User Tools

Site Tools


tsm:tsm_tdpmssql_cmdlets

Cmdlets for protecting Microsoft SQL Server data (TDP MSSQL)

https://www.ibm.com/support/knowledgecenter/SSER7G_8.1.7/db.sql/r_dpsql_cmdlets_sql.html

The following table identifies the cmdlets that are available for use to protect Microsoft SQL Server data (Cmdlets to protect Microsoft SQL Server data).

Cmdlet name Related command-line interface command Short description
Add-DpSqlPolicy tdpsqlc create policy Create a new policy for Microsoft SQL Server data.
Backup-DpSqlComponent tdpsqlc backup Backup SQL components.
Copy-DpSqlPolicy tdpsqlc copy policy Copy an existing policy to a new policy.
Dismount-DpSqlBackup tdpsqlc unmount backup Dismount a backup.
Dismount-DpSqlClone not applicable Dismounts a clone backup.
Get-DpSqlBackup tdpsqlc query tsm * Query the backups that are stored on the server.
Get-DpSqlClone not applicable Queries the clone backups that are stored on the SQL server.
Get-DpSqlComponent tdpsqlc query sql * Query the databases that are available on the SQL server.
Get-DpSqlConfig tdpsqlc query tdp Display configuration information.
Get-DpSqlConnection tdpsqlc query tsm Displays the Tivoli Storage Manager API and server information.
Get-DpSqlFileGroups not applicable Displays all file and group information about specified SQL Server databases.
Get-DpSqlInformation tdpsqlc query sql Display specified SQL Server information.
Get-DpSqlManagedCapacity tdpsqlc query managedcapacity Assist with storage planning by determining the amount of managed capacity that is in use.
Get-DpSqlPolicy tdpsqlc query policy Query policy.
Mount-DpSqlBackup tdpsqlc mount backup Mounts a backup that provides access to the files that are contained by the backup.
Mount-DpSqlClone not applicable Mounts a cloned database that provides access to the files that are contained in a clone backup. You can mount a cloned database as read/write only.
Remove-DpSqlPolicy tdpsqlc delete policy Deletes a local policy.
New-DpSqlCloneFromComponent not applicable Creates a clone backup from a production database. You can select specific databases from the current SQL server for which you want to create a clone backup. This backup is then used to create a clone of the production database.
Remove-DpSqlBackup tdpsqlc delete backup and tdpsqlc inactivate Use to delete a VSS backup of a SQL Server database, or inactivate one or more active legacy backup objects on the Tivoli Storage Manager server.
Remove-DpSqlClone not applicable Deletes one or more SQL clone backups.
Reset-DpSqlTsmPassword tdpsqlc changetsmpassword Changes the Tivoli storage Manager password used by Data Protection for SQL Server.
Restore-DpSqlBackup tdpsqlc restore Restore backups of Microsoft SQL Server data.
Set-DpSqlConfig tdpsqlc set paramname Set the Tivoli Storage FlashCopy Manager for SQL configuration parameters in the configuration file.
Set-DpSqlPolicy tdpsqlc update policy Changes an existing policy.

To view the details about a specific cmdlet, run the Get-Help cmdlet with the cmdlet name. For example:

Get-Help Get-DpSqlBackup

To continue the example, to see examples for the cmdlet, enter:

get-help Get-DpSqlBackup -examples

For more information, enter:

get-help Get-DpSqlBackup -detailed

For technical information, enter:

get-help Get-DpSqlBackup -full

To go to the information center, enter:

get-help Get-DpSqlBackup -online

For information about a specific parameter, enter:

help Get-DpSqlBackup -Parameter backupdestination

To display the help in a separate window, include the -showwindow parameter with the help command.

Command line example for backup:

Get-DpSqlBackup -Private -Name * -AllTypes -COMPATibilityinfo -FROMSQLserver mynode -QUERYNode DP -ConfigFile "C:\Program Files\Tivoli\TSM\TDPSql\tdpsql.cfg" -TsmOptFile "C:\Program Files\Tivoli\TSM\TDPSql\dsm.opt"

backup_sql.ps1

import-module "C:\Program Files\Tivoli\Flashcopymanager\fmmodulemmc.dll"

import-module "C:\Program Files\Tivoli\Flashcopymanager\fmmoduleSQL.dll"


$startTime = get-date
Backup-DpSqlComponent -Name AdventureWorks2012 -BackupDestination TSM -BackupMethod Legacy -Full
$endTime = get-date

$activity = Get-FcmMmcActivity -StartTime $startTime -EndTime $endTime
$activity
tsm/tsm_tdpmssql_cmdlets.txt · Last modified: 2021/01/01 21:25 (external edit)