Restoring the master database

  • I am trying to restore the master database but never succeeded. I am using SQL Server 7. The steps I did were:

    a/ Stop SQL Server

    b/ Bring SQL Server up into single-user mode via the command line: sqlservr.exe -c -m

    c/ Log into SQL Server as Admin account

    d/ Restore the master database from master_db.BAK

    The restoring process seems to run OK until at the end, I got error message "ConnectionTransact (GetOverLappedResult()) Connection Broken"

    According to MS, the workaround is "no action required" in most case and just restart SQL Server again. After I started SQL Server again, all databases (includes master database) were gone.

    Has anyone come across this problem before or got any sol?

  • I have not come across this before. Did the server start back up or fail. If started then may be there just not visible. Check the path of all the databases and make sure there files are there then reboot the server and see if problem continues. If so then open QA and see if it can see the databases. Let us know what happens and you find out.

  • While it's unlikely to have changed, check the server registration properties in enterprise manager to make sure "Show system database and system objects" is checked.

    Also check the registration properties to make sure the account you use to connect to sql server is an account with appropriate permissions.

    It sounds like your problem isn't this simple though.


    -Ken

  • I ran to this problem>But just as mentioned by saying ok i see that the database is restored.

    I have a question can u see the master Database Once u restart the server??

    ANd also how old is the Backup set??Are the user databses created after the Backup is taken??

  • Thanks for all the inputs people. Really appreciate. I should've been more cleared last time. I am setting up a new server and trying to restore database from the existing server (backup files on existing are done daily) onto the new server. Now, I guess there's another way to do it, which is "Replica" (I haven't read the Replica doc though) but becos I really want to try to do it by restoring the backups so if the server dies in the future (let's hope not huh), then I can get it back on from the backups.

    Since the last post, I also tried importing master database with "Drop" option which would delete the components on the new server and replace them with the exact amount of components of the existing server and the next steps are as I wrote in the last post. I was told if the components are not the same then it would not work. However, it did not work either. I could restart the SQL server and see all new databases (after I restore them) but after I restart the system (windows), they were gone (include MASTER). I got "No Items" when I open master database.

    1/ The SQL Server started again after all the steps but it was done manually (it could not start by itself)

    2/ Does windows Service Pack version matter in this case? I got 6a installed.

    3/ Does SQL Service Pack need to be installed before doing all the steps I showed in last post? I haven't installed any.

    4/ Show system database and system objects are always checked.

    5/ Let's say if I install SQL Server 7 as fresh again and do not restore "master" database but only others, would it work and if it does, would it work exactly the same as the existing server?

    6/ There was a suggestion that model & msdb databases need to be restored as well. Do you think it's necessary?

    Once againt thanks for you time and please excuse my so little knowledge as I just started learning SQL.

    Edited by - raptorkiller47 on 11/17/2002 8:52:32 PM

  • I've seen this error with SQL7 & NT4.

    And, the solution was just as prescribed by MS (no action required).

    If the master database did not exist at all,

    then in EM or QA, you would get the message "a connection could not be established...".

    If you can connect via EM or QA, then the master exists.

    Try going into the system tables on the master using QA, and see what is in the sysdatabases table.

    select * from sysdatabases

    With SQL7 & SQL2K, often the main items in the master database are the logins (or groups, etc). You can start with a clean master, and build the logins using the script below for each login:

    sp_droplogin 'xxx'

    go

    sp_addlogin @loginame = 'xxx',

    @passwd = 'xxx',

    @sid = xxxxxxxx

    go

    You need the sid to map login to db user.

    Otherwise use dbo.sp_change_users_login

    to map user to login when the sid's do not

    match (see sp_helpuser)

    Then just restore each database, including msdb and model if needed.

    This is a very simple approach, but works for most installs.

    For migrating db from one server to another, I usually start with a clean master, and build up the necessary security issues - that

    way I have documentation. I don't recommend moving the master unless you have a lot of information in it, such as with publication related....


    What's the business problem you're trying to solve?

  • I have had also the error fcb::ZeroFile():  GetOverLappedResult()       failed with error 2. during the restore of a database. My server is an IBM Netfinity with a raid-controller. I have had problems during creating backups on this server before. Before the problems started the machine has run without problems for more than 6 months. The solution for the backup problems was to remove the backup folders and recreate them. If have done the same for the fcb::ZeroFile():  GetOverLappedResult()       failed with error 2. problem and now it is solved for the time being........

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply