Testing your Database Setup

Celoxis uses JDBC to connect to the database.  Celoxis not being able to connect to the database could be because of a number of reasons. To debug the problem we have written a simple program that will facilitate you to understand the problem.

Downloading the program

Download the jdbctest.zip file from http://download.celoxis.com/jdbctest/jdbctest.zip and unzip it. This will create a directory containing the following:

Running the test program

Open a terminal window on Unix/Linux or Command prompt in Windows
Go to the directory jdbctest
On Microsoft Windows run the program (substituting values according to your configuration) as:
java -cp .;drivers/* jdbctest product=oracle name=celoxis user=scott password=tiger host=localhost
On Unix (or Linux) run the program (substituting values according to your confiuration) as:
java -cp '.:drivers/*' jdbctest product=oracle name=celoxis user=scott password=tiger host=localhost
Note
product one of oracle (for Oracle), pgsql (for Postgresql), mssql_2000 (for SQL Server 2000), mssql_2005 (for SQL Server 2005) or mssql_2008 (for SQL Server 2008) 
name name of your database
user/password username and password to be used to connect to the database. NOTE:  In case of SQL server, the login and database must be configured to use the SQL Authentication mode (or Mixed mode), not Windows authentication mode only.
host the machine name of the server where the database is running
port the port of the database server. This is an optional field and when unspecified the default port will be used. 


You will receive a success message if the connection was successful.  If the connection fails, the message returned by the driver is printed. If you don't understand the output simply send us the output.

Debugging your database setup

Common errors for Oracle

ERROR MESSAGE POSSIBLE CAUSES
The Network Adapter could not establish the connection 1) The host name is  not resolvable using DNS 2) Database server  is not running on the host 3) The database port on the database server is inaccessible because of a firewall
Invalid username/password; logon denied Username or password is incorrect
Connection refused(DESCRIPTION=(TMP=) (VSNNUM=153092352)(ERR=12505) (ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4)))) 1) The database name is incorrect 2) The user doesn't have privileges to logon to the database

Common errors for MSSQL

ERROR MESSAGE POSSIBLE CAUSES
Error establishing socket.
1) The host name is  not resolvable using DNS 2) Databse server is not running on the host 3) The database port on the database server is inaccessible because of a firewall
Login failed for user
Username or password is incorrect
Cannot open database requested in login
1) The database name is incorrect  2) The user doesn't have privileges to logon to the database
Not Associated with a trusted SQL Server Connection This occurs typically when Microsoft Sql Server installation is configured to use only Windows authentication and not SQL Server authentication. To solve the problem: Change the Authentication change the authentication mode to sql server authentication.

Common errors for Postgresql

ERROR MESSAGE POSSIBLE CAUSES
The connection attempt failed
1) The host name is  not resolvable using DNS 2) Database server is not running on the host 3) The database port on the database server is inaccessible because of a firewall
Connection rejected: FATAL: password authentication failed for user
Username or password is incorrect
Backend start-up failed: FATAL: database "abc" does not exist
1) The database name (abc) is incorrect 2) The user doesn't have privileges to logon to the database