JDBC is using URL to locate the database schema.
Database URLs are strings that you specify for the value of the url property of the DataSource object.
You can add to all JDBC URL, the user and the password in the query part. Example
jdbc:subProtocol://hostname;user=[userName];password=[userPassword];DatabaseName=[Databasename]
The userName and the userPassword must be encoded as all query properties.
The getConnection function gives the following format for the beginning of the string.
jdbc:subprotocol:subname
The format of a url is DB-specific but many follows the following syntax:
jdbc:subprotocol:uri
# ie
jdbc:subprotocol:scheme://autority....
where:
The colon “:” implies SID, the slash “/” implies service_name.
Example:
jdbc:oracle:thin:scott/tiger@myhost:1521:mysid
With user: jdbc:oraclebi://localhost:9703/user=Nico;password=********;
Others parameters:
Example:
jdbc:sqlserver://localhost;user=MyUserName;password=*****;databaseName=AdventureWorks;
The driver= com.timesten.jdbc.TimesTenDriver. The jar driver is located int the TIMESTEN_BASE\lib directory. The jar file ttjdbc5.jar is for the Java SDK version 5 and ttjdbc6.jar is for version 6. (ttjdbc5.jar, ttjdbc6.jar)
URL:
jdbc:timesten:{direct|client}:dsn=DSNname;[DSNattributes;]
Example:
jdbc:timesten:client:dsn=TT_DATA_STORE;UID=login;Pwd=pwd;SQLQUERYTIMEOUT=0
For the Embedded configuration
For the client/server communication: