How to assign ORACLE_SID to variable in sqlplus
Posted on 2012-03-23
Would like to have the following under sql plus prompt:
1) It worked
where in test.sql, I can put
I do not want this.
2) Since once logging in database, the ORACLE_SID can be obtained from
select name from v$database;
Is there any way to assign the SID into a define statement in sqlplus?
define ORACLE_SID = ...
--get the SID via whatever.
use the SID in other sql statements.