User - owns tables but not a user...

User - owns tables but not a user...

Post by Nick » Mon, 23 Apr 2001 01:33:36



Apologies before I begin, but I am not that familiar with SQL Server, being
from an Oracle background...

I have a database that I have been sent and restored it onto our server. The
main tables are owned by user1.

User1 does not appear in the user list for the database. User1 does appear
in the user list for the server.

When I try to add User1 as a new user for the database, I cannot, "Error
15023: User or role 'user1' already exists in the current database."

Only one user is currently listed, 'dbo'. And 2 users are displayed in the
public role, 'dbo' and 'user1'. I cannot remove 'user1' from the public role
list, the 'Remove' button does not become enabled on selection.

What do I need to do to be able to add this user, 'User1', to the database
user list?

Thank you in advance for your help.

Nick

 
 
 

User - owns tables but not a user...

Post by Dan Guzma » Mon, 23 Apr 2001 02:23:22


When you restore a database from another server, the mappings between
syslogins (master db) and sysusers (user db) may get out-of-sync.  The can
be fixed with the sp_changeuserslogin proc.  See the Books Online for
details.

Hope this helps.

-----------------------
SQL FAQ links (courtesy  Neil Pike):

 http://forumsb.compuserve.com/gvforums/UK/default.asp?SRV=MSDevApps
 (faqxxx.zip in lib 7)
 or www.ntfaq.com/Articles/Index.cfm?DepartmentID=800
 or www.sqlserverfaq.com
 or www.mssqlserver.com/faq
-----------------------


Quote:> Apologies before I begin, but I am not that familiar with SQL Server,
being
> from an Oracle background...

> I have a database that I have been sent and restored it onto our server.
The
> main tables are owned by user1.

> User1 does not appear in the user list for the database. User1 does appear
> in the user list for the server.

> When I try to add User1 as a new user for the database, I cannot, "Error
> 15023: User or role 'user1' already exists in the current database."

> Only one user is currently listed, 'dbo'. And 2 users are displayed in the
> public role, 'dbo' and 'user1'. I cannot remove 'user1' from the public
role
> list, the 'Remove' button does not become enabled on selection.

> What do I need to do to be able to add this user, 'User1', to the database
> user list?

> Thank you in advance for your help.

> Nick


 
 
 

User - owns tables but not a user...

Post by Nick » Tue, 24 Apr 2001 21:09:22


Thanks again Dan


> When you restore a database from another server, the mappings between
> syslogins (master db) and sysusers (user db) may get out-of-sync.  The can
> be fixed with the sp_changeuserslogin proc.  See the Books Online for
> details.

> Hope this helps.

> -----------------------
> SQL FAQ links (courtesy  Neil Pike):

>  http://forumsb.compuserve.com/gvforums/UK/default.asp?SRV=MSDevApps
>  (faqxxx.zip in lib 7)
>  or www.ntfaq.com/Articles/Index.cfm?DepartmentID=800
>  or www.sqlserverfaq.com
>  or www.mssqlserver.com/faq
> -----------------------



> > Apologies before I begin, but I am not that familiar with SQL Server,
> being
> > from an Oracle background...

> > I have a database that I have been sent and restored it onto our server.
> The
> > main tables are owned by user1.

> > User1 does not appear in the user list for the database. User1 does
appear
> > in the user list for the server.

> > When I try to add User1 as a new user for the database, I cannot, "Error
> > 15023: User or role 'user1' already exists in the current database."

> > Only one user is currently listed, 'dbo'. And 2 users are displayed in
the
> > public role, 'dbo' and 'user1'. I cannot remove 'user1' from the public
> role
> > list, the 'Remove' button does not become enabled on selection.

> > What do I need to do to be able to add this user, 'User1', to the
database
> > user list?

> > Thank you in advance for your help.

> > Nick