Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 SQL 2005 restore to a different computor

Author  Topic 

hlbyrdman
Starting Member

1 Post

Posted - 2009-10-17 : 11:38:08
I upgraded to sql 2005 from sql 2000 last year. Today my server developed a memory/battery problem and won't boot. Thats OK I have a backup. but I need to move it to my standby computor. no problem ..
With 2000 after restoring the backup my web users could not log in I solved that by deleting the web user and creating a new one (same name and password)but from the new machine. SQL 2005 won't let me delete the user because the user owns a schema. how do I associate the user with the new machine.. web site fails to launch because the user login fails.

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2009-10-17 : 22:29:49
make another use the owner of the schema. recreate login/user. make user schema owner again
Go to Top of Page

jeffw8713
Aged Yak Warrior

819 Posts

Posted - 2009-10-18 : 13:03:09
Use newdatabase; -- replace newdatabase with your database
Execute sp_change_users_login 'Report'; -- identify orphaned users in that database

After executing the above, you can then use one of the other options to fix the orphaned user. Basically, the reason you are having a problem is because you have a user in the database, but the new server does not have that login. The login needs to be created and the user associated with that login.

Lookup the procedure in Books Online for the other options - which will create the login for you.
Go to Top of Page
   

- Advertisement -