NOTE: Applies to geodatabases created with an ArcGIS Server Enterprise license only
NOTE: Beginning with ArcGIS 9.2, 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.
NOTE: Environment variables that affect the giomgr must be set by the user who starts the service; otherwise, the variables will not be read. Once an environment variable has been set, the system must be rebooted before the service manager can pick them up.
The following is a list of environment variables you might set or unset in the dbinit.sde file.
- ESRI_US_STREETS_DIR
ESRI_US_STREETS_DIR specifies the folder that stores the ArcGIS StreetMap USA reference data used by the ArcSDE StreetMap USA locators. Set this environment variable to the folder containing the usa.edg file and other .edg StreetMap USA street data files. Note that the value of this environment variable should not contain a trailing slash (/) or backslash (\).
set ESRI_US_STREETS_DIR=d:\streetmap usa\usa\streets
GIOMGRLOGREFRESH
Set GIOMGRLOGREFRESH to true if you want to have the giomgr.log file overwritten each time the ArcSDE service is started. If you want to accumulate the log messages (the default), do not set the variable.
set GIOMGRLOGREFRESH=TRUE
LOCATION_ERRLOG
LOCATION_ERRLOG defines the file to which ArcSDE location errors are logged. The value of this environment variable should contain the fully qualified name of the log file. This file does not need to exist before setting the environment variable because the location framework creates it automatically. ArcSDE location errors will be logged to this file whenever the LOCATION_VERBOSE environment variable is set to true.
set LOCATION_ERRLOG=c:\temp\location.errlog
LOCATION_VERBOSE
Set the LOCATION_VERBOSE environment variable to true to log ArcSDE location errors. If the LOCATION_ERRLOG environment variable is also set, location errors are logged to the specified file. If the LOCATION_ERRLOG environment variable is not set or the specified file cannot be created, location errors are logged to SDEHOME\etc\location.errlog.
set LOCATION_VERBOSE=TRUE
PGHOST or PGHOSTADDR
(PostgreSQL only) Use the PGHOST variable to set the name of the server on which a remote PostgreSQL database cluster is installed.
set PGHOST=orwell
Or set the PGHOSTADDR to the IP address of the remote database server.
set PGHOSTADDR=162.44.100.22
These two settings are mostly useful if you are connecting from an ArcSDE installation on Linux to a remote PostgreSQL database.
If the remote PostgreSQL database does not use the default port number or Unix-domain socket, you will also need to set the PGPORT variable.
PGPORT
(PostgreSQL only) Use the PGPORT variable to set the TCP port number or Unix-domain socket file extension of the remote PostgreSQL database cluster to which you want to connect.
set PGPORT=6000
For more information on PostgreSQL environment variables, consult the
PostgreSQL documentation.
SDEATTEMPTS
Set SDEATTEMPTS to the number of times you want the session to attempt to connect to an ArcSDE service. Under normal conditions, only one attempt is required; however, should the ArcSDE service become too busy satisfying the connection requests of many users at the same time, several attempts may be required before a session is able to establish a connection. Each time a session fails to establish a connection, it waits until the IP time out occurs. The IP time out is set by your network administrator but defaults to 75 seconds on most operating systems. By default, SDEATTEMPTS is set to 4. This should be adequate for most environments.
set SDEATTEMPTS=4
SDEDATABASE or SDE_DATABASE
SDEDATABASE (SQL Server databases) or SDE_DATABASE (DB2, Informix, and PostgreSQL databases) can be entered for the DBMS and has multiple database connection possibilities within a single application server. Specifying the database through the application overrides this variable. If the variable is not set and the database is not specified upon connection, the ArcSDE client connects to the default database. Oracle does not use this variable.
set SDEDATABASE=city_eng
(for SQL Server database)
or
set SDE_DATABASE=city_eng
(for DB2 or Informix databases)
NOTE: Beginning with ArcSDE 9.2 for DB2 and Informix on Windows, the database specified in the ADMIN_DATABASE registry key will take precedence over the database specified with the dbinit SDE_DATABASE variable.
SDEDBECHO
SDEDBECHO echoes the contents of the dbinit.sde file during startup. For ArcSDE application servers started locally on a UNIX system, the output of SDEDBECHO is written to the screen. The SDEDBECHO output for an ArcSDE application server started on a remote UNIX ArcSDE application server is written to its sde.errlog file.
set SDEDBECHO=TRUE
SDEHOME
SDEHOME specifies the location where the ArcSDE files are installed. It also determines on which ArcSDE service the administrative commands will operate. This variable can be overridden by the –H option of the commands.
set SDEHOME=d:\arcexe\arcsde
SDEINSTANCE
SDEINSTANCE is set in the environment of the client application and determines to which ArcSDE service name to connect. Specifying the service in the application overrides this variable. If this variable is not set and the service name is not specified in the application, the service name defaults to esri_sde.
set SDEINSTANCE=esri_sde
SDEINTERCEPT
You would set the SDEINTERCEPT variable (along with the SDEINTERCEPTLOC variable) if you needed to capture information that the client or server sends across the TCP/IP port. ESRI customer support might ask you to get this information to troubleshoot certain types of problems. Gathering both the client and server network broadcast can help the technical support analyst diagnose problems unique to either the client or server, since the broadcasts should be symmetric. Any asymmetic broadcasts would indicate information that is not being received on one end.
After you set this and the SDEINTERCEPTLOC variable, you will need to restart your ArcSDE service and reproduce the problem steps.
You can set the SDEINTERCEPT variable with the following flags to intercept network broadcasts:
c—Intercept the API command name
r—Intercept the Channel broadcasts read-only
w—Intercept the Channel broadcasts write-only
t—Intercept log time (minute:second)
T—Intercept log time (hour:minute:second)
f—Intercept flush immediate
set SDEINTERCEPT=crwtf
When you no longer need to intercept the information, you can comment out the SDEINTERCEPT and SDEINTERCEPTLOC variables in the dbinit.sde file by adding a pound sign (#) in front of them and restarting your service.
SDEINTERCEPTLOC
Set the SDEINTERCEPTLOC variable, along with the SDEINTERCEPT variable, to capture information the client or server sends across the TCP/IP port.
For both client and server intercepts, set the SDEINTERCEPTLOC variable to the full path name of the file name prefix that receives the information.
When intercept is enabled, a new file is created and written to each time an application connects to the ArcSDE service. The file is closed only after the application disconnects. ArcSDE generates a file name from the prefix provided in SDEINTERCEPTLOC by appending a numeric extension that begins at .001 and increments sequentially for each new file created.
set SDEINTERCEPTLOC=D:\tmp\sde_server
If the technical support analyst asks for intercept output from both the client and server, use distinct prefix names to distinguish between the client and server. For example, setting SDEINTERCEPTLOC to d:\tmp\sde_server in the dbinit.sde file captures server network broadcasts. Setting SDEINTERCEPTLOC to d:\tmp\sde_client in the application's environment captures client network broadcasts in the same directory but with a different prefix.
SDELOGAPPEND
NOTE: Unix only
Set SDELOGAPPEND to true if you want the sde error log file to accumulate log messages and not be truncated each time the service is restarted. Do not set the variable if you want the sde error logfile to be truncated upon startup.
set SDELOGAPPEND=TRUE
SDENOIPTEST
Set SDENOIPTEST to true if you do not want ArcSDE to test for the presence of the SERVER name in the HOSTS file. By default, SDENOIPTEST is not set. Setting this variable can be useful if you have not set up the HOSTS file. The client will attempt to connect to the server for SDEATTEMPTS (four times by default).
set SDENOIPTEST=TRUE
SDEPASSWORD
SDEPASSWORD specifies the password for the user name entered by the ArcSDE client application. Specifying the password on the application connection tool overrides this variable. If the variable is not set and the password is not specified in the application, the application may prompt for the password. If the application does not prompt for the password, an error is returned.
set SDEPASSWORD=fools.gold
If you set this, the connection will be attempted using the password set with this environment variable. If you are using operating system (OS) authentication, it will fail since you are trying to use the password of the OS login. This would always apply for connecting to ArcSDE geodatabases on SQL Server Express (ArcSDE database servers).
NOTE: Storing a password with the SDEPASSWORD environment variable is not secure and is not recommended.
SDESERVER
SDESERVER determines the host of the ArcSDE service for the connecting client application. This variable can be overridden by specifying the host in the application. If the host is not specified during connection and the SDESERVER variable is not set, the client application attempts to connect to an ArcSDE service running on the local host.
set SDESERVER=bruno
SDETMP
SDETMP allows you to set the temp directory for the servers using this variable, but it will only be checked if the TEMP keyword is not set in the SERVER_CONFIG table (sde_server_config in SQL Server and PostgreSQL).
set SDETMP=c:\temp
SDETRACELOC
Enables tracing and directs the connecting application to the location of the trace files. Tracing begins when an application first connects and ends when the application terminates the connection.
set SDETRACELOC=<path_to_trace_results_file>
SDETRACEMODE
Sets the type and amount of information that is written to the trace file. The mode is set with the following parameters:
Code |
Definition |
Description |
b |
Brief mode |
Prints function names only |
v |
Verbose mode |
Prints names, input, output and return values |
m |
Minute Mode |
Prints the time in [min:sec] format between function calls |
h |
Hour Mode |
Prints the time in [hour:minute:second] format |
f |
Force Mode |
Forces data to be written to the trace file |
The verbose mode has precedence over brief mode and the hour mode has precedence over the minute mode. Therefore, if the mode is set to brief and verbose, the verbose mode is applied and if the mode is set to minute and hour the hour mode is applied. If all five modes are set, the mode of vhf is applied.
If you don't set the SDETRACEMODE, it defaults to vhf: verbose, hour mode, force mode.
If you use an invalid parameter value with SDETRACEMODE, the value will default to b: brief mode.
SDEUSER
SDEUSER specifies the user name through which the ArcSDE client application will connect. Specifying the user name in the application overrides this variable. If this variable is not set and the user name is not specified in the application, an error is returned. A user name must be specified.
set SDEUSER=bob
Do not set this environment variable if you will be using operating system authentication for your geodatabase connections. If you set this, the connection will be attempted using the user set with this environment variable, which will fail since you are trying to use operating system authentication. This would always apply for connecting to ArcSDE geodatabases on SQL Server Express (ArcSDE database servers).
SDEVERBOSE
SDEVERBOSE reports internal messaging to the screen upon startup and writes gsrvr process startup and shutdown messages to sde.errlog.
set SDEVERBOSE=TRUE
TWO_TASK or LOCAL
(Oracle only) Use the TWO_TASK variable on Unix servers or the LOCAL variable on Windows servers to specify the Net Service Name of a remote Oracle database. The Net Service Name of the Oracle database is created when you configure Oracle. Consult your Oracle documentation to find out how to set a network service name.
set TWO_TASK=GRANITEO10G
or
set LOCAL=BRONZEORA
NOTE: You could use the TWO_TASK or LOCAL variable to specify the Net Service Name of a local Oracle database. However, this is not recommended because it results in additional overhead when making a connection to the database. For local connections, you should use the Oracle_SID.