public class DatabaseConnection
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SQLSERVER_DRIVER |
static java.lang.String |
SQLSERVER_SELECTMETHOD |
static java.lang.String |
SQLSERVER_URL |
static java.lang.String |
TIMESTEN_DRIVER |
static java.lang.String |
TIMESTENDSNPREFIX |
Constructor and Description |
---|
DatabaseConnection() |
Modifier and Type | Method and Description |
---|---|
static java.sql.Connection |
createOracleConnection(java.lang.String user,
java.lang.String password,
java.lang.String dbName)
Attempts to establish a connection to an oracle database through
a Oracle JDBC thin driver.
|
static java.sql.Connection |
createOracleConnection(java.lang.String user,
java.lang.String password,
java.lang.String dbName,
java.util.Properties prop)
Attempts to establish a connection to an oracle database through
a Oracle JDBC thin driver.
|
static java.sql.Connection |
createOracleConnection(java.lang.String user,
java.lang.String password,
java.lang.String dbHost,
java.lang.String dbPort,
java.lang.String svcName)
Attempts to establish a connection to an oracle database through
a Oracle JDBC thin driver.
|
static java.sql.Connection |
createOracleConnection(java.lang.String user,
java.lang.String password,
java.lang.String dbHost,
java.lang.String dbPort,
java.lang.String svcName,
java.util.Properties prop)
Attempts to establish a connection to an oracle database through
a Oracle JDBC thin driver.
|
static java.sql.Connection |
createOracleThinConnection(java.lang.String user,
java.lang.String password,
java.lang.String Host,
java.lang.String Port,
java.lang.String Sid)
Attempts to establish a connection to an oracle database through
a Oracle thin JDBC driver.
|
static java.sql.Connection |
createTimesTenConnection(java.lang.String user,
java.lang.String password,
java.lang.String dsnName)
Attempts to establish a connection to a TimesTen datastore through
a TimesTen JDBC driver.
|
static java.sql.Connection |
createTimesTenConnection(java.lang.String user,
java.lang.String password,
java.lang.String dsnName,
java.lang.String oraclePwd)
Attempts to establish a connection to a TimesTen datastore through
a TimesTen JDBC driver.
|
static java.lang.Process |
exec_sql_cmd(java.lang.String cmd,
java.lang.String password)
Provides an interface to execute sqlloader/sqlplus operation as system command
by decrypting the password, second parameter.
|
static java.lang.Process |
exec_sql_cmd(java.lang.String cmd,
java.lang.String[] envp,
java.io.File dir,
java.lang.String password)
Provides an interface to execute sqlloader/sqlplus operation as system command
by decrypting the password, second parameter.
|
static java.lang.Process |
exec_sql_cmd(java.lang.String cmd,
java.lang.String[] envp,
java.lang.String password)
Provides an interface to execute sqlloader/sqlplus operation as system command
by decrypting the password, second parameter.
|
public static final java.lang.String TIMESTEN_DRIVER
public static final java.lang.String TIMESTENDSNPREFIX
public static final java.lang.String SQLSERVER_DRIVER
public static final java.lang.String SQLSERVER_URL
public static final java.lang.String SQLSERVER_SELECTMETHOD
public static java.sql.Connection createOracleConnection(java.lang.String user, java.lang.String password, java.lang.String dbName) throws java.lang.Exception
user
- - User namepassword
- - PassworddbName
- - Name of the databasejava.lang.Exception
public static java.sql.Connection createOracleConnection(java.lang.String user, java.lang.String password, java.lang.String dbName, java.util.Properties prop) throws java.lang.Exception
user
- - User namepassword
- - PassworddbName
- - Name of the databaseprop
- - Connection Propertiesjava.lang.Exception
public static java.sql.Connection createOracleConnection(java.lang.String user, java.lang.String password, java.lang.String dbHost, java.lang.String dbPort, java.lang.String svcName, java.util.Properties prop) throws java.lang.Exception
user
- - User namepassword
- - PassworddbHost
- - Database hostnamedbPort
- - Database portsvcName
- - Database service nameprop
- - Connection Propertiesjava.lang.Exception
public static java.sql.Connection createOracleConnection(java.lang.String user, java.lang.String password, java.lang.String dbHost, java.lang.String dbPort, java.lang.String svcName) throws java.lang.Exception
user
- - User namepassword
- - PassworddbHost
- - Database hostnamedbPort
- - Database portsvcName
- - Database service namejava.lang.Exception
public static java.sql.Connection createOracleThinConnection(java.lang.String user, java.lang.String password, java.lang.String Host, java.lang.String Port, java.lang.String Sid) throws java.lang.Exception
user
- - User namepassword
- - PasswordHost
- - Database hostPort
- - Database portSid
- - SID of the databasejava.lang.Exception
public static java.lang.Process exec_sql_cmd(java.lang.String cmd, java.lang.String password) throws java.lang.Exception
cmd
- - sqlloader/sqlplus command with PASSWORD constant embedded in it.
Like 'sqlloader <username>/PASSWORD@<database>'
password
- - plain or encrypted password.
Like '&aes|05|...'
java.lang.Exception
public static java.lang.Process exec_sql_cmd(java.lang.String cmd, java.lang.String[] envp, java.lang.String password) throws java.lang.Exception
cmd
- - sqlloader/sqlplus command with PASSWORD constant embedded in it.
Like 'sqlloader <username>/PASSWORD@<database>'
password
- - plain or encrypted password.
Like '&aes|05|...'
envp
- - environment variables arrayjava.lang.Exception
public static java.lang.Process exec_sql_cmd(java.lang.String cmd, java.lang.String[] envp, java.io.File dir, java.lang.String password) throws java.lang.Exception
cmd
- - sqlloader/sqlplus command with PASSWORD constant embedded in it.
Like 'sqlloader <username>/PASSWORD@<database>'
password
- - plain or encrypted password.
Like '&aes|05|...'
envp
- - environment variables arraydir
- - Directory pathjava.lang.Exception
public static java.sql.Connection createTimesTenConnection(java.lang.String user, java.lang.String password, java.lang.String dsnName) throws java.lang.Exception
user
- - User namepassword
- - plain or encrypted password.
Like '&aes|05|0D5E11BFDD97D2769D9B0DBFBD1BBF7E5A47EE7B6C8677D6E95F4E14E55CA745C1'
dsnName
- - DataStoreName that matches the entry in odbc.inijava.lang.Exception
public static java.sql.Connection createTimesTenConnection(java.lang.String user, java.lang.String password, java.lang.String dsnName, java.lang.String oraclePwd) throws java.lang.Exception
user
- - User namepassword
- - plain or encrypted password.
Like '&aes|05|...'
dsnName
- - DataStoreName that matches the entry in odbc.inioraclePwd
- - backend oracle password plain or encryptedjava.lang.Exception