Test-sqmTdpConfiguration
Backup
sqmSQLTool v1.9.218+ · Test
✓ -WhatIf supported
Test-sqmTdpBackup for the case that there is no SQL Server access: no login, instance down, or only file access to the server. It checks the TDP configuration and the TDP logs and gives a fix hint for every finding. No dbatools and no SQL connection are needed.
Where the paths come from.
-TdpDir and -ConfigPath are parameters. The Configuration section of BackupPlan.json (TsmOptFile, TdpConfigFile, LogPath) overrides the defaults <TdpDir>\dsm.opt, <TdpDir>\tdpsql.cfg and <TdpDir>\03_Log. The log name comes from LOGFile in tdpsql.cfg, the script location from SET BackupScriptsDir= in the wrapper, the TSM server from dsm.opt. A remote computer is read through its administrative share.
Not covered because it needs SQL Server: Agent job and schedule, tracking tables, backup age in msdb, plan against existing databases. Use
Test-sqmTdpBackup for those.
Parameters
| Parameter | Type | Required | Default | Notes |
|---|---|---|---|---|
| -ComputerName | string[] | Optional | $env:COMPUTERNAME | Computer that runs the TDP client. Remote computers are read through \\computer\C$. |
| -TdpDir | string | Optional | C:\Program Files\Tivoli\TSM\TDPSql | TDP directory on that computer. |
| -ConfigPath | string | Optional | <TdpDir>\BackupPlan.json | Path of BackupPlan.json. |
| -LogFilesToScan | int | Optional | 5 | Number of newest logs scanned. |
| -LogDays | int | Optional | 7 | Only messages of the last N days count. |
| -TestTsmServer | switch | Switch | $false | TCP test of the TSM server from dsm.opt (local computer only). |
| -AdditionalFinding | object[] | Optional | , | Findings the caller already collected; Test-sqmTdpBackup passes its SQL finding here. |
| -OutputPath | string | Optional | <OutputPath config>\TdpConfiguration | Report directory. |
| -NoOpen | switch | Switch | $false | Do not open the HTML report. |
| -NoReport | switch | Switch | $false | Write no files, only return the result object. |
| -ContinueOnError | switch | Switch | $false | Continue with the next instance or computer on error. |
| -EnableException | switch | Switch | $false | Throw exceptions immediately. |
Execution Flow
Return value
One object per computer with Status (OK, Warning, Critical, Error), the counts, Findings (Severity, Category, Message, Hint) and the report file paths.
| Severity | Meaning |
|---|---|
Critical | The backup is not working or the data is not protected. Changes the overall status to Critical. |
Warning | Needs attention but the backup still runs. Overall status Warning. |
Info | Good to know (for example a step runs without a proxy). Does not change the overall status. |
Known hints: ANS1017E (TCP/IP connection to the TSM server failed), ANS1025E (authentication failed, node password), ANS1035S (options file not found or invalid). Other codes are reported with their message line.
Examples
Local computer
Test-sqmTdpConfiguration
Remote server, only what needs attention
(Test-sqmTdpConfiguration -ComputerName SQL01 -NoReport).Findings |
Where-Object Severity -ne 'Info' | Format-List Severity, Category, Message, HintNon-default TDP directory and TSM server test
Test-sqmTdpConfiguration -TdpDir 'D:\Tivoli\TDPSql' -TestTsmServer
Only the last day of log messages
Test-sqmTdpConfiguration -LogDays 1