Q
Problem solve Get help with specific problems with your technologies, process and projects.

Errors when running SQL Plus

I have a batch script with the command: sqlplus "conn sys/oracle@dba as sysdba" in sys@dba.bat file. After I run it, I get an invalid option error "SP-0306". But when I go to cmd and run sqlplus /nolog, then conn sys/oracle@dba as sysdba it works without errors. My other .bat scripts, such as registry or cmd, are working fine. I also get "Enter Password" when I run sqlplus/nolog then conn/as sysdba and then click Enter and I'm connected. Can you please suggest a solution?
Remove the 'conn' string from your connection information. Try the following:

sqlplus "sys/oracle@dba as sysdba"

You only need the connect command when you are in the command line prompt of SQL*Plus. The above will assume that you are trying to connect with the appropriate information.

This was last published in April 2005

Dig Deeper on Oracle database design and architecture

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide.com

SearchDataCenter

SearchContentManagement

SearchHRSoftware

Close