Create a Connectable (connectableCreate)
The connectableCreate command creates a connectable object in the model, defining connection attribute settings.
ttGridAdmin connectableCreate -dbdef name
[-cs [-only hostname[.instancename]]]
filepathOptions
The connectableCreate command has the options:
| Option | Description |
|---|---|
|
|
The name of the database definition object that the connectable references (which is the name of the database to connect to). |
|
|
Specifies that the connectable will be for client/server access to the database. If this is not specified, the connectable will be for direct mode access. |
|
|
For client/server connections, optionally specifies that applications connecting through this connectable should connect to the indicated instance. By default, all data instances in the grid are available and connections are distributed among them. You need to specify the instance name only if there is more than one instance on the host. (See Grid Objects and Object Naming.) You can specify multiple |
|
|
Path and name of the connectable file, which contains the connection attribute settings for the connectable. The file name must be of the form Also see the example below. |
Examples
The example creates a client/server connectable using this connectable file, database1client.connect:
ConnectionCharacterSet=AL32UTF8 UID=ttclient
Create the connectable:
% ttGridAdmin connectableCreate -dbdef database1 -cs /sw/tten/grid/conndefs/database1client.connect Connectable database1client created.
Notes
-
The connectable file must be in
odbc.iniformat, as shown in the example, withattribute=valueon each line. A DSN name, in[name]format such as[database1client]here, is optional. If provided, it must match the connectable name determined by the connectable file name. -
The default value is used for any connection attribute not set in the connectable.
-
When you apply the model after creating a connectable, new versions of all necessary configuration files are written to each data instance. This makes the connectable available for use. (Never edit configuration files manually. They are overwritten each time the model is applied.)
-
You cannot set data store (creation time) attributes or first connection attributes in the connectable file. Those must be set in the database definition file for the
dbdefCreateordbdefModifycommand. -
Any settings for
TTC_SERVER,TTC_SERVER_DSN, orTCP_PORTare ignored. Appropriate values for the grid topology are automatically used. -
The connectable that is defined is usable through all APIs supported by TimesTen.