13 May 2014

Troubleshooting TDP SAP backup error "BKI4008E: File cannot be opened. Reason: errno(22) A system call received a parameter that is not valid"

The following error will be seen while trying to take the SAP Oracle database backup using Tivoli Data Protection (TDP) for SAP with Oracle software through brtools and backint interface.

BR0280I BRCONNECT time stamp: 2014-05-08 17.10.09
#BEGIN /oracle/QDI/sapdata1/sysaux_1/sysaux.data1
#BEGIN /oracle/QDI/sapdata1/system_1/system.data1
BR0315I 'Alter tablespace SYSAUX begin backup' successful
BR0315I 'Alter tablespace SYSTEM begin backup' successful
BR0280I BRCONNECT time stamp: 2014-05-08 17.10.09

BKI4008E: File '/oracle/QDI/sapdata1/sysaux_1/sysaux.data1' cannot be opened. Reason:  errno(22)  A system call received a parameter that is not valid.

BR0280I BRCONNECT time stamp: 2014-05-08 17.10.13
#END /oracle/QDI/sapdata1/sysaux_1/sysaux.data1
#END /oracle/QDI/sapdata1/system_1/system.data1
BR0317I 'Alter tablespace SYSAUX end backup' successful
BR0317I 'Alter tablespace SYSTEM end backup' successful
BR0280I BRCONNECT time stamp: 2014-05-08 17.10.13

BKI1208W: The object '/oracle/QDI/sapdata1/sysaux_1/sysaux.data1' will be retried [3].
BKI1208W: The object '/oracle/QDI/sapdata1/system_1/system.data1' will be retried [3]

The above error doesnt show much information about the error and it will be quite annoying if you have no idea about how SAP and AIX works together. You will see this kind of error if your SAP database filesystems are mounted with the CIO (Concurrent I/O) option enabled. Concurrent I/O (CIO) for JFS2 filesystems gains the benefits of Direct I/O without the locking serialization. It allows a process writing to a file exclusive write access to that file. 

You need to remount the filesystems with CIO option disabled to fix this problem. Apparently, this requires the downtime of your SAP system.

Follow these below steps to troubleshoot this BKI4008E error permanently

1) First, STOP your SAP system (database & application).

2) Check which filesystems have CIO enabled by using lsfs command

      # lsfs

/dev/fslv03     --         /oracle/PRD/origlogA      jfs2  1048576 rw,cio         yes  no
/dev/fslv04     --         /oracle/PRD/origlogB      jfs2  1048576 rw,cio         yes  no
/dev/fslv12     --         /oracle/PRD/oraarch        jfs2  20971520 rw              yes  no
/dev/fslv13     --         /oracle/PRD/sapreorg      jfs2  2097152 rw               yes  no
/dev/fslv14     --         /oracle/PRD/sapdata1      jfs2  41943040 rw,cio       yes  no
/dev/fslv15     --         /oracle/PRD/sapdata2      jfs2  94371840 rw,cio       yes  no
/dev/fslv16     --         /oracle/PRD/sapdata3      jfs2  4194304 rw,cio         yes  no
/dev/fslv17     --         /oracle/PRD/sapdata4      jfs2  115343360 rw,cio     yes  no
/dev/fslv21     --         /eccerp6                           jfs2  4194304 rw                   yes  no

3) After making sure that SAP is down, unmount all the filesystems which have CIO enabled one by one. I am showing only for 2 filesystems, you need to change all the filesystems which have CIO enabled.

      # umount /oracle/PRD/origlogA
      # umount /oracle/PRD/sapdata2

4) Disable the CIO option for the filesystems by using chfs command as shown below

     # chfs -a options=rw /oracle/PRD/origlogA
    # chfs -a options=rw /oracle/PRD/sapdata2

5) Then remount the filesystems. You should disable CIO option for all the SAP filesystems.

      # mount /oracle/PRD/origlogA
     # mount /oracle/PRD/sapdata2

6) Now, if you run lsfs command, the output should be somewhat like

/dev/fslv03     --         /oracle/PRD/origlogA      jfs2  1048576 rw               yes  no
/dev/fslv04     --         /oracle/PRD/origlogB      jfs2  1048576 rw               yes  no
/dev/fslv12     --         /oracle/PRD/oraarch        jfs2  20971520 rw              yes  no
/dev/fslv13     --         /oracle/PRD/sapreorg      jfs2  2097152 rw                yes  no
/dev/fslv14     --         /oracle/PRD/sapdata1      jfs2  41943040 rw              yes  no
/dev/fslv15     --         /oracle/PRD/sapdata2      jfs2  94371840 rw              yes  no
/dev/fslv16     --         /oracle/PRD/sapdata3      jfs2  4194304 rw                yes  no
/dev/fslv17     --         /oracle/PRD/sapdata4      jfs2  115343360 rw            yes  no
/dev/fslv21     --         /eccerp6                              jfs2  4194304 rw                yes  no

7) After making sure all the SAP filesystems are correctly mounted with CIO disabled, START SAP application and database.

8) Finally, now you can restart your SAP database backup using SAP brtools and backint interface and the backup should complete successfully.

Check this below IBM technote for more info


10 May 2014

Steps to restore TDP SAP for Oracle production (PRD) database to another SAP oracle database (DEV or QTY)

You might required to restore the current SAP oracle database to another SAP database according to the clients requirement. For example, it is required to restore the SAP production database to SAP development/quality database for testing any upgrade/modifications on the existing database before making it live. It is the TSM administrators job to restore the database within the given downtime. TSM administrator should also make sure that the offline backup of SAP production database is successful before going for restoration process. In this post we will see how to restore Production (PRD) SAP database to Quality (QTY) SAP database.

How to restore SAP Oracle database backup to another SAP system ?

Step 1: First, you need to plan for a offline backup of production SAP database and it should be successful. Make sure that the tapes used for this backup are secure and are inside the library slots for immediate mounting. 

Step 2: Make all the SAP file systems on QTY server like PRD server with  same size (or +1GB % utilize). If filesystems already exist then clean or empty them. Any SAP filesystems will be in the format of 

/oracle/SID/sapdata1
/oracle/SID/orilog1
/oracle/SID/sapreorg
/oracle/SID/saparch1
/oracle/SID/saptrace/usertrace
/oracle/SID/saptrace/background
/oracle/SID/sapcheck
/oracle/SID/sapbackup

Here SID is the Oracle SID - ideally PRD for production & QTY for quality systems. You have to remove any existing data in these filesystems by using rm -rf command (command depends on OS).

Step 3: In this step you have to copy all the TDP SAP configuration files from Production system to the Quality system. The TDP SAP configuration files and their locations are 
  • /oracle/PRD/102_64/dbs/initPRD.sap
  • /oracle/PRD/102_64/dbs/initPRD.utl

You need to copy these files and paste them in the same location in the Quality System by changing their name as shown below

  • /oracle/QTY/102_64/dbs/initQTY.sap
  • /oracle/QTY/102_64/dbs/initQTY.utl
If files with the same name already exists, then rename the old files with another name before copying above files.

Step 4: In TDP SAP, after the database backup (online & offline) completes it generates the log file. For offline the log file extension is (.aff) and for online backup the log file extension is (.anf). Because we are restoring latest offline backup we need to copy the latest .aff file  from production system to quality system. The file location is shown below.

 Copy from /oracle/PRD/sapbackup/brnnfghrk.aff and paste it in /oracle/QTY/sapbackup filesystem.

Step 5: From the same location, we also have to copy the backPRD.log file to the same location in the quality system.

Step 6: Next, we need to change permissions and ownership (dba user) of all the files which are copied in the above steps.

chown oraqty:dba initQTY.sap initQTY.utl
chmod 777 initQTY.sap initQTY.utl

chown oraqty:dba brnnfghrk.aff backPRD.log 
chmod 777 brnnfghrk.aff backPRD.log

Step 7: In this step, we need to open initQTY.sap & initQTY.utl files and change the PRD to QTY. Make sure you change these below important parameters

In initQTY.sap file
util_par_file=/oracle/QTY/102_64/dbs/initQTY.utl    (PRD  → QTY)
compress_dir = /oracle/QTY/sapreorg

In initQTY.utl file
CONFIG_FILE       /oracle/QTY/102_64/dbs/initQTY.bki    (PRD  → QTY)

Step 8: Next, we need to change the node in the /usr/tivoli/tsm/client/api/bin64/dsm.sys file. use the same node name which you have used for taking the production database backup.  You have to make sure that the SERVERNAME in all the files dsm.opt, initQTY.utl and dsm.sys are same.

cd /usr/tivoli/tsm/client/api/bin64/dsm.sys
vi dsm.sys
nodename PRDnode

Step 9: Next, we need to authenticate the TDP node with TSM server. This TDP node name is nothing but the production TDP node name, we have to authenticate PRD TDP node from QTY system.To do this you have to login using oracle user

su - oraqty
cd /oracle/QTY/102_64/dbs
./backint -p initQTY.utl  -f password
or 
su - oraqty
cd /oracle/QTY/102_64/dbs
./usr/tivoli/tsm/tdp_r3/ora64/backint -p initQTY.utl  -f password

Type the TDP node password and press enter. It should successfully authenticate the password for the production node through which you have taken the offline backup.

Note: backint utility is by default located in /usr/tivoli/tsm/tdp_r3/ora64 directory. You can either make a soft link to the /oracle/PRD/102_64/dbs directory or use the whole path name for authenticating TDP node as above.

Step 10: Finally, restoring the backup data, you have to login as oracle user and run the following command to restore whole database.

su - oraqty
cd /oracle/QTY/102_64/dbs
brrestore –m full –b brnnfghrk.aff –p initQTY.sap –c

Note: You can run brrestore utility from anywhere if the environment variable setting is enabled for this utility. Otherwise you need to create soft link from /usr/sap/QTY/sys/exe/run to the /oracle/QTY/102_64/dbs directory.

Commands to restore single database and archivelog files

1) For restoring only single file use the following command

brretore –m /oracle/QTY/sapdata7/btabd_250/btabd.data250 –b brnnfghrk.aff  –p initQTY.sap  –c

2) For restoring one database file use the following command

brretore –m /oracle/PRD/sapdata38/btabd_250/btabd.data250 –b  brnnfghrk.aff   –p initQTY.sap -c

3) For restoring archive files online use below steps
  • Copy archPRD.log to QTY server  
  • Change permission and owner as above
  • su - oraQTY
3.1) Restoring one archive file
brrestore -u system/passw0rd -a 519407  (No. of archive file)

3.2) Restoring multiple archive files
 brrestore -u system/passw0rd -a '519408-519498'  (range of archive files)


24 April 2014

Quick Steps to configure TSM for Database (TDPOracle & TDPSQL) and TSM for Mail (TDPExchange & TDPDomino) Servers

What is IBM Tivoli Data Protection (TDP) and why we need it ?

How to configure Tivoli Data Protection (TDP)
IBM Tivoli Data Protection (TDP) is one of the family products of IBM Tivoli Storage Manager (TSM) which is used specifically for application level backup and restore functions. It allows us to take the backup of the applications even when the application is in running state, it offers both online and offline application level backups. Through TSM Backup-Archive client we can take only flat file level backup but using TDP’S we can communicate directly with any of the application servers like SQL, ORACLE, R3 SAP, EXCHANGE, DOMINO thorough TSM API and configure the backup, this type of backup is generally considered as a consistent and reliable backup for restoring the application data. In addition, we can also configure TDP clients to take the archive log backups for database and mail applications for point in time restore. You need a separate licenses from IBM to use these TDP products.

Below steps will help you to quickly configure TDP clients and start taking the backup of your applications. It is required to install and configure TSM BAclient software on all the application servers before installing/configuring any TDP Clients.

Quick steps to configure Tivoli Storage Manager (TSM) for Database Servers

With TSM for Database software package you can protect Microsoft SQL Database and Oracle Database servers. Use the following steps to quickly configure TDP clients to protect your databases.

Steps to configure TDP for SQL Databases

  • First,we have to install the TDP SQL Software in SQL application client. After that we will get TDP SQL folder (Program Files/Tivoli/Tsm/Tdpsql). This is the default installation path for TDP SQL. In this folder we will have all the required configuration files. They are TDPSQL.CFG, DSM.SMP (dsm.smp rename it as dsm.opt).
  • Next, we have to edit these file (dsm.opt) with default parameters which are tcpserveraddress, tcpport, nodename, commmethod, include, exclude, passwordaccess generate options.
  • After installation and configuration we will go to TSM server side and we have to create  a new policy domain (or) new management class in the existing domain with the required retention settings.
  • Then we come back to client side and trigger the following command to check the status of the TDPSQL as shown below. 
                Cd C:\Program Files\Tivoli\Tsm\Tdpsql >Tdpsqlc
  • Now we have to check the communication between TDPSQL and TSM Server by using the following command. This command will show all the policy and destination setting of the SQL database backups.
          Cd C:\Program Files\Tivoli\Tsm\Tdpsql >Tdpsqlc q tsm
  • Next step is to authenticate and store the password of the TDP SQL node. You have to register two separate nodes on TSM Server, one for BA-client node and another for TDPSQL. Run the following command to authenticate and store the password for future backup schedules. It will ask old password, new password and verification password. You can skip this step if you have already authenticated it through TDPSQL GUI before.
         Cd C:\Program Files\Tivoli\Tsm\Tdpsql >tdpsqlc changetsmpassword
  • Finally,  we can take backup of the SQL application database. To take the backup you can either use GUI or commandline.  On the commandline run the following command to start the SQL DB backup.
         Cd C:\Program Files\Tivoli\Tsm\Tdpsql>Tdpsqlc backup databasename full

Steps to configure TDP for ORACLE Databases

  • First,we have to install the TDP ORACLE software in Oracle application client. After that we will get TDP oracle folder (Program Files/Tivoli/Tsm/AgentOba). This is the default TDP Oracle installation path in windows OS. In this folder we will have all the required configuration files. They are TDPOCONF.CFGDSM.SMP.
  • Change to the C:\Program Files\Tivoli\TSM\AgentOBA directory and copy the tdpo.opt.smp file to tdpo.opt. Edit the tdpo.opt file to include these options:
dsmi_orc_config C:\Program Files\Tivoli\TSM\AgentOBA\dsm.opt 
dsmi_log C:\Program Files\Tivoli\TSM\AgentOBA
  • In this same directory, copy the dsm.smp file to dsm.opt. Edit the dsm.opt file to include these options:

COMMMethod TCPip 
TCPServeraddress x.x.x.x 
PASSWORDAccess generate 
NODename TDPnodename
  • Register the node to the Tivoli Storage Manager server with the following command:

REG NODE TDPnodename password maxnummp=n
  • Make sure the Oracle user has the read and write permission to the C:\Program Files\Tivoli\TSM\AgentOBA directory.
  • Change to the C:\Program Files\Tivoli\TSM\AgentOBA directory and run the tdpoconf password command as Oracle user to generate the password file. You will be prompted to enter the password from Step 4 three times.
  • Run the tdpoconf showenvironment command to confirm proper configuration.
  • As Oracle user, run your RMAN backup script with the parameter as specified.

    ENV=(TDPO_OPTFILE=C:\Program Files\Tivoli\TSM\AgentOBA\tdpo.opt) 


            For example:

run {
                             allocate channel t1 type ’sbt_tape’ parms
                                 ’ENV=(TDPO_OPTFILE=C:\Program Files\Tivoli\TSM\AgentOBA\tdpo.opt)’;
                             backup
                                filesperset 5
                                format ’df_%t_%s_%p’
                                (database);
}

Quick steps to configure Tivoli Storage Manager for Mail Servers

With TSM for Mail software package you can protect Microsoft Exchange and IBM Lotus Domino Mail Servers. Use the following steps to quickly configure TDP clients to protect your mail servers

Steps to Configure TDP for EXCHANGE

  • First, we have to install the TDP Exchange Software in Exchange application client.. After that we will get TDP Exchange folder (Program Files/Tivoli/Tsm/TdpExchange. This is the default installation path for TDP Exchange. In this folder we will have all the required configuration files. They are TDPEXC.CFGDSM.SMP (dsm.smp rename it as dsm.opt).
  • Next, we have to edit these file (dsm.opt) with default parameters which are tcpserveraddress, tcpport, nodename, commmethod, include, exclude, passwordaccess generate options.
  • After installation and configuration we will go to TSM server side and we have to create a new policy domain (or) new management class in the existing domain with the required retention settings.
  • Then we come back to client side and trigger the following command to check the status of the TDPExchange as shown below. 
                Cd C:/Program Files/Tivoli/Tsm/TdpExchange >Tdpexcc
  • Now we have to check the communication between TDPExchange and TSM Server by using the following command. This command will show all the policy and destination settings of the Exchange backups.
          Cd C:/Program Files/Tivoli/Tsm/TdpExchange >Tdpexcc q tsm
  • Next step is to authenticate and store the password of the TDP Exchange node. You have to register two separate nodes on TSM Server, one for BA-client node and another for TDPExchange. Run the following command to authenticate and store the password for future backup schedules. It will ask old password, new password and verification password. You can skip this step if you have already authenticated it through TDPExchange GUI before
         Cd C:/Program Files/Tivoli/Tsm/TdpExchange>tdpexcc changetsmpassword 
  • Finally,  we can take backup of the Exchange mail server. To take the backup you can either use GUI or commandline.  On the commandline run the following command to start the Exchange mail server backup.
         Cd C:/Program Files/Tivoli/Tsm/Tdpexchange>Tdpexcc backup storagegroupname full
  • Three backup types which are commonly used for taking backup of SQL DB are FULL, DIFFERENTIAL and INCREMENTAL backups. 

Steps to Configure TDP for DOMINO Mail servers

  • First,we have to install the TDP Domino Software in Domino application client. After that we will get TDP Domino folder (Program Files/Tivoli/Tsm/Domino). This is the default installation path for TDP Domino.  In this folder we will have all the required configuration files. They are DOMDSM.CFGDSM.SMP (dsm.smp rename it as dsm.opt).
  • Next, we have to edit these file (dsm.opt) with default parameters which are tcpserveraddress, tcpport, nodename, commmethod, include, exclude, passwordaccess generate options.
  • After installation and configuration we will go to TSM server side and we have to create  a new policy domain (or) new management class in the existing domain with the required retention settings.
  • Then we come back to client side and trigger the following command to check the status of the TDPDOMINO as shown below. 
                Cd C:/Program Files/Tivoli/Tsm/Tdpsql >domdsmc
  • Now we have to check the communication between TDP Domino and TSM Server by using the following command. This command will show all the policy and destination settings of the Lotus Domino backups.
          Cd C:/Program Files/Tivoli/Tsm/domino >domdsmc q adsmserv
  • Next step is to authenticate and store the password of the TDP Domino node. You have to register two separate nodes on TSM Server, one for BA-client node and another for TDP Domino. Run the following command to authenticate and store the password for future backup schedules.  It will ask old password, new password and verification password. You can skip this step if you have already authenticated it through TDP Domino GUI before and stored the         password.
         Cd C:/Program Files/Tivoli/Tsm/domino >domdsmc changetsmpassword
  • Finally,  we can take backup of the Domino Mail server. To take the backup you can either use GUI or commandline.  On the commandline run the following command to start the Domino Mail server backup.
         Cd C:/Program Files/Tivoli/Tsm/domino>Domdsmc sel mail/* -subdir=yes


21 April 2014

Does TSM client encrypt or decrypt the client data which is already been encrypted before taking backup or restore ?

The Tivoli Storage Manager client makes no special provisions for data on a machine that has been previously encrypted, such as from third party vendor programs or NTFS EFS. From the perspective of Tivoli Storage Manager there is no difference between the encrypted data and plain text. Tivoli Storage Manager will take the data as it exists and store it in Tivoli Storage Manager Server storage. Tivoli Storage Manager makes no attempts to decrypt the data prior to storing it in the Tivoli Storage Manager server. 

Then when it is restored, Tivoli Storage Manager puts the data back as it was on the disk. If that was previously encrypted, then the third party program will be needed to decrypt that and bring it back to it's plain format.

Starting with the Tivoli Storage Manager V5.5 Client, the EFSDECRYPT parameter was introduced for AIX Client's only. This can allow the client to decrypt JFS2 encrypted files to plain format before having them stored into the Tivoli Storage Manager Server. The default is EFSDecrypt=NO to not decrypt the files. 

Efsdecrypt option

The efsdecrypt option allows you to control whether or not files encrypted by an AIX Encrypted File System (EFS) are read in encrypted or decrypted format. The efsdecrypt option default is no, which is to back up the encrypted or raw data. If you specify yes, the files are backed up as clear text, which means that they are backed up as normal files, as if the files existed in unencrypted form on the file system.

Another important point to remember if you want to use this options for your backups. Whenever you run a backup that includes any files encrypted on an EFS, you must ensure that you use the correct specification of the efsdecrypt option. If the efsdecrypt option value changes between two incremental backups, all encrypted files on EFS file systems are backed up again, even if they have not changed since the last backup. For example, if you are running an incremental backup of encrypted files that were previously backed up as "raw," then ensure that efsdecrypt is specified as no. If you change efsdecrypt to yes, all the files are backed up again in clear text even if they are unchanged, so ensure that you use this option carefully.

efsdecrypt syntax


                                     .-No--.   
>>-EFSDecrypt-------+-----+-----------------------------------------><
                                    '-Yes-' 


Suppose if the Tivoli Storage Manager client configuration is setup to encrypt it's own data stream to the Tivoli Storage Manager server. In this case Tivoli Storage Manager will take the data as it exists on the client and encrypt it and store it in the Tivoli Storage Manager server in it's own encrypted format. This means that if the data has been previously encrypted, Tivoli Storage Manager will encrypt the data again using it's own encryption method, and store this in the server. Then when it is restored, Tivoli Storage Manager decrypts the data back to it's original form as it was on the disk. If that was previously encrypted, then the third party program will be needed to decrypt that and bring it back to it's plain format. 


19 April 2014

How to rebalance the TSM Server database tablespaces after adding the new db filesystem

When the Tivoli Storage Manager server database (TSMDB1) is created using dbdirs on multiple file systems, for example "/TSM/db1, /TSM/db2", the database will use all file systems equally. When additional file systems need to be added to the database space with the "extend dbs" command, the newly added tablespaces will not be used equally.

After adding the /TSM/db3 file system to the database space, DB2 will not rebalance the file systems utilization equally. For example 

/dev/tsmdblv021 10412032 10411804 228 100% /TSM/db1
/dev/tsmdblv022 10412032 10411812 220 100% /TSM/db2
/dev/tsmdblv033 10403840 1333136 9070704 13% /TSM/db3

The 100% full /TSM/db1 and /TSM/db2 will stay 100% full and may cause the Tivoli Storage Manager to stop because of a DISK FULL condition. To prevent this condition you have to rebalance the TSM Database tablespaces. If the Database was initially created by a Tivoli Storage Manager Server V6.2 or above, there are is a way to do this online using the steps below.

Steps to rebalance the TSM Database Tablespace after adding new DB filesystem

  • Prepare a filesystem the same size as the initial filesystem. For example /TSM/db4 size : 10403840
  • Add /TSM/db4 to tablespace via Tivoli Storage Manager server admin command :
    extend DBs /fs/db4
  • Perform the rebalance activity during a quiet time. Logon as the server instance owner and execute the DB2 commands below. (on Windows, you need to run these commands from a DB2 Command Window and "set db2instance=server1).
    db2 connect to tsmdb1
    db2 set schema tsmdb1
    db2 alter tablespace SYSCATSPACE rebalance
    db2 alter tablespace USERSPACE1 rebalance
    db2 alter tablespace LARGESPACE1 rebalance
    db2 alter tablespace LARGEIDXSPACE1 rebalance
    db2 alter tablespace IDXSPACE1 rebalance
    db2 alter tablespace SYSTOOLSPACE rebalance
  • Depending on the size of the tablespace, the rebalance can take some time to finish. For a large tablespace, the rebalance can take about 30 minutes. Run the following command to check the rebalance status
    db2 "select * from SYSIBMADM.TBSP_UTILIZATION " |grep -i progress
  • If the rebalance is still active, the above command will return the tablespace still in active resizing. Wait until all tablespaces have done the rebalance and execute the following commands to reduce the tablespaces 
    db2 alter tablespace SYSCATSPACE reduce max
    db2 alter tablespace USERSPACE1 reduce max
    db2 alter tablespace LARGESPACE1 reduce max
    db2 alter tablespace LARGEIDXSPACE1 reduce max
    db2 alter tablespace IDXSPACE1 reduce max
    db2 alter tablespace SYSTOOLSPACE reduce max
  • After the rebalance/reduce, the file systems should be equally utilized and there are should be no more file systems in 100% full condition.
Note: If you are not sure on how to do these steps, open an IBM PMR and IBM support should be able to do these steps for you. 


How to add a new filesystem to the existing TSM DB when the TSM server is down or unable to startup

It is possible to add extra filesystems to the existing TSM server to increase the TSM database size. You can increase the TSM database size while the TSM server is in both online and offline state. Use the extend dbspace command when the TSM server is in online state after making sure that filesystem is mounted and available for use.

Otherwise, if you have enough down time available you can also halt the TSM server and add the TSM DB filesystem entry in the dsmserv.opt file and then restart the TSM server. This will pick the new added filesystem and add it to the TSM database directory list.  Once the new filesystem is added you need to rebalance the DB2 so that all the DB filesystems have the same utilization. 

But the above two procedures can be done only if the TSM server is in good condition, i.e having enough space in TSM DB to do the other server activities. With the Tivoli Storage Manager Server up and running it is possible to assign a new filesystem to the DB using extend dbspace command. But when the Tivoli Storage Manager Server is down this command is not available.

Lets imagine a situation where one of the TSM DB filesystem size reached to 100% and your TSM server is now down. The above discussed steps cannot be done since TSM server instance cannot start. In these situations follow the below steps to add new DB filesystem and increase the TSM DB size.

How to add TSM DB space to an offline TSM Server

Usually this situation should not occur and the DB filesystem usage needs to be monitored in regular intervals. This situation might occur during high peak backup activity. So make sure you always check the TSM DB size and its corresponding filesystem sizes. To assign additional space to the DB2 when the server is down follow these steps
  • Add a new filesystem to the Operating System with the same size of the existing assigned filesystems.
  • For the following steps at least 200 MB need to be available in the existing DB filesystems.
  • Login as the Tivoli Storage Manager instance owner and run
- db2 connect to TSMDB1
- db2 ALTER DATABASE TSMDB1 ADD STORAGE ON <path_new_filesystem>
  • After completing the previous commands start the Tivoli Storage Manager Server.
  • Use the following command to verify whether the new filesystem was added successfully
- query dbs
  • When the new path is shown in the "q dbs" output you have to rebalance the DB. This means that the DB containers get distributed to all available paths. 


18 April 2014

How to troubleshoot TSM DB backup failure (ANR2983E DSMI_DIR - DB2 sqlcode -2033 sqlerrmc) in TSM V7.1

While taking TSM Database backup, the db backup might fail with the following error code  "ANR2983E Database backup terminated due to environment or setup issue related to DSMI_DIR - DB2 sqlcode -2033 sqlerrmc 168". This error is mainly seen in Tivoli Storage Manager V7.1 on all the platforms. The following error codes will be seen in the TSM activity log. 

ANR2983E Database backup terminated due to environment or setup issue related to DSMI_DIR - DB2 sqlcode -2033 sqlerrmc 168. (SESSION: 108, PROCESS: 3)
ANR1361I Output volume /tsm/fsname/94712603.DBV closed.(SESSION: 108, PROCESS: 3)
ANR0515I Process 3 closed volume /tsm/fsname/94712603.DBV. (SESSION: 108, PROCESS: 3)
ANR0985I Process 3 for Database Backup running in the BACKGROUND completed with completion state FAILURE at 01:10:04 PM. (SESSION: 108, PROCESS: 3) 

Troubleshooting ANR2983E (TSM DB backup failure) error

In Unix & Linux platforms, starting with Tivoli Storage Manager V7.1, it is no longer necessary to set the API password during a manual configuration of the server. If you set the API password during the manual configuration process, the TSM database backup might fail.

If you use the Tivoli Storage Manager configuration wizard to create a Tivoli Storage Manager server instance, you do not have to complete these steps. If you are configuring an instance manually, complete the following steps before you issue either the BACKUP DB or the RESTORE DB commands.

The values and directory paths given below might be different in your TSM environment. Replace the example values with your actual values of server instance user ID, Tivoli Storage Manager server instance directory, and the server instance users home directory. 

Steps to do on AIX & Linux Operating Systems

Step 1: First, set the Tivoli Storage Manager API environment-variable configuration for the database instance:
  • Log in using the tsminst1 user ID.
  • When user tsminst1 is logged in, ensure that the DB2 environment is properly initialized. The DB2 environment is initialized by running the /home/tsminst1/sqllib/db2profile script, which normally runs automatically from the profile of the user ID. Ensure the .profile file exists in the instance users home directory, for example, /home/tsminst1/.profile. If .profile does not run the db2profile script, add the following lines:

    if [ -f /home/tsminst1/sqllib/db2profile ]; then
          . /home/tsminst1/sqllib/db2profile
      fi
  • For the instance_directory/sqllib/userprofile file, add the following lines:

    DSMI_CONFIG=server_instance_directory/tsmdbmgr.opt
    DSMI_DIR=server_bin_directory/dbbkapi
    DSMI_LOG=server_instance_directory
    export DSMI_CONFIG DSMI_DIR DSMI_LOG 
  • For the instance_directory/sqllib/usercshrc file, add the following lines:

    setenv DSMI_CONFIG=server_instance_directory/tsmdbmgr.opt
    setenv DSMI_DIR=server_bin_directory/dbbkapi
    setenv DSMI_LOG=server_instance_directory

Step 2: Log out and log in again as tsminst1, or issue this command:

   . ~/.profile

Ensure that you enter a space after the initial dot (.) character.

Step 3: Create a file that is called tsmdbmgr.opt in the server_instance directory, which is in the /tsminst1 directory in this example, and add the following line:

SERVERNAME TSMDBMGR_TSMINST1

The SERVERNAME that you use must be consistent in the tsmdbmgr.opt and dsm.sys files.

Step 4: As root user, add the following lines to the Tivoli Storage Manager API dsm.sys configuration file. The dsm.sys configuration file is in the following default location server_bin_directory/dbbkapi/dsm.sys

servername TSMDBMGR_TSMINST1 
commmethod tcpip 
tcpserveraddr localhost 
tcpport 1500 
errorlogname /tsminst1
nodename $$_TSMDBMGR_$$ 

Steps to do on  Windows Operating Systems

Step 1: Create a file that is called tsmdbmgr.env in the d:\tsmserver1 directory with the following contents:

DSMI_CONFIG=server_instance_directory\tsmdbmgr.opt
DSMI_LOG=server_instance_directory 

Step 2: Set the DSMI_ api environment-variable configuration for the database instance:

Open a DB2 command window. One method is to go to the C:\Program Files\Tivoli\TSM\db2\bin directory, or if you installed Tivoli Storage Manager in a different location, go to the db2\bin subdirectory in your main installation directory. Then, issue this command:

    db2cmd 

Issue this command:

    db2set -i server1 DB2_VENDOR_INI=d:\tsmserver1\tsmdbmgr.env 

Step 3: Create a file that is called tsmdbmgr.opt in the d:\tsmserver1 directory with the following contents:

nodename $$_TSMDBMGR_$$ 
commmethod tcpip 
tcpserveraddr localhost
tcpport 1500
passwordaccess generate
errorlogname d:\tsmserver1 


Popular Posts

Recent Posts

Random Posts