This topic provides information on database connection strings for various server types: MS SQL Server, mySQL, Oracle, and IBM DB2.
jdbc:sqlserver://hostname:port;user=username;password=password;DatabaseName=database
hostname
= Computer name where MS
port
= MS
database
= MS
password
= MS
MSSQL2005.jdbc.SQLServerDriver
To use the MSSQL2005.jdbc.SQLServerDriver, you must have the sqljdbc4.jar file in the server’s CLASSPATH. One such spot is in the TOMCAT_HOME/common/lib directory (for Tomcat), or any location that will be accessible to the Java Web Server running the generated Agent Scripting Web application.
data source=hostname;Database=dbname;UID=username;Password=password
dbname
= MS
username = MS SQL server user name
password = MS SQL server password
Note: When SQL Server is
located on a remote host, use:
Server=server_name;Database=database;UID=username;Password=password;)
database
= MS
password
= MS
MSSQL2005.jdbc.SQLServerDriver
To use the MSSQL2005.jdbc.SQLServerDriver, you must have the sqljdbc.jar file in the server’s CLASSPATH. One such spot is in the TOMCAT_HOME/common/lib directory (for Tomcat), or any location that will be accessible to the Java Web Server running the generated Agent Scripting Web application.
com.microsoft.jdbc.sqlserver.SQLServerDriver
To use the JDBC driver com.microsoft.jdbc.sqlserver.SQLServerDriver, you must have the files mssqlserver.jar, msbase.jar, and msutil.jar in the server’s CLASSPATH. One such spot is in the TOMCAT_HOME/common/lib directory (for Tomcat), or any location that will be accessible to the Java Web Server running the generated Agent Scripting Web application.
jdbc:sqlserver://hostname:port;user=username;password=password;DatabaseName=database
hostname
= Computer name where MS
port
= MS
database
= MS
password
= MS
jdbc:microsoft:sqlserver://hostname:port;user=username;password=password;DatabaseName=database
hostname
= Computer name where MS
port
= MS
database
= MS
password
= MS
Make sure the services are started after installation.
password = mySQL server password
jdbc:mysql://hosturl:port/database?user=username&password=password
hosturl = URL of sight where mySQL database is running
port = mySQL Listener Port number (DEFAULT=3306)
database = mySQL database name
username = mySQL user name
password = mySQL password
DSN=dsn;UID=username;Password=password
dsn = Data source name from ODBC Control panel
username = Oracle user name
password = Oracle password
OraOLEDB.Oracle
System.Data.OracleClient
Data Source=TNSName;User ID=username;Password=password
TNSName = Oracle database local Service Name as defined in tnsnames.ora configuration file.
username = Oracle user name
password = Oracle password
oracle.jdbc.OracleDriver
oracle.jdbc.pool.OracleConnectionCacheImpl for a pooled cached connection
Two possible connection strings:
jdbc:oracle:thin:username/password@hostname:port:sid
username = Oracle user name
password = Oracle password
hostname = Computer name where Oracle is running
port = Oracle Listener Port number (DEFAULT=1521)
sid = Oracle database SID as defined in tnsnames.ora
jdbc:oracle:oci:username/password@TNSName
username = Oracle user name
password = Oracle password
TNSName
= Oracle database local Service Name as defined in tnsnames.ora
For IIS you must grant read/execute permission on the Oracle home directory to IUSR_xxx where xxx is the machine name.
Log on to Windows as a user with Administrator privileges.
Launch Windows Explorer from the Start Menu and navigate to the ORACLE_HOME directory. This default path is C:\oracle\ora92
Right-click the ORACLE_HOME folder and choose the Properties option from the drop-down list. The Properties window displays.
Click the Security tab on the Properties window.
Click the Authenticated Users item in the Name list (on Windows XP the Name list is called Group or user names).
Clear the Read and Execute box in the Permissions list (on Windows XP the Permissions list is called Permissions for Authenticated Users). This box will be under the Allow column.
Select the Read and Execute box. This is the box you just cleared.
Click the Apply button.
Click the OK button.
Restart your computer.
For JDBC make sure that the classes12.jar file is in the common/lib folder (for Tomcat), or any location that will be accessible to the Java Web Server running the generated Agent Scripting Web application.
DSN=dsn;UID=username;PWD=password
dsn = Data source name from ODBC Control panel
username = IBM DB2 server user name
password = IBM DB2 server password
IBMDADB2
IBM.Data.DB2
DSN=database;UID=username;PWD=password
database
username = IBM DB2Server user name
password = IBM DB2Server user password
Server=server:port;Database=database;UID=username;PWD=password
Server:port = Name of computer running IBM DB2Server:port number (Default port number is 50000)
database = IBM DB2Server database name
username = IBM DB2Server user name
password = IBM DB2Server user password
com.ibm.db2.jcc.DB2Driver
jdbc:db2://Server:port/Database:user=User_ID;
password=password;
Server = Computer name where IBM DB2 server is running.
port = IBM DB2 server listener port number (DEFAULT=50000)
database = IBM DB2Server database name
User_ID = IBM DB2Server user name
password = IBM DB2Server password
IBM DB2 client is at version 8.1.7 or higher for provider = IBM.Data.DB2.
For JDBC, make sure that the file db2jcc.jar file is in the common/lib folder (for Tomcat), or any location that will be accessible to the Java Web Server running the generated Agent Scripting Web application.