SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SQLSafe Command line with no recovery


SQLSafe Command line with no recovery

Author
Message
Jaime E. Maccou
Jaime E. Maccou
Old Hand
Old Hand (325 reputation)Old Hand (325 reputation)Old Hand (325 reputation)Old Hand (325 reputation)Old Hand (325 reputation)Old Hand (325 reputation)Old Hand (325 reputation)Old Hand (325 reputation)

Group: General Forum Members
Points: 325 Visits: 413
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.
Jaime E. Maccou
Jaime E. Maccou
Old Hand
Old Hand (325 reputation)Old Hand (325 reputation)Old Hand (325 reputation)Old Hand (325 reputation)Old Hand (325 reputation)Old Hand (325 reputation)Old Hand (325 reputation)Old Hand (325 reputation)

Group: General Forum Members
Points: 325 Visits: 413
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.

Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search