Re: Owner of the database after restore

From: Hari Prasad (hari_prasad_k_at_hotmail.com)
Date: 07/27/04

  • Next message: ringo: "Re: Getting "SQL Server does not exist or access denied" error messages"
    Date: Tue, 27 Jul 2004 21:12:10 +0530
    
    

    Hi,

    First you have to correct the user testbinu. The error has come because the
    login testbinu was not there in the master database syslogins table.

    You can rectify the problem using the procedure sp_change_users_login (see
    sql server books online on usage)

    After builing up the Login/ user chain , you can change the database owner
    to testbinu if you need

    use <dbname>
    go
    sp_changedbowner testbinu

    Thanks
    Hari
    MCDBA

    "Abraham" <binu_ca@yahoo.com> wrote in message
    news:#34ScB$cEHA.3664@TK2MSFTNGP12.phx.gbl...
    > I restored a database SynComp_TEST from a backup using a login testbinu,
    > which have dbcreator fixed server role. ( SynComp_TEST not exists earlier)
    >
    > I got below message ..
    >
    > Processed 1672 pages for database 'SynComp_TEST', file 'Metadata_001' on
    > file1.
    > Processed 104 pages for database 'SynComp_TEST', file 'Datasets_001' on
    file
    > 1.
    > Processed 8 pages for database 'SynComp_TEST', file 'Indexes_001' on file
    1.
    > Processed 1 pages for database 'SynComp_TEST', file 'Logs_001' on file 1.
    > Msg 916, Level 14, State 1, Server BOYD, Line 1
    > Server user 'testbinu' is not a valid user in database 'SynComp_TEST'.
    > Msg 3013, Level 16, State 1, Server BOYD, Line 1
    > RESTORE DATABASE is terminating abnormally.
    >
    >
    > Now I think the owner of the database is 'sa ' ?Am I right ?
    > Is there any way I can restore this database with testbinu as the owner ?
    > Or at least testbinu as a valid user in the database?
    >
    >


  • Next message: ringo: "Re: Getting "SQL Server does not exist or access denied" error messages"

    Relevant Pages

    • Re: Owner of the database after restore
      ... First you have to correct the user testbinu. ... login testbinu was not there in the master database syslogins table. ... After builing up the Login/ user chain, you can change the database owner ... > Is there any way I can restore this database with testbinu as the owner? ...
      (microsoft.public.sqlserver.server)
    • Re: Owner of the database after restore
      ... First you have to correct the user testbinu. ... login testbinu was not there in the master database syslogins table. ... After builing up the Login/ user chain, you can change the database owner ... > Is there any way I can restore this database with testbinu as the owner? ...
      (microsoft.public.sqlserver.programming)
    • Re: Owner of the database after restore
      ... If the restore was successful you can see the database owner through ... You can change the owner for the database using the sp_changedbowner system ... note from BOL that testbinu login must already ...
      (microsoft.public.sqlserver.programming)
    • Owner of the database after restore
      ... which have dbcreator fixed server role. ... Processed 104 pages for database 'SynComp_TEST', ... Server user 'testbinu' is not a valid user in database 'SynComp_TEST'. ... Is there any way I can restore this database with testbinu as the owner? ...
      (microsoft.public.sqlserver.programming)
    • Owner of the database after restore
      ... which have dbcreator fixed server role. ... Processed 104 pages for database 'SynComp_TEST', ... Server user 'testbinu' is not a valid user in database 'SynComp_TEST'. ... Is there any way I can restore this database with testbinu as the owner? ...
      (microsoft.public.sqlserver.security)