I copied a database from a SQL 2000 server to a SQL 2005 server. In the
node for that database, and in the security > users node, it shows the users
from the 2000 box. Of course, those users don't exist on the 2005 box.
The GUI (SQL Server Management Studio) won't let me right click and delete.
When I try that, it says an error occurred. I thought 2005 would be smarter
than 2000. Microsoft has done a terrible job with the UI upgrade after 5
years. I know the answer is in running some lines in query analyzer to
remove those false user names from the db, but I can't remember what they
are, and I don't know if it is different for sql 2005 that it was under
2000.Run this in the said database, then execute the output it generates. That
will clean up the users for you.
set quoted_identifier off
select "exec sp_dropuser '" + name + "'" from sysusers where uid between 3
and 16383
AndyP,
Sr. Database Administrator,
MCDBA 2003
"HK" wrote:
> I copied a database from a SQL 2000 server to a SQL 2005 server. In the
> node for that database, and in the security > users node, it shows the users
> from the 2000 box. Of course, those users don't exist on the 2005 box.
> The GUI (SQL Server Management Studio) won't let me right click and delete.
> When I try that, it says an error occurred. I thought 2005 would be smarter
> than 2000. Microsoft has done a terrible job with the UI upgrade after 5
> years. I know the answer is in running some lines in query analyzer to
> remove those false user names from the db, but I can't remember what they
> are, and I don't know if it is different for sql 2005 that it was under
> 2000.
>
>|||Exactly what I was looking for. Thanks!
"AndyP" <AndyP@.discussions.microsoft.com> wrote in message
news:CD6F6C73-B481-4D5F-B6A8-5C2C78985F9D@.microsoft.com...
> Run this in the said database, then execute the output it generates. That
> will clean up the users for you.
>
> set quoted_identifier off
> select "exec sp_dropuser '" + name + "'" from sysusers where uid between 3
> and 16383
>
> --
> AndyP,
> Sr. Database Administrator,
> MCDBA 2003
>
> "HK" wrote:
> > I copied a database from a SQL 2000 server to a SQL 2005 server. In the
> > node for that database, and in the security > users node, it shows the
users
> > from the 2000 box. Of course, those users don't exist on the 2005 box.
> > The GUI (SQL Server Management Studio) won't let me right click and
delete.
> > When I try that, it says an error occurred. I thought 2005 would be
smarter
> > than 2000. Microsoft has done a terrible job with the UI upgrade after
5
> > years. I know the answer is in running some lines in query analyzer to
> > remove those false user names from the db, but I can't remember what
they
> > are, and I don't know if it is different for sql 2005 that it was under
> > 2000.
> >
> >
> >
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment