SQL Server 2005
MSDTC and cloning

Be very, very careful cloning a machine that's got MSDTC running... as this handy (and surprisingly useful) Event Log message indicates:

The local MS DTC detected that the MS DTC on DB has the same unique identity as the local MS DTC. This means that the two MS DTC will not be able to communicate with each other. This problem typically occurs if one of the systems were cloned using unsupported cloning tools. MS DTC requires that the systems be cloned using supported cloning tools such as SYSPREP. Running 'msdtc -uninstall' and then 'msdtc -install' from the command prompt will fix the problem. Note: Running 'msdtc -uninstall' will result in the system losing all MS DTC configuration information.

 

Add Comment Filed Under [ SQL Server 2005 ]
SQL Server 2005 Mirroring and Users

Setting up a SQL Server 2005 mirrored environment outside of a Domain where the client connects using Windows Authentication? We had oddles of fun with this on MiVoice Vote, as the Principal and Mirror servers have no idea about each others users so you need to do a bit of jiggery pokery to get your code to connect to each one succesfully.

Setup your mirroring environment as normal, creating a SQL Login / Database user as normal on the Principal tied to the Windows User the client will connect as. Then fail the mirror over so that the roles are swapped (Principal becomes Mirror and vice versa). Now create another SQL Login / Database user (with a different username) on the new Principal (was the Mirror) tied to the Windows User (you have created the Windows User accounts on the two machines with the same username/password, haven't you?) on that machine.

Fail back and everything should be good to go. The diagram below shows how it ended up on MiVoice Vote:

You'll need to make sure that the two database users have the same access rights as each other.

One Comment Filed Under [ SQL Server 2005 ]
SQL Server 2005 Broker

If you're restoring a SQL Server 2005 DB backup that uses a broker you'll need to create a new broker for the DB after the restore operation's complete. The command's as follows:

ALTER DATABASE [dbname here] SET NEW_BROKER

Add Comment Filed Under [ SQL Server 2005 ]