Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

moving DB, unable to access the moved db.

Status
Not open for further replies.

ASmee

IS-IT--Management
Jul 9, 2002
46
US
I have a DB where all of the tables are owned by a user. I need to move this db from the current server, onto a new one. The server SQL server 7 (both of them). I create the DB on the new server, backup the DB on the old server, restore on the new server, create the user and I can't connect to the db. Why is this? I can't view any tables with any other account for this db on the new server.
 
sounds like you have got orphaned users (where the SID on the login no longer matches the SID on the new server due to being moved)

run this on your db which should tell you which users have a problem

sp_change_users_login 'report'

then this should fix them

use yourdbname
sp_change_users_login 'Update_One', 'userhere', 'loginhere'

uesr and login are probably the same

check faq183-2153 as well

Matt

Brighton, UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top