Results 1 to 4 of 4
  1. #1
    Join Date
    May 2002
    Posts
    55

    Unanswered: restore MASTER database ( SQL 7.0 sp4)

    when I start SQL 7.0 with single user model and restore Master database

    sqlservr -c -m

    in QA use command:

    restore database master from disk='c:\sqldbbackup\master.bak'
    with move 'master' to 'e:\mssql7\data\master.mdf',
    move 'mastlog' to 'f:\mssql7\log\mastlog.ldf',
    replace
    go

    Get error message:

    Server: Msg 3708, Level 16, State 4, Line 1
    Cannot drop the database 'master' because it is a system database.
    Server: Msg 3166, Level 16, State 1, Line 1
    RESTORE DATABASE could not drop database 'master'. Drop the database and then reissue the RESTORE DATABASE statement.

    How can I do with this error, try to drop the master db, but fail???

    Thanks,

    Guyang

  2. #2
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578
    Why do you want to restore the MASTER database?
    Try REBUILDM utility to do so which is recommended method.
    --Satya SKJ
    Microsoft SQL Server MVP
    [IMG]http://sqlserver-qa.net/google_bart.gif[/IMG]

  3. #3
    Join Date
    May 2002
    Posts
    55
    restore master will keep the login information from previous database.
    actually, we are doing a test for moving database from one location to another ( sql 7 database, Windows 2000 server).

    when I do the restore, without the "with move" option, it is success.
    but if add " with move " option, give me the error messsage above.

    RebuildM is alternative option when master db crash, but we want to try restore master way here.

    Any suggestion.

    Thanks

  4. #4
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578
    Do not attempt to move master database, just restore using RESTORE statement.

    Any database users previously associated with logins that need to be re-created are orphaned because the login is lost. To associate an existing database user to a new SQL Server login, see sp_addlogin. To associate an existing database user with a Windows NT user, see sp_grantlogin.
    --Satya SKJ
    Microsoft SQL Server MVP
    [IMG]http://sqlserver-qa.net/google_bart.gif[/IMG]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •