USE [HCITools];
DECLARE @password VARCHAR(255);
SET @password
  = dbo.fn_Decrypt(
      0x01000000C2811DD6D0339FF2EFE6AE1181B3469D18798020836E3E0A1E4BC96D548B4FCDFFB77F264E1A4F42AD91F785284A6F5D4F3E533B0355E88F91A61E7E671472D3F580FC36CCF0AE48858099190C1B7E3A1A2A292A3E8809B40EAB6EAECF3C0FF6871CAF54A3928615C21830602BCB12F1F973E4B4B1F34A613B342C397372596025DB62CB426319AE916D0DC5CCAED8A62675D7602D592A92);

DECLARE @t DATETIME = CURRENT_TIMESTAMP;

/* RESTORE WITH MOVE */
EXEC [dba].[Commvault_Operation] @in_type = 'Restore',
                                 @in_username = 'CLI_SQL_Backup',
                                 @in_password = @password,
                                 @in_toTimeValue = @t,
                                 @in_restoreSource = 'olpPRIX_Galenicare',
                                 @in_newDatabaseName = 'olpPRIX_Galenicare',
                                 @in_destinationInstance_clientName = 'swopxqms01.centralinfra.net\TGALOLPP01',
                                 @in_destinationInstance_instanceName = 'swopxqms01.centralinfra.net\TGALOLPP01',
                                 @in_targetMDFPath = 'd:\sqlDatabase',
                                 @in_targetLDFPath = 'd:\sqlDatabase',
                                 --@in_targetFileStreamPath = 'f:\sqlDatabase',
                                 @in_callerApp = 'TSC'
;
GO

