Running job with dsjob when user does not have permissions

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
vskr72
Premium Member
Premium Member
Posts: 128
Joined: Wed Apr 28, 2004 9:36 pm

Running job with dsjob when user does not have permissions

Post by vskr72 »

The user that I log into does not have permissions. So, I as suggested to use sudo to implement it. When I used sudo, and see the output, I get the return code value as 0 and the job is not running. Not sure what this means. Does this implementation ever work?

Code: Select all

sudo -l -u dsadm ${DSHOME}/bin/dsjob -run -wait -warn 0 -jobstatus -mode NORMAL ${DSProj} ${JobName} > ${sTmpFile}
+ sudo -l -u dsadm /opt/IBM/InformationServer/Server/DSEngine/bin/dsjob -run -wait -warn 0 -jobstatus -mode NORMAL DEV_EDW master

   iDSRetCode=$?
+ iDSRetCode=0
Pls advice for any alternatives.
pandeesh
Premium Member
Premium Member
Posts: 1399
Joined: Sun Oct 24, 2010 5:15 am
Location: CHENNAI, TAMIL NADU

Post by pandeesh »

Are you getting anything in ${sTmpFile} ?
And also use either -wait or -jobstatus switch, but not both.
pandeeswaran
vskr72
Premium Member
Premium Member
Posts: 128
Joined: Wed Apr 28, 2004 9:36 pm

Post by vskr72 »

THis is what I get in the TmpFile

/opt/IBM/InformationServer/Server/DSEngine/bin/dsjob -run -wait -warn 0 -jobstatus -mode NORMAL DEV_EDW master
pandeesh
Premium Member
Premium Member
Posts: 1399
Joined: Sun Oct 24, 2010 5:15 am
Location: CHENNAI, TAMIL NADU

Post by pandeesh »

pandeesh wrote:And also use either -wait or -jobstatus switch, but not both.
And what about this?
pandeeswaran
vskr72
Premium Member
Premium Member
Posts: 128
Joined: Wed Apr 28, 2004 9:36 pm

Post by vskr72 »

THis is what I get in the TmpFile

/opt/IBM/InformationServer/Server/DSEngine/bin/dsjob -run -wait -warn 0 -jobstatus -mode NORMAL DEV_EDW master
pandeesh
Premium Member
Premium Member
Posts: 1399
Joined: Sun Oct 24, 2010 5:15 am
Location: CHENNAI, TAMIL NADU

Post by pandeesh »

Please re-read my previous post carefully:
And try the below command in the shell:(Do not execute as it's .please pass the parameters accordingly)

Code: Select all

sudo -l -u dsadm ${DSHOME}/bin/dsjob -run -wait -warn 0  -mode NORMAL ${DSProj} ${JobName}
Run this and post what you are getting.
pandeeswaran
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Why are you seeking to bypass the fact that you do not have permission? Perhaps there's a reason they have not given you permission. To test this theory, request permission.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
vskr72
Premium Member
Premium Member
Posts: 128
Joined: Wed Apr 28, 2004 9:36 pm

Post by vskr72 »

Without the Sudo I realized that I do not have permissions and I requested. So they said they gave me permission and that it will only work with the sudo option. The way they suggested is before you call the dsjob command put 'sudo -l -u dsadm'. This the little background.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Try it without the "-l" in the sudo command for grins.
-craig

"You can never have too many knives" -- Logan Nine Fingers
vskr72
Premium Member
Premium Member
Posts: 128
Joined: Wed Apr 28, 2004 9:36 pm

Post by vskr72 »

GIves me this msg:

Code: Select all

/opt/IBM/InformationServer/Server/DSEngine/bin/dsjob: error while loading shared libraries: libvmdsapi.so: cannot open shared object file: No such file or directory

PaulVL
Premium Member
Premium Member
Posts: 1315
Joined: Fri Dec 17, 2010 4:36 pm

Post by PaulVL »

Use the -user and -password option of an ID that does have authority, also... I will second the motion of DON'T RUN IF YOU ARE NOT ALLOWED TO RUN.
vskr72
Premium Member
Premium Member
Posts: 128
Joined: Wed Apr 28, 2004 9:36 pm

Post by vskr72 »

GIves me this msg:

Code: Select all

/opt/IBM/InformationServer/Server/DSEngine/bin/dsjob: error while loading shared libraries: libvmdsapi.so: cannot open shared object file: No such file or directory

PaulVL
Premium Member
Premium Member
Posts: 1315
Joined: Fri Dec 17, 2010 4:36 pm

Post by PaulVL »

Most likely because you didn't source dsenv.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Source your dsenv file and try again.
-craig

"You can never have too many knives" -- Logan Nine Fingers
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post by qt_ky »

Have your admin put your ID in the same group as the dsadm ID and make sure group read and execute permissions are set on the dsjob file.
Choose a job you love, and you will never have to work a day in your life. - Confucius
Post Reply