Home > Archive > MS SQL Server > August 2005 > Database Detach - orphan users









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Database Detach - orphan users
Ben

2005-08-23, 8:23 pm

I've used the sp_'s from this article:
HOW TO: Transfer Logins and Passwords Between Instances of SQL Server
http://support.microsoft.com/defaul...scid=kb;[LN];Q246133
And still got orphaned users.

Here's what I did:

1. Script users on master server with sp_'s in KB article.
2. Detach
3. FTP
4. Attach
5. Load users from sp_'s output

user databases still had no link to sql server logins
(not using windows auth by the way, only sql server logins)

I had to use sp_change_users_logi
n but I should not have had to.
What went wrong ?



Tibor Karaszi

2005-08-24, 3:23 am

Possibly logins already existed with the same name on the destination database. Did you get any
errors from step 5? That would explain it.

--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www. solidqualitylearning
.com/

Blog: http:// solidqualitylearning
.com/blogs/tibor/



"Ben" <null@void.com> wrote in message news:%23yKtezCqFHA.3424@TK2MSFTNGP14.phx.gbl...
> I've used the sp_'s from this article:
> HOW TO: Transfer Logins and Passwords Between Instances of SQL Server
> http://support.microsoft.com/defaul...scid=kb;[LN];Q246133
> And still got orphaned users.
>
> Here's what I did:
>
> 1. Script users on master server with sp_'s in KB article.
> 2. Detach
> 3. FTP
> 4. Attach
> 5. Load users from sp_'s output
>
> user databases still had no link to sql server logins
> (not using windows auth by the way, only sql server logins)
>
> I had to use sp_change_users_logi
n but I should not have had to.
> What went wrong ?
>
>
>


Ben

2005-08-24, 8:23 pm

There were no errors and the users did not exist.
The second server was a fresh install



"Tibor Karaszi" <tibor_please.no. email_karaszi@hotmai
l.nomail.com> wrote in
message news:unZSCBIqFHA.544@TK2MSFTNGP11.phx.gbl...
> Possibly logins already existed with the same name on the destination

database. Did you get any
> errors from step 5? That would explain it.
>
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www. solidqualitylearning
.com/

> Blog: http:// solidqualitylearning
.com/blogs/tibor/

>
>
> "Ben" <null@void.com> wrote in message

news:%23yKtezCqFHA.3424@TK2MSFTNGP14.phx.gbl...
>



Tibor Karaszi

2005-08-24, 8:23 pm

Then I have no ideas I'm afraid. It should not happen. I guess you could compare the file produced
by sp_help_revlogins with the logins on the originating system and with sysusers on both originating
server as well as the restored database. That should give you the whole picture.

--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www. solidqualitylearning
.com/

Blog: http:// solidqualitylearning
.com/blogs/tibor/



"Ben" <null@void.com> wrote in message news:%23qdaZrNqFHA.364@TK2MSFTNGP11.phx.gbl...
> There were no errors and the users did not exist.
> The second server was a fresh install
>
>
>
> "Tibor Karaszi" <tibor_please.no. email_karaszi@hotmai
l.nomail.com> wrote in
> message news:unZSCBIqFHA.544@TK2MSFTNGP11.phx.gbl...
> database. Did you get any
> news:%23yKtezCqFHA.3424@TK2MSFTNGP14.phx.gbl...
>
>


Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com