How to Configure SQL Developer on Windows for TimesTen Connections
Contents Prerequisites ........................................................................................................................................... 2
Install TimesTen Client Software ............................................................................................................ 2
Install SQL Developer .............................................................................................................................. 3
Create a New Database Connection ....................................................................................................... 4
Troubleshooting ...................................................................................................................................... 7
Prerequisites
SQL Developer 3.x requires Java Development Kit (JDK) 6 be installed. Please install the appropriate JDK for your platform. Best practice states that if you are running 64-bit Windows then install the 64-bit JDK, 64-bit TimesTen Client and 64-bit SQL Developer. If running 32-bit Windows install the 32-versions of the products. The JDK can be downloaded from here http://www.oracle.com/technetwork/java/javase/downloads/index.html
Install TimesTen Client Software In order for SQL Developer to connect to a TimesTen Database, it requires the TimesTen client to be installed on the same system as SQL Developer. The TimesTen client software is part of the TimesTen software bundle downloaded from here http://www.oracle.com/technetwork/products/timesten/downloads/index.html
Download the appropriate 32-bit or 64-bit Windows TimesTen software bundle to your local machine.
Unzip the download to an appropriate location on your machine.
Navigate to the unzipped location and run (double click) setup.exe
Click <Next> and accept the defaults until you reach the screen below at which point just select the TimesTen Client for your machine in this case we’re installing on a 64-bit machine.
Continue to press <Next> accepting the defaults including Registering TimesTen environment variables.
Select which version of the JDK is installed on your machine which needs to be JDK 6.
Continue to press <Next> until the installation starts and the <Finish> when complete.
Install SQL Developer
If not already done so download and install SQL Developer from here http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html
Download the appropriate 32-bit or 64-bit install to your local machine.
Unzip the download to an appropriate location on your machine.
Navigate to the unzipped location and run (double click) sqldeveloper.exe
Enter the full pathname for JDK 6 java.exe on your local machine.
After a couple of start-up screens SQL Developer should now be up and running.
By default Autocommit in SQL Developer is set to OFF. This has the potential to cause problems in TimesTen if for example a SQL Developer session was left with an open transaction that might be holding locks for a database transaction that needs to run. So to avoid this type of issue ALWAYS set Autocommit to ON.
Do this by selecting Tools-> Preferences -> Database -> Advanced ->Autocommit
Create a New Database Connection Add a new database connection by clicking on the green +
You should now see a New Database Connection Screen with a TimesTen tab. If the TimesTen tab is not showing please refer to the trouble shooting section.
Select the TimesTen connection Tab and enter the following information:
Connection Name: Call the connection any name you like for example TT_Connection
Username: This is the database user you will be using to connect to the TimesTen Database.
For Exalytics, this will be the username the BI Server uses to connect to the TimesTen
database. In this example, the database user is called ‘airlines’
Password: The password of the username above in my example is ‘welcome1’
Check the Save Password box.
In order to specify the target TimesTen database, you can select a pre-defined DSN from the DSN
drop down list, or by specifying a connection string. In this example, we are going to illustrate
how to connect to a remote TimesTen database using a user-specified connection string.
DSN: Select <User specified> from the drop down list.
Connection type: Leave as Client/Server
Connection string: : For this we are going to provide three attributes:
TTC_Server=hostname;TTC_Server_DSN=Server_DSN;TCP_Port=Server_port
o TTC_Server is the hostname or IP address of the machine that hosts the TimesTen
database. For Exalytics, this is the IP address of the Exalytics machine
o TTC_SERVER_DSN is the DSN of the TimesTen database on the above machine.
For Exalytics, this is typically TT_AGGR_STORE
o TCP_PORT is the port number of the TimesTen Server, which is 53397 for TimesTen
11.2.2.x. Please see the troubleshooting section if this is not the case.
e.g. TTC_Server=130.35.26.99;TTC_Server_DSN=TT_AGGR_STORE;TCP_Port=53397
Oracle Password (for Cache): This is the password of the same connection user in the Oracle
database. This is required only if you plan use cache groups, or use the ttLoadFromOracle
built-in procedure to load Oracle database tables.
Hit <Test> and it should say: Success. If not please refer to the troubleshooting section
Hit <Save> and then <Connect>. A new connection icon should appear.
From here you can now access all the database objects using SQL Developer.
Troubleshooting
1. The TimesTen tab doesn’t show in the New Connection window
a. Check that your CLASSPATH includes the TimesTen jar file installed as part of the
Client install.
For example CLASSPATH = TimesTen_install_dir\lib\ttjdbc6.jar;
If not set correctly edit the environment variable manually or run TimesTen_install_dir\bin\ttenv.bat
Once this is done, launch SQL Developer from the command line in the same
CMD.EXE window you ran ttenv.bat, so the new environment variables are picked
up by SQL Developer
b. Check that you have both 32-bit TimesTen Client and 32-bit SQL Developer installed,
or both 64-bit and not a mix.
2. Status : Failure –Could not connect to database. The error encountered was:
Unable to connect to data source (DSN: ; Network Address: 130.35.26.99; Port
Number: 53397). This operation has Timed Out. Try increasing your ODBC
timeout attribute or check to make sure the target TimesTen Server is
running.
Could be a number of issues:
a. Check that there are no typos in the connection string
b. Check that you can ‘ping’ the machine name or ip address from a command prompt
c. Check that the TimesTen Daemon and Server are running. To check this log onto the
TimesTen host machine and open a command prompt.
If the environment is set correctly, run ttStatus Database_DSN Using the Exalytics DSN example in the previous section, this will be ttStatus TT_AGGRE_STORE If you get ttStatus not found error, run <TimesTen_install_dir>/bin/ttStatus
On Exalytics, this is typically /home/oracle/TimesTen/tt1122/bin/ttStatus
If ttStatus fails with the error shown then you need to start the TimesTen daemon as shown in the error message
If ttStatus runs ok, check to see if the TimesTen server is running, if not start it as shown below
d. The TimesTen Server may not be using the default port number. Again the output
from ttStatus database_DSN will tell you the correct port number
3. Status : Failure -Could not connect to database. The error encountered was:
Data source name not found and no default driver specified
Check that the DSN specified in TTC_Server_DSN is the correct DSN to be connecting to on
your machine. The TimesTen DSN is defined here:
TimesTen_install_dir/info/sys.odbc.ini
On Exalytics, this file is typically located here: /home/oracle/TimesTen/tt1122/info/sys.odbc.ini