Solved

Restoring MS-SQL DBs from .bak files

Posted on 2001-07-30
7
446 Views
Last Modified: 2012-06-27
In the event of disaster, How does one recover previous system with backup files (.bak) on a new server and a fresh install of SQL Server?
0
Comment
Question by:masonrivlin
[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
7 Comments
 

Accepted Solution

by:
allenstoner earned 100 total points
ID: 6335397
 If you using Enterprise Manager you can right-click the databases tag and under 'All Tasks' is a 'Restore Database'.  In the 'Restore as database' field at the top you can put in a new database name or overwrite an existing database.  For what you're asking you'll want to put in a new name.
  You'll want to restore from a device.  Under 'Select Device' browse to the location of the .bak file and select it as the device.
  If the actual SQL directories are different you may need to change them under the 'Options' tab.
  If you want to use t-sql check out the bol for 'RESTORE DATABASE' which will give you some direction as well as the syntax.

Allen
0
 
LVL 143

Assisted Solution

by:Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3] earned 100 total points
ID: 6336743
The procedure might change slightly if you have older version of SQL Server, especially for the TSQL statement of RESTORE DATABASE...

furhtermore, you might check out the following stored procedure (SQL7+): sp_change_users_login. It will help you to clean up "orphaned" users and create the necessary logins.

CHeers
0
 

Author Comment

by:masonrivlin
ID: 6341436
I appreciate your comments so far.  This would work for user dbs.  What about the master database?  I try to restore over it, find the .bak file as a device, and am told that the backup's sort order and the current install's sort order do NOT match and it cannot proceed.  Also, part of the error is that the binary sort order id of the backup (42) is not the same as the current (52).
Now what I want to do is force it over the existing master db.  After that, I am certain that the rest is a simple matter indeed.

With that in mind, How do I restore the master db when the backup from which I am working was saved in a NON binary sort order?
0
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 6343499
You have to rebuild the master database, using a tool that you should find on the SQL Server cd: rebuildm.exe
You can also reinstall the SQL Server, specifying those sort order.
0
 

Expert Comment

by:CleanupPing
ID: 9281934
masonrivlin:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 9623425
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Award points to angelIII and allenstoner

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Anthony
EE Cleanup Volunteer
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

Suggested Solutions

Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.

752 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