Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Passing pameter which has spaces sqlplus

Passing pameter which has spaces sqlplus

From: Abhijit Bhosale <abhijitbhosale_at_hotmail.com>
Date: 22 Jan 2003 10:41:38 -0800
Message-ID: <c7d01eb4.0301221041.755658ab@posting.google.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US