InitializationString
- Last Updated: November 20, 2019
- 1 minute read
- DataDirect Connectors
- JDBC
- Oracle Service Cloud 5.1
- Documentation
Purpose
Specifies one or multiple SQL commands to be executed by the driver after it has established the connection to the database and has performed all initialization for the connection. If the execution of a SQL command fails, the connection attempt also fails and the driver throws an exception indicating which SQL command or commands failed.
Valid Values
command
[[;
command
]...]
where:
- command
- is a SQL command.
Notes
Multiple commands must be separated by semicolons. In addition, if this property is specified in a connection URL, the entire value must be enclosed in parentheses when multiple commands are specified.
Example
When mapping custom objects to a relational model, the driver exposes the different
namespaces for the packages as different schemas within the relational model. For example,
if you create an object called bar in the foo namespace, the driver exposes a schema called FOO that contains a table called BAR. To access this table using the single part naming convention, the
application can change the current schema by passing the SQL command ALTER SESSION SET CURRENT_SCHEMA = FOO in the InitializationString property. For
example:
jdbc:datadirect:oracelservicecloud:loginHost=mysite.custhelp.com;
User=test;Password=secret;
InitializationString=(ALTER SESSION SET CURRENT_SCHEMA = FOO)
Default
none
Data Type
String