Hi,
we are executing an sqlplus command through an ExecuteCommand Stage and we would like to hide user/password information in the list of parameters. Any idea? What about environment variables?
Joerg.
sqlplus in Execute Command
Moderators: chulett, rschirm, roy
Gruezi Joshi,
You can use environment variables and a UNIX script to read & use them; there is no way to hide the command line when executing a shell command from DataStage. Remember that you need to SET them in the same process right before executing the shell - you cannot rely on any inherited environment attributes.
You can use environment variables and a UNIX script to read & use them; there is no way to hide the command line when executing a shell command from DataStage. Remember that you need to SET them in the same process right before executing the shell - you cannot rely on any inherited environment attributes.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
Joerg,
since the Command Stage only lets you execute one command, it would be best to write a short DataStage Routine to do this.
Define a routine with 5 parameters containing the information your script needs, such as: UnixCommand, OraInstance, OraSchema, OraUser, OraPassword.
Then build your command(s) and use the EXECUTE Basic statement.
since the Command Stage only lets you execute one command, it would be best to write a short DataStage Routine to do this.
Define a routine with 5 parameters containing the information your script needs, such as: UnixCommand, OraInstance, OraSchema, OraUser, OraPassword.
Then build your command(s) and use the EXECUTE Basic statement.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
Joerg,
you can specify them with #ParameterName# - but you can also use the clickbox "..." on the right part of the command window to insert parameters.
Viel Spass...
you can specify them with #ParameterName# - but you can also use the clickbox "..." on the right part of the command window to insert parameters.
Viel Spass...
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
UNIX response, at least initially.
To hide the password from ps -ef users, you must employ a shell script, whether you call it from a before/after subroutine, a command activity or a routine.
I'm guessing there's a way to do something like this in a BAT file, but don't have the skills. You might try this and see whether it works.
To hide the password from ps -ef users, you must employ a shell script, whether you call it from a before/after subroutine, a command activity or a routine.
Code: Select all
#!/bin/sh
# Invoke sqlplus command
# Environment variables contain authentication and SQL
# A "here script" is used to have sqlplus prompt for password,
# rather than have it appear on the command line.
sqlplus ${ORACLE_USER}@${ORACLE_DB} << -END
${ORACLE_PASSWORD} # response to password prompt
${SQL_STATEMENT} # SQL statement to execute
quit # exit from sqlplus
-END
Code: Select all
sqlplus %ORACLE_USER%@%ORACLE_DB%
%ORACLE_PASSWORD%
%SQL_STATEMENT%
QUIT
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.