Environment variables
Environment variables store information for specific settings in the environment of the connecting client. They store such things as the path to a specific directory or file, a port number, and user names.
The following is a list of environment variables you can set. Most of these variables are intended for use with an ArcSDE service and, as such, are set in the dbinit.sde file on the ArcSDE server. Some variables can be set for clients making direct connections to the geodatabase, such as SDEINTERCEPT and SDEINTERCEPTLOC. In those cases, you can set variables in the Windows system variables or UNIX command shell for the connecting client. Additionally, some variables such as SDEDBECHO, are intended for UNIX/Linux systems.
-
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
-
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. By default, SDEATTEMPTS is set to 4. This should be adequate for most environments.
set SDEATTEMPTS=4
-
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 installation the administration commands will operate. This variable can be overridden by the –H option of the commands.
set SDEHOME=d:\arcgis\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=sde2
-
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 technical 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 must 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), and 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 an ESRI 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 error log file, sde.errlog, to accumulate log messages and not be truncated each time the service is restarted. Do not set the variable if you want the sde.errlog 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 ArcSDE 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
Note:
Storing a password with the SDEPASSWORD environment variable is not secure and is not recommended.
SDEPASSWORD specifies the password for the user name entered by the ArcSDE client application. You might do this in a development or testing environment so you don't have to specify a password when testing. 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 is attempted using the password set with this environment variable. If you are using operating system (OS) authentication, it fails, since you are trying to use the password of the OS login. This always applies when connecting to ArcSDE geodatabases on SQL Server Express (database servers).
-
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.
set SDETMP=c:\temp
-
SDETRACELOC
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
SDETERACEMODE sets the type and amount of information that is written to the trace file. The mode is set with the following parameters:
ArcSDE trace mode codesCode
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 do not 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 in the applicaton or with a variable.
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 is attempted as the user set with this environment variable, which will fail, since you are trying to use operating system authentication.
-
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
Use the TWO_TASK variable on UNIX or Linux 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=GRANITEO11G
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.