Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

SQLSafe Command line with no recovery Expand / Collapse
Author
Message
Posted Monday, April 25, 2011 10:18 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, October 24, 2013 3:23 PM
Points: 108, Visits: 399
I am using sqlsafe to restore a large database using the following:
DECLARE @ResultCode INT

EXEC @ResultCode = [master].[dbo].[xp_ss_restore]
@database = 'test1',
@filename = 'F:\Backup\test1_Full_201104050430.safe',
@withmove = '"test1_Data" "G:\MSSQL\Data\test1_Data.MDF"',
@withmove = '"test1_data2" "G:\MSSQL\Data\test1_data2.NDF"',
@withmove = '"test1_Log" "H:\MSSQL\log\test1_Log.LDF"',
@securitymodel = 'Sql',
@sqlusername = 'sa',
@Recovery='norecovery',
@encryptedsqlpassword = 'xvvsvrterstasv'

IF(@ResultCode != 0)
RAISERROR('One or more operations failed to complete.', 16, 1);

I will like to use the command line in the same way put found not information on using the @recovery='norecovery' for the command line. Can someone provide some pointers.
Here is the command line:

"C:\Program Files\Idera\SQLsafe\SQLsafeCmd.exe" Restore test1 F:\Backup\test1_db_dump.safe -Replace -Move test1_data2 G:\Mssql\Data\test1_data2.NDF -Move test1_Log H:\MSSQL\Log\test_Log.LDF -SecurityModel Sql -SqlUsername sa -EncryptedSqlPassword xvvsvrterstasv

Any help will be greatly appreciated.
Post #1098403
Posted Tuesday, April 26, 2011 8:53 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, October 24, 2013 3:23 PM
Points: 108, Visits: 399
I managed to find the solution:Adding "-Recoverymode Standby" , this will allow me to restore transaction

"C:\Program Files\Idera\SQLsafe\SQLsafeCmd.exe" Restore test1 F:\Backup\test1_db_dump.safe -Replace -Move test1_data2 G:\Mssql\Data\test1_data2.NDF -Move test1_Log H:\MSSQL\Log\test_Log.LDF -SecurityModel Sql -Recoverymode Standby -SqlUsername sa -EncryptedSqlPassword xvvsvrterstasv


Jaime E. Maccou (4/25/2011)
I am using sqlsafe to restore a large database using the following:
DECLARE @ResultCode INT

EXEC @ResultCode = [master].[dbo].[xp_ss_restore]
@database = 'test1',
@filename = 'F:\Backup\test1_Full_201104050430.safe',
@withmove = '"test1_Data" "G:\MSSQL\Data\test1_Data.MDF"',
@withmove = '"test1_data2" "G:\MSSQL\Data\test1_data2.NDF"',
@withmove = '"test1_Log" "H:\MSSQL\log\test1_Log.LDF"',
@securitymodel = 'Sql',
@sqlusername = 'sa',
@Recoverymode='norecovery',
@encryptedsqlpassword = 'xvvsvrterstasv'

IF(@ResultCode != 0)
RAISERROR('One or more operations failed to complete.', 16, 1);

I will like to use the command line in the same way put found not information on using the @recovery='norecovery' for the command line. Can someone provide some pointers.
Here is the command line:

"C:\Program Files\Idera\SQLsafe\SQLsafeCmd.exe" Restore test1 F:\Backup\test1_db_dump.safe -Replace -Move test1_data2 G:\Mssql\Data\test1_data2.NDF -Move test1_Log H:\MSSQL\Log\test_Log.LDF -SecurityModel Sql -SqlUsername sa -EncryptedSqlPassword xvvsvrterstasv

Any help will be greatly appreciated.
Post #1098698
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse