Restored DB on new box, and user accounts

  • We have a database with 100+ tables with dbo "LogIT". "LogIT" is also the owner of all objects in the DB.

    I restored this database on a new server and the  "LogIT"  account from the original server is displayed as the owner of all tables on the restored DB. But, of course, that "LogIT" account doesn't yet exist on the new server. Now if I try to create that account on the new server and make it dbo of the restored DB, I'd get a "User login already exists".

    How would you deal with this?

     

  • Try detaching the database, dropping the login, adding the login again making sure that the sid matches the sid on the original server. Then attach the database, you should have all the access and everything should be golden.



    Shamless self promotion - read my blog http://sirsql.net

  • an alternative is to run sp_change_users_login (can look it up in BOL) and this should fix it too...



    Good Hunting!

    AJ Ahrens


    webmaster@kritter.net

  • Microsoft has a procedure described here that I've used for this before when moving databases that works well:  http://support.microsoft.com/default.aspx?scid=kb;en-us;298897&Product=sql

    Hope this helps.

     

    My hovercraft is full of eels.

  • Thanks to everyone for your great replies!

     

     

    Bill

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply