SQL Server connection validation

I run into a problem where I tried to connect to a fresh installation of SQL Server 2008 and could not do it for no apparent reason. But it turns out that SQL Server 2008 is shipped with TSP/IP disabled and nobody can connect to it via network, even from localhost.
Here is the solution:
http://support.microsoft.com/kb/823938

You can check in registry this key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\\MSSQLServer\SuperSocketNetLib\Tcp\Enabled
It must be set to 1 for SQL Server to be listening for network connection.

Run this on master database to see error log on the server:
exec Go Xp_readerrorlog
You should look for
SQL server listening on X.X.X.X: Y
This will be an indicator if network connections are allowed in the Server

How to replace system files in WinXp

Sometimes you need to replace damaged system files with correct ones. I’m talking about files in C:\windows\system32\…

There are 2 ways of doing this:

Use sfc command: insert distribution disk with correct version of Windows, execute sfc /purgecache to clean out the cache of drivers/files. Then execute sfc /scannow. This will check all the system files and replace damaged.

Another way is to replace files one by one. Again, insert your distribution disk, then run command:

expand D:\i386\ndis.sy_ C:\windows\system32\drivers\ndis.sys

This unpacks compressed files from the CD archive.

How to determine what type of WinXP installation disk you have

Open the I386 folder on your XP CD and find a file called SETUPP.INI. That file will contain a line starting PID=
The numbers following the ‘=’ indicate which version of XP is on the disc.

Here’s a list of all the various types of disc along with the volume name, date and PID numbers:
Windows XP Home Retail = WXHFPP_EN 08/23/01 8:00 AM (08:00:00) 55277000
Windows XP Home Retail w/ SP1 = XRMHFPP_EN 08/29/02 8:00 AM (08:00:00) 55277000
Windows XP Home Retail w/ SP1a = X1AHFPP_EN 03/31/03 8:00 AM (08:00:00) 55277000
Windows XP Home Retail w/ SP2 = VRMHFPP_EN 08/04/04 8:00 AM (08:00:00) 55277000
Windows XP Home Upgrade = WXHCCP_EN 08/23/01 8:00 AM (08:00:00) 55285000
Windows XP Home Upgrade W/SP1 = XRMHCCP_EN 08/29/02 8:00 AM (08:00:00) 55285000
Windows XP Home Upgrade W/SP1a = X1AHCCP_EN 03/31/03 8:00 AM (08:00:00) 55285000
Windows XP Home Upgrade W/SP2 = VRMHCCP_EN 08/04/04 8:00 AM (08:00:00) 55285000
Windows XP Home OEM = WXHOEM_EN 08/23/01 8:00 AM (08:00:00) 55277OEM
Windows XP Home OEM w/ SP1 = XRMHOEM_EN 08/29/02 8:00 AM (08:00:00) 55277OEM
Windows XP Home OEM w/ SP1a = X1AHOEM_EN 03/31/03 8:00 AM (08:00:00) 55277OEM
Windows XP Home OEM w/ SP2 = VRMHOEM_EN 08/04/04 8:00 AM (08:00:00) 55277OEM
Windows XP Home Volume = WXHVOL_EN 08/23/01 8:00 AM (08:00:00) 55274270
Windows XP Home Volume W/ SP1 = XRMHVOL_EN 08/29/02 8:00 AM (08:00:00) 55274270
Windows XP Home Volume W/ SP1a = X1AHVOL_EN 03/31/03 8:00 AM (08:00:00) 55274270
Windows XP Home Volume W/ SP2 = VRMHVOL_EN 08/04/04 8:00 AM (08:00:00) 55274270

Windows XP Pro Retail = WXPFPP_EN 08/23/01 8:00 AM (08:00:00) 55274000
Windows XP Pro Retail w/ SP1 = XRMPFPP_EN 08/29/02 8:00 AM (08:00:00) 55274000
Windows XP Pro Retail w/ SP1a = X1APFPP_EN 03/31/03 8:00 AM (08:00:00) 55274000
Windows XP Pro Retail w/ SP2 = VRMPFPP_EN 08/04/04 8:00 AM (08:00:00) 55274000
Windows XP Pro Upgrade = WXPCCP_EN 08/23/01 8:00 AM (08:00:00) 55276000
Windows XP Pro Upgrade w/ SP1 = XRMPCCP_EN 08/29/02 8:00 AM (08:00:00) 55276000
Windows XP Pro Upgrade w/ SP1a = X1APCCP_EN 03/31/03 8:00 AM (08:00:00) 55276000
Windows XP Pro Upgrade w/ SP2 = VRMPCCP_EN 08/04/04 8:00 AM (08:00:00) 55276000
Windows XP Pro OEM = WXPOEM_EN 08/23/01 8:00 AM (08:00:00) 55274OEM
Windows XP Pro OEM w/ SP1 = XRMPOEM_EN 08/29/02 8:00 AM (08:00:00) 55274OEM
Windows XP Pro OEM w/ SP1a = X1APOEM_EN 03/31/03 8:00 AM (08:00:00) 55274OEM
Windows XP Pro OEM w/ SP2 = VRMPOEM_EN 08/04/04 8:00 AM (08:00:00) 55274OEM
Windows XP Pro Volume = WXPVOL_EN 08/23/01 8:00 AM (08:00:00) 55274270
Windows XP Pro Volume w/ SP1 = XRMPVOL_EN 08/29/02 8:00 AM (08:00:00) 55274270
Windows XP Pro Volume w/ SP1a = X1APVOL_EN 03/31/03 8:00 AM (08:00:00) 55274270
Windows XP Pro Volume w/ SP2 = VRMPVOL_EN 08/04/04 8:00 AM (08:00:00) 55274270
Windows XP Pro Tablet PC w/SP1 Disc1 = XRMPFPP_EN 08/29/02 8:00 AM (08:00:00) 55274000
Windows XP Pro Tablet PC w/SP1a Disc1 = X1APFPP_EN 03/31/03 8:00 AM (08:00:00) 55274000
Windows XP Pro Tablet PC w/SP2 Disc1 = VRMPFPP_EN 08/04/04 8:00 AM (08:00:00) 55274000
Windows XP Pro MSDN = WXPFPP_EN 08/23/01 8:00 AM (08:00:00) 55274000
Windows XP Pro MSDN w/ SP1 = XRMPFPP_EN 08/29/02 8:00 AM (08:00:00) 55274000
Windows XP Pro MSDN w/ SP1a = X1APFPP_EN 03/31/03 8:00 AM (08:00:00) 55274000
Windows XP Pro MSDN w/ SP2 = VRMPFPP_EN 08/04/04 8:00 AM (08:00:00) 55274000
Windows XP Pro Evaluation = WXPEVL_EN

How to change a product key on Windows XP

Microsoft kb328874

Note We recommend that you run System Restore to create a new restore point before you follow these steps.

Deactivate Windows

  1. Click Start, and then click Run.
  2. In the Open box, type regedit, and then click OK.
  3. In the navigation pane, locate and then click the following registry key:
    HKEY_LOCAL_MACHINE\Software\Microsoft\WindowsNT\Current Version\WPAEvents
  4. In the topic pane, right-click OOBETimer, and then click Modify.
  5. Change at least one digit of this value to deactivate Windows.
Reactivate Windows and add new product key

  1. Click Start, and then click Run.
  2. In the Open box, type the following command, and then click OK.
    %systemroot%\system32\oobe\msoobe.exe /a
  3. Click Yes, I want to telephone a customer service representative to activate Windows, and then click Next.
  4. Click Change Product key.
  5. Type the new product key in the New key boxes, and then click Update.

    If you are returned to the previous window, click Remind me later, and then restart the computer.

  6. Repeat steps 1 and 2 to verify that Windows is activated. You receive the following message:
    Windows is already activated. Click OK to exit.
  7. Click OK.

DRIVER VERIFIER – Windows 7 & Vista

1. Create a Windows System Restore Point –
Vista –> START | type rstrui – create a restore point

Windows 7 –> START | type create | select “Create a Rstore Point”

2. Run the Driver Verifier –

Code:
DRIVER VERIFIER

START | type verifier | make these selections - 

1. Select 2nd option - "Create custom settings (for code developers)"
2. Select 2nd option - "Select individual settings from a full list"
3. Check these boxes -
• Special Pool • Pool Tracking • Force IRQL checking • Deadlock Detection • Security Checks (Windows 7) • Miscellaneous Checks
4. Select last option - "Select driver names from a list" 5. Click on the Provider heading - sorts list by Provider 6. Check ALL boxes where "Microsoft" IS NOT the Provider 7. Click on Finish 8. Re-boot

*** IMPORTANT – PLEASE READ:

– If the Driver Verifier (DV) finds a violation, it will result in a BSOD
– After re-start, you may not be able to log on to normal Windows
… • Boot into SAFEMODE – tap the F8 key repeatedly during boot-up
… • Select “System Restore”
… • Choose the restore point that you created in step #1

– For Driver Verifier status – type verifier /query (in a cmd/DOS screen)
– To turn Driver Verifier off – verifier /reset then re-boot

– The Driver Verifier needs to run as long as possible – even if the status screen appears clear.
– All future BSOD dumps must be VERIFIER_ENABLED_MINIDUMPs – otherwise the dump(s) are of no use


Switch Off Active Desktop in WinXP

  1. From the Windows Start menu, select Run. In the Run box, type regedit and click OK.
  2. In the Registry Editor, locate the following key:
    HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\
    CurrentVersion\Policies\Explorer
  3. Create a new DWORD Value with the name ClassicShell, and assign a value of 1 to it.
  4. Close the Registry Editor.
  5. Reboot