Tuesday, 1 April 2008

Need to transfer logins from one SQL 2005 instance to another SQL 2005 instance? Here's how!

In SQL 2000 there was a DTS package that could do this. I didn't like DTS and never used it, but it is out there. I used the Microsoft-provided sp_help_revlogin stored procedure instead to do this in 2000, but when I looked at the code I realized it would need an update for 2005.
In 2005 the sys.syslogins view exits, but you really shouldn't use it- you should use sys.server_principals (see books online). So, when I looked at that system view I realized this was really going to take some work... so naturally I Googled! ;)

Anyways, I found out that good-ol' MS had already updated the TSQL that generates sp_help_revlogin (and it's required binary stored proc) and posted it online in KB 918992. I copied the code and it worked just like it always had except that I was able to transfer the logins with SIDs and passwords from one 2005 instance to another instead of a 2000 to 2005 or 2000 to 2000 instance. :)

http://support.microsoft.com/kb/918992

Thursday, 20 March 2008

Disappearing Symantec Anti Virus Tray Icon (VPTray)

Maybe you want that stupid yellow shield (I think that's what it is... looks like an old mouse to me!) gone, and maybe you don't.

If you want it back and you can't seem to figure out how to get it back check out the directions here:
Symantec Support


Or just go ahead and try this:
To enable the system tray icon on unmanaged clients
  1. Exit all open programs.
  2. Click Start> Run. The Run dialog box appears.
  3. Type regedit
  4. Click OK. The Registry Editor appears.
  1. Go to the following key:

    HKEY_LOCAL_MACHINE\Software\Intel\Landesk\VirusProtect6\CurrentVersion\AdministratorOnly\General

  2. In the right pane, double-click the following value:

    ShowVPIcon

  3. Change the value to 1.
  4. Close the Registry Editor.
  5. Restart the computer.
To add the registry value to the Run key
  1. Exit all open programs.
  2. Click Start> Run. The Run dialog box appears.
  3. Type regedit
  4. Click OK. The Registry Editor appears.
  5. Navigate to the following key:

    HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run

  6. Click Edit> New> String Value.
  7. Name the value "Vptray" and press Enter.
  8. Double-click Vptray.
  9. Type the path to Vptray.exe, enclosing it in quotation marks, and press Enter.

    Windows 98/Me/NT/2000/XP:

    "C:\Program Files\Symantec_Client_Security\Symantec AntiVirus\Vptray.exe"
    or
    "C:\Program Files\Navnt\Vptray.exe"

  10. Close the Registry Editor.
  11. Restart the computer.

Saturday, 16 February 2008

Firefox: Goodbye 3rd Party Cookies!

I love and hate cookies. I love the fact that I can go to certain
"safe" sites and they'll remember certain settings. Google, PageFlakes, Blogger, etc. would be good examples of this.
Then there's the other guys... I don't want everyone and their mother knowing what I browse, or when. To increase my privacy I like to disable 3rd Party cookies, but the DEVs removed the simple click-box to do this in later version of Firefox.
Here's how to add it back:

1. Type in about:config in the address bar and hit enter
2. Edit the value for network.cookie.cookieBehavior and set it to 1.
1 = Accept cookies from this site only, 0 = accept all cookies, 2 = accept no cookies, 3 = use P3P policy

...I also modified the network.cookie.lifetime.days value so that the cookies expire much sooner.
Check out this MozillaZine page for more great info.

Thursday, 14 February 2008

IIS 6 ASP.NET Website Permissions Error

If you're ever trying to get a website to load properly in IIS 6.0 and you keep seeing this:
"Server Application Unavailable
The web application you are attempting to access on this web server is currently unavailable. Please hit the "Refresh" button in your web browser to retry your request.
Administrator Note: An error message detailing the cause of this specific request failure can be found in the application event log of the web server. Please review this log entry to discover what caused this error to occur. "


In your browser, followed by an event in the application log that starts with this:
"Failed to initialize the AppDomain:/LM/W3SVC/1/Root"

And you're using the Network Service account to run your worker process here's some steps that should get you up and running...
1. Ensure that you've granted the Network Service the "Local Launch" and "Local Activation"permissions. (Component Services -> Computers -> My Computer -> DCOM Config -> IIS Admin Service -Right-Click-> Properties -> Select the Security tab, and set the permissions)

2. Locate the file system directory that you've mapped to the IIS virtual directory and edit the permissions to grant at least Read & Execute, List Folder Contents, and Read to the IIS_WPG account.

Make sure the worker process is running and then try again. With any luck your application will display in the browser properly!

Cheers!