User Tools

Site Tools


tsm

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
tsm [2018/12/06 21:05] – created 91.177.234.129tsm [2019/01/30 11:32] (current) – external edit 127.0.0.1
Line 1: Line 1:
-====== TSM ======+  *  [[http://www.oucs.ox.ac.uk/hfs/archive/cli/index.xml?splitLevel=-1#body.1_div.4|Some tips from Oxford University]] 
 +  *  [[http://thobias.org/tsm/sql/#toc147|Some useful TSM server queries]] 
 +  *  [[http://froebe.net/blog/2014/03/24/ibm-tivoli-storage-manager-tsm-how-to-determine-management-class-and-retention-using-dsmc/|TSM - How to determine management class and retention using dsmc]] - nice syntax highlighting! 
 +===== Tivoli Storage Management =====
  
-  * [[http://www.oucs.ox.ac.uk/hfs/archive/cli/index.xml?splitLevel=-1#body.1_div.4|Some tips from Oxford University]] +==== Default location for files ==== 
-  * [[http://thobias.org/tsm/sql/#toc147|Some useful TSM server queries]] +<code> 
-  * [[http://froebe.net/blog/2014/03/24/ibm-tivoli-storage-manager-tsm-how-to-determine-management-class-and-retention-using-dsmc/|TSM - How to determine management class and retention using dsmc]] - nice syntax highlighting! +Linux, AIX 
-======Tivoli Storage Management====== +dsm.sys,dsm.opt               /opt/tivoli/tsm/client/ba/bin 
-=====Default location for files===== +dsmerror.log, dsmsched.log    /opt/tivoli/tsm/client/ba/bin 
-<code>0@@</code> + 
-=====Restart ITM Monitoring agent===== +Solaris 
-====To see if the Oracle module is installed==== +dsm.sys,dsm.opt               /usr/tivoli/tsm/client/ba/bin 
-<code>1@@</code>+dsmerror.log, dsmsched.log    /var/log 
 +</code> 
 +==== Restart ITM Monitoring agent ==== 
 +=== To see if the Oracle module is installed === 
 +<code> 
 +export ITM_HOME=/opt/IBM/ITM 
 +$ITM_HOME/bin/cinfo -i 
 +</code>
 and see which agents are running and see which agents are running
-<code>2@@</code>+<code> 
 +export ITM_HOME=/opt/IBM/ITM 
 +$ITM_HOME/bin/cinfo -r 
 +</code>
 and see which agents are configured (or not) and see which agents are configured (or not)
-<code>3@@</code>+<code> 
 +export ITM_HOME=/opt/IBM/ITM 
 +$ITM_HOME/bin/cinfo -o 
 +</code>
  
-====See which instances have been setup to be monitored==== +=== See which instances have been setup to be monitored === 
-<code>4@@</code> +<code> 
-<code>5@@</code>+export ITM_HOME=/opt/IBM/ITM 
 +$ITM_HOME/smitools/scripts/kdyedit -h /opt/IBM/ITM list 
 +</code> 
 +<code> 
 +export ITM_HOME=/opt/IBM/ITM 
 +$ITM_HOME/smitools/scripts/kciedit -h /opt/IBM/ITM list 
 +</code>
  
-====Add an instance to be monitored==== +=== Add an instance to be monitored === 
-<code>6@@</code>+<code> 
 +$ITM_HOME/smitools/scripts/kdyedit -h /opt/IBM/ITM -r itmora -t rz add -i $ORACLE_SID 
 +</code>
 This one should also be done in order that rc.d scripts know to start the agent as itmora instead of root This one should also be done in order that rc.d scripts know to start the agent as itmora instead of root
-<code>7@@</code>+<code> 
 +$ITM_HOME/smitools/scripts/kciedit -h /opt/IBM/ITM -r itmora -t rz add -i $ORACLE_SID 
 +</code>
  
-=====Restart the Oracle agents===== +==== Restart the Oracle agents ==== 
-To avoid issues with orphaned processes, restart is best done with a combination of stop, cleanup, start.<br />+To avoid issues with orphaned processes, restart is best done with a combination of stop, cleanup, start.\\
 **Stop all Oracle agents** **Stop all Oracle agents**
-<code>8@@</code>+<code> 
 +export ITM_HOME=/opt/IBM/ITM 
 +$ITM_HOME/smitools/scripts/StartAgent.sh stop rz 
 +</code>
 or, the standard method... or, the standard method...
-<code>9@@</code>+<code> 
 +su - itmora -c "/bin/ksh -c '/opt/IBM/ITM/bin/itmcmd agent -o TIBPFW start rz >/tmp/itmcmd_TIBPFW.log 2>&1'" 
 +</code>
 **Check agent processes have stopped** **Check agent processes have stopped**
-<code>10@@</code> +<code> 
-Any remaining processes (containing a SID) should be killed.<br /> +ps -ef | grep [[k]]rz 
-It is normal to have agents for 61, ul and ux still running.<br /> +</code> 
-<br /> +Any remaining processes (containing a SID) should be killed.\\ 
-**Check agent RunInfo file is correct**<br />+It is normal to have agents for 61, ul and ux still running.\\ 
 + 
 +**Check agent RunInfo file is correct**\\
 If this file is corrupted, the StartAgent.sh script does not function correctly If this file is corrupted, the StartAgent.sh script does not function correctly
-<code>11@@</code> +<code> 
-...and remove any lines containing database SIDs in the 4th column<br /> +vi $ITM_HOME/config/.ConfigData/RunInfo 
-<br />+</code> 
 +...and remove any lines containing database SIDs in the 4th column\\ 
 **Start all Oracle agents** **Start all Oracle agents**
-<code>12@@</code> +<code> 
-<br /> +$ITM_HOME/smitools/scripts/StartAgent.sh start rz 
-or<br />+</code> 
 + 
 +or\\
 ...using ITM standard command to restart one agent ...using ITM standard command to restart one agent
-<code>13@@</code>+<code> 
 +/usr/bin/su - itmora -c "/opt/IBM/ITM/bin/itmcmd agent  -o EMREP  stop or" 
 +</code>
 Perform cleanup as above Perform cleanup as above
-<code>14@@</code>+<code> 
 +/usr/bin/su - itmora -c "/opt/IBM/ITM/bin/itmcmd agent  -o EMREP  start or" 
 +</code>
  
-====Check the agent is running==== +=== Check the agent is running === 
-<code>15@@</code>+<code> 
 +ps -ef | grep [[k]]rz 
 +</code>
  
-====Reconfigure agent==== +=== Reconfigure agent === 
-<code>16@@</code>+<code> 
 +export ITM_HOME=/opt/IBM/ITM 
 +$ITM_HOME/bin/itmcmd config -A rz 
 +</code>
  
-=====Troubleshooting===== +==== Troubleshooting ==== 
-====cinfo -r reports processes not running (as well as running)====+=== cinfo -r reports processes not running (as well as running) ===
 eg: eg:
-<code>17@@</code>+<code> 
 +coupprod  or    25690298                    DMMPRD  ...process not running 
 +coupprod  or    5832894                     DMMPRD  ...process not running 
 +coupprod  ux    39452858  root    Apr23     None    ...running 
 +coupprod  or    43319374  itmora  Apr24     DMMPRD  ...running 
 +</code>
 need to remove the first 2 lines... need to remove the first 2 lines...
-<code>18@@</code>+<code> 
 +cd /opt/IBM/ITM/config/.ConfigData 
 +vi RunInfo 
 +</code>
 and remove the unnecessary lines and remove the unnecessary lines
-=====Remove / uninstall / decommission an ITM agent===== +==== Remove / uninstall / decommission an ITM agent ==== 
-====Check agent is configured==== +=== Check agent is configured === 
-<code>19@@</code> +<code> 
-====Stop the running agent==== +export ITM_HOME=/opt/IBM/ITM 
-<code>20@@</code> +$ITM_HOME/bin/cinfo -o rz 
-====Delete config files for the instance==== +</code> 
-<code>21@@</code> +=== Stop the running agent === 
-====Modify the rz environment file==== +<code> 
-<code>22@@</code> +SID=WM9TNSBX 
-====Modify the rz agent startup file==== +$ITM_HOME/smitools/scripts/StartAgent.sh stop rz -o ${SID} 
-  * Remove line from "start_all" section +</code> 
-  * Remove line from "stop_all" section +=== Delete config files for the instance === 
-<code>23@@</code>+<code> 
 +cd $ITM_HOME/config 
 +ls -al *rz_${SID}* 
 +rm -f *rz_${SID}* 
 +ls -al *rz_${SID}* 
 +ls: 0653-341 The file *rz_WM9TNSBX* does not exist. 
 +</code> 
 +=== Modify the rz environment file === 
 +<code> 
 +vi $ITM_HOME/config/.ConfigData/krzenv 
 +</code> 
 +=== Modify the rz agent startup file === 
 +  *  Remove line from "start_all" section 
 +  *  Remove line from "stop_all" section 
 +<code> 
 +vi /etc/rc.itm1 
 +</code>
  
-====Recheck if the agent is configured (SID should have gone from list)==== +=== Recheck if the agent is configured (SID should have gone from list) === 
-<code>24@@</code> +<code> 
-=====Automate modification of ORACLE_HOME in config files and restart ITM agent for each database=====+$ITM_HOME/bin/cinfo -o rz 
 +</code> 
 +==== Automate modification of ORACLE_HOME in config files and restart ITM agent for each database ====
 After an upgrade, the hard-coded(!!!) path to ORACLE_HOME needs modifying to use the new location After an upgrade, the hard-coded(!!!) path to ORACLE_HOME needs modifying to use the new location
-<code>25@@</code>+<code> 
 +export ITM_HOME=/opt/IBM/ITM 
 +cd ${ITM_HOME}/config 
 +for i in $(find . -type f -name "*_rz_*cfg"); do 
 +    perl -p -i.bck -e 's/11.2.0.3/11.2.0.4/g' $i 
 +    db=$(echo $i | awk -F_ '{print $NF}' | awk -F\\. '{print $1}'
 +    /usr/bin/su - itmora -c "/bin/ksh -c '${ITM_HOME}/bin/itmcmd agent -o $db stop rz'" 
 +    /usr/bin/su - itmora -c "/bin/ksh -c '${ITM_HOME}/bin/itmcmd agent -o $db start rz'" 
 +done 
 +${ITM_HOME}/bin/cinfo -r 
 +</code>
  
-=====Starting the TSM client=====+==== Starting the TSM client ====
 On Unix On Unix
-<code>26@@</code>+<code> 
 +dsmc -se=so_u_`hostname`_orx_d_bax 
 +</code>
 On Windows On Windows
-<code>27@@</code>+<code> 
 +dsmc -optfile=c:\\oracle\\SID\\admin\\dsm.opt 
 +</code>
  
-=====Send a file to TSM===== +==== Send a file to TSM ==== 
-<code>28@@</code>+<code> 
 +dsmc archive -server=SO_U_ubenoa31_ORX_D_BAX "/oracle/export/NSWORKP1/export_NSWORKP1_D_FULL_201301030007_01.dmp" 
 +</code>
  
-=====Query the archive to see if a file is available in TSM===== +==== Query the archive to see if a file is available in TSM ==== 
-<code>29@@</code>+<code> 
 +dsmc query archive -server=SO_U_ubenoa31_ORX_D_BAX "/oracle/export/NSWORKP1/export_NSWORKP1_D_FULL_20130103*" 
 +</code>
 Query all the files sent to the monthly node since start of FEB 2013 (using dateformat YYYY-MM-DD) Query all the files sent to the monthly node since start of FEB 2013 (using dateformat YYYY-MM-DD)
-<code>30@@</code>+<code> 
 +dsmc q ar -date=3 -fromdate=2013-02-01 -subdir=yes -filesonly -se=SO_U_`uname -n`_ORX_M_BAX "/oracle/export/*" 
 +</code>
 and on Windows... and on Windows...
-<code>31@@</code> +<code> 
-Note: You will get an error with the above command as Windows ignores the dateformat on the command line!<br /> +dsmc query archive -dateformat=3 -fromdate=2013-02-01 -subdir=yes -filesonly -optfile='C:\\home\\ibmtools\\etc\\oracle\\SO_I_WDCRHBP05_ORX_D_SOL.opt' 
-To fix it, put dateformat  3 in the opt file.<br />+</code> 
 +Note: You will get an error with the above command as Windows ignores the dateformat on the command line!\\ 
 +To fix it, put dateformat  3 in the opt file.\\
  
-=====List all export jobs on this TSM node===== +==== List all export jobs on this TSM node ==== 
-<code>32@@</code>+<code> 
 +cd /oracle/export 
 +dsmc q ar -subdir=yes -se=SO_U_UBENOA26_ORX_D_BAX "expdp*" 
 +</code> 
 + 
 +==== Retrieve file from TSM ==== 
 +<code> 
 +dsmc retrieve -pick -server=SO_U_ubenoa31_ORX_D_BAX "/oracle/export/NSWORKP1/export_NSWORKP1_D_FULL_20130103*" 
 +</code> 
 +This opens an interactive window listing all files that match the file query (note the wildcard)\\ 
 +Files can be toggled on and off for recovery by pressing the number associated with the file then recover with the letter o (for ok!).\\
  
-=====Retrieve file from TSM===== 
-<code>33@@</code> 
-This opens an interactive window listing all files that match the file query (note the wildcard)<br /> 
-Files can be toggled on and off for recovery by pressing the number associated with the file then recover with the letter o (for ok!).<br /> 
-<br /> 
 If several versions of the same file exist, use the description field to make the distinction If several versions of the same file exist, use the description field to make the distinction
-<code>34@@</code>+<code> 
 +dsmc retr -server=SO_U_`hostname`_ORX_D_SOL -descr="*30-01-2014*" "/oracle/export/AGP/export_AGP_D_FULL_20130103*" 
 +</code>
  
-=====Retrieve a file from TSM and save it to a different name===== +==== Retrieve a file from TSM and save it to a different name ==== 
-<code>35@@</code> +<code> 
-=====Restore a file from TSM (from backup not archive)===== +dsmc retr -server=SO_U_`hostname`_ORX_D_SOL /oracle/export/AGP/export_AGP_D_FULL_201301031200.dmp renamedfile.dmp 
-<code>36@@</code>+</code> 
 +==== Restore a file from TSM (from backup not archive) ==== 
 +<code> 
 +dsmc rest /home/bey9at77/Documents/ /tmp/restore/ -su=yes  -inactive -pick 
 +</code>
  
-=====Check backup is performed across DWDM (diagonal) to TSM server in remote location===== +==== Check backup is performed across DWDM (diagonal) to TSM server in remote location ==== 
-Some customers want the backups of the databases running in one data centre to be sent to the other data centre providing "data centre down" recovery.<br />+Some customers want the backups of the databases running in one data centre to be sent to the other data centre providing "data centre down" recovery.\\
 Put this into a temporary file on the management server... Put this into a temporary file on the management server...
-<code>37@@</code>+<code> 
 +cat <<'EOCAT' >/tmp/tsmchk.ksh 
 +export HN=$(hostname); for i in $(ps -ef | grep [[p]]mon | awk -F_ '{print $NF}'); do export SID=${i}; perl -00 -n -e 'print "$ENV{'HN'}|$ENV{'SID'}|$1\ 
 +" if m/TSM_$ENV{'SID'}_TDPO.*?erveraddress\\s+([[\\w-]]+)?/s' /etc/tsm/dsm.sys; done 
 +EOCAT 
 +chmod +x /tmp/tsmchk.ksh 
 +</code>
 then send it to, and run it on, all the satellite servers... then send it to, and run it on, all the satellite servers...
-<code>38@@</code> +<code> 
-This spits out a list of host | Instance | TSM server<br />+/home/ibmtools/scripts/oracle/doscp -f /tmp/tsmchk.ksh 
 +/home/ibmtools/scripts/oracle/dosh2 -c "ksh /tmp/tsmchk.ksh" 
 +</code> 
 +This spits out a list of host | Instance | TSM server\\
 If this list is pasted into a spreadsheet, a formula in Column 4 will show any bad ones (still backed up to the local data centre). If this list is pasted into a spreadsheet, a formula in Column 4 will show any bad ones (still backed up to the local data centre).
-<code>39@@</code>+<code> 
 +====== IF( MID(A1,3,2) = (MID(C1,4,2) ) ,"<===",""
 +</code>
 Obviously this is customer specific! Character positions 3-4 of the hostname show where the server is hosted, positions 4-5 of the TSM server name show its location. Obviously this is customer specific! Character positions 3-4 of the hostname show where the server is hosted, positions 4-5 of the TSM server name show its location.
  
-=====Show details about all management classes on the TSM server===== +==== Show details about all management classes on the TSM server ==== 
-<code>40@@</code> +<code> 
-=====Query running sessions on a TSM node===== +dsmc query mgmtclass -detail 
-<code>41@@</code>+</code> 
 +==== Query running sessions on a TSM node ==== 
 +<code> 
 +dsmc q sess -se=SO_U_SOLAX005_ORX_D_SOL 
 +</code>
 and on Windows... and on Windows...
-<code>42@@</code>+<code> 
 +dsmc q sess -optfile='C:\\home\\ibmtools\\etc\\oracle\\SO_I_WDCRHBP05_ORX_D_SOL.opt' 
 +</code>
  
-=====Find the default management class on the domain===== +==== Find the default management class on the domain ==== 
-<code>43@@</code>+<code> 
 +dsmc q mgmt | grep 'Default Mgmt Class Name' | awk -F' ' '{print $NF}' 
 +</code>
  
-=====Force a management class===== +==== Force a management class ==== 
-The TSM domain has a default management class. This can be overridden in both the dsm.opt file (include options) and on the command line.<br />+The TSM domain has a default management class. This can be overridden in both the dsm.opt file (include options) and on the command line.\\
 Archiving files: Archiving files:
-<code>44@@</code>+<code> 
 +dsmc archive -archmc=M14 -se=SO_U_`hostname`_ORX_D_BAX "/oracle/export/NSWORKP1/export_NSWORKP1_D_FULL_201301030007_01.dmp" 
 +</code>
  
-=====Restart LANFree Storage agent===== +==== Restart LANFree Storage agent ==== 
-<code>45@@</code> +<code> 
-=====Update number of mount points for a node===== +udevdba31:root[[/home/root]]# ps -ef|grep dsmsta 
-<code>46@@</code> +    root 13828246        1     Mar 26      - 512:39 /usr/tivoli/tsm/StorageAgent/bin/dsmsta 
-=====Start dsmc in administrator mode===== +    root 29491300 62259284   0 11:58:29  pts/1  0:00 grep dsmsta 
-<code>47@@</code>+udevdba31:root[[/home/root]]# kill 13828246 
 +udevdba31:root[[/home/root]]# ps -ef|grep dsmsta 
 +    root 41418862 62259284   0 11:58:48  pts/1  0:00 grep dsmsta 
 +udevdba31:root[[/home/root]]# cat /etc/inittab | grep stg 
 +autostgagnt:2:off:/usr/tivoli/tsm/StorageAgent/bin/rc.tsmstgagnt 
 +udevdba31:root[[/home/root]]# at now 
 +/usr/tivoli/tsm/StorageAgent/bin/rc.tsmstgagnt<CTRL-D> 
 +Job root.1366365724.a will be run at Fri Apr 19 12:02:04 DFT 2013. 
 +udevdba31:root[[/home/root]]# ps -ef|grep dsmsta 
 +    root 20906202 62259284   0 12:02:28  pts/1  0:00 grep dsmsta 
 +    root 64225302  3735904   0 12:02:16      -  0:01 dsmsta quiet 
 +udevdba31:root[[/home/root]]# 
 +</code> 
 +==== Update number of mount points for a node ==== 
 +<code> 
 +tsm: TSMSRV1>upd node CLUBDEV maxnummp=4 
 +ANR2063I Node CLUBDEV updated. 
 +</code> 
 +==== Start dsmc in administrator mode ==== 
 +<code> 
 +dsmadmc -id=ibmdba -pa=$DSMADMPWD -se=baxmac 
 +</code>
 Add -comma or -tab to command line in order to get the query results in a list format Add -comma or -tab to command line in order to get the query results in a list format
-<code>48@@</code> +<code> 
-=====Check TSM sessions are running Lanfree=====+dsmadmc -id=ibmdba -pa=$DSMADMPWD -se=baxmac -comma 
 +</code> 
 +==== Check TSM sessions are running Lanfree ====
 Message number 415 shows the relevant sessions Message number 415 shows the relevant sessions
-<code>49@@</code> +<code> 
-<code>50@@</code>+dsmadmc -id=ibmdba -pa=$DSMADMPWD -se=baxnos -comma "select * from actlog where msgno=415 and message like '%SO_U_JDBEOP1_ORA_X_BAX%' order by DATE_TIME desc fetch first 1 rows only" 
 +</code> 
 +<code> 
 +DATE_TIME: 2015-12-30 00:49:42.000000 
 +MSGNO: 415 
 +SEVERITY: I 
 +MESSAGE: ANR0415I Session 1011613 proxied by STABENOUERP07MAC started for node SO_U_JDBEOP1_ORA_X_BAX. (SESSION: 1011613) 
 +</code>
 Parsing the session id out of the message, we can query the summary to find more info. Parsing the session id out of the message, we can query the summary to find more info.
-<code>51@@</code>+<code> 
 +dsmadmc -id=ibmdba -pa=$DSMADMPWD -se=baxnos "select * from summary where number=1011613" 
 + 
 +      START_TIME: 2015-12-30 00:49:42.000000 
 +        END_TIME: 2015-12-30 00:49:44.000000 
 +        ACTIVITY: BACKUP 
 +          NUMBER: 1011613 
 +          ENTITY: SO_U_JDBEOP1_ORA_X_BAX 
 +        COMMMETH: Tcp/Ip 
 +         ADDRESS: 10.100.119.145:61762 
 +   SCHEDULE_NAME: 
 +        EXAMINED: 0 
 +        AFFECTED: 1 
 +          FAILED: 0 
 +           BYTES: 262155 
 +            IDLE: 0 
 +          MEDIAW: 0 
 +       PROCESSES:
 +      SUCCESSFUL: YES 
 +     VOLUME_NAME: 
 +      DRIVE_NAME: 
 +    LIBRARY_NAME: 
 +        LAST_USE: 
 +       COMM_WAIT:
 +NUM_OFFSITE_VOLS: 
 +</code> 
 + 
 +==== Clean up export dump and log files if they are on tape ==== 
 +<code> 
 +for i in `find /oracle/export -name "*dmp" -type f`; do 
 +    sid=`echo $i | awk -F_ '{print $2}'
 +    echo dsmc q ar -se=so_u_`hostname`_orx_d_bax $i 
 +    dsmc q ar -se=so_u_`hostname`_orx_d_bax $i >/tmp/results.$$ 
 +    if grep $i /tmp/results.$$; then 
 +            echo rm -f $i 
 +                 rm -f $i 
 +    fi 
 +done 
 +rm /tmp/results.$$ 
 +</code>
  
-=====Clean up export dump and log files if they are on tape===== 
-<code>52@@</code> 
tsm.1544130327.txt.gz · Last modified: 2018/12/06 21:05 by 91.177.234.129

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki