Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Passing pameter which has spaces sqlplus
Hi,
I want to execute the following command on 9i Server
sqlplus -S /NOLOG @ora.sql "sys/change_on_install_at_ORAID1 as sysdba"
Since 9i allows sys user login only if it's connected as sysdba or
sysoper.
So the paramater I want to pass should have the 'as sysdba' part.
Now I want this parameter to be passed to the script ora.sql.
My pboblem is, when I use Oracle 8i sqlplus client to execute the
above command, it works only if I put the '\' as the escape chrater
before ".
e.g.
sqlplus -S /NOLOG @ora.sql \"sys/change_on_install_at_ORAID1 as sysdba\"
And if I run using Oracle 9i sqlplus client, it works without using
the '\'
as escape charater.
e.g.
sqlplus -S /NOLOG @ora.sql "sys/change_on_install_at_ORAID1 as sysdba"
I want same command to be executed with both the sqlplus clients. How can I do that?
I found one command, "SET ESC ON", which sets the '\' as the escape
charater.
Will it be useful in this case? How can I use it?
Thanks,
Abhijit
Received on Wed Jan 22 2003 - 12:41:38 CST