Skip to main content
  • Place orders quickly and easily
  • View orders and track your shipping status
  • Enjoy members-only rewards and discounts
  • Create and access a list of your products
  • Manage your Dell EMC sites, products, and product-level contacts using Company Administration.

PowerProtect Data Manager 19.15 Microsoft SQL Server User Guide

Sample T-SQL backup script

The following SQL-CLR script is an example of a backup script:

NOTE:

For self-service backups, the retention time displayed in the SSMS plug-in does not match the retention time displayed in PowerProtect Data Manager. The retention time in PowerProtect Data Manager is normalized and rounded off to midnight.

A retention setting in PowerProtect Data Manager overrides a retention setting specified by the -y option.

USE [master]
GO
DECLARE @returnCode int
8 -l full -N "Set1" -y +0d -a "NSR_DFA_SI_DD_HOST=10.31.192.10" -a
"NSR_DFA_SI_DD_USER=ost" -a "NSR_DFA_SI_DEVICE_PATH=/ddsub7" -a
"NSR_SKIP_NON_BACKUPABLE_STATE_DB=TRUE" "MSSQL:"'
IF @returnCode <> 0
BEGIN
RAISERROR ('Fail!', 16, 1)
END

You can use any Microsoft SQL Server standard interfaces, such as the SSMS Query window and OSQL command line tool, to run the SQL-CLR scripts.

You can use the SQL-CLR script to schedule Microsoft SQL Server backups by using the SQL Server Agent. Scheduling Microsoft SQL Server backups by using SQL Server Agent provides information.

Best practices to back up Microsoft SQL Server with Application Direct provides guidelines for better performance of Microsoft SQL Server backups by using the Microsoft application agent for Application Direct SQL-CLR scripts.


Rate this content

Accurate
Useful
Easy to understand
Was this article helpful?
0/3000 characters
  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: <>()\