Friends,
DB: 11gR2
OS: Linux
I'm writing a shell script through which I pass schema name (OPS$USER) to the sql file to spool all objects of the user.
I'm not able to spool file with the '$' in the name, could somebody please suggest me if alternate options are available?
Since I'm using OPS$USER in the sql file as &1 I don't want to replace $ in the ksh script.
$SCHEMA = OPS$USER
$HOST = MAC
KSH:
$ORACLE_HOME/bin/sqlplus / @user_obj.sql $SCHEMA $HOST
SQL:
spool log.all_obj.&1.&2
SELECT count(*)
FROM dba_objects
WHERE username = &1;
exit;
Trying to create spool file with '$' sign in it or replace '$' with '_'.
i.e. log.all_obj.ops$user.mac or
log.all_obj.ops_user.mac
Many thanks.