30.06.2013 Views

SQL Server Backup and Restore - Simple Talk

SQL Server Backup and Restore - Simple Talk

SQL Server Backup and Restore - Simple Talk

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 4: Restoring From Full <strong>Backup</strong><br />

To start <strong>SQL</strong> <strong>Server</strong> in single-user mode, open a comm<strong>and</strong> prompt <strong>and</strong> browse to the<br />

<strong>SQL</strong> <strong>Server</strong> installation folder, which contains the sqlservr.exe file. Here are the default<br />

locations for both <strong>SQL</strong> <strong>Server</strong> 2008 <strong>and</strong> 2008 R2:<br />

• \MS<strong>SQL</strong>10.MS<strong>SQL</strong>SERVER\MS<strong>SQL</strong>\Binn<br />

• \MS<strong>SQL</strong>10_50.MS<strong>SQL</strong>SERVER\MS<strong>SQL</strong>\Binn<br />

From that location, issue the comm<strong>and</strong> sqlservr.exe –m. <strong>SQL</strong> <strong>Server</strong> will begin the<br />

startup process, <strong>and</strong> you'll see a number of messages to this effect, culminating (hopefully)<br />

in a Recovery is complete message, as shown in Figure 4-9.<br />

Figure 4-9: Recovery is complete <strong>and</strong> <strong>SQL</strong> <strong>Server</strong> is ready for admin connection.<br />

Once <strong>SQL</strong> <strong>Server</strong> is ready for a connection, open a second comm<strong>and</strong> prompt <strong>and</strong><br />

connect to your test <strong>SQL</strong> <strong>Server</strong> with sqlcmd. Two examples of how to do this are<br />

given below, the first when using a trusted connection <strong>and</strong> the second for a <strong>SQL</strong> Login<br />

authenticated connection.<br />

141

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!