Re: Creating user after backup

From: Stamey (Stamey@PostToTheGroupOnly)
Date: 12/12/02


From: "Stamey" <Stamey@PostToTheGroupOnly>
Date: Thu, 12 Dec 2002 11:35:24 -0500


It sounds like you may have restored to a different SQL Server. If this is
not the case please post more info.
If this IS the case you have run into a typical problem with restoring SQL
DBs to sifferent servers. The user is in the DB's Sysusers table but the
User's SID does not match the user's SID in the SysLogins table in the
Master DB. Typically you will delete the user, by name, from the database
and then add them back in using stored procedures or EM GUI. In your case
you may not be able to delete that user as it is the owner of objects in the
DB, or it may just introduce more problems. You may be able to update the
SID column in the ProblemDB..SysUsers with the value for that user from from
the Master..SysLogins table. you will need to change the "Allow
modifications to be made directly to the system catalogs" option to True
when you do this.

Chris

"meho kodro" <kodro_at_work@hotmail.com> wrote in message
news:00b101c2a1b7$c24034b0$8ef82ecf@TK2MSFTNGXA04...
>
> I have restored a backup of a DB. When I want to create
> the user owner of that database, it raises an error saying
> that the user already exists, but I doesn't appear in the
> users screen.
>
> How can I solve this problem? I can't create a user with a
> different name because all the objects in the DB belong to
> that user.
>
> Thanks in advance.



Relevant Pages

  • Re: Logins between SQL Databases on diff. servers.
    ... If they are NT logins and on the same domain you shouldn't have to do ... Errors After Restoring Dump ... for SQL Server ... > So how can I move the logins first with its passwords and SID? ...
    (microsoft.public.sqlserver.security)
  • Re: Disaster Recovery Scenario Help
    ... Right...I understand the concept of the SID... ... assign them permissions, then what would be affected by the SID change other ... >>> promote the DR servers into DCs? ... In that case restoring DCs ...
    (microsoft.public.windows.server.active_directory)
  • Re: Cluster DR
    ... Restoring a cluster is almost exactly the same as restoring a stand-alone ... SQL Server service offline. ... Senior Database Administrator ...
    (microsoft.public.sqlserver.clustering)
  • XPe SQL Database Backup/Restore
    ... This is a general FYI to anyone having difficulty with restoring the XP ... Embedded Component Database. ... Microsoft SQL Server Management Studio Express ...
    (microsoft.public.windowsxp.embedded)
  • Re: User already exists in the database error
    ... I suggest you create the logins *with the correct SID* before restoring. ... I need to have the users already created on the SQL server yes? ...
    (microsoft.public.sqlserver.server)