PowerProtect Microsoft Application Agent 19.15 SQL Server User Guide

PDF

Restore SQL Server volumes with T-SQL scripts

The Microsoft application agent for Storage Direct enables you to generate SQL-CLR script that you can use to restore SQL Server volumes.

The SQL-CLR volume restore command is the same as the database restore command, that is, protectpoint_run_restore.

However to perform volume restores, you must specify the value of the NSR_RESTORE_TYPE option as lunresync.

You must provide a VARCHAR type parameters to the protectpoint_run_restore command.

You must provide a VARCHAR type parameters to this command. The protectpoint_run_restore command uses the same command options as the msagentrc.exe command. Optional parameters for rollback restores with the msagentrc.exe command provides information about the restore command options.

You can use any SQL Server standard interfaces such as, the SQL Server Management Studio Query window and T-SQL command prompt to run the SQL-CLR scripts.

Sample T-SQL volume level or LUN level restore script

USE [master]
GO
DECLARE @returnCode int
DECLARE @stdin NVARCHAR(MAX)
SET @stdin = '-t 1465211083 -A ADDITIONAL_RESTORES=no APPLICATIONS:
\SqlServerWriter\' + CHAR(10);
EXEC @returnCode = dbo.protectpoint_run_restore ' -c
ledmf176.msapp.com -A "NSR_DFA_SI_DD_HOST=ledmd035.lss.example.com" -A
"NSR_DFA_SI_DD_USER=DD163_user" -A "NSR_DFA_SI_DEVICE_PATH=/SU_DD163"
-A "NSR_DFA_SI_DD_LOCKBOX_PATH=C:\Program Files\DPSAPPS\common
\lockbox" -A "RP_MGMT_HOST=ledmd163.lss.example.com" -A
"RP_USER=admin" -A "NSR_RESTORE_TYPE=lunresync" -I -', @stdin
IF @returnCode <> 0
BEGIN
RAISERROR ('Fail!', 16, 1)
END

  Please provide ratings (1-5 stars).
  Please provide ratings (1-5 stars).
  Please provide ratings (1-5 stars).
  Please select whether the article was helpful or not.
  Comments cannot contain these special characters: <>()\