Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Pass sqlplus variables, its values to OS prompt and vice versa

N_RajOct 6 2017 — edited Oct 11 2017

Hi All,

We have  Red hat 6.5.

We have oracle 11.2.0.4.We often use sqlplus ,sqlloader and expdp.

We have set OS environment variables like ORACLE_HOME,ORACLE_SID etc. We have many environment  variables for the reporting purpose.

We have also use sqlplus variables ( select 'begin db_name = ' || db_name from v$database' ).

  and plsql also.

1,How to pass OS environment variables into sqlplus  and plsql

2,How to pass sqlplus  variables into OS prompt?

For Ex :  select 'begin db_name = ' || db_name from v$database;

db_name is variable name and its values Test.

How to pass those variable name db_name and its value Test to OS prompt?

3,How to pass plsql variables into OS prompt?

Any Suggestions

Thanks & Regards,

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 3 2017
Added on Oct 6 2017
4 comments
2,192 views