Re: users with no logins
From: Brian Nall (not@innewsgroups.com)
Date: 05/30/02
- Next message: Sue Hoegemeier: "Re: New to SQL server"
- Previous message: Dan Guzman: "Re: users with no logins"
- In reply to: Dan Guzman: "Re: users with no logins"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: "Brian Nall" <not@innewsgroups.com> Date: Thu, 30 May 2002 08:28:33 -0500
Worked great... thanks for the help
-- This posting is provided "AS IS" with no warranties, and confers no rights. "Dan Guzman" <danguzman@nospam-earthlink.net> wrote in message news:ue4tus9BCHA.1732@tkmsftngp02... > User login mapping can get out-of-sync following a restore. You can > correct the dbo user with sp_changedbowner. In some cases you may get > an error stating 'the proposed owner is already a user in the database' > and the script below will work around that problem. > > USE MyDatabase > EXEC sp_addlogin 'TempLogin' > EXEC sp_changedbowner 'TempLogin' > EXEC sp_changedbowner 'sa' > EXEC sp_droplogin 'TempLogin' > > For non-dbo users, use sp_change_users_login. See the Books Online for > details. > > > Hope this helps. > > > Dan Guzman > SQL Server MVP > > ----------------------- > SQL FAQ links (courtesy Neil Pike): > > http://www.ntfaq.com/Articles/Index.cfm?DepartmentID=800 > http://www.sqlserverfaq.com > http://www.mssqlserver.com/faq > ----------------------- > > "Brian Nall" <not@innewsgroups.com> wrote in message > news:#6oVoSyBCHA.1588@tkmsftngp02... > > Is there a reason for database user names to not show a login name > when you > > view the users in a database? I have noticed that in just about all > of my > > databases, the dbo user name shows "sa" as the login. But I have > found that > > one of my databases that show the dbo user name with no login > associated > > with it. > > > > Any ideas, > > > > Thanks in advance for any help. > > > > Brian Nall > > > > > > > >
- Next message: Sue Hoegemeier: "Re: New to SQL server"
- Previous message: Dan Guzman: "Re: users with no logins"
- In reply to: Dan Guzman: "Re: users with no logins"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|