Create a Database Definition (dbdefCreate)
The dbdefCreate
command creates a database definition object in the model, defining characteristics of the database according to attribute settings in the specified file. It also creates a direct connectable object with the same name as the database, for direct connections.
ttGridAdmin dbdefCreate filepath
Once a database definition is added to the model, it can be used to create a database.
Options
The dbdefCreate
command has the option:
Option | Description |
---|---|
|
Path and name of the database definition file, which contains the attribute settings for the database definition. The file name must be of the form |
Examples
The example uses database definition file database1.dbdef
:
DataStore=/disk/databases/database1 LogDir=/disk2/logs DatabaseCharacterSet=AL32UTF8 ConnectionCharacterSet=AL32UTF8 PermSize=256 TempSize=128
Typical settings in a database definition file include the following, as shown in the example.
-
Data store attributes:
DataStore
(required)LogDir
, andDatabaseCharacterSet
(required)Directories are created on each host as necessary for the
DataStore
andLogDir
locations. -
First connection attributes:
PermSize
(required) andTempSize
-
General connection attribute:
ConnectionCharacterSet
-
As necessary, PL/SQL first connection attributes and server connection attributes
Create the database definition object:
% ttGridAdmin dbdefCreate /sw/tten/grid/dbdefs/database1.dbdef Database Definition database1 created.
Data store attributes and first connection attributes go in the resulting database definition. From the example, this consists of DataStore
, LogDir
, DatabaseCharacterSet
, PermSize
, and TempSize
. In addition, a default connections
setting and a default durability
setting are added to the definition automatically.
[database1] DataStore=/disk/databases/database1 DatabaseCharacterSet=AL32UTF8 LogDir=/disk2/logs PermSize=256 TempSize=128 connections=100 durability=0
General connection attributes go in the resulting connectable definition that is automatically created. In the example, this consists of ConnectionCharacterSet
:
[database1] ConnectionCharacterSet=AL32UTF8
For additional information, see Creating a Database Definition File in Oracle TimesTen In-Memory Database Scaleout User's Guide.
Notes
-
The database name cannot be the same as any existing database or connectable name.
-
The database definition file must be in
odbc.ini
format, as shown in the example, withattribute
=
value
on each line. -
A
dbdef
file supports the following substitution strings forDataStore
andLogDir
entries. They are replaced as appropriate when the model is applied:-
!!HOST_NAME!!
is replaced on each host by the host name as specified in the model. -
!!INSTANCE_NAME!!
is replaced in each instance by the instance name as specified in the model.
A scenario for using
!!HOST_NAME!!
and!!INSTANCE_NAME!!
, for example, would be if you use a Storage Area Network device shared between the hosts of the grid. SettingDataStore
to/shared/datastores/!!HOST_NAME!!/!!INSTANCE_NAME!!
gives each host its own data storage area. -
-
It is best practice to specify
LogDir
and have it be on a different file system fromDataStore
. TheDataStore
andLogDir
paths and directories will be created wherever necessary. -
You can create additional connectables as described in Create a Connectable (connectableCreate).
-
Some connection attributes cannot be set in a
dbdef
file, although they could be set for additional connectables that you create. For example, because the initial connectable that is created during database definition must be usable by the instance administrator, theUID
andPWD
connection attributes cannot be specified in adbdef
file. -
When you apply the model after creating a database definition, new versions of all necessary configuration files are written to each data instance, with an entry added according to the
dbdef
settings. (Never edit configuration files manually. They are overwritten each time the model is applied.)