To be able to help our departments here I have cloned a piece of equipment which was on its last legs and it is really hosting some important data. The program would be to migrate to some VMware VM as quickly as possible, but meanwhile I cloned the equipment onto another PC for testing amongst other things.

I have re-named the initial machine's hostname, therefore the new machine is running ASP.Internet and SQL Server 2005 (Express) and also the database-driven website (Intranet-only) has become back ready to go but we are getting a mistake 4200 with ODBC in regards to a login unsuccessful.

On checking the big event viewer there is the following message:

Error in Event viewer application log

Nevertheless it appears that SQL server still sees the neighborhood accounts to be within older hostname (see below:)

old hostname held by SQL server

Basically consider adding the consumer "CURRENTHOSTNAMEASPNET" towards the database under consideration it only sees that old hostname. Is what's leading to my problem ? I am unsure.

I know that to obtain IIS working to begin with I needed to do "aspnet_reg.exe -ga CURRENTHOSTNAMEASPNET" which fixed my first problem but this second you have me stumped.

The 3rd party company supplying the program are now being very slow to assist about this. It's my job to do PHP &lifier MySQL so I have virtually no understanding of Microsoft SQL. If anyone can assist me to you'd be saving my sausage because this is dragging on a few days now.

Thanks ahead of time!

Renaming a piece of equipment having a SQL server instance on it may be tricky. My prediction is you obtain the old machine title advertising media are this question:

SELECT @@SERVERNAME

Should you choose, that old computer title continues to be saved within the sys.servers table. You may have the ability to simply follow Microsoft's instructions at renaming, that is just running a few saved methods:

sp_dropserver 'old_host_name'
GO
sp_addserver 'new_host_name', local
GO

By cloning a piece of equipment you are opening a large can of earthworms. My suggestion is always to backup data only and restore it to new computer with fresh installs of all things. However in your situation, you will find a couple of things that I'd try:

  • after cloning you have to totally reset SID - take a look link
  • sql recognises customers by their id/guid, so remove all customers from sql server/database and add them on your own

Okay it appears to become fixed now - I re-added the NEWHOSTNAMEASPNET to SecurityLogins under "Microsoft SQL Server Management Studio Express" after which it made an appearance under DatabasesMyDatabaseSecurityUsers" or I could add it anyway (can't remember which) - unsure if renaming the server that turns up under SELECT @@SERVERNAME is important, but this error is bound now anyway