User Tools

Site Tools


tsm:tsm_tdpmssql2

TDP for MSSQL v6.3

http://www.empalis.de/fileadmin/templates_empalis/PDFs/Events_2014/Storage-Briefing_noon2noon_qSkills_20140604/TSM_FCM_VE_und_Windows_Markus_Stumpf.pdf

TDP SQL command line to check if everything is right:

tdpsqlc query tdp
tdpsqlc query tsm
tdpsqlc query sql

Privilege to backup SQL server

The above message tells me that I am creating a Global Shared Memory Object but I currently do not have the necessary privilege to create the object. Check the output of whoami /priv for the account that is running the Backup Simulator or the backup software and see if the following privilege is listed: SeCreateGlobalPrivilege. This privilege is granted by default to administrators, services, and the local system account. In case you are trying to use Backup Simulator on a Windows version which has UAC, then you need to run Backup Simulator using “Run as Administrator” option to avoid this issue. If the account trying to create this global memory object doesn’t have this privilege, then you can grant the privilege to this account using the following steps:

  • On the Start menu, click Run. In the Open box, type gpedit.msc.
  • The Group Policy dialog box opens.
  • On the Group Policy console, expand Computer Configuration, and then expand Windows Settings.
  • Expand Security Settings, and then expand Local Policies.
  • Select the User Rights Assignment folder.
  • The policies will be displayed in the details pane.
  • In the pane, double-click Create global objects.
  • In the Local Security Policy Setting dialog box, click Add.
  • In the Select Users or Groups dialog box, add an account with privileges to run backup software or the Backup Simulator application.

Once this is done, you need to re-launch Backup Simulator or re-start the backup using the Backup Software as the security privilege will not modify the token that is currently being used by the backup software or Backup Simulator.

Introduction

With the latest version of TDP for MSSQL v6.3, the TDP will be installing very easily, and it configure the VSS (Windows snapshots) it self, and give also samples command to register the TDP on the TSM server.

Now you have access to different management console: - One management console like Microsoft SQL, with a local scheduler, more focused to MSSQL administrators
- One management console with interface to manage backup/restore and managed by TSM scheduler.

There are 2 ways to backup MSSQL:
- Legacy : (full, incr, diff) datas are located on TSM server.
- VSS : (full, incr, diff) datas are located on TSM server and/or on local snapshots with particular management classes Ex : keep only the last backup (snapshot)for instant restore

If VSS allow instant restore, the most versions we keep on the local machine, the most space will be used.

Grant proxy in case of use VSS

grant proxynode target=TSM_Client01_SQL agent=TSM_Client01

Supported level:

TDP MSSQL 6.4.1 on x86 or x64

Windows levels: <box 100% blue |The following operating systems are supported for the x86 platform.>

32-bit Windows Server 2008 SP2, and later Service Pack levels: Standard, Enterprise, or Data Center editions

</box> <box 100% blue |The following operating systems are supported for the x64 platform.>

64-bit Windows Server 2008 SP2, and later Service Pack levels: Standard x64, Enterprise x64, or Data Center x64, editions
64-bit Windows Server 2008 R2 SP1, and later Service Pack levels: Standard x64, Enterprise x64, or Data Center x64, editions
64-bit Windows Server 2012, and later Service Pack levels: Essentials, Standard or Data Center editions

</box>

SQL levels: <box 100% blue |The following application levels are supported for the x86 platform.>

Microsoft SQL Server 2008 SP1, and later Service Pack levels: Standard or Enterprise Editions
Microsoft SQL Server 2012, and later Service Pack levels: Standard, Business Intelligence, or Enterprise Editions

</box> <box 100% blue |The following application levels are supported for the x64 platform.>

Microsoft SQL Server 2008 SP1, and later Service Pack levels: Standard x64 or Enterprise x64 Editions
Microsoft SQL Server 2008 R2 SP1, and later Service Pack levels: Standard, Enterprise, or Data Center Editions
Microsoft SQL Server 2012, and later Service Pack levels: Standard, Business Intelligence, or Enterprise Editions
Note: SQL Server 2012 on a Server Core installation of Windows Server 2008 R2 SP1 or Windows Server 2012 is supported. 

</box>

TDP MSSQL 6.3.1 on x86 or x64

Windows levels: <box 100% blue |The following operating systems are supported for the x86 platform.>

32-bit Windows Server 2003 SP2, and later Service Pack levels: Standard, Enterprise, or Data Center editions
32-bit Windows Server 2003 R2 SP2, and later Service Pack levels: Standard, Enterprise, or Data Center editions
32-bit Windows Server 2008 SP2, and later Service Pack levels: Standard, Enterprise, or Data Center editions

</box> <box 100% blue |The following operating systems are supported for the x64 platform.>

64-bit Windows Server 2003 SP2, and later Service Pack levels: Standard x64, Enterprise x64, or Data Center x64 editions
64-bit Windows Server 2003 R2 SP2, and later Service Pack levels: Standard x64, Enterprise x64, or Data Center x64 editions
64-bit Windows Server 2008 SP2, and later Service Pack levels: Standard x64, Enterprise x64, or Data Center x64, editions
64-bit Windows Server 2008 R2 SP1, and later Service Pack levels: Standard x64, Enterprise x64, or Data Center x64, editions
64-bit Windows Server 2012, and later Service Pack levels: Essentials, Standard or Data Center editions
Note: This is toleration level support. Exploitation of new features available with Windows Server 2012 is available in Data Protection for Microsoft SQL Server Version 6.4 and FlashCopy Manager for Microsoft SQL Server 2012 Version 3.2. 

</box>

SQL levels: <box 100% blue |The following application levels are supported for the x86 platform.>

Microsoft SQL Server 2005 SP3, and later Service Pack levels: Standard or Enterprise Editions
Microsoft SQL Server 2008 SP1, and later Service Pack levels: Standard or Enterprise Editions
Microsoft SQL Server 2008 R2, and later Service Pack levels: Standard, Enterprise, or Data Center Editions
Microsoft SQL Server 2012, and later Service Pack levels: Standard, Business Intelligence, or Enterprise Editions
Note: This is toleration level support. Exploitation of new features available with Microsoft SQL Server 2012 is available in Data Protection for Microsoft SQL Server Version 6.4 and FlashCopy Manager for Microsoft SQL Server 2012 Version 3.2.

</box> <box 100% blue |The following application levels are supported for the x64 platform.>

Microsoft SQL Server 2005 SP3, and later Service Pack levels: Standard x64 or Enterprise x64 Editions
Microsoft SQL Server 2008 SP1, and later Service Pack levels: Standard x64 or Enterprise x64 Editions
Microsoft SQL Server 2008 R2, and later Service Pack levels: Standard, Enterprise, or Data Center Editions
Microsoft SQL Server 2012, and later Service Pack levels: Standard, Business Intelligence, or Enterprise Editions
Note: This is toleration level support. Exploitation of new features available with Microsoft SQL Server 2012 is available in Data Protection for Microsoft SQL Server Version 6.4 and FlashCopy Manager for Microsoft SQL Server 2012 Version 3.2.

</box>

TDP MSSQL 5.5.6 on x86 32 bits only

Windows levels: <box 100% blue |The following operating systems are supported for the x86 platform.>

32-bit Windows Server 2003 SP2, or later Service Pack levels: Standard, Enterprise, or Data Center editions
32-bit Windows Server 2003 R2 SP2, or later Service Pack levels: Standard, Enterprise, or Data Center editions
32-bit Windows Server 2008 SP2, or later Service Pack levels: Standard, Enterprise, or Data Center editions

</box>

SQL levels: <box 100% blue |The following application levels are supported for the x86 platform.>

Microsoft SQL Server 2000 SP4 or later Service Pack levels: Standard or Enterprise Editions
Note: The Tivoli Storage FlashCopy Manager product does not support Microsoft SQL Server 2000. 
Microsoft SQL Server 2005 SP3, or later Service Pack levels: Standard or Enterprise Editions
Microsoft SQL Server 2008 SP1, or later Service Pack levels: Standard or Enterprise Editions
Microsoft SQL Server 2008 R2, or later Service Pack levels: Standard, Enterprise, or Data Center Editions

</box>

If you use TDP for VE, you can backup MSSQL, you can backup a SQL server

On the datamover node, specify that SQL VM will use VSS snapshot

INCLUDE.VMTSMVSS vmname 

On the command line, type:

dsmc set password -type=vmguest vmguestname AdminID AdminPswd 

to store the guest VM password. The guest VM user must have permission to create Volume Shadow Copies and to truncate SQL Server logs.

Back up the VM by issuing the dsmc backup vm command.

Additionnaly keep the SQL logs on the VM, to do a more granular recovery of your SQL database.

INCLUDE.VMTSMVSS vmname OPTions=KEEPSqllog

In this case you have to manualy purge the SQL logs by doing a full SQL backup, using for example TDP for SQL inside the VM.

If the OPTions KEEPSqllog parameter is specified in an INCLUDE.VMTSMVSS statement, this parameter prevents SQL server logs from being truncated when a data mover node backs up a virtual machine that runs a SQL server. Specifying this parameter allows the SQL server administrator to manually manage the SQL server logs. The logs can be preserved as needed and be used to restore SQL transactions to a specific checkpoint, after the virtual machine is restored. When this option is specified, the SQL log is not truncated and following message is displayed and logged on the server:

ANS4179I IBM Tivoli Storage Manager application protection did not truncate Microsoft SQL Server logs on virtual machine vmname

Permissions to backup/restore self-contained application data for MS SQL

http://www-01.ibm.com/support/docview.wss?uid=swg21647995

Scripts / commands

Example 1

tdpsqlc backup <dbname> <full> /backupdestination=TSM /backupmethod=vss

Example 2

tdpsqlc restore <db> <full> /fromsqlserver=STRINGVM1\STRINGVM1

Example 3

@ECHO OFF
 
SQLCMD -E -Q "SET NOCOUNT ON; SELECT name FROM sys.databases WHERE name NOT IN ('master','model','msdb','tempdb')" -h -1 -o tdpsql_input.txt
FOR /F %%A IN (tdpsql_input.txt) DO CALL :perform %%A
 
GOTO end_batch
 
:perform
tdpsqlc backup %1 full /configfile=tdpsql.cfg /tsmoptfile=dsm.opt /sqlserver=servername /logfile=tdpsqlc.log
 
:end_batch

Example 4

@ECHO OFF

cd “C:\Program Files\Tivoli\tsm\TDPSql”

SQLCMD -E -Q “SET NOCOUNT ON; SELECT name FROM sys.dm_hadr_availability_replica_states ars INNER JOIN sys.databases dbs ON ars.replica_id = dbs.replica_id WHERE name NOT IN (‘master’,’model’,’msdb’,’tempdb’) and role_desc=’PRIMARY'” -h -1 -o tdpsql_input.txt
FOR /F %%A IN (tdpsql_input.txt) DO CALL :perform %%A

GOTO end_batch

:perform
tdpsqlc backup %1 full /BackupMethod=Legacy /BackupDestination=TSM /SqlServer=COSQL3SP /SQLAUTHentication=INTegrated /Stripes=8 /Logfile=full_backup_defaultlog

:end_batch

findstr “error” full_backup_defaultlog
set rc=%errorlevel%

if %rc% eq 0 start powershell Send-MailMessage -To “l.peoples@juiceplus.com” -Subject ‘COSQL3SP Backup Failed’ -From “Sql@COSQL3SP.nsanet.local” -Body ‘COSQL3SP FULL Backup Failed’ -smtpServer relay.nsanet.local

Example 5

%sql_dir%\tdpsqlc backup * log /truncate=yes /tsmoptfile=%sql_dir%\dsm.opt /logfile=%sql_dir%\sqlfull.log >> %sql_dir%\sqlsched.log

Example 6

%sql_dir%\tdpsqlc backup * log /truncate=yes /tsmoptfile=%sql_dir%\dsm_sql.opt /logfile=%sql_dir%\sqlfull.log >> %sql_dir%\sqlsched.log

Considerations: Using this parameter means that you are using SQL Server authentication. The SQL Server and the SQL user ID for this password must both be configured for SQL Server authentication.

The SQL user ID must have the SQL server SYSADMIN fixed server role.

If you do not specify /SQLUSer, the default is sa. If you specify /SQLUSer but not sqlusername, the default is also sa.

This parameter is ignored if you use the /SQLAUTH=integrated parameter with it.

tsm/tsm_tdpmssql2.txt · Last modified: 2021/01/01 21:25 (external edit)