I had to re-format my hard drive because of a crash. How
could I retrieve the database which I had backed-up on
another hard drive before the crash?After you reload SQL Server you can use the RESTORE command to get it back.
Check out RESTORE in BooksOnLine.
Andrew J. Kelly
SQL Server MVP
"L. Dettering" <anonymous@.discussions.microsoft.com> wrote in message
news:1581601c4470e$c2f95190$a601280a@.phx
.gbl...
> I had to re-format my hard drive because of a crash. How
> could I retrieve the database which I had backed-up on
> another hard drive before the crash?|||Hi,
To add on to Andrew and Tiber (other post).
1. Install SQL server and Service packs same as old
2. Restore master database first
Have a look into steps (15 - 28) in the attached link.
http://www.dbarecovery.com/restoremasterdb.html
3. restore MSDB database using RESTORE command
4. Finally restore the user databases again with RESTORE command.
Refer books online for RESTORE syntax / usage.
Thanks
Hari
MCDBA
"Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
news:OhXfhGxREHA.2936@.TK2MSFTNGP12.phx.gbl...
> After you reload SQL Server you can use the RESTORE command to get it
back.
> Check out RESTORE in BooksOnLine.
> --
> Andrew J. Kelly
> SQL Server MVP
>
> "L. Dettering" <anonymous@.discussions.microsoft.com> wrote in message
> news:1581601c4470e$c2f95190$a601280a@.phx
.gbl...
>|||Hari:
What steps can the following steps cause, instead of using the restore
process using the backup files.
Assuming that I have mdf and ldf files for all the databases that were
present in the SQL server before the crash, including msater and msdb.
If I pick a new machine and install SQL Server, with the same setting,
updates and Service packs similar to the ones on the machine that
crashed and then I can do the following.
(a) stop SQL server on the new machine.
(b) put mdf and ldf files of the master database that I saved on a
network drive. This will replace the mdf and ldf files already present
on the new SQL Server.
(c) Optional step. Restart SQL server and see if there are any
problems(testing master database). If it does with no problems, stop the
SQL server.
(d) put mdf and ldf files for all the databases of interest, including
msdb. This will replace the mdf and ldf files if they are already
present on the new SQL Server.
(e) Start SQL server. If everything is okay, that is it.
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!|||There is a lot of good info on this subject in these links:
http://www.support.microsoft.com/?id=314546 Moving DB's between Servers
http://www.support.microsoft.com/?id=224071 Moving SQL Server Databases
to a New Location with Detach/Attach
http://support.microsoft.com/?id=221465 Using WITH MOVE in a
Restore
http://www.databasejournal.com/feat...cle.php/2228611
Transferring Logins
http://www.support.microsoft.com/?id=246133 How To Transfer Logins and
Passwords Between SQL Servers
http://www.support.microsoft.com/?id=298897 Mapping Logins & SIDs after a
Restore
http://www.dbmaint.com/SyncSqlLogins.asp Utility to map logins to
users
http://www.support.microsoft.com/?id=168001 User Logon and/or Permission
Errors After Restoring Dump
http://www.support.microsoft.com/?id=240872 How to Resolve Permission
Issues When a Database Is Moved Between SQL Servers
http://www.sqlservercentral.com/scr...sp?scriptid=599
Restoring a .mdf
http://www.support.microsoft.com/?id=307775 Disaster Recovery Articles
for SQL Server
Andrew J. Kelly
SQL Server MVP
"gudia 97" <hbatra@.rgslp.com> wrote in message
news:ei956ZzREHA.556@.tk2msftngp13.phx.gbl...
> Hari:
> What steps can the following steps cause, instead of using the restore
> process using the backup files.
> Assuming that I have mdf and ldf files for all the databases that were
> present in the SQL server before the crash, including msater and msdb.
> If I pick a new machine and install SQL Server, with the same setting,
> updates and Service packs similar to the ones on the machine that
> crashed and then I can do the following.
> (a) stop SQL server on the new machine.
> (b) put mdf and ldf files of the master database that I saved on a
> network drive. This will replace the mdf and ldf files already present
> on the new SQL Server.
> (c) Optional step. Restart SQL server and see if there are any
> problems(testing master database). If it does with no problems, stop the
> SQL server.
> (d) put mdf and ldf files for all the databases of interest, including
> msdb. This will replace the mdf and ldf files if they are already
> present on the new SQL Server.
> (e) Start SQL server. If everything is okay, that is it.
>
> *** Sent via Developersdex http://www.codecomments.com ***
> Don't just participate in USENET...get rewarded for it!|||Hi gudia,
"Dettering" mentioned that he has backed up the databases (Using BACKUP
database) to a diffrent drive. That was the reason I / we mentioned
the solution with RESTORE Database process.
If we got all the MDF and LDF files for System and User databases then he
can follow the steps mentioned by you, which is very easy.
1. Install SQL server in the same directory as old and apply service packs
as previous
2. Stop SQl server
3. COpy the MDF and LDF files to the same folders as old
4. Start SQL Server
Thanks
Hari
MCDBA
"gudia 97" <hbatra@.rgslp.com> wrote in message
news:ei956ZzREHA.556@.tk2msftngp13.phx.gbl...
> Hari:
> What steps can the following steps cause, instead of using the restore
> process using the backup files.
> Assuming that I have mdf and ldf files for all the databases that were
> present in the SQL server before the crash, including msater and msdb.
> If I pick a new machine and install SQL Server, with the same setting,
> updates and Service packs similar to the ones on the machine that
> crashed and then I can do the following.
> (a) stop SQL server on the new machine.
> (b) put mdf and ldf files of the master database that I saved on a
> network drive. This will replace the mdf and ldf files already present
> on the new SQL Server.
> (c) Optional step. Restart SQL server and see if there are any
> problems(testing master database). If it does with no problems, stop the
> SQL server.
> (d) put mdf and ldf files for all the databases of interest, including
> msdb. This will replace the mdf and ldf files if they are already
> present on the new SQL Server.
> (e) Start SQL server. If everything is okay, that is it.
>
> *** Sent via Developersdex http://www.codecomments.com ***
> Don't just participate in USENET...get rewarded for it!
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment