The dbinit.sde file

The dbinit.sde file can store environment variables that control the manner in which an ArcSDE service or client connects to a database. This file is located in the %SDEHOME%\etc directory on Windows and in the $SDEHOME/etc directory on UNIX and Linux.

If you are making a direct connection to the geodatabase, you can create an etc directory under the client installation location and place a copy of the dbinit.sde file there to be read when the client connects directly to the geodatabase.

By default, the dbinit.sde file is empty. If you want to use environment variable commands/parameters to control the connection to the database, you must add these to the file. You can also add comments to the dbinit.sde file to document why you set or unset a certain variable. Comments are any lines preceded by the pound sign (#).

The commands in the dbinit.sde file accept two keywords: set and unset. The set command enables the system variable and assigns it the value following the equal sign. The syntax of the set command is

set <environment variable>=<value>

The unset command disables the system variable. It is useful because it ensures that an undesired variable set in the login environment is not set when ArcSDE starts. The syntax of the unset command is

unset <environment variable>
NoteNote:

For ArcGIS 9.2 and later releases, for those variables that can be set to TRUE, you can unset them with set <environment variable>=FALSE or 0, as well as with unset <environment variable>. Prior to 9.2, you had to use unset to turn off a variable to disable it.

The dbinit.sde file is read each time the ArcSDE instance starts or, if the dbinit.sde file is placed in an etc directory in the client installation directory, when the user connects. The parameters defined in the dbinit.sde file override duplicate parameters from other sources.

Use of this file is optional. Populating this file avoids the need to rely on environment variables set when the user logs in and is, therefore, most useful on UNIX/Linux platforms. On these platforms, ArcSDE takes the environment variables from the shell of the user who starts ArcSDE. To this list of environment variables, it adds the variables that are set in the dbinit.sde file. If the variable already exists in the user's shell, ArcSDE uses the information from dbinit.sde instead. Those variables that are unset in the dbinit.sde file are removed from the list.

On Windows platforms, you might use the dbinit.sde file to do things like connect to an instance that is different from the one in the Windows Registry or to set SDEVERBOSE, thereby enabling gsrvr process startup and shutdown messages to be sent to the sde.errlog.

NoteNote:

Environment variables that affect the giomgr must be set by the user who starts the service; otherwise, the variables are not read. Once an environment variable has been set, you must reboot the system before the service manager can read them.

See Environment variables for a list of variables you could set or unset in the dbinit.sde file.

Related Topics


8/19/2013