SQLSafe Command line with no recovery

  • I am using sqlsafe to restore a large database using the following:

    DECLARE @ResultCodeINT

    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.

  • 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 @ResultCodeINT

    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.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply