Thursday 15 August 2013

Export DHCP from one server to another

I tried to move DHCP services from Windows 2003 to Windows 2008 by doing a backup on Windows 2003 and a restore on Windows 2008.

This, however, does not work and seems to break the DHCP server install on Windows 2008.  Uninstalling the DHCP server role and reinstalling it does not seem to work and I had errors like "The syste, cannot find the file specified" when I tried to look at the bindings.

To recover from this I did the following:

1.  Uninstall the DHCP Server role.
2.  REBOOT.
3.  Delete the contents of the C:\Windows\System32\DHCP directory. (will need to change folder permissions)
4.  Reinstall the DHCP Server role.

This put the DHCP server back in working order.  I then proceeded to do it the correct way:

On the Windows 2003 DHCP server, open up a command prompt and type:

netsh DHCP server a.b.c.d export C:\2k3DHCPDB all

Where a.b.c.d is the IP address of the Windows 2003 DHCP server.

Now copy the 2k3DHCPDB file to the Windows 2008 DHCP Server and stop the Windows 2003 DHCP server.

On the Windows 2008 DHCP server, do the following:

1.  Install the DHCP Server role.
2.  Stop the DHCP Server service.
3.  Delete the file C:\Windows\System32\dhcp\DHCP.mdb
4.  Start the DHCP Server service.
5.  Run a command prompt as Administrator.
6.  Type "netsh DHCP server e.f.g.h import C:\2k3DHCPDB"
7.  Stop the DHCP Server service.
8.  Start the DHCP Server service.

Where e.f.g.h is the IP address of the Windows 2008 DHCP server.  Now I had a functional DHCP server in 2008...

Tuesday 6 August 2013

How to set Sql server to SQL_Latin1_General_CP1_CI_AS Collation

When running the SQL setup choose custom and then "Dictionary order, case-insensitive, for use with 1252 character set"