Solved

SQL Server Restore of Master Database On ANother Server with Different DB Name

Posted on 2014-01-27
9
1,305 Views
Last Modified: 2014-02-05
Hello,

I am trying to restore a copy of our Master database.  Normally this runs on our production server, but I need to restore this to my local machine, which runs a different/newer version of SQL, in case that matters.  I have the BAK file locally, and I do not wish to overwrite my existing Master database, so I have been attempting to restore it as MasterX.

C:\Users\me>SQLCMD -E -SMyPC -Q "RESTORE DATABASE masterx FROM Disk='c:\
master.bak' WITH RECOVERY, MOVE 'master' TO 'C:\SQLDATA\master_data.mdf', MOVE '
mastlog' TO 'C:\SQLDATA\master_log.mdf'"

Processed 376 pages for database 'masterx', file 'master' on file 1.
Processed 3 pages for database 'masterx', file 'mastlog' on file 1.
Msg 3013, Level 16, State 1, Server PC9391, Line 1
RESTORE DATABASE is terminating abnormally.
Msg 5570, Level 23, State 3, Server PC9391, Line 1
FILESTREAM Failed to find the garbage collection table.
Converting database 'masterx' from version 661 to the current version 706.
Database 'masterx' running the upgrade step from version 661 to version 668.
Database 'masterx' running the upgrade step from version 668 to version 669.
Database 'masterx' running the upgrade step from version 669 to version 670.
Database 'masterx' running the upgrade step from version 670 to version 671.
Database 'masterx' running the upgrade step from version 671 to version 672.
Database 'masterx' running the upgrade step from version 672 to version 673.
Database 'masterx' running the upgrade step from version 673 to version 674.
Database 'masterx' running the upgrade step from version 674 to version 675.
Database 'masterx' running the upgrade step from version 675 to version 676.
Database 'masterx' running the upgrade step from version 676 to version 677.
Database 'masterx' running the upgrade step from version 677 to version 679.

When this is complete, the database IS displayed in the SSMS tree of databases, but it says '(Recovery Pending)'.

I don't need to do much with this database besides look at a table, and possibly some triggers.

I DID attempt to do this in single user mode, but because I was not restoring to Master, this would not work.

Any ideas what I am doing wrong?

Thanks In Advance,

- Michael
0
Comment
Question by:mjs082969
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 3
9 Comments
 

Author Comment

by:mjs082969
ID: 39813176
I did try to restore the database through SSMS, but received a similar message (but with less detail).
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 39813197
>FILESTREAM Failed to find the garbage collection table.
the restore visibly is failing/missing on the filestream part.

please locate the path of the filestream file of the db:
RESTORE FILELISTONLY  FROM Disk='c:\master.bak'

and add the MOVE option for that one also in your restore statement
0
 

Author Comment

by:mjs082969
ID: 39813379
Should the filestream file be in addition to the data and log files?  I don't see one referenced.



master      C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\master.mdf      D      PRIMARY      4194304

mastlog      C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\mastlog.ldf      L      NULL      1048576
0
Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 39813410
can you run a DBCC CHECKDB on the original database?
0
 

Author Comment

by:mjs082969
ID: 39815037
That system no longer exists, so unfortunately that is not possible.
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 39815210
I had searched a bit on the internet, but couldn't find anything like this.
I fear you will have to get into touch with MS support for this ...
0
 

Author Comment

by:mjs082969
ID: 39817818
Thanks, I am going to contact them and will update this with the results.
0
 

Author Comment

by:mjs082969
ID: 39835866
I did contact Microsoft.  We were unable to restore the database on the system that I was attempting to restore on.  However, we were able to restore to a system that had a installation of SQL Server that was more comparable to the one that the database was backed up from.  They were the same version (I had been attempting to restore on SQL Server 2012), and had the same configuration options (in particular, the FILESTREAM options).

Thanks for your assistance, Guy!
0
 

Author Closing Comment

by:mjs082969
ID: 39835868
I did contact Microsoft.  We were unable to restore the database on the system that I was attempting to restore on.  However, we were able to restore to a system that had a installation of SQL Server that was more comparable to the one that the database was backed up from.  They were the same version (I had been attempting to restore on SQL Server 2012), and had the same configuration options (in particular, the FILESTREAM options).

Thanks for your assistance, Guy!
0

Featured Post

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question