I have restored a database. Now I am trying to reset permissions on some accounts and this is the error I get. Even when I delete and re-establish acct, I get same thing. Can anyone help
ThanksSeems you want to read about sp_change_users_logins in Books Online. For a GUI on top of the
command, see:
http://www.dbmaint.com/SyncSqlLogins.asp
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"mmitchmcp" <mmitchmcp@.netscape.net> wrote in message
news:1E90A19D-BBB7-4B4A-A7FB-BCFE344A323D@.microsoft.com...
> I have restored a database. Now I am trying to reset permissions on some accounts and this is the
error I get. Even when I delete and re-establish acct, I get same thing. Can anyone help?
> Thanks|||I tried this application and it works great! Thank you
Showing posts with label exists. Show all posts
Showing posts with label exists. Show all posts
Wednesday, February 15, 2012
Error 21002 [SQL-DMO) User 'account' already exists
I restored a database and tried setting permissions on my accounts and recieved the following error:
Error 21002 [SQL-DMO] User acct already exists.
Whats this?
Can anyone help?
Thanks
MMSeems you want to read about sp_change_users_logins in Books Online. For a GUI on top of the
command, see:
http://www.dbmaint.com/SyncSqlLogins.asp
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"MM" <anonymous@.discussions.microsoft.com> wrote in message
news:832FD572-1F3A-4A2D-B027-A7B04BFE19EB@.microsoft.com...
> I restored a database and tried setting permissions on my accounts and recieved the following
error:
> Error 21002 [SQL-DMO] User acct already exists.
> Whats this?
> Can anyone help?
> Thanks
> MM|||Your sids do not match more than likely. When you create a
login(sysxlogins) a sid is made and when you add that login to a database as
a user the sid is copied(sysusers). The sid is unique and different on each
server, even for the same login name. You will not see the users in the
GUI(remember GUI is evil and dumb), however if you query the sysusers of
that database you will see those names. Drop all users using T-SQL and add
them back. Good luck.
"MM" <anonymous@.discussions.microsoft.com> wrote in message
news:832FD572-1F3A-4A2D-B027-A7B04BFE19EB@.microsoft.com...
> I restored a database and tried setting permissions on my accounts and
recieved the following error:
> Error 21002 [SQL-DMO] User acct already exists.
> Whats this?
> Can anyone help?
> Thanks
> MM|||"Kevin Brooks" <jeepnreb@.yahoo.com> wrote in message
news:eNzqsFMxDHA.2328@.TK2MSFTNGP10.phx.gbl...
> Your sids do not match more than likely. When you create a
> login(sysxlogins) a sid is made and when you add that login to a database
as
> a user the sid is copied(sysusers). The sid is unique and different on
each
> server, even for the same login name. You will not see the users in the
> GUI(remember GUI is evil and dumb), however if you query the sysusers of
> that database you will see those names. Drop all users using T-SQL and
add
> them back. Good luck.
> "MM" <anonymous@.discussions.microsoft.com> wrote in message
> news:832FD572-1F3A-4A2D-B027-A7B04BFE19EB@.microsoft.com...
> > I restored a database and tried setting permissions on my accounts and
> recieved the following error:
> >
> > Error 21002 [SQL-DMO] User acct already exists.
> >
> > Whats this?
> >
> > Can anyone help?
> >
> > Thanks
> >
> > MM
>
Error 21002 [SQL-DMO] User acct already exists.
Whats this?
Can anyone help?
Thanks
MMSeems you want to read about sp_change_users_logins in Books Online. For a GUI on top of the
command, see:
http://www.dbmaint.com/SyncSqlLogins.asp
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"MM" <anonymous@.discussions.microsoft.com> wrote in message
news:832FD572-1F3A-4A2D-B027-A7B04BFE19EB@.microsoft.com...
> I restored a database and tried setting permissions on my accounts and recieved the following
error:
> Error 21002 [SQL-DMO] User acct already exists.
> Whats this?
> Can anyone help?
> Thanks
> MM|||Your sids do not match more than likely. When you create a
login(sysxlogins) a sid is made and when you add that login to a database as
a user the sid is copied(sysusers). The sid is unique and different on each
server, even for the same login name. You will not see the users in the
GUI(remember GUI is evil and dumb), however if you query the sysusers of
that database you will see those names. Drop all users using T-SQL and add
them back. Good luck.
"MM" <anonymous@.discussions.microsoft.com> wrote in message
news:832FD572-1F3A-4A2D-B027-A7B04BFE19EB@.microsoft.com...
> I restored a database and tried setting permissions on my accounts and
recieved the following error:
> Error 21002 [SQL-DMO] User acct already exists.
> Whats this?
> Can anyone help?
> Thanks
> MM|||"Kevin Brooks" <jeepnreb@.yahoo.com> wrote in message
news:eNzqsFMxDHA.2328@.TK2MSFTNGP10.phx.gbl...
> Your sids do not match more than likely. When you create a
> login(sysxlogins) a sid is made and when you add that login to a database
as
> a user the sid is copied(sysusers). The sid is unique and different on
each
> server, even for the same login name. You will not see the users in the
> GUI(remember GUI is evil and dumb), however if you query the sysusers of
> that database you will see those names. Drop all users using T-SQL and
add
> them back. Good luck.
> "MM" <anonymous@.discussions.microsoft.com> wrote in message
> news:832FD572-1F3A-4A2D-B027-A7B04BFE19EB@.microsoft.com...
> > I restored a database and tried setting permissions on my accounts and
> recieved the following error:
> >
> > Error 21002 [SQL-DMO] User acct already exists.
> >
> > Whats this?
> >
> > Can anyone help?
> >
> > Thanks
> >
> > MM
>
Error 21002 : User already exists
Running SQL Server 2000 Enterprise SP3a ( Windows Server 2003 )
I restored several databases from one instance ( on another box ) to another
. Now I am trying to add the users
to the second box ( to duplicate those on the first ) where I restored the d
ata and I am getting this error when
trying to add the database permissions for the user.
I tried working with sp_change_users, but the report shows nothing ( no rows
returned ) .
I tried deleting user using sp_droplogin, it dropped the user, but same thin
g happened again
once I readded him. I also tried the sp_change_users_login ( autofix) to no
avail ( nothing happened )
Any help would be appreciated.
ThanksRun select * from sysusers in the database that you are trying to add the
user. If the user does exist then run the sp_granddbaccess procedure to
grant access to the user. You may then need to run sp_change_users_login
again after verifying that the login exists for this user.
Rand
This posting is provided "as is" with no warranties and confers no rights.|||That response should hav been sp_grantdbaccess.
Rand
This posting is provided "as is" with no warranties and confers no rights.
I restored several databases from one instance ( on another box ) to another
. Now I am trying to add the users
to the second box ( to duplicate those on the first ) where I restored the d
ata and I am getting this error when
trying to add the database permissions for the user.
I tried working with sp_change_users, but the report shows nothing ( no rows
returned ) .
I tried deleting user using sp_droplogin, it dropped the user, but same thin
g happened again
once I readded him. I also tried the sp_change_users_login ( autofix) to no
avail ( nothing happened )
Any help would be appreciated.
ThanksRun select * from sysusers in the database that you are trying to add the
user. If the user does exist then run the sp_granddbaccess procedure to
grant access to the user. You may then need to run sp_change_users_login
again after verifying that the login exists for this user.
Rand
This posting is provided "as is" with no warranties and confers no rights.|||That response should hav been sp_grantdbaccess.
Rand
This posting is provided "as is" with no warranties and confers no rights.
Subscribe to:
Posts (Atom)