Create TSQL Script to Restore the RTC Database

,

There are two ways to create the TSQL script for restoring the RTC database. If you are familiar with TSQL, it’s fairly simple to write the script and set it as a job.


Tip

If you are not familiar with TSQL, there is a way to have the SQL Management studio write the script for you. Follow steps 1–5 as shown previously. However, instead of clicking OK, click the Script button at the top of the window and choose Script Action to New Query Window, as shown in Figure 14.9. Simply run the query to create the backup.

Figure 14.9 Creating a TSQL Script for Database Restore

image


For the process outlined previously, the script is included here.

RESTORE DATABASE [rtc] FROM DISK = N'C:Program FilesMicrosoft SQL
ServerMSSQL10.MSSQLSERVERMSSQLBackup tc.bak' WITH FILE = 1, NOUNLOAD,
REPLACE, STATS = 10
GO

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset