Integrated backup/restore scenarios
Chapter 4. Database and recovery log
4.9 Additional commands
Although the recommended settings enable database triggering, you may need to occasionally perform some database maintenance operations in Tivoli Storage Manager. This section shows the possible commands to increase or decrease both database and recovery log space. You should only need to run these commands if you want to redesign the volume layouts or if you add new volumes to Tivoli Storage Manager.
4.9.1 EXTEND DB
Use theextend dbcommand to increase the amount of space that can be used by the database within all the database volumes previously allocated to Tivoli Storage Manager.
4.9.2 EXTEND LOG
Use the extend log command to increase the amount of space that can be used by the recovery log within all the recovery log volumes previously allocated to Tivoli Storage Manager.
tsm: TSM010> query db
Available Assigned Maximum Maximum Page Total Used Pct Max.
Space Capacity Extension Reduction Size Usable Pages Util Pct
(MB) (MB) (MB) (MB) (bytes) Pages Util
---- --- ---- ---- -- ---- ----
---20 8 12 0 4,096 2,048 763 37.3 50.3
tsm: TSM010> extend db 8
ANR2248I Database assigned capacity has been extended.
tsm: TSM010> query db
Available Assigned Maximum Maximum Page Total Used Pct Max.
Space Capacity Extension Reduction Size Usable Pages Util Pct
(MB) (MB) (MB) (MB) (bytes) Pages Util
---- --- ---- ---- -- ---- ----
---20 16 4 8 4,096 4,096 765 18.7 25.2
4.9.3 REDUCE DB
Use thereduce dbcommand to decrease the amount of space that can be used by the database. To reduce the capacity of the database, you must reduce the database in 4 MB increments. If you do not specify the reduction in 4 MB
increments, Tivoli Storage Manager rounds the number to the next 4 MB partition.
For example, if you reduce the database by 1 MB, Tivoli Storage Manager reduces the capacity of the database by 4 MB.
tsm: TSM010> query log
Available Assigned Maximum Maximum Page Total Used Pct Max.
Space Capacity Extension Reduction Size Usable Pages Util Pct
(MB) (MB) (MB) (MB) (bytes) Pages Util
---- --- ---- ---- -- ---- ----
---36 8 28 4 4,096 1,536 75 4.9 21.3
tsm: TSM010>extend log 8
ANR2269I Recovery log extension process initiated (process ID 36).
ANS8003I Process number 36 started.
tsm: TSM010> query log
Available Assigned Maximum Maximum Page Total Used Pct Max.
Space Capacity Extension Reduction Size Usable Pages Util Pct
(MB) (MB) (MB) (MB) (bytes) Pages Util
---- --- ---- ---- -- ---- ----
---36 16 20 12 4,096 3,584 76 2.1 2.1
tsm: TSM010> query actlog ...
02/08/00 19:27:57 ANR0984I Process 36 for EXTEND LOG started in the BACKGROUND at 19:27:57.
02/08/00 19:27:57 ANR2269I Recovery log extension process initiated (process ID 36).
02/08/00 19:27:58 ANR0307I Recovery log extend in progress; 4 megabytes of 8 formatted.
02/08/00 19:28:00 ANR0307I Recovery log extend in progress; 8 megabytes of 8 formatted.
02/08/00 19:28:00 ANR2268I Recovery log assigned capacity has been extended.
02/08/00 19:28:00 ANR0988I Process 36 for EXTEND LOG running in the BACKGROUND processed 8,388,608 bytes with a completion state of SUCCESS at 19:28:00.
Tivoli Storage Manager> query db
Available Assigned Maximum Maximum Page Total Used Pct Max.
Space Capacity Extension Reduction Size Usable Pages Util Pct
(MB) (MB) (MB) (MB) (bytes) Pages Util
---- --- ---- ---- -- ---- ----
---20 20 0 12 4,096 5,120 436 8.5 8.5
Tivoli Storage Manager> reduce db 8
ANR2250I Database assigned capacity has been reduced.
Tivoli Storage Manager> query db
Available Assigned Maximum Maximum Page Total Used Pct Max.
Space Capacity Extension Reduction Size Usable Pages Util Pct
(MB) (MB) (MB) (MB) (bytes) Pages Util
---- --- ---- ---- -- ---- ----
---20 12 8 4 4,096 3,072 434 14.1 14.1
tsm: TSM010> query db
Available Assigned Maximum Maximum Page Total Used Pct Max.
Space Capacity Extension Reduction Size Usable Pages Util Pct
(MB) (MB) (MB) (MB) (bytes) Pages Util
---- --- ---- ---- -- ---- ----
---20 16 4 8 4,096 4,096 765 18.7 25.2
tsm: TSM010> reduce db 4
ANR2250I Database assigned capacity has been reduced.
tsm: TSM010> query db
Available Assigned Maximum Maximum Page Total Used Pct Max.
Space Capacity Extension Reduction Size Usable Pages Util Pct
(MB) (MB) (MB) (MB) (bytes) Pages Util
---- --- ---- ---- -- ---- ----
---20 12 8 4 4,096 3,072 764 24.9 33.6
4.9.4 REDUCE LOG
Use the reduce logcommand to decrease the amount of space that can be used by the recovery log. To decrease the capacity of the recovery log, you must reduce the recovery log in 4 MB increments. If you do not specify the reduction in 4 MB increments, Tivoli Storage Manager rounds the number to the next 4 MB partition. For example, if you reduce the recovery log by 1 MB, Tivoli Storage Manager reduces the capacity of the recovery log by 4 MB.
4.9.5 DELETE VOLHIST TYPE=DBBACKUP
A common problem reported by new Tivoli Storage Administrators is that they run out of tapes. Upon analysis, they discover many tapes have been used by old server database backups. The problem seems to be compounded by the fact that each database backup requires its own tape - it is not possible to ’stack’ multiple backups onto a single tape. You should think of this as a security feature.
Database backups are extremely important and you would not want to be in the situation where you had your last seven days of database backups contained on one tape which, at the crucial moment when a restore was required, turned out to be unreadable. That is why Tivoli Storage Manager requires you to use a new tape each time you backup the database, regardless of whether it is a full or incremental backup. But the problem remains, how to free up the obsolete database backup tapes for re-use? The answer is the delete volhistory command. Use this command to delete sequential volume history information collected by the server when the information is no longer needed. Depending on the options chosen, this can be for sequential volumes used for database backups, storage pools or other purposes.
tsm: TSM010> query log
Available Assigned Maximum Maximum Page Total Used Pct Max.
Space Capacity Extension Reduction Size Usable Pages Util Pct
(MB) (MB) (MB) (MB) (bytes) Pages Util
---- --- ---- ---- -- ---- ----
---36 16 20 12 4,096 3,584 76 2.1 2.1
tsm: TSM010> reduce log 8
ANR2270I Recovery log assigned capacity has been reduced.
tsm: TSM010> query log
Available Assigned Maximum Maximum Page Total Used Pct Max.
Space Capacity Extension Reduction Size Usable Pages Util Pct
(MB) (MB) (MB) (MB) (bytes) Pages Util
---- --- ---- ---- -- ---- ----
---36 8 28 4 4,096 1,536 77 5.0 5.0
When the records that contain volume history information about volumes that are not in storage pools (volume types DBSNAPSHOT, BACKUPFULL,
BACKUPINCR, and EXPORT) are deleted, the volumes return to scratch status if they were acquired by Tivoli Storage Manager as scratch volumes. For scratch volumes with device type FILE, the files are deleted.
When the records that contain volume history information about volumes in storage pools are deleted, the volumes themselves are not affected and remain in the Tivoli Storage Manager database.
In 11.2.2, “Defining the volume history schedule” on page 220 we describe setting up a schedule to take care of this automatically.
tsm: TSM010> query volhist type=dbbackup
tsm: TSM010> del volhist type=dbbackup todate=today Do you wish to proceed? (Yes/No) y
ANR2467I DELETE VOLHISTORY: 1 sequential volume history entries were successfully deleted.
You should not run thedelete volhistcommand to delete obsolete database backups if you are using Tivoli Disaster Recovery Manager, since that product handles the expiry of this data itself.
Note: