User`s guide
2 Getting Started with Database Toolbox
2-130
Connect to Oracle using the JDBC connection command line.
When using the command line, you do not have to set up a data source with Database
Explorer. You can use the command line to pass all the required parameters for
connection.
1
Use the Vendor name-value pair argument of database to specify a connection
to an Oracle database. Set the DriverType name-value pair argument to thin.
For example, the following code assumes you are connecting to a database named
dbname on a database server named sname with user name username, password
pwd, and port number as 123456.
dbname can be the service name or the Oracle system identifier (SID) depending on
your specific Oracle database setup. For details, see your tnsnames.ora file, which
is often in <ORACLE_HOME>\NETWORK\ADMIN where <ORACLE_HOME> is the folder
where the database or the Oracle client is installed.
conn = database('dbname','username','pwd',...
'Vendor','Oracle','DriverType','thin',...
'Server','sname','PortNumber',123456);
Or, if you have trouble using the database function to connect to your Oracle
database, try using the full entry in your tnsnames.ora file in the URL string as
one consecutive line. Leave the first argument blank. For example, the following