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 -> Re: sys as sysdba within a script?

Re: sys as sysdba within a script?

From: Connor McDonald <connor_mcdonald_at_yahoo.com>
Date: Wed, 22 Dec 2004 21:05:28 +0800
Message-ID: <41C97118.48AD@yahoo.com>


Howard J. Rogers wrote:
>
> Rauf Sarwar wrote:
> > "sys/password as sysdba" won't work. " must be escaped by a \ as
> > \"sys/password as sysdba\". This works on *nix and Win* besides what
> > Dave suggested in his post to surround ' with ".
> >
> > Regards
> > /Rauf
>
> Rauf: I realise the original post was about export, and as such your
> advice is sound... but there's no mention of export or import in your
> reply, which could lead to unfortunate conclusions being drawn by the
> unwary. You also used the "m" word: 'Double quotes MUST be escaped" -and
> that again makes no distinction on *when* they must.
>
> My point is simply this:
>
> ----------------------
> C:\>sqlplus \"/ as sysdba\"
> Usage: SQLPLUS [ [<option>] [<logon>] [<start>] ]
> where <option> ::= -H | -V | [ [-L] [-M <o>] [-R <n>] [-S] ]
> <logon> ::= <username>[/<password>][@<connect_string>] | / | /NOLOG
> <start> ::= @<URI>|<filename>[.<ext>] [<parameter> ...]
> "-H" displays the SQL*Plus version banner and usage syntax
> "-V" displays the SQL*Plus version banner
> "-L" attempts log on just once
> "-M <o>" uses HTML markup options <o>
> "-R <n>" uses restricted mode <n>
> "-S" uses silent mode
>
> C:\>exp \"/ as sysdba\"
>
> Export: Release 9.2.0.1.0 - Production on Wed Dec 22 21:52:37 2004
>
> Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
>
> Connected to: Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
> With the Partitioning, OLAP and Oracle Data Mining options
> JServer Release 9.2.0.1.0 - Production
> Enter array fetch buffer size: 4096 >
> ---------------------
>
> That is: the escaping works on Windows *provided* you are talking ONLY
> about export/import -but for SQL*Plus, the escaping causes an error, at
> least on Windows, and is therefore definitely NOT a "must".
>
> Regards
> HJR
Another reason to use the 10g client

sqlplus / as sysdba

works...!

-- 
Connor McDonald
Co-author: "Mastering Oracle PL/SQL - Practical Solutions"
ISBN: 1590592174

web: http://www.oracledba.co.uk
web: http://www.oaktable.net
email: connor_mcdonald_at_yahoo.com

Coming Soon! "Oracle Insight - Tales of the OakTable"

"GIVE a man a fish and he will eat for a day. But TEACH him how to fish,
and...he will sit in a boat and drink beer all day"

------------------------------------------------------------
Received on Wed Dec 22 2004 - 07:05:28 CST

Original text of this message

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