2.17.2006

Command to remove all CRLFs from a file

Use the following command to remove CRLF (all) carriage returns and line feeds from a text file, effectively joining all lines into one single line.

Using the tr command in cygwin:
tr -d '\r\n' < sql.txt > sqlnew.txt

If you want to use the tr command outside of the Cygwin environment, the following files must be copied from \cygwin\bin to the directory you want to store them in:
tr.exe
cygwin1.dll
cygintl-3.dll
cygiconv-2.dll

2.15.2006

Terminal Services licensing database corrupt/damaged

Trying to deactivate License Server (terminal services) via the "internet" method, I get the following error after hitting 'next' in the dialog:
"The Licensing wizard encountered an internal error from the license server.  Message Number: 0xc0110011"

System eventlog:
Event Type:     Error
Event Source:   TermServLicensing
Event Category: None
Event ID:       38
Date:           2/15/2006
Time:           2:48:25 PM
User:           N/A
Computer:       MyComputerName
Description:
Can't generate a license for client because of error 'Can't add certificate to store, error c0010020.'.



You cannot activate a Terminal Services license server in Windows 2000 Server or in Windows Server 2003 -
http://support.microsoft.com/kb/887444

Windows Server 2003 Terminal Server Licensing - http://www.microsoft.com/windowsserver2003/techinfo/overview/termservlic.mspx
Frequently Asked Questions About Terminal Services 2003 - http://www.microsoft.com/windowsserver2003/community/centers/terminal/terminal_faq.mspx

call (888) 571-2048 to reach the Microsoft Clearinghouse.

File access via VPN very very slow

Ran into this one recently:  WinXP Pro client,  checkpoint VPN, 2 mapped drives to different members of a windows 2000 cluster.  One of the mapped drives was noticeably slower than the other.  I moved the cluster resource group to the other cluster member, it still was slow.  When I had the root of the mapped drive displaying in explorer, I noticed that it had a file handle open on desktop.ini in one particular sub-folder (caught this by using the 'shared folders' snap-in (fsmgmt.msc or compmgmt.msc).  When I deleted the desktop.ini file, the mapped drive was much, much faster.  I restored the desktop.ini file and it slowed down again.  I then looked at the folder properties and it was marked with the read only (R) attribute (on the directory only, not the files).  I turned the R attribute mask off the directory and the mapped drive was fast.  Turned the read-only attribute on again, the it was slow.
 
It's weird that this combination of read-only attribute on the folder and the desktop.ini in that folder would cause a significant file access slow down.  I didn't notice any speed different when connected at LAN speeds, but via the check point VPN there was a definite difference.
 
Here's the contents of the desktop.ini file:
[{5984FFE0-28D4-11CF-AE66-08002B2E1262}]
PersistMoniker=file://Folder Settings\Folder.htt
PersistMonikerPreview=%WebDir%\folder.bmp
[ExtShellFolderViews]
{5984FFE0-28D4-11CF-AE66-08002B2E1262}={5984FFE0-28D4-11CF-AE66-08002B2E1262}
[.ShellClassInfo]
ConfirmFileOp=0