Unix environment variables [message #366981] |
Tue, 07 March 2000 01:55 |
julz
Messages: 3 Registered: March 2000
|
Junior Member |
|
|
Is there an elegant way to make Unix environment variables, such as TZ, available in Oracle? One way is to create a shell script that echoes $TZ > tz.out and then imports tz.out into an Oracle table. Is there a better way?
|
|
|
|
|
Re: Unix environment variables [message #366985 is a reply to message #366981] |
Sun, 12 March 2000 12:45 |
Roshan D'Souza
Messages: 8 Registered: March 2000
|
Junior Member |
|
|
Julz,
How bout trying this simple one
Prerequisites are you should have a Oracle table (you can give any name, for the example here I have given the name timezone with a field TZ)
Place this code into a shell script(Remember a shell script and not sql script) and execute it
sqlplus "userid/password" << EOF
insert into timezone(TZ)
values('$TZ');
commit;
exit;
EOF
Let me know if it works.
|
|
|
|