Master database corruption

  • This is the scenario where I was asked:

    I know you can rebuild the master database and I do have backups.

    But I was thinking:

    Your master database is corrupted and SQL server wont even start, you can proceed rebuilding master database if you have the setup.exe and restore master. But what if you do not have setup.exe folder but you have other production servers?

    Can you restore the master backup file you have got on another server and then move the files to the server that is not starting? How can you do this? Any ideas and or any articles would be very great.

    Thanks

  • surely you would restore a backup of the master database from that server that wasn't corrupt

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • Perry Whittle (4/2/2009)


    surely you would restore a backup of the master database from that server that wasn't corrupt

    Woww..you are here again :).

    so lets say I have a Server A which is not starting at all and Server B which is clean and running and I have backups of master system database for Server A.

    So is it you are saying that restore the master database of Server B? Hows that possible, if server A is not starting at all?

    You have been so kind thanks.

  • You'd restore the backup of master that you have from Server A. The fact that you have a second server is immaterial.

    http://msdn.microsoft.com/en-us/library/ms190190.aspx

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Perry Whittle (4/2/2009)


    surely you would restore a backup of the master database from that server that wasn't corrupt

    How it is possible to run sql server if master database corrupted?. Basic rule is if we want to start sql server master database should not corrupted. Then how can you restore master database?.

    Is it possible to run sql server either in SSMS or SQLCMD, without master? Can you please explain clearly about this.

    Thanks in advance

  • Achtang (4/2/2009)


    Perry Whittle (4/2/2009)


    surely you would restore a backup of the master database from that server that wasn't corrupt

    Woww..you are here again :).

    so lets say I have a Server A which is not starting at all and Server B which is clean and running and I have backups of master system database for Server A.

    So is it you are saying that restore the master database of Server B? Hows that possible, if server A is not starting at all?

    You have been so kind thanks.

    Sorry maybe i didnt make myself clear. Using your server a and server b scenario,

    i am saying you would restore the backup from the server A. You dont really want to restore backups from other servers as thing like logins and collations may differ and cause even more problems.

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • Thanks for your kind replies Gail and Perry.

    Yes, I can restore the master database if the server is running but What if the sql server does not start at all at the start up.

    did you mean you can restore is through SQLCMD? But the server won't even using :

    net start 'instance'

  • Achtang (4/2/2009)


    Yes, I can restore the master database if the server is running but What if the sql server does not start at all at the start up.

    Did you read the link I gave you?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • GilaMonster (4/2/2009)


    Achtang (4/2/2009)


    Yes, I can restore the master database if the server is running but What if the sql server does not start at all at the start up.

    Did you read the link I gave you?

    I did but it says that to restore master database the server should be running :~(

    and also it says if it does not allow you to start sql server then you should rebuild the master, but my concern is what if yo dont have the sql.exe folder and also the installation cd but you have access to another production server?

    I was asked this question am afraid :~(. He says you can restore the backup you have got to your another production server and then move the files to the server that doesn;t start? I was wondering how could that be possible? Any info pleasE?

  • prvreddy (4/2/2009)


    How it is possible to run sql server if master database corrupted?.

    read Gails link below

    http://msdn.microsoft.com/en-us/library/ms190190.aspx

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • Hi Gila,

    Can you tell me is it possible to run a sql server, if master database failure happened. If yes tell me how can we do that.

    If no, tell me what is solution?

    I faced this question in interview?

    Thanks in Advance.

    Vijay

  • Are you sure you read the link?

    Part way down there's a link to a second article 'Considerations for restoring the master database'. In there there's a piece on starting the DB in single user.

    If the server won't start at all, then you need to rebuild the master database and, afterwards restore your backup.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • if master is truly hosed you will need to rebuild first using the cd

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • Gail,

    Yes I read that and right now I am reading how to rebuild the master database if you have the setup folder or the setup cd. but in wost cases where you don't have you see.

    I know am a bit crazy raising this issue but I don't know this guy asked me I think hes crazy that's what he said that you can restore the backup master database onto another server using a different name and then move the files to the server that is not starting?? Is that posible at all?

  • Achtang (4/2/2009)


    you can restore the backup master database onto another server using a different name and then move the files to the server that is not starting?? Is that posible at all?

    not sure about that but what i just did was corrupt my master completely so sql wouldnt start. I had another instance running on the same box so i stopped the service for that instance and copied the master.mdf and mastlog.ldf over to the corrupt instance and the service with the corrupt master db then starts. I'll test out the other scenario now and get back shortly

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

Viewing 15 posts - 1 through 15 (of 20 total)

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