0% found this document useful (0 votes)
71 views

TDP For SQL Installation and Configuration

Uploaded by

shyam_rt
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
71 views

TDP For SQL Installation and Configuration

Uploaded by

shyam_rt
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 30

TDP for SQL

V0.1

Shyam Rajamanickam
Contents
1. Installing TDP for SQL............................................................................................................2
2. Configuring TDP for SQL.....................................................................................................11
3. Backup of SQL Databases..................................................................................................18
4. Legacy VS VSS.....................................................................................................................18
5. Schedule SQL Backup.........................................................................................................22
6. Common Errors.......................................................................................................................28

1
TDP for SQL Backup
1. Installing TDP for SQL

1) Double click SetupFCM.exe in the installation package folder, then just follow the wizard.

2
3
4
5
6
7
8
9
10
2. Configuring TDP for SQL

register node TSM_Client01 <password>


update node TSM_Client01 backdelete=yes maxnummp=6

Configure Data Protection for SQL Server on TSM_Client01

11
12
13
14
15
Query the tdp, tsm and sql to confirm everything works fine. Ensure you login account with the admin
permission of the server and SQL.

16
TSM admin to schedule Full and Weekly Backup .

17
3. Backup of SQL Databases

Example 1: Use DP For SQL Management Console

1) Login into TSM_Client01 and launch DP For SQL Management Console (it requires flash copy
manager license).

2) I will start with flash copy manager. Right click the SQL server and choose properties

4. Legacy VS VSS

3) Configure using Legacy policy , Legacy is preferred than VSS due to following Advantages

- Technology:

 Legacy uses SQL VDI interface to backup/restore data, whereas VSS uses Volume Shadow Copy
Service to backup/restore data.

- Backup:

 Legacy supports Full/Differential/Log backup.


Legacy backup does not back up the empty pages, whereas VSS does because it backs up all files.
 VSS only supports Full backup.
Destination of your VSS backup (TSM vs LOCAL) must be considered. LOCAL backups are persistent
snapshots on the attached storage system and not on the Tivoli Storage Manager server, only the meta
data is stored on the Tivoli Storage Manager server."

- Restore:

18
 Legacy can be restored to any SQL instance.
 VSS only can be restored to the same SQL instance. VSS supports fast restore
(granularity is at database level), instant restore (volume level). VSS Fast Restore and VSS Instant
Restore can be performed only from a LOCAL (persistent) VSS snapshot. Any VSS backup to the TSM
Server looks and feels the same as a legacy full backup to the Tivoli Storage Manager server.

- Time:

 VSS could be much faster when backing up or restoring the large database. But it is only true if you use
backupdestination=LOCAL which requires that you provision enough storage space that the VSS
Provider requires. If you choose backupdestination=TSM or backupdestination=BOTH, the backup will
take longer (the SQL Server will only be in backup mode for a shorter period in time.)

Source : https://www.ibm.com/support/pages/vss-vs-legacy-backups-microsoft-sql-pros-and-cons

4) Configure a SQL login account with sysadmin right in SQL server. ( This is needed only if backups
are begin manually from SQL or FCM GUI

19
5) Grant NTAuthority for Sysadmin priviledge

20
6) Right click the DB name and choose Full Backup.

6) After the full backup completed. The Log size is almost same, this is because the VSS Full backup
does truncate the logs. To truncate log, a log backup has to be done.

7) Any DB with ‘Truncate log on checkpoint’ attribute means the log only can be truncated by SQL
server itself. It is called simple recovery mode. Open the SQL management studio, and run the
following SQL query against the System Database to find it out.

SELECT name, recovery_model_desc FROM sys.databases

21
9) Click ‘Show Backup Options’ then change the value to ‘True’ in Truncate field.

10) Right click the database and choose Legacy Full backup. The log backup only can be done after a
Legacy full or differential backup.

22
11) After the full backup completed, right click the database and choose Legacy and Log backup.

5. Schedule SQL Backup

1) Login into TSM_Client01 to install client scheduler (you still need to do so if there is an existing one
for the normal BA client)

2) Follow the steps described before, and name it TSM SQL Client Scheduler

the dsm.opt file under

23
C:\Program Files\Tivoli\TSM\TDPSql should be like this:

NODename XXXXXX
PASSWORDAccess generate
TCPServeraddress X.X.X.X
TCPPort 1500
HTTPport 1581
SCHEDMODE PROMPTED
MANAGEDSERVICES WEBCLIENT SCHEDULE

3) Create a batch file named sqlfull.cmd under C:\Program Files\Tivoli\TSM\TDPSql\ (there is a


sample file sqlfull.smp in the same foder). I want a full backup of the database followed by a log
backup every day.

@ECHO OFF
rem ==================================================================
rem sqlfull.smp sample command file
rem
rem Sample command file containing commands to do a scheduled full
rem backup of all SQL databases to an IBM Tivoli Storage Manager
rem server.
rem
rem This file is meant to be executed by the IBM Tivoli Storage
rem Manager central scheduler in response to a defined schedule on
rem the IBM Tivoli Storage Manager server.
rem
rem ==================================================================

rem ==================================================================
rem Replace “C:” with the drive where Data Protection for SQL
rem is installed. Update the directory to match the installation
rem directory that you chose when you installed the product.
rem ==================================================================

set sql_dir=C:\Progra~1\Tivoli\TSM\TDPSql

C:

cd %sql_dir%

rem ==================================================================
rem The two lines below put a date/time stamp in a log file for you.
rem Note: You can change “sqlsched.log” to whatever you prefer in
rem lines below.
rem ==================================================================

date /t < NUL >> %sql_dir%\sqlsched.log


time /t < NUL >> %sql_dir%\sqlsched.log

rem ==================================================================
rem Now call the command-line interface to do the backup:
rem
rem Replace “srvrname” with the name of the options file name you
rem plan to use.
rem
rem If SQL authentication is being used and the SQL login settings have
rem not been stored via the GUI, you must also specify the /sqluser and
rem /sqlpassword options on the command below.

24
rem
rem In this example, we use the ‘*’ to back up all of the databases
rem on the SQL server. Note that database ‘tempdb’ will not
rem be backed up.
rem
rem Note: You can change “sqlsched.log” and “sqlfull.log” to
rem whatever you prefer.
rem ==================================================================

%sql_dir%\tdpsqlc backup * full /tsmoptfile=%sql_dir%\dsm.opt /logfile=%sql_dir%\sqlfull.log


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

set RC=%ERRORLEVEL%
echo ——————— >> %sql_dir%\sqlsched.log
echo Return code was %RC% >> %sql_dir%\sqlsched.log
echo ===================== >> %sql_dir%\sqlsched.log
exit %RC%

4) Double click the batch file to run a test. Check the sqlsched.log file after it completed.

IBM Tivoli Storage Manager for Databases:


Data Protection for Microsoft SQL Server
Version 6, Release 3, Level 0.0
(C) Copyright IBM Corporation 1997, 2011. All rights reserved.

ACO5057I The C:\Progra~1\Tivoli\TSM\TDPSql\sqlfull.log log file was pruned successfully.

Connecting to SQL Server, please wait…

Starting SQL database backup…

Connecting to TSM Server as node ‘TSM_CLIENT01_SQL’…

Beginning full backup for database LcsCDR, 1 of 7.


Full: 3 Read: 6291456 Written: 0 Rate: 0.00 Kb/Sec
Full: 0 Read: 9523968 Written: 9523968 Rate: 4,309.89 Kb/Sec

Backup of LcsCDR completed successfully.

Beginning full backup for database master, 2 of 7.


Full: 0 Read: 3235584 Written: 3235584 Rate: 7,879.68 Kb/Sec

Backup of master completed successfully.

Beginning full backup for database model, 3 of 7.


Full: 0 Read: 2184960 Written: 2184960 Rate: 2,243.69 Kb/Sec

Backup of model completed successfully.

Beginning full backup for database msdb, 4 of 7.


Full: 3 Read: 10485760 Written: 0 Rate: 0.00 Kb/Sec
Full: 0 Read: 12680960 Written: 12680960 Rate: 7,246.20 Kb/Sec

Backup of msdb completed successfully.

25
Beginning full backup for database QoEMetrics, 5 of 7.
Full: 0 Read: 5335808 Written: 5335808 Rate: 6,892.53 Kb/Sec

Backup of QoEMetrics completed successfully.

Beginning full backup for database ReportServer, 6 of 7.


Full: 3 Read: 11534336 Written: 0 Rate: 0.00 Kb/Sec
Full: 3 Read: 20027904 Written: 0 Rate: 0.00 Kb/Sec
Full: 0 Read: 20030208 Written: 20030208 Rate: 8,851.02 Kb/Sec

Backup of ReportServer completed successfully.

Beginning full backup for database ReportServerTempDB, 7 of 7.


Full: 0 Read: 2190080 Written: 2190080 Rate: 3,839.77 Kb/Sec

Backup of ReportServerTempDB completed successfully.

Inactivating log backup LcsCDR\201206131534450001628


Inactivating log backup QoEMetrics\201206131629490000AA4

Total SQL backups selected: 7


Total SQL backups attempted: 7
Total SQL backups completed: 7
Total SQL backups excluded: 0
Total SQL backups inactivated: 2
Total SQL backups deduplicated: 0

Throughput rate: 6,156.55 Kb/Sec


Total bytes inspected: 55,181,568
Total bytes transferred: 55,181,568
Total LanFree bytes transferred: 0
Total bytes before deduplication: 0
Total bytes after deduplication: 0
Data compressed by: 0%
Deduplication reduction: 0.00%
Total data reduction ratio: 0.00%
Elapsed processing time: 8.75 Secs

ANS0102W Unable to open the message repository tdpsena.txt. The American English repository will
be used instead.

IBM Tivoli Storage Manager for Databases:


Data Protection for Microsoft SQL Server
Version 6, Release 3, Level 0.0
(C) Copyright IBM Corporation 1997, 2011. All rights reserved.

ACO5057I The C:\Progra~1\Tivoli\TSM\TDPSql\sqlfull.log log file was pruned successfully.

Connecting to SQL Server, please wait…

Starting SQL database backup…

Connecting to TSM Server as node ‘TSM_CLIENT01_SQL’…

Beginning log backup for database LcsCDR, 1 of 4.


Full: 0 Read: 84736 Written: 84736 Rate: 57.83 Kb/Sec
Full: 0 Read: 84736 Written: 84736 Rate: 52.34 Kb/Sec

26
Backup of LcsCDR completed successfully.

Beginning log backup for database model, 2 of 4.


Full: 0 Read: 85760 Written: 85760 Rate: 98.41 Kb/Sec

Backup of model completed successfully.

Beginning log backup for database QoEMetrics, 3 of 4.


Full: 0 Read: 90880 Written: 90880 Rate: 98.50 Kb/Sec

Backup of QoEMetrics completed successfully.

Beginning log backup for database ReportServer, 4 of 4.


Full: 0 Read: 105216 Written: 105216 Rate: 101.53 Kb/Sec
Full: 0 Read: 105216 Written: 105216 Rate: 88.43 Kb/Sec

Backup of ReportServer completed successfully.

Total SQL backups selected: 7


Total SQL backups attempted: 4
Total SQL backups completed: 4
Total SQL backups excluded: 3
Total SQL backups deduplicated: 0

Throughput rate: 79.59 Kb/Sec


Total bytes inspected: 366,592
Total bytes transferred: 366,592
Total LanFree bytes transferred: 0
Total bytes before deduplication: 0
Total bytes after deduplication: 0
Data compressed by: 0%
Deduplication reduction: 0.00%
Total data reduction ratio: 0.00%
Elapsed processing time: 4.50 Secs

———————
Return code was 0
=====================

5) Login to the TSM TESTto create a SQL backup schedule for this job, and associate
TSM_Client01_SQL to this schedule.

def sched SQL Daily_Full desc=”SQL Daily Full Backup” action=command


objects=”objects=”C:\Progra~1\Tivoli\TSM\TDPSql\sqlfull.cmd” priority=2 starttime= now
duration=15 duru=minutes period=1 perunits=day dayofweek=any
define association SQL Daily_Full TSM_Client01_SQL

6) Check the log file to confirm the job is completed successfully.

27
or check the event on the TSM TESTby running:

q event SQL Daily_Full f=d

28
6. Common Errors

The following error is logged in the Data Protection for Microsoft SQL log file :

ACO5426E The SQL log on does not have the Sysadmin role: CSqlApi::LogonServer:6638:1904
Server:IsSysadmin:false
The QUERY EVENT Tivoli Storage Manager administrative command shows the schedule as

Cause

Windows account running the scheduler service does not have the sysadmin role on the SQL server.

Diagnosing the problem

Review the “C:\Program files\Tivoli\TSM\tdpsql\tdpsql.cfg” file. Verify what value is specified for the
SQLAUTHentication option. In this case, the option was not configured and the following default value
was used : [SQLAUTHentication INTegrated

Review the Tivoli Storage Manager client scheduler in Windows and verify which account is used to
run the service. In this case, the scheduler service was configured to run with the “Local System
Account”.

Resolving the problem

When using the INTegrated option, it means that the userid doing the backup (or the account running
the Data Protection for Microsoft SQL scheduler service) must have the sysadmin role on the SQL
server. When the scheduler service is run with the “Local System Account”, you need to “NT
AUTHORITY\SYSTEM” to the sysadmin role on the SQL server otherwise run the scheduler service
with a different Windows account which has sysadmin role to the SQL server.

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

29

You might also like