What is the dbtune file?
The dbtune configuration file provides the initial values for the DBTUNE table.
After the creation of the DBTUNE table, the dbtune file can be used to add new configuration keywords to the DBTUNE table.
The dbtune file is initially found under the etc directory of SDEHOME. When the sdesetup command executes (or when you run the ArcSDE Post Installation wizard on Windows systems), configuration parameters are read from the file and written into the DBTUNE table. If the dbtune file is absent, empty, or not specified, the DBTUNE table is created and populated with default configuration keywords representing the minimum ArcSDE configuration. In many cases, you will populate the DBTUNE table with specific storage parameters for your database.
If you are using ArcSDE for Oracle, DB2, or PostgreSQL, you should uncomment some parameters under the DATA_DICTIONARY keyword and edit the associated configuration strings to specify a tablespace name before you create the geodatabase. There are also commented parameters under all the other keywords for which you should uncomment and specify a tablespace name before you begin adding data to your geodatabase. Commented lines are prefaced with a single pound sign (#). Remove this pound sign and replace the <text> with the name of the correct tablespace.
The anatomy of a dbtune file
The following example is from a SQL Server dbtune.sde file. Each number, described following the illustration, corresponds to a component of the dbtune file.
- Configuration keyword—Keywords are prefixed by two pound signs (##) in the dbtune file. These pound signs are not actually part of the keyword; they don't get stored in the DBTUNE table. They are present in the dbtune.sde file to signify which line in the dbtune file contains the configuration keyword.ArcSDE records the configuration keyword (or DEFAULTS if one is not specified) for every layer in the system tables. It also records a keyword for nonspatial tables created in the geodatabase. Whenever you create a new object for a layer or registered table, such as an index, ArcSDE will use the current parameter values in the DBTUNE table for the keyword that was used to create the table. For example, if you create a column index with sdetable –o create_index, ArcSDE will refer back to the DBTUNE table for the storage information that was used to create the table and use it to create the index. For this reason, you must be careful if you delete DBTUNE entries.Note:
Make sure there are no spaces between the pound signs or between the pound signs and the configuration keyword in the dbtune file. If there are, ArcSDE will read the keyword as being part of the previous keyword.
- Parameter name—Parameters come in three basic types: meta, table, and index. Meta parameters define the way certain types of data will be stored, the environment of a configuration keyword, or a comment that describes it. Table parameters define the storage configuration of a database table. When a client application sends a CREATE TABLE statement, ArcSDE appends the configuration string associated with the parameter to the CREATE TABLE statement prior to submitting the statement to the database. Index parameters define the storage configuration of a DBMS index. When a client application sends a CREATE INDEX statement, ArcSDE appends the index parameter to it prior to submitting the statement to the database.
For example, if you create a new layer in your SQL Server or Oracle database and you choose the WKB_GEOMETRY keyword, ArcSDE will add GEOMETRY_STORAGE="OGCWKB" to the CREATE TABLE statement it sends to the database.
See What are DBTUNE configuration keywords and parameters? for more information on keywords and parameters.
- Configuration string—A configuration string value may span multiple lines. If the value is an actual string value, it must be enclosed in double quotes in the dbtune file. Boolean or numeric values don't require quotes. In some database management systems (DBMS), double quotes with no space between them indicate a value is blank. The double quotes are used to signify a literal value in the dbtune.sde file; they are not part of the value stored in the DBTUNE table.
The configuration string is always paired with a parameter name and provides the specifics for how an object will be created and stored in the database.
- End keyword—Each parameter group must be followed by the END keyword. If the END keyword is missing from the end of any of the parameter groups, the file cannot be loaded into the DBTUNE table.
Any number of parameter groups can be specified in a dbtune file. However, certain groups and certain parameter names within groups are expected to exist and will be automatically created in the DBTUNE table if they do not exist in the dbtune.sde file.
Comments can be placed within the dbtune file and are indicated by a single pound sign (#). The default version of the dbtune.sde file provided with your ArcSDE component installation contains lines that are commented out. These lines are used as placeholders for certain storage parameters, which you can use by removing the comment character and editing the line.