Comments
Sort by recent activity
Here's the batch file I am using to restore my test server. Perhaps you could do something similar: @echo on
del B:\Restore\*.* /s /q
c:\Robocopy\ROBOCOPY.EXE /JOB:c:\Robocopy\CPOPM2_RESTORE1.RCJ
c:\Robocopy\ROBOCOPY.EXE /JOB:c:\Robocopy\CPOPM2_RESTORE2.RCJ
c:\Robocopy\ROBOCOPY.EXE /JOB:c:\Robocopy\CPOPM2_RESTORE3.RCJ
ren B:\Restore\CentricityPM\*.sqb FULL_CentricityPM.sqb
ren B:\Restore\CPM_Production\*.sqb FULL_CPM_Production.sqb
ren B:\Restore\CPM_Reports\*.sqb FULL_CPM_Reports.sqb
SQL Backup command line interface can only work on local servers.
CD "C:\Program Files\Red Gate\SQL Backup\(LOCAL)"
SqlBackupC -SQL "RESTORE DATABASE [CentricityPM] FROM DISK = 'B:\Restore\CentricityPM\FULL_CentricityPM.sqb' WITH RECOVERY, MOVE 'CentricityPM_DB' TO 'D:\MSSQL\Data\CentricityPM.mdf', MOVE 'PatientVisit_Table' TO 'D:\MSSQL\Data\CentricityPM_1.NDF', MOVE 'PatientVisit_Text' TO 'D:\MSSQL\Data\CentricityPM_2.NDF', MOVE 'PatientVisit_Indexes' TO 'D:\MSSQL\Data\CentricityPM_3.NDF', MOVE 'CentricityPM_Log' TO 'E:\MSSQL\Data\CentricityPM.ldf', REPLACE" -E
SqlBackupC -SQL "RESTORE DATABASE [CPM_Production] FROM DISK = 'B:\Restore\CPM_Production\FULL_CPM_Production.sqb' WITH RECOVERY, MOVE 'CPM_Production_Data' TO 'D:\MSSQL\Data\CPM_Production.MDF', REPLACE" -E
SqlBackupC -SQL "RESTORE DATABASE [CPM_Reports] FROM DISK = 'B:\Restore\CPM_Reports\FULL_CPM_Reports.sqb' WITH RECOVERY, MOVE 'CPM_Reports_Data' TO 'D:\MSSQL\Data\CPM_Reports.MDF', REPLACE" -E
exit
You can get ROBOCOPY from http://www.microsoft.com/downloads/details.aspx?FamilyID=9D467A69-57FF-4AE7-96EE-B18C4790CFFD&displaylang=en
Cheers![/url] / comments
Here's the batch file I am using to restore my test server. Perhaps you could do something similar:@echo on
del B:\Restore\*.* /s /q
c:\Robocopy\ROBOCOPY.EXE /JOB:c:\Robocopy\CPOPM2_RESTORE1.RCJ
c:...
Peter and Vollker,
Until Redgate can impliment everything, have you considered just changing the Job steps via a SQl script? Jobs are just text records in msdb, and you should be able to easily manipulate these to add the commands you need for each job.
Just a thought.....
Rick in Phx / comments
Peter and Vollker,
Until Redgate can impliment everything, have you considered just changing the Job steps via a SQl script? Jobs are just text records in msdb, and you should be able to easily man...