Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
March 2010
Content
Purpose & Scope Start/Stop DS Engine To Check the status of DS Engine To Release Job locks To Delete Jobs To Delete Datasets To Restore a Dataset System Monitoring Tools iostat vmstat To View Who Last Modified a Job DataStage Housekeeping Add Environment Variables Suggested Environment Variables For Reporting Import DataStage Jobs From Command Prompt Export DataStage Jobs From Command Prompt Compiling Jobs Message Handler To Configure/Test DataBase connectivity Oracle Other Databases
Confidential Copyright 2007 Wipro Ltd Wipro Ltd - Confidential 2
Purpose
Purpose of this Presentation is to give some knowledge on DataStage Admin Activities performed on Server side and DataStage Client Side.
Scope
This document will educate you about DataStage repository database (UV). This presentation doesnt cover all the properties of UV Database. This document will educate you about Configuring and trouble shooting the database connectivity for DataStage.
Start/Stop DS Engine
From time to time you may need to stop or restart the DataStage engine, for example, when you want to shut down the server. A script uv is provided for these purposes. su to dsadm (su dsadm) and then Issue appropriate stop or start command below. To stop the server engine, use: # dshome/bin/uv -admin stop To restart the server engine, use: # dshome/bin/uv -admin start
The following command is used to check the status of the DS Engine. $ uv -admin info The following data will be displayed $ uv -admin -info
Details for DataStage Engine release 7.5.2.1 instance "ade" ================================================================ Install history : Installed by root (admin:dsadm) on: Feb 03 2005 14:18:21 : Upgraded by root (admin:dsadm) on: Sep 21 2006 17:20:25 : Upgraded by root (admin:dsadm) on: Sep 21 2006 19:53:45 : Upgraded by root (admin:dsadm) on: Sep 21 2006 20:57:20 : Upgraded by root (admin:dsadm) on: Sep 22 2006 10:17:17 : Upgraded by root (admin:dsadm) on: Sep 22 2006 11:53:46 : Upgraded by root (admin:dsadm) on: Sep 22 2006 14:32:55 Instance tag : ade Engine status : Running w/active nls Engine location : /ascential/Ascential/DataStage/DSEngine Binary location : /ascential/Ascential/DataStage/DSEngine/bin Impersonation : Enabled Administrator : dsadm Autostart mode : disabled Autostart link : none Startup script : /ascential/Ascential/DataStage/DSEngine/sample/ds.rc Cache Segments : 0 active User Segments Confidential Copyright 2007 Wipro Ltd Wipro Ltd - Confidential
Log into Administrator (as dsadm) Open the Command line for the project Execute LIST.READU EVERY Identify the values for INODE and USER columns for the job for which the locks need to be released. Execute UNLOCK INODE <inodenumber> ALL UNLOCK USER <user number> ALL
Logon to Unix Su to dsadm Go to a corresponding project Type UV Type DS.TOOLS Select the option 4 (4. Administer processes/locks >>) Again Select the option 4 (4. List all locks) Identify the values for PID columns for the job for which the locks need to be released. Then select the Option 7 (7. Clear locks held by a process) Give the PID value here(Enter pid#=) and press Enter.
Open DataStage Director Go to the Job Cleanup Resources In the Job Resources window, Select Show All (Processes) Find your User Name and click on Logout
To Delete Jobs
The DataStage jobs can be deleted either via DS Administrator or the TCL prompt. 1. In Administrator select the project and run this command: DELETE DS_JOBS <job name>
2. From the TCL prompt you will need to do this: $DSHOME/. ./dsenv ./bin/uvsh LOGTO <project name> DELETE DS_JOBS <job name> Using TCL, you could automate this via script. Also developers can delete the jobs through Designer Client. Note: The deleted jobs can be restored only with the disk backup
10
To Delete Datasets
The Datasets in DataStage can be deleted using following two methods, 1. 2. Using orchadmin The orchadmin command is used to delete the datasets $APT_ORCHHOME/bin/orchadmin delete <dataset name> For Example orchadmin delete /detld1/etl/Ascential//DataStage/Projects/Staging/EDPRO_20100225_129.ds Using DataSet Management The DataSet Management utility is available in DataStage Manager and Director. Using this we can delete the datasets. Using orchadmin Using DataSet Management
11
To Restore a Dataset
The dataset can be restored from a disk backup Restore the header of the dataset, which will be found in the directory where specified in the job. Restore the detail records of the dataset, Which will be found in the resource directory specified in the config file used to run the job.
12
every N seconds (10 in the command line example) iostat outputs: Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn dev8-0 4.00 0.00 96.00 0 96
13
free 24648
swap si so 0 0
bi 0
io bo 1
system cpu in cs us sy id 2 2 1 1 0
vmstat produces the following every N seconds: 0 0 0 10692 24648 51872 228836 0 0
328
41
0 99
14
Logon to Unix Su to dsadm Go to a project folder Type UV Issue the following SQL SELECT INSTANCE, DTM, MODIFIER FROM DS_AUDIT WHERE CLASS = '2' AND INSTANCE LIKE '%MyJob';
15
DataStage Housekeeping
There is very little housekeeping that can be done from the OS level.
Clearing /tmp folder Clearing the &PH& directories Delete the temporary files, Data Sets or File Sets. It is advised to do this in the application side itself.
16
DataStage Housekeeping
Before clearing the &PH& directories make sure ever one logged out of the datastage. To check the user connections use the command uv admin info . From any project directory . $DSHOME/dsenv $DSHOME/bin/uv LOGTO UV RUN ADMIN_BP REMOVE.SHM Or $DSHOME/bin/dsdlockd -p
Run the following command for each project. LOGTO (Project Name) CLEAR.FILE &PH&
17
The following are the steps to add the environment variables in DataStage Logon to DataStage Administrator Choose the Project Go to Environment Select User Defined tab to add the new used defined variables. Select the other options to change the values for the existing variables.
18
19
Using DS_IMPORTDSX Command This command runs within the DS engine using dssh. It can import any job executables found within specified DSX files. Run it as following, 1. 2. 3. CD to the project directory on the server: Run the dssh shell: ..\..\engine\bin\dssh At the dssh prompt enter the DS_IMPORTDSX command
The DSXimport command is as follows, DS_IMPORTDSX filename [[-OVERWRITE] -JOB[S] * | jobname ] | [-LIST]
20
21
22
23
Compiling Jobs
There is a program on the Client side called dscc.exe. This resides in the Clients\Classic folder where the Designer and Director reside. This is used to Compile the jobs.
C:\IS81CL\Clients\Classic>dscc /? /? Show program usage /bo (value) BuildOp to compile, * = All BuildOps, \folder\* = folder /d (value) ASB Domain Name /f Use the Force Compile /h (value) Name of Host to attach to /j (value) Job to compile, * = All Jobs, \folder\* = folder /jt (value) Job Type To Compile -1 (Default) = All Types 0 = Server 1 = Mainframe 2 = Sequence 3 = Parallel /mfcgb (value) Mainframe Code Gen base directory location /mful (value) Mainframe Job Upload Profile /ouc Only Compile Uncompiled Objects /p (value) Password project Project To Attach to /qs (value) QS objects to provision * = All QS objects, \folder\* = folder /qspa Provision all dependant QS objects /r (value) Routine to compile, * = All Routines, \folder\* = folder /rd (value) Report Directory and Name /rt (value) Type of report to produce : X = xml, T = txt - default /u (value) User Name
Also the jobs can be compiled from DataStage Designer Client or from Manager through Run Multiple Job Compile Option.
24
Message Handler
The Message Handler is used to suppress the Warnings. Log into the Director Select the job And then view the logs Select the warning Right click on the Warning message A popup will display Select Add Rule to the Message Handler Now choose the Add rule to chosen message handler And click on the Button Add Rule
25
26
27
28
The SQLPLUS is used to check the databases behind the listener is up or not The following is the syntax,
sqlplus username/password@servicename
29
30
Thank You
32