Can someone tell me, how to connect sql developer from command line. I just want to connect to system user of Database named test and port 1521. Please provide me complete command with synatx.
Sql Developer is a GUI tool.
You create connections using a dialog box.
Are you trying to use the command-line interface?
If so post ALL of the info needed to help you: full version of sql dev and show us what you have tried.
I am trying to invoke sql developer from command prompt.
C:\app\OS3189\oracle\sqldeveloper-184.108.40.206.59-no-jre\sqldeveloper\sqldeveloper.exe sqlplus system/password@sid - this command i am giving.
Instead, please try SQLcl. Over the 4.1.x early adopter phase, I think this got renamed from sqlplus+ to sdsql to SQLcl (using sql.exe)...
sql system/password@sid <== This is called a TNS Alias, not a SID. Of course, the tnsnames.ora may use the SID as the alias.
and that is only if you really have a tnsnames.ora file somewhere, especially if a TNS_ADMIN environment variable has been defined to point at the folder containing tnsnames.ora. Otherwise, use the EZConnect URL format (@host:port/servicename) in place of the TNS Alias form (@TNSAlias).
as stated, sqldeveloper is a gui.
sqlplus (sqlplus.exe) is a command line tool to connect to Oracle databases and has been around for a long time -- and very good!
It is available if you have an oracle client install or oracle database server install on your machine:
C:> sqlplus -h :: for help
C:> sqlplus username/password@tns_entry_in_tnsnames_file
C:> sqlplus username/password@//host:1521/service_name
C:> sqlplus username/pasword@"DESCRIPTION=(ADDRESS=(HOST=mydbhost)(PORT=1521)(PROTOCOL=TNS))(CONNECT_DATA=(SERVICE_NAME=mydbservicename)))"
SQLcl (sql.exe) is an early adopters command line tool which is like sqlplus, but with different features. run without parameters, it will prompt you for user, password and db:
C:> sql -h
you can't pass a connection string to sql developer at startup
connections have to be made once the GUI launches
SQLcl is of course a different ball game
Is there a reason you're not using SQL*Plus?
Here is some info
Here is a sample invocation in Windows
sqlplus user/password @%sql_path%\scriptname >> %log_path%\scriptload.log
if the script is a *.sql file, you don't need to explicitly list the suffix. you can also do user@tns_server_name_here