ArcGIS Server Banner

The dbtune file and the DBTUNE table

The dbtune file and the DBTUNE table

Release 9.3 E-mail This TopicPrintable VersionGive Us feedback
Note:This topic was updated for 9.3.1.

NOTE: DBTUNE table present in all ArcSDE geodatabases but can only be altered in geodatabases created with an ArcGIS Server Enterprise license

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. Both the dbtune file and DBTUNE table are discussed in the sections listed below.

The dbtune file

The DBTUNE table

Editing the DBTUNE table

DBMS-specific uses of the DBTUNE table

DB2 uses

Informix uses

Oracle uses

PostgreSQL uses

SQL Server uses

The dbtune file

The dbtune.sde file, initially found under the SDEHOME/etc directory, contains the default object storage parameters for ArcSDE geodatabases. When the ArcSDE sdesetup command executes (or when you run the ArcSDE Post Installation wizard on Windows systems), you can specify that the configuration parameters be 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 most cases, you will populate the DBTUNE table with specific storage parameters for your database.

You can alter the dbtune file prior to creating the ArcSDE geodatabase schema by

  1. Making a backup copy of the default dbtune file. If you later decide to change any of the parameter values back to the default settings, you can use this backup file for reference.
  2. Open the dbtune file with a text editor.
  3. Edit the configuration strings you want to change or add any custom configuration keywords you want to use.
  4. Create the system tables by running sdesetup or the ArcSDE Post Installation on Windows.

The ArcSDE for Oracle Windows installation includes several versions of the dbtune file; each specifies a different geometry storage in the DEFAULTS keyword. If you are performing a new installation of ArcSDE for Oracle (not upgrading the database), you can use one of the alternate versions of the file to populate your DBTUNE table during the postinstallation setup if you want your default geometry storage to be a type other than ST_GEOMETRY.

The ArcSDE for DB2 installation includes two dbtune.sde files—one for DB2 (dbtune.sde) and one for DB2 for z/OS (dbtune.sde.zos). Be sure to alter and use the correct dbtune file for your installation.

NOTE: If you are using ArcSDE for Oracle or DB2, you must uncomment some parameters under the DATA_DICTIONARY keyword and edit the associated configuration strings to specify a table space name before you create the ArcSDE geodatabase schema. There are also commented parameters under all the other keywords for which you should uncomment and specify a table space 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 table space.

After the geodatabase has been created, you will use the sdedbtune administration command to edit the contents of the DBTUNE table. For instructions on how to use the sdedbtune command, see the ArcSDE Administration Command Reference included with your ArcSDE installation.

The anatomy of a dbtune file

The following example is from a SQL Server dbtune.sde file. Each number corresponds to a component of the dbtune file, which are described below.

Example entry from a SQL Server dbtune.sde file

  1. 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.
  2. 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.

    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. If you need to, you can alter the registration information for a feature class or table to use a new configuration keyword with sdelayer –o alter or sdetable –o alter_reg. See DBTUNE configuration keywords for more information on keywords.

  3. Parameter name—Parameters come in three basic types: meta parameters, table parameters, and index parameters. 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 DBMS 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.
  4. 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 DBTUNE configuration parameter name-configuration string pairs for more information on configuration parameters.

  5. 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.
  6. 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.

  7. 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 may 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.

The DBTUNE table

The DBTUNE table contains the following columns:

At its most basic level, the DBTUNE table is a lookup table; when you create data in, or add data to, a geodatabase, ArcSDE looks in the DBTUNE table for the configuration keyword you specify. ArcSDE takes the parameters and configuration strings associated with the keyword and appends them to the CREATE TABLE or CREATE INDEX statements the client application sends to the DBMS.

For example:

A user named pablo creates a new mines feature class using the New Feature Class wizard in ArcCatalog. Pablo specifies a name for the feature class (mines), field names, types, lengths, the DEFAULTS configuration keyword, and all the other characteristics of the feature class using the wizard. The wizard causes CREATE TABLE and CREATE INDEX statements to be sent to the Oracle DBMS. ArcSDE searches the DBTUNE table for all records with DEFAULTS as the keyword. It adds the config_string values for each parameter associated with the DEFAULTS keyword to the CREATE TABLE and CREATE INDEX commands sent by the wizard to the database. For the B_STORAGE parameter (which specifies the storage for the business table of the feature class) under DEFAULTS, the statement might be as follows:

CREATE TABLE pablo.mines (OBJECTID NUMBER(38), NAME NVARCHAR2(40), STATUS NUMBER(4)...)
IN TABLESPACE gisdata
WHERE PCTFREE = 0 and INITRANS = 4

NOTE: ESRI does not recommend you use SQL from a SQL editor to directly alter the contents of the DBTUNE table. Doing so would bypass certain protections written into the sdedbtune utility, possibly leading to reduced performance.

The DBTUNE table is created during the postinstallation setup and populated with default keywords, parameter names, and configuration string values or any customized values you made in the dbtune file prior to running the postinstallation tasks.

Editing the DBTUNE table

If you want to alter the contents of the DBTUNE table after it has been created—for instance, you want to create a new configuration keyword or alter the parameters of an existing keyword—you would use the sdedbtune administration command. You will use different operations with the sdedbtune command depending on what you want to change.

If you want to change the value of a parameter that already exists in the DBTUNE table, use the alter operation.

sdedbtune –o alter –k <configuration keyword>
–P <parameter_name> –v <configuration_string_value>
[–i <service>] [–D <database>] –u <user_name>
[–p <password>] [–N] [–q]

To delete one parameter from a parameter group or delete a configuration keyword and all its parameters, you must use the delete_data operation. Before deleting a configuration keyword, be sure the keyword is truly no longer needed by other users or applications, such as an ArcIMS map service.

sdedbtune –o delete_data –k <keyword>
[–P <parameter_name>] [–i <service>] [–s <server_name>]
[–D <database>] –u <user_name> [–p <password>] [–N] [–q]

To delete one parameter from a configuration keyword, you would specify both the keyword and the parameter in the command string (provide values for both –k and –P). To delete a configuration keyword and all the parameters that are part of that keyword, you only need to specify the keyword in the command.

Beginning with ArcSDE 9.3, if you need to add a new parameter to a keyword, use the sdedbtune command with the insert operation. This operation inserts one parameter at a time. For instance, in the following example, a UI_TEXT parameter is added to a custom keyword, RASTER:

sdedbtune -o insert -k RASTER -P UI_TEXT -v 'Use for raster data' -i 5000 -u sde

Remember that you can only insert valid configuration parameters. See DBTUNE configuration parameter name-configuration string pairs for a list of valid configuration parameters.

If you need to add a new keyword with multiple parameters to the DBTUNE table or if you are using ArcSDE 9.1 or lower, it is necessary to export, edit, then import the contents of the DBTUNE table. These are the steps you would take:

  1. Export the DBTUNE table to a text file using the sdedbtune –o export command.
  2. Make a backup copy of your text file.
  3. Edit the exported text file with a UNIX file-based editor, such as vi, or a Windows file-based editor, such as Notepad.
  4. Import the edited file to the DBTUNE table using the sdedbtune –o import command.

For ArcSDE 9.2 and later releases, you can export the DBTUNE table's contents to a file in a directory you specify. If you don't specify a directory, the file will be exported to the directory you are in when you issue the command. In ArcSDE 9.1 and lower, the sdedbtune administration tool always exported the file into the etc directory of the ArcSDE home directory; you could not relocate the file to another directory with a qualifying path name.

To run any of the edit operations of sdedbtune, you must provide the ArcSDE administrator user name and password.

For details on using the sdedbtune command to administer the DBTUNE table, see the Administration Command Reference provided with your ArcSDE component installation. You can also download a PDF version of the file from the Geodatabase Resource Center.

Uses of DBTUNE in DB2

Some things for which the DBTUNE table is used in a DB2 for Linux, UNIX, or Windows database include the following:

The DBTUNE table for DB2 for z/OS is used for the following:

Uses of DBTUNE in Informix

Some things for which the DBTUNE table is used in Informix databases include these:

Uses of DBTUNE in Oracle

Some of the things for which the DBTUNE table is used in Oracle databases include the following:

Uses of DBTUNE in PostgreSQL

In PostgreSQL databases, the values set in the sde_dbtune table include the following:

Uses of DBTUNE in SQL Server

The SDE_dbtune table in a geodatabase on SQL Server is used for the following:

See Also

  • DBTUNE configuration keywords
  • DBTUNE configuration parameter name-configuration string pairs