Command syntax

The ArcSDE administration commands use UNIX-style command syntax and notation according to the following conventions:

-<letter> or -<word> Specifies a command option, for example, -o, -a, or -interleave

Letters are both lowercase and uppercase, so it is important that you input the correct case.

< > Required argument—replace with appropriate value.

For example, -u <DB_user_name> could become -u mlogin.

| Mutually exclusive arguments—pick one from the list.
{ } Used with | to specify a list of choices for an argument
[ ] Optional parameter

Each command has operations and options.

Operations

An operation performs a specific task related to the command and is specified by -o <task>.
For example, some of the sdetable command operations are:

sdetable -o create
sdetable -o delete
sdetable -o truncate
sdetable -o list
sdetable -o describe
sdetable -o create_index
sdetable -o delete_index

Each operation has a set of options.

Options

Like operations, options are specified by -<letter> or, occasionally, -<word>. The -<letter> used for a particular option is standard across all commands, with a few exceptions. For instance, the option to specify a database name is always -D, whereas the option -a indicates attribute mode on most commands, but indicates column names on sdetable, sets NoData pixels on sderaster, and lists the attribute data values on sdexinfo. Although a letter is sometimes used for two different types of options, it is never used for two different options in the same command.

For each command's operation, there are mandatory and nonmandatory options.

sdelog -o list -u <username> [-i <service> | <port#> | <direct connection>] [-q]

The example above has three options. Anything enclosed within brackets [ ] is not required. The user name option is required, but quiet [-q] is not. If you are using the default service name and port number, the connection [-i] information is optional. If you are not using the default, you must specify one of the items in the list: either the service name, service port number, or direct connection information.

Sometimes an option marked optional is not truly optional. The most common occurrence is [-p <DB_user_password>]. It is optional on the command line, but ArcSDE queries for the password if it is not given. For example:

sdetable -o delete -t test30 -u sde
Enter Database User password:

The -p <DB_user_password> is not encrypted. Therefore, leaving this option out of the command and typing the password when prompted allows you to input the password without it appearing on the screen.

In other cases, certain options are optional depending on your circumstances. The previous use of the -i option is one example. Another example is the use of the -s option. For instance, if you are issuing the sdeconfig command to a local database (one that is on the same machine from where you issue the command), the -s <server_name> option does not have to be specified because the local machine is assumed.

sdeconfig -o list -P AUTH_KEY -i 5100 -D vector -u sde

Whereas, if you issue the command against a remote database, you must specify the -s option so ArcSDE knows to look in that location for the database you specify.

sdeconfig -o list -P AUTH_KEY -i 7220 -s sepulveda -D vector -u sde

Some options have a list of choices such as:

shp2sde -o append [-a {none | all | file=<file_name>}]

The -a option in this example allows you to choose how to execute the option. These elements are enclosed in curly brackets {}.

A few options have two or more parameters separated by commas. For example, the following option:

-l <table,column>

specifies a business table name and column name. Do not add spaces between the parameters.

Special characters

In identifiers

Identifiers containing special characters, such as a user name based on a Windows login in the form DOMAIN\login, need to be delimited with double-quotes. In the Windows login identifier example, the back slash (\) is a special character.

For Windows commands, the backslash (\) is an escape character. Escape characters indicate to the administration command that the character that follows should be passed to the database as a simple character.

The administration commands do not recognize double-quotes; therefore, a command for which you would specify "DOMAIN\login", such as sdelayer or sdetable, will not function correctly unless you place an escape character before each double-quote. In this example, you would place a back slash (\) before each quote mark. This tells the administration command to pass the subsequent character as part of the character string. For example:

sdelayer -o describe -O \"WORLD\shannon\" ...

In the example above, sdelayer will pass \"WORLD\shannon\" as "WORLD\shannon".

Delimited identifiers can be used with any of the supported DBMSs, but will mostly only be used with ArcSDE for SQL Server.

On UNIX

UNIX users should be careful with special characters such as ?. Depending on the UNIX shell version, you may need to include the appropriate quote character to use a special character. For example, you can use the -? operation with any administration command to get help. If you're using a C shell (rather than a Bourne shell), you must include \, which tells the shell to use the next character directly rather than as a special character.

Therefore, in a C shell, you would use

sdetable -\?

In a Bourne shell, you can simply use

sdetable -?

Some commands include optional SQL query statements, or WHERE clauses to limit the features retrieved from a table or log file. If this option is included, the query must be quoted (for example, "area < 1000"). If your DBMS encloses character literals with single quotes, enclose the entire expression with double quotes:

" state_code = 'CO' "

If your DBMS encloses character literals with double quotes, enclose the entire expression with single quotes:

' state_code = "CO" '

Check your DBMS documentation to determine which is correct for your DBMS.

 

Home

Copyright © Environmental Systems Research Institute, Inc. 2004 - 2010.