Solved

Restore Master DB and our own DB to a freshly installed SQL 2008 server

Posted on 2011-02-25
10
357 Views
Last Modified: 2012-05-11
Hi All

I have had to re-install our SQL 2008R2 server, before reinstalling i backed up the master database and our own SQL database,  i have now reinstalled the server and installed SQL.

My next step is to restore the database. is it as simple as right clicking on each database and restoring.

Does the New SA password need to match the old one, and also now i have re-installed the file paths are slightly different as the path to the databases i chose during install was E:\SQL_Data

in the original install it was still on the E drive but was just the long default path that SQL.

Thanks

0
Comment
Question by:ncomper
  • 4
  • 4
  • 2
10 Comments
 
LVL 57

Expert Comment

by:Raja Jegan R
ID: 34978417
>> My next step is to restore the database. is it as simple as right clicking on each database and restoring.

Nope, there are few more restrictions applicable.
Follow the steps mentioned in the link below to get your master database restored properly:
http://msdn.microsoft.com/en-us/library/ms190679.aspx

>> Does the New SA password need to match the old one, and also now i have re-installed the file paths are slightly different as the path to the databases i chose during install was E:\SQL_Data

SA password neet not match..
0
 
LVL 9

Expert Comment

by:mayank_joshi
ID: 34978654
the database files path need not to be same too.

0
 
LVL 5

Author Comment

by:ncomper
ID: 34978655
Thanks

How do i run that sqlcmd specifying my sa username and password, for some reason even thhough the server is in mixed mode and i have given domain admins group  the sysadm right i can not connect to the sql server using my domain admin account, i can only login using the SA details.

Thanks
0
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 
LVL 57

Expert Comment

by:Raja Jegan R
ID: 34978667
>> i can not connect to the sql server using my domain admin account, i can only login using the SA details.

Then Builtin\Administrators account in your server might have been disabled..
Kindly enable it or use sa password..
0
 
LVL 5

Author Comment

by:ncomper
ID: 34978839
Hi All

Im getting the following error when i try this

C:\Users\Administrator>sqlcmd
1> RESTORE DATABASE master FROM DISK = `E:\SQL_db_backups\MASTER.BAK` WITH REPLACE;
2> GO
Msg 102, Level 15, State 1, Server SQLSVR, Line 1
Incorrect syntax near '`'.
Msg 319, Level 15, State 1, Server SQLSVR, Line 1
Incorrect syntax near the keyword 'with'. If this statement is a common table ex
pression, an xmlnamespaces clause or a change tracking context clause, the previ
ous statement must be terminated with a semicolon.

I have tried this with and without the semicolon at the end of line 1

Anyone have any ideas?
0
 
LVL 9

Assisted Solution

by:mayank_joshi
mayank_joshi earned 250 total points
ID: 34978876
you are using ` instead of '
0
 
LVL 57

Accepted Solution

by:
Raja Jegan R earned 250 total points
ID: 34979033
As mayank_joshi stated, it should be

RESTORE DATABASE master FROM DISK = 'E:\SQL_db_backups\MASTER.BAK' WITH REPLACE;
0
 
LVL 5

Author Comment

by:ncomper
ID: 34979135
sorry could you explain, im not a dba as ours is away so im a newbie when itc omes to SQL

that line you have stated above looks the same as what i was typing or am i missing somthing?

Thanks again
0
 
LVL 57

Expert Comment

by:Raja Jegan R
ID: 34979167
Ok, here it is..

Your version - `E:\SQL_db_backups\MASTER.BAK`
My Version   -  'E:\SQL_db_backups\MASTER.BAK'

Actually you need to encapsulate value with Single quotes (') but you have used (`) sign.
Hence changing this should help..
0
 
LVL 5

Author Closing Comment

by:ncomper
ID: 34980556
Thanks all, you saved me a lot of stress
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
replicated - directional or bidirectional? 3 29
2016 SQL Licensing 7 41
Inserting oldest record into new table. 5 24
VB.NET 2008 - SQL Timeout 9 24
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
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 video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.

773 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