Thursday, September 19, 2013

Configuring the TSM Backup Agent Web client on Unix/Linux Operating System

To configure the Web client from the command line, perform the following steps:

Step 1)  If MANAGEDServices scheduler is set, specify “MANAGEDServices webclient scheduler” in the dsm.sys file.

Step 2)  Ensure that you specify “passwordaccess generate” in the dsm.sys file.

Step 3)  Generate the Tivoli Storage Manager password; start the backup-archive client by entering the following command:

#dsmc query session

When prompted, enter your user ID and password.

Step 4)  Start the client acceptor daemon (CAD) by entering the following command:

#dsmcad

Step 5)  Access the Web client, enter the following URL from any supported browser, where your_machine_name is the host name of the machine running the Web client:

http://your_machine_name:1581

Step 6)  Run the schedule service in the background:

# nohup dsmc schedule 2> /dev/null &

 

Thursday, July 18, 2013

Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration

Problem:

# tail -f ../logs/error.log
[Tue Jul 09 13:32:24 201x] [alert] [client 10.26.45.83] /folder1/folder2/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration
[Tue Jul 09 13:32:25 201x] [alert] [client 10.26.45.83] /folder1/folder2/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration

Solution:
Step 1: Enable header module

                # vi httpd.conf
LoadModule headers_module modules/mod_headers.so

Step 2: Restart the http server
                # service httpd configtest
                # service httpd restart

 

Friday, July 12, 2013

Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist


Problems:
130702 12:48:19 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
130702 12:48:19 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

Solution:
Step 1   Change “datadir” option to new directory i.e. /abcdb
           # vi /etc/my.cnf
[mysqld]
datadir=/abcdb
socket=/var/lib/mysql/mysql.sock
user=mysql
symbolic-links=0
 
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
 
Step 2   Change ownership “mysql” of “/abcdb” directory.

Step 3   Disable selinux

 Step 4   Run below command:

                #mysql_install_db -user=mysql -ldata=/abcdb

Step 5   Restart the mysqld service

 

 

Monday, July 1, 2013

Large memory usage problem in Red Hat 6.x

Step 1:  Check memory usages
# free -m
                         total       used       free     shared    buffers     cached
Mem:              16081      15848        232          0        379      13846

            Still memory utilization is very high.

 Step 2: Check value of ‘vm.vfs_cache_pressure’
# sysctl -a | grep vfs_cache_pressure
vm.vfs_cache_pressure = 100

 Step 3: Change 1000 instead of 100
# vi /etc/sysctl.conf
vm.vfs_cache_pressure = 1000

Step 4: Make value effective
# sysctl -p
vm.vfs_cache_pressure = 1000

Set /proc/sys/vm/vfs_cache_pressure at 1000, memory usage would usually hover around 700-900MB, but if anything needs lots of memory (e.g. copying lots amount of data to tmpfs) it's usage would drop back to around 100-130MB mark.

Step 5:  Check memory usages
# free -m
                         total       used       free     shared    buffers     cached
Mem:              16081      15884        197          0        379      13850

Step 6: Run below command again
# sync && echo 3 > /proc/sys/vm/drop_caches
 
Meaning of above command parameters
            echo 1 > /proc/sys/vm/drop_caches  # free pagecache, [OR]
            echo 2 > /proc/sys/vm/drop_caches  # free dentries and inodes, [OR]
            echo 3 > /proc/sys/vm/drop_caches  # free pagecache, dentries and inodes

            sync  # forces the dump to be destructive

Step 7:  Check memory usages
# free -m
                                         total       used       free     shared    buffers     cached
Mem:               16081       1166      14915          0          4        149

 

Saturday, June 29, 2013

Steps to take DB backup in TSM 6.3

Step 1: Create folder where you want to store the DB backup

mkdir E:\dbbackup

Step 2: update the device class ‘maximum volume capacity’ and ‘path to store files’

UPDATE DEVCLASS FILEDEV1 DIR=E:\DBBACKUP MAXCAP=50G SHARED=YES

Step 3: Take full backup of DB

backup db type=full devclass=filedev1
 
Error will generate:
            ANR2590E BACKUP DB failed - SET DBRECOVERY command has not been issued.
            ANS8001I Return code 3.

Step 4: Set device class for automatic DB backup to FILEDEV1

set dbrecovery filedev1

Step 5: Again take full backup of DB

backup db type=full devclass=filedev1
 
Now process will start and at the end it will show message like “Database Backup running in the BACKGROUND completed with completion state SUCCESS at xx:xx:xx.”

            There are following types of backup you can run. This parameter is optional. The default is

INCREMENTAL.

a)      Incremental

An incremental (or cumulative) backup image contains a copy of all database data that has changed since the last successful full backup operation was performed.

b)     Full

To run a full backup of the Tivoli Storage Manager database.

c)      DBSnapshot

To run a full snapshot database backup. The entire contents of a database are copied and a new snapshot database backup is created without interrupting the existing full and incremental backup series for the database.

Step 6: Take backup of Server sequential volume history information file

backup volhist f=e:\dbbackup\volhist.out wait=yes

Step 7: Take backup of Server device configuration information file

backup devconfig f=e:\dbbackup\devconfig.out wait=yes

Step 6: Delete sequential volume history entries

delete volhist t=dbb todate=today-2 wait=yes

Friday, June 28, 2013

Administrator user management in TSM 6.x

1.     Create a new TSM administrator ‘john’ with password ‘john123’
         register admin john john123
 
2.     Assign ‘policy’ privilege to new administrator
         grant authority john classes=policy

        There are following types of privileges:
        -          System
        -          Policy
        -          Storage
        -          Operator
        -          Node
 
3.    Check admin
        query admin
        query admin john f=d
 
4.    Remove privilege of administrator
        revoke authority john
 
5.    Remove administrator
        remove admin john
                 Confirm deletion of administrator by typing ‘yes’

 

Thursday, June 27, 2013

How to set password expiration period in TSM 6.x ?

Step 1: Login through TSM Admin user

Step 2:  Check current password expiration period
            tsm> q stat
                   Password Expiration Period: 90 Day(s)

Step 3: Run below command to set expiry period:
             tsm> set passexp 9999
                   ANR2092I Password expiration period set to 9999 days.

Step 4: Check again current status
            tsm> q stat
                   Password Expiration Period: 9,999 Day(s)

Step 5: Logout from TSM Admin user

Wednesday, June 26, 2013

How to change Date & Time in Solaris 10 OS?


# date –u 010100302000

            (01-MM; 01-DD; 00-TT; 30-MINUTES; 2000- Year) – 1st January 2000 12:30 AM
 

# date 033117152006

            (03-MM; 31-DD; 17-TT; 15-MIN; 2006-Year) – 31st March 2006 5:15 PM

Tuesday, June 25, 2013

warning: include(): Unable to allocate memory for pool.


Problem:  warning: require_once(): Unable to allocate memory for pool

Solution:

Add these lines to the end of your php.ini file

[xdebug]
apc.enabled=1
apc.shm_segments=1
apc.shm_size=128M
apc.cache_by_default=1
apc.stat=1
apc.rfc1867=1
apc.stat=0

So the trick to change 32M to 128M and the apc.stat=7200 to = 0.

Restart the web server.

 

 

Saturday, June 22, 2013

How to start TSM client schedule in Linux environment?

1.    Change to the Tivoli Storage Manager Installation directory and enter the following command:
           $ dsmc schedule

Note : When you start the client scheduler, it runs continuously until you close the window, end the process, or log off your system.

2.    If the Tivoli Storage Manager client executable directory is not in your PATH environment variable, change to the installation directory and enter the following command:
           $ ./dsmc schedule

3.    To run the schedule command in the background and to keep the client scheduler running, even if you log off your system, enter the following:

$ nohup dsmc schedule 2> /dev/null &
 

Friday, June 21, 2013

How take DB2 database backup, setup in Linux environment?

Check DB directory list

[db2inst1@nodexxxx ~]$ db2 list db directory
System Database Directory
Number of entries in the directory = 1
Database 1 entry:
 Database alias                       = DBXXX
 Database name                        = DBXXX
 Local database directory             = /home/db2inst1
 Database release level               = b.00
 Comment                              =
 Directory entry type                 = Indirect
 Catalog database partition number    = 0
 Alternate server hostname            =
 Alternate server port number         =

[db2inst1@nodexxxx ~]$ ls -l
drwxr-xr-x  2 db2inst1 db2grp1 4096 Feb 15 15:35 backup_store

[db2inst1@nodexxxx ~]$ cd backup_store/

[db2inst1@nodexxxx backup_store]$ db2 backup db DBXXX compress
SQL1035N  The database is currently in use.  SQLSTATE=57019

[db2inst1@nodexxxx backup_store]$ db2 force application all
DB20000I  The FORCE APPLICATION command completed successfully.
DB21024I  This command is asynchronous and may not be effective immediately.

[db2inst1@nodexxxx backup_store]$ db2 backup db DBXXX compress
Backup successful. The timestamp for this backup image is : 20130218184329

[db2inst1@nodexxxx backup_store]$ ls -l
total 353652
-rw-r----- 1 db2inst1 db2grp1 361779200 Feb 18 18:46 DBXXX.0.db2inst1.NODE0000.CATN0000.20130218184329.001

 

Thursday, June 20, 2013

How to define daily/weekly schedule in Tivoli Storage Manager 6.3?

Define selective schedule (win-test-bkp) backup to take WEEKLY backup of windows base BA client:
tsm: SRV1>DEF SCH STANDARD win-test-bkp TYPE=CLIENT ACTION=SELECTIVE OBJECTS="c:\bkptest\*" OPTIONS=-subdir=yes STARTDATE=06/18/2013 STARTTIME=22:30:00 DAYOFWEEK=SAT PRIORITY=5 DURATION=15 DURUNITS=MINUTES

Define incremental schedule (daily_increment_bkp) backup to take DAILY backup of Linux base BA client:
tsm: SRV1>DEFINE SCHEDULE STANDARD daily_increment_bkp TYPE=CLIENT ACTION=INCREMENTAL OBJECTS="/xyz/*" OPTIONS=-subdir=yes SCHEDSTYLE=ENHANCED STARTDATE=06/17/2013 STARTTIME=23:40:00 DAYOFWEEK=TUE,WED,THU,FRI,SAT PRIORITY=5 DURATION=15 DURUNITS=MINUTES

Define association of schedule (win-test-bkp) backup with specific client node (baclxxxx):
tsm: SRV1>DEFINE ASSOCIATION STANDARD win-test-bkp baclxxxx

Update schedule (daily_increment_bkp) start date & time:
tsm: SRV1>UPDATE SCHEDULE STANDARD daily_increment_bkp STARTDATE=06/18/2013 STARTTIME=00:00:00

Check schedule (win-test-bkp) status:
tsm: SRV1>QUERY EVENT * *
tsm: SRV1>QUERY SCHEDULE STANDARD f=d
tsm: SRV1>QUERY ASSOCIATION
tsm: SRV1>QUERY ASSOCIATION STANDARD win-test-bkp

Update schedule (daily_increment_bkp) backup:
tsm: SRV1>UPDATE SCHEDULE STANDARD daily_increment_bkp SCHEDSTYLE=CLASSIC PERIOD=1 PERUNITS=days DAYOFWEEK=ANY
tsm: SRV1>UPDATE SCHEDULE STANDARD daily_increment_bkp SCHEDSTYLE=ENHANCED DAYOFWEEK=MON,TUE,WED,THU,FRI WEEKOFMONTH=ANY MONTH=ANY

Delete schedule (win-test-bkp):
tsm: SRV1>DELETE SCHEDULE STANDARD win-test-bkp

Wednesday, June 19, 2013

Backup-Archive (BA) & Oracle Tivoli Data Protection (TDP) Configuration on Linux 5.x base OS


Software details:
OS - Redhat Linux 5.3  64 bits
DB - Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit
BA - TIVsm-BA-6.3.0-0
API - TIVsm-API64-6.3.0-0
TDP - TDP-Oracle-5.5.1-0


For BA configuration

[root@oraxxxx ~]# ls -l /opt/tivoli/tsm/client/ba/bin/
-rw-r--r-- 1 root root        20 Feb 14 16:54 dsm.opt
-rw-r--r-- 1 root root       381 Jun 14 17:34 dsm.sys

 [root@oraxxxx ~]# cat /opt/tivoli/tsm/client/ba/bin/dsm.opt
SERVERNAME ORAXXXX

[root@oraxxxx ~]# cat /opt/tivoli/tsm/client/ba/bin/dsm.sys
SERVERNAME oraxxxx
   COMMMethod         TCPip
   TCPPort            1500
   NODENAME         oraxxxx
   TCPSERVERADDRESS tsmservx.abctest.com
   passwordaccess       generate

SERVERNAME oraxxxxtsm
   COMMMethod         TCPip
   TCPPort            1500
   NODENAME         oraxxxx_tdp
   TCPSERVERADDRESS tsmservx.abctest.com
   passworddir  /home/oracle
   passwordaccess       generate
 

For API Configuration

[root@oraxxxx ~]# ls -l /opt/tivoli/tsm/client/api/bin64/
-r--r--r-- 1 root root       809 Feb 19 16:11 dsm.opt
-rw-r--r-- 1 root root       388 Feb 19 16:12 dsm.sys


[root@oraxxxx ~]# cat /opt/tivoli/tsm/client/api/bin64/dsm.opt
SErvername     oraxxxxtsm

[root@oraxxxx ~]# cat /opt/tivoli/tsm/client/api/bin64/dsm.sys
SERVERNAME oraxxxxtsm
   COMMMethod         TCPip
   TCPPort            1500
   NODENAME         oraxxxx_tdp
   TCPSERVERADDRESS tsmservx.abctest.com
   passworddir  /home/oracle

 

For TDP Configuration

[root@oraxxxx ~]# ls -l /opt/tivoli/tsm/client/oracle/bin64/
-r--r--r-- 1 oracle root    808 Feb 12 16:34 dsm.opt
-r--r--r-- 1 oracle root    968 Feb 12 16:11 dsm.sys
-rwxr-xr-x 1 root   root 507072 Mar 28  2008 tdpoconf
-rwxr-xr-x 1 oracle root    707 Feb 18 17:02 tdpo.opt


[root@oraxxxx ~]# cat /opt/tivoli/tsm/client/oracle/bin64/dsm.opt
SErvername     oraxxxxtsm

[root@oraxxxx ~]# cat /opt/tivoli/tsm/client/oracle/bin64/dsm.sys
SErvername      oraxxxx
   COMMMethod         TCPip
   TCPPort            1500
   TCPServeraddress   tsmservx.abctest.com

[root@oraxxxx ~]# cat /opt/tivoli/tsm/client/oracle/bin64/tdpo.opt
DSMI_ORC_CONFIG    /opt/tivoli/tsm/client/oracle/bin64/dsm.opt
DSMI_LOG           /opt/tivoli/tsm/client/oracle/bin64

TDPO_FS            /adsmorc
TDPO_NODE          oraxxxx_tdp
TDPO_OWNER         oracle
TDPO_PSWDPATH      /opt/tivoli/tsm/client/oracle/bin64

TDPO_DATE_FMT      1
TDPO_NUM_FMT       1
TDPO_TIME_FMT      1

TDPO_MGMT_CLASS_2   mgmtclass2
TDPO_MGMT_CLASS_3   mgmtclass3
TDPO_MGMT_CLASS_4   mgmtclass4


[root@oraxxxx ~]# /opt/tivoli/tsm/client/oracle/bin64/tdpoconf password

IBM Tivoli Storage Manager for Databases:
Data Protection for Oracle
Version 5, Release 5, Level 1.0
(C) Copyright IBM Corporation 1997, 2008. All rights reserved.
 

***************************************************************
*   IBM Tivoli Storage Manager for Databases Utility
*   Password file initialization/update program
***************************************************************


Please enter current password:


Please enter new password:


Please reenter new password for verification:

ANU0260I Password successfully changed.

[root@oraxxxx ~]# /opt/tivoli/tsm/client/oracle/bin64/tdpoconf showenv
IBM Tivoli Storage Manager for Databases:
Data Protection for Oracle
Version 5, Release 5, Level 1.0
(C) Copyright IBM Corporation 1997, 2008. All rights reserved.


Data Protection for Oracle Information
 Version:              5
 Release:              5
 Level:                1
 Sublevel:             0
 Platform:             64bit TDPO LinuxAMD64

Tivoli Storage Manager Server Information
 Server Name:          ORAXXXXTSM
 Server Address:       TSMSERVX.ABCTEST.COM
 Server Type:          Windows
 Server Port:          1500
 Communication Method: TCP/IP

Session Information
 Owner Name:           oracle
 Node Name:            oraxxxx_tdp
 Node Type:            TDPO LinuxAMD64
 DSMI_DIR:             /opt/tivoli/tsm/client/api/bin64
 DSMI_ORC_CONFIG:      /opt/tivoli/tsm/client/oracle/bin64/dsm.opt
 TDPO_OPTFILE:         /opt/tivoli/tsm/client/oracle/bin64/tdpo.opt
 Password Directory:   /opt/tivoli/tsm/client/oracle/bin64
Compression:          FALSE

 License Information:  License file exists and contains valid license data.

Check above configuration

[root@oraxxxx ~]# dsmc
IBM Tivoli Storage Manager
Command Line Backup-Archive Client Interface
  Client Version 6, Release 3, Level 0.0
  Client date/time: 06/17/2013 14:39:31
(c) Copyright by IBM Corporation and other(s) 1990, 2011. All Rights Reserved.

Node Name: ORAXXXX
Session established with server SMBACKPHY01_SERVER1: Windows
  Server Version 6, Release 3, Level 0.0
  Server date/time: 06/17/2013 02:28:02  Last access: 06/14/2013 05:45:12
tsm> quit

[root@oraxxxx ~]# dsmc -servername=oraxxxxtsm
IBM Tivoli Storage Manager
Command Line Backup-Archive Client Interface
  Client Version 6, Release 3, Level 0.0
  Client date/time: 06/17/2013 14:40:30
(c) Copyright by IBM Corporation and other(s) 1990, 2011. All Rights Reserved.

Node Name: ORAXXXX_TDP
Session established with server SMBACKPHY01_SERVER1: Windows
Server Version 6, Release 3, Level 0.0
Server date/time: 06/17/2013 02:29:01  Last access: 06/17/2013 02:20:43
tsm> quit

Tuesday, June 18, 2013

ANS1126E (RC27) The file space cannot be deleted because this node does not have permission to delete archived or backed up data.


Problem:

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of delete command on sbt1 channel at 06/17/2013 16:40:49
ORA-19509: failed to delete sequential file, handle="/orcl/bk_152_1_818350547", parms=""
ORA-27027: sbtremove2 returned error
ORA-19511: Error received from media manager layer, error text:
ANS1126E (RC27)   The file space cannot be deleted because this node does not have permission to delete archived or backed up data.

Solution:

Check output of node details on TSM Server:

tsm:SRV1>q node oraxxxx_tdp f=d
Backup Delete Allowed?: No

Update backup Delete option ‘yes’:

tsm: SRV1>update node oraxxxx_tdp backdelete=yes
ANR2063I Node ORAXXXX_TDP updated.

Again check output of node option:

tsm:SRV1>q node oraxxxx_tdp f=d
Backup Delete Allowed?: Yes

Now start RMAN script to take backup of Oracle Database through TSM Server on DB Server

[oracle@oraxxxx ~]$ ./rman.sh
piece handle=/orcl/bk_164_1_818356487 tag=TAG20130617T171447 comment=API Version 2.0,MMS
piece handle=/orcl/bk_165_1_818356974 tag=TAG20130617T171447 comment=API Version 2.0,MMS
piece handle=/orcl/al_166_1_818356993 tag=TAG20130617T172313 comment=API Version 2.0,MMS
piece handle=/orcl/al_167_1_818357109 tag=TAG20130617T172313 comment=API Version 2.0,MMS
piece handle=/orcl/cntrl_168_1_818357204 tag=TAG20130617T172644 comment=API Version 2.0,MMS
released channel: sbt1
Recovery Manager complete.

[oracle@oraxxxx ~]$

Check Oracle DB backup status on TSM Server

tsm:SRV1>q cont E:\TIVOLI\TSM\SERVER1\DISK1.DSM node=oraxxxx_tdp
Node Name        Type  Filespace   FSID  Client's Name for File
                             Name
---------------  ----  ----------  ----  --------------------------------------
ORAXXXX_TDP     Bkup  /adsmorc       1  ///orcl/bk_164_1_818356487
ORAXXXX_TDP     Bkup  /adsmorc       1  ///orcl/bk_165_1_818356974
ORAXXXX_TDP     Bkup  /adsmorc       1  ///orcl/al_166_1_818356993
ORAXXXX_TDP     Bkup  /adsmorc       1  ///orcl/al_167_1_818357109
ORAXXXX_TDP     Bkup  /adsmorc       1  ///orcl/cntrl_168_1_818357204
tsm:SRV1>

tsm:SRV1>q occupancy oraxxxx_tdp
Node Name  Type Filespace  FSID Storage      Number of    Physical     Logical
                Name            Pool Name        Files       Space       Space
                                                         Occupied    Occupied
                                                              (MB)        (MB)
---------- ---- ---------- ---- ---------- ----------- ----------- -----------
ORAXXXX_- Bkup /adsmorc      1 DISKPOOL            17   10,104.37   10,104.37
TDP
tsm:SRV1>quit

Monday, June 17, 2013

RMAN Script for taking backup of Oracle Database through TSM 6.x

[oracle@oraxxxx ~]$ ls -l
-rwxr--r-- 1 oracle oinstall   460 Feb 18 16:03 rman_bkp.sh
-rwxr-xr-x 1 oracle oinstall   106 Feb 13 16:49 rman.sh

[oracle@oraxxxx ~]$ cat rman.sh
export ORACLE_BASE=/u01/app/oracle/product/11.2.0/db_1
export ORACLE_SID=orcl
rman target / @rman_bkp.sh

[oracle@oraxxxx ~]$ cat rman_bkp.sh
run
{
allocate channel sbt1 type sbt parms 'ENV=(TDPO_OPTFILE=/opt/tivoli/tsm/client/oracle/bin64/tdpo.opt)';
crosscheck archivelog all;
BACKUP FORMAT '/orcl/bk_%s_%p_%t'
    DATABASE;
    sql 'alter system archive log current';
BACKUP
    filesperset 20
   FORMAT '/orcl/al_%s_%p_%t'
   ARCHIVELOG ALL;
BACKUP
    FORMAT '/orcl/cntrl_%s_%p_%t'
    CURRENT CONTROLFILE;
delete noprompt expired archivelog all;
delete noprompt obsolete;
RELEASE CHANNEL sbt1;
}

[oracle@oraxxxx ~]$ ./rman.sh
            :
          :
sql statement: alter system archive log current
released channel: sbt1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of sql command on default channel at 06/17/2013 15:39:20
RMAN-11003: failure during parse/execution of SQL statement: alter system archive log current
ORA-01109: database not open

Note: Database is not open. Check & Correct as below.

[oracle@oraxxxx ~]$ sqlplus "/ as sysdba"
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> shutdown immediate
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.

SQL> startup
ORACLE instance started.
Total System Global Area 1052233728 bytes
Fixed Size                  2220032 bytes
Variable Size             792723456 bytes
Database Buffers          251658240 bytes
Redo Buffers                5632000 bytes
Database mounted.
Database opened.

SQL> quit