Home » RDBMS Server » Server Administration » Difference in connecting as sqlplus / as sysdba, sqlplus "/ as sysdba" and sqlplus '/ as (Oracle 10g on windows)
Difference in connecting as sqlplus / as sysdba, sqlplus "/ as sysdba" and sqlplus '/ as [message #380325] Sat, 10 January 2009 15:50 Go to next message
dvishnu_apps
Messages: 34
Registered: September 2008
Member
Hi,

What is the difference among the following statements while connecting to the database as sysdba:


1)sqlplus / as sysdba
2)sqlplus " /as sysdba"
3)sqlplus '/ as sysdba'

Thanks in Advance.

Regards,
Vishnu
Re: Difference in connecting as sqlplus / as sysdba, sqlplus "/ as sysdba" and sqlplus '/ [message #380330 is a reply to message #380325] Sat, 10 January 2009 22:42 Go to previous messageGo to next message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
A quick test would have showed:

E:\>sqlplus / as sysdba

SQL*Plus: Release 10.2.0.3.0 - Production on Sat Jan 10 23:40:08 2009

Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.

Connected to an idle instance.

SQL> exit
Disconnected

E:\>sqlplus '/ as sysdba'

SQL*Plus: Release 10.2.0.3.0 - Production on Sat Jan 10 23:40:17 2009

Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.

Enter password:
Connected to an idle instance.

SQL> exit
Disconnected

E:\>sqlplus "/ as sysdba"

SQL*Plus: Release 10.2.0.3.0 - Production on Sat Jan 10 23:40:35 2009

Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.

Connected to an idle instance.

SQL>

[Updated on: Sat, 10 January 2009 22:43]

Report message to a moderator

Re: Difference in connecting as sqlplus / as sysdba, sqlplus "/ as sysdba" and sqlplus '/ [message #380390 is a reply to message #380325] Sun, 11 January 2009 13:19 Go to previous messageGo to next message
dvishnu_apps
Messages: 34
Registered: September 2008
Member
If ,sqlplus / as sysdba and sqlplus "/ as sysdba" gave the same result, then what is the difference b/w them?

Also, in what cases, we login as sqlplus '/ as sysdba'??

Regards,
Vishnu
Re: Difference in connecting as sqlplus / as sysdba, sqlplus "/ as sysdba" and sqlplus '/ [message #380391 is a reply to message #380390] Sun, 11 January 2009 13:22 Go to previous messageGo to next message
Michel Cadot
Messages: 68718
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
sqlplus '/ as sysdba' should give the same result but a bug on Windows makes it wrong.
So don't use it.

Regards
Michel

[Updated on: Sun, 11 January 2009 13:25]

Report message to a moderator

Re: Difference in connecting as sqlplus / as sysdba, sqlplus "/ as sysdba" and sqlplus '/ [message #380393 is a reply to message #380325] Sun, 11 January 2009 14:21 Go to previous messageGo to next message
dvishnu_apps
Messages: 34
Registered: September 2008
Member
Hi Michel,

Ok...

Please give me the detailed difference in connecting as sysdba
with all the three statements.

If all are same, then why will we use in several ways??

Please explain me.

Regards,
Vishnu
Re: Difference in connecting as sqlplus / as sysdba, sqlplus "/ as sysdba" and sqlplus '/ [message #380401 is a reply to message #380393] Sun, 11 January 2009 19:12 Go to previous messageGo to next message
ThomasG
Messages: 3212
Registered: April 2005
Location: Heilbronn, Germany
Senior Member
As Michael already said, the all should work the same way, but due to a bug in Windows one of them doesn't work.

Quote:

If all are same, then why will we use in several ways??



They are not all the same, they should just DO the same. Since different operating systems or scripting languages might require different quoting strategies, you can chose what suits you best.

A lot of times there are different ways of doing things. You can get out of bed right foot first or left foot first. How you do it is up to you. The same applies here.
Re: Difference in connecting as sqlplus / as sysdba, sqlplus "/ as sysdba" and sqlplus '/ [message #380473 is a reply to message #380325] Mon, 12 January 2009 00:49 Go to previous messageGo to next message
dvishnu_apps
Messages: 34
Registered: September 2008
Member
Hi Thomas,

Please explain which one of them are useful for which Operating system.

For example, In Linux, what will we use among three of them?
and
In Windows,which of themwe will use mostly?

Regards,
Vishnu
Re: Difference in connecting as sqlplus / as sysdba, sqlplus "/ as sysdba" and sqlplus '/ [message #380493 is a reply to message #380473] Mon, 12 January 2009 01:24 Go to previous messageGo to next message
Michel Cadot
Messages: 68718
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Test them and use ANYONE that works.
IT DOES NOT MATTER.

Regards
Michel

[Updated on: Mon, 12 January 2009 01:24]

Report message to a moderator

Re: Difference in connecting as sqlplus / as sysdba, sqlplus "/ as sysdba" and sqlplus '/ [message #381322 is a reply to message #380401] Fri, 16 January 2009 06:09 Go to previous messageGo to next message
ora_2007
Messages: 430
Registered: July 2007
Location: Mumbai
Senior Member
sqlplus "/ as sysdba" is used upto Oracle 9i.

And afterwards we can use without quote,
sqlplus / as sysdba

if this is used in oracle 9i it would gives an error.

Thanks,
Re: Difference in connecting as sqlplus / as sysdba, sqlplus "/ as sysdba" and sqlplus '/ [message #383209 is a reply to message #381322] Tue, 27 January 2009 14:34 Go to previous message
Sanjay Bajracharya
Messages: 279
Registered: October 2001
Location: Florida
Senior Member
ora_2007 wrote on Fri, 16 January 2009 07:09
sqlplus "/ as sysdba" is used upto Oracle 9i.

And afterwards we can use without quote,
sqlplus / as sysdba

if this is used in oracle 9i it would gives an error.

Thanks,



That was neat .. honestly did not know that. Always used sqlplus '/ as sysdba' and always worked.

In 10, all works.
--
Sanjay B.
Previous Topic: finding all databases at os level
Next Topic: migration from 9i to 10g
Goto Forum:
  


Current Time: Fri Nov 29 15:41:10 CST 2024