Modifying the Connection Attributes of a Database

There are three types of connection attributes based on their persistence.

  • Attributes that are set on database creation and that cannot be modified. You store the value assigned for these attributes in the database definition.

  • Attributes that are set when the database is loaded into memory and that can only be modified upon unloading and reloading the database into memory. You store the value assigned for these attributes in the database definition.

  • Attributes that are set by each connection to the database and persist for the duration of that connection. You store the value assigned for these attributes in a connectable.

These topics describe how to modify the connection attributes of a database depending on where they are stored:

Modify the Connection Attributes in a Database Definition

To modify a database definition is to modify the assigned value of the connection attributes that a database definition supports. The types of connection attributes that a database definition supports and that can be modified after database creation are:

  • First connection attributes

  • PL/SQL first connection attributes

  • Server connection attributes

Note:

You cannot modify data store attributes after database creation. To use a different value for a data store attribute, you need to destroy and re-create the database. See Destroying a Database and Creating a Database.

TimesTen Scaleout assigns the default value to any supported attribute not explicitly specified in the database definition. Attributes with the default value assigned can be modified by including the attribute in the database definition. Once you add or modify the attributes defined in a database definition and apply the changes to current version of the model, TimesTen Scaleout overwrites the configuration files of every data instance with the new attributes in the DSN associated with the database definition.

To modify the values assigned to the attributes supported by a database definition, perform these tasks:

  1. If you don't have access to the file that you used to create (or modify) the database definition, export the contents of the database1 database definition to a file.
    % ttGridAdmin dbdefExport database1 /mydir/database1.dbdef

    The following example shows the contents of the exported file.

    [database1]
    Connections=2048
    DatabaseCharacterSet=AL32UTF8
    DataStore=/disk1/databases/database1
    Durability=0
    LogBufMB=1024
    LogDir=/disk2/logs
    PermSize=32768
    TempSize=4096
  2. Modify the value of the PermSize attribute from 32768 to 49152 in the exported database definition file.
    [database1]
    Connections=2048
    DatabaseCharacterSet=AL32UTF8
    DataStore=/disk1/databases/database1
    Durability=0
    LogBufMB=1024
    LogDir=/disk2/logs
    PermSize=49152
    TempSize=4096
  3. Import the contents of the modified database definition file into the database1 database definition.
    % ttGridAdmin dbdefModify /mydir/database1.dbdef
    Database Definition DATABASE1 modified.
  4. Apply the changes to the database1 database definition to the current version of the model.
    % ttGridAdmin modelApply
    ...
    Updating grid state...................................................OK
    Pushing new configuration files to each Instance......................OK
    ...
    ttGridAdmin modelApply complete
  5. Unload the database1 database as shown in Unloading a Database from Memory.
  6. Restart the database1 database as shown in Reloading a Database into Memory to bring the changes you made to the database1 database definition into effect.

For a complete description of all the connection attributes, see Connection Attributes in Oracle TimesTen In-Memory Database Reference.

For more information on the ttGridAdmin dbdefExport, ttGridAdmin dbdefModify, or ttGridAdmin modelApply command, see Export a Database Definition (dbdefExport), Modify a Database Definition (dbdefModify), or Apply the Latest Version of the Model (modelApply), respectively, in Oracle TimesTen In-Memory Database Reference.

Modify the Connection Attributes in a Connectable

To modify a connectable is to modify the assigned value of the connection attributes that a connectable supports. The types of connection attributes that a connectable supports are:

  • General connection attributes

  • NLS general connection attributes

  • PL/SQL connection attributes

  • Client connection attributes

TimesTen Scaleout assigns the default value to any supported attribute not explicitly specified in the connectable. Attributes with the default value assigned can be modified by including the attribute in the connectable. Once you add or modify the attributes defined in a connectable and apply the changes to current version of the model, TimesTen Scaleout overwrites the configuration files of every data instance with the new attributes in the DSN associated with the connectable.

To modify the values assigned to the attributes supported by a connectable, perform these tasks:

  1. If you don't have access to the file that you used to create (or modify) the connectable, export the contents of the database1CS connectable to a file.
    % ttGridAdmin connectableExport database1CS -file /mydir/database1CS.connect

    The following example shows the contents of the exported file.

    [database1CS]
    ConnectionCharacterSet=AL32UTF8
    UID=terry
  2. Modify the value of the SQLQueryTimeout connection attribute to 300 in the exported connectable file.
    [database1CS]
    ConnectionCharacterSet=AL32UTF8
    UID=terry
    SQLQueryTimeout=300
  3. Import the contents of the modified connectable file into the database1CS connectable.
    % ttGridAdmin connectableModify /mydir/database1CS.connect
    Connectable DATABASE1CS modified.
  4. Apply the changes to the database1CS connectable to the current version of the model.
    % ttGridAdmin modelApply
    ...
    Updating grid state...................................................OK
    Pushing new configuration files to each Instance......................OK
    ...
    ttGridAdmin modelApply complete

For a complete description of all the connection attributes, see Connection Attributes in Oracle TimesTen In-Memory Database Reference.

For more information on the ttGridAdmin connectableExport, ttGridAdmin connectableModify, or ttGridAdmin modelApply command, see Export a Connectable (connectableExport), Modify a Connectable (connectableModify), or Apply the Latest Version of the Model (modelApply), respectively, in Oracle TimesTen In-Memory Database Reference.