SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 login permission after restore
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

arkiboys
Flowing Fount of Yak Knowledge

1406 Posts

Posted - 04/02/2009 :  07:25:33  Show Profile  Reply with Quote
I have restored a database.
There is a system stored procedure which should be run to restore these logins with proper permissions.
I think it is sp_fix... or sp_repair... which requires the user account to be passed to it.
Do you know the name of the stored procedure and the proper parameters please?
Thanks

darkdusky
Aged Yak Warrior

591 Posts

Posted - 04/02/2009 :  09:49:59  Show Profile  Reply with Quote
Resolve Orphaned Users

Use TestDB
--to fix individual logins
sp_change_users_login 'update_one', 'test', 'test'
--to automatically fix logins with same name
sp_change_users_login 'Auto_Fix'
--report logins not listed in masterdatabase
sp_change_users_login 'Report'
Go to Top of Page

darkdusky
Aged Yak Warrior

591 Posts

Posted - 04/02/2009 :  09:53:04  Show Profile  Reply with Quote
If you have restored to a new server you may need to copy login passwords across. Search google for: sp_help_revlogin
Go to Top of Page

arkiboys
Flowing Fount of Yak Knowledge

1406 Posts

Posted - 04/03/2009 :  02:44:35  Show Profile  Reply with Quote
quote:
Originally posted by darkdusky

Resolve Orphaned Users

Use TestDB
--to fix individual logins
sp_change_users_login 'update_one', 'test', 'test'
--to automatically fix logins with same name
sp_change_users_login 'Auto_Fix'
--report logins not listed in masterdatabase
sp_change_users_login 'Report'



Thank you
Go to Top of Page

darkdusky
Aged Yak Warrior

591 Posts

Posted - 04/03/2009 :  04:42:14  Show Profile  Reply with Quote
welcome
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000