The sdesetup command performs various functions related to the creation and maintenance of the ArcSDE geodatabase repository.
sdesetup -o delete -d {ORACLE10G|ORACLE11G} [-H <sde_directory>] [-u <ArcSDE_admin_user>]
[-p <ArcSDE_admin_password>] [-i <master_geodatabase_service>:<user_schema>]
[-N] [-q]
sdesetup -o install -d {ORACLE10G|ORACLE11G|SQLSERVER|DB2|DB2ZOS|INFORMIX|POSTGRESQL}
[-H <sde_directory>] [-u <ArcSDE_admin_user>] [-p <ArcSDE_admin_password>]
[-D <database_name>] [-s <datasource>] [-i {<master_geodatabase_service>[:<user_schema>]|:sde]}
[-l <key>] [-N] [-q]
sdesetup -o install_st_raster -d {ORACLE10G|ORACLE11G|SQLSERVER|POSTGRESQL}
[-H <sde_directory>] [-u <ArcSDE_admin_user>] [-p <ArcSDE_admin_password>]
[-D <database_name>] [-s <datasource>]
[-l <key>] [-N] [-q]
sdesetup -o list -d {ORACLE10G|ORACLE11G|SQLSERVER|DB2|DB2ZOS|INFORMIX|POSTGRESQL}
[-H <sde_directory>] [-u <DB_user>] [-p <DB_password>] [-D <database_name>]
[-s <datasource>] [-i <master_geodatabase_service>:<user_schema>] [-q]
sdesetup -o prerequisite_check -d
{ORACLE10G|ORACLE11G|SQLSERVER|DB2|DB2ZOS|INFORMIX|POSTGRESQL}
[-H <sde_directory>] [-u <ArcSDE_admin_user>] [-p <ArcSDE_admin_password>]
[-D <database_name>] [-s <datasource>] [-N] [-q]
sdesetup -o update_key -d {ORACLE10G|ORACLE11G|SQLSERVER|DB2|DB2ZOS|INFORMIX|POSTGRESQL}
-l <key> [-u <ArcSDE_admin_user>] [-p <ArcSDE_admin_password>] [-H <sde_directory>]
[-D <database_name>] [-s <datasource>] [-i <master_geodatabase_service>:<user_schema>] [-N] [-q]
sdesetup -o upgrade -d {ORACLE10G|ORACLE11G|SQLSERVER|DB2|DB2ZOS|INFORMIX|POSTGRESQL}
[-H <sde_directory>] [-u <ArcSDE_admin_user>][-p <ArcSDE_admin_password>]
[-D <database_name>] [-s <datasource>] [-i <master_geodatabase_service>:<user_schema>]
[-l <key>] [-N] [-q]
sdesetup -h
sdesetup -?
Operation | Description | Examples |
delete |
Oracle only
Deletes an ArcSDE geodatabase; used primarily for user-schema geodatabases |
Deleting a geodatabase from Oracle |
install | Creates or updates the geodatabase system tables and stored procedures | Creating the system tables and stored procedures |
install_st_raster | Creates the ST_Raster type or
assembly in the database This operation is not currently supported in DB2 or Informix databases. |
Creating the ST_Raster type in geodatabases in Oracle, PostgreSQL, or SQL Server |
list | Lists the installed ArcSDE version | Finding out what version of ArcSDE is installed |
prerequisite_check | Checks to be sure the connecting user has the correct permissions to setup a geodatabase, the database is enabled for XML support, and the required user-defined type libraries are present and correct | Checking for correct permissions, XML, and user-defined types |
update_key | Updates the license for ArcGIS Server | Updating your ArcGIS Server license |
upgrade |
Updates the ArcSDE system tables and stored procedures
You cannot use this operation to upgrade geodatabases that participate in geodatabase functionality; this can only be run on geodatabases that have only the ArcSDE system tables populated. You must stop the giomgr process before running an upgrade. |
Upgrading ArcSDE tables |
Options | Description |
-d |
The type of DBMS you are using to store the geodatabase (ORACLE10G, ORACLE11G, SQLSERVER, DB2, DB2ZOS, INFORMIX, or POSTGRESQL)
Note: There are differences between the setup for Oracle 10g and 11g; be sure to specify the correct one for your site. |
-D | Database name (not supported on Oracle) |
-h or -? | Use either of these options to see the usage and options for the command. Note: If using a C shell, use -h or "-\?". |
-H |
ArcSDE home directory (SDEHOME)
This is only needed if the SDEHOME variable isn't set or multiple services are in use. |
-i |
Used for user-schema geodatabases in Oracle or to specify an sde-schema
geodatabase in SQL Server only On Oracle, use the -i option to specify the ArcSDE service name or port number information for the master sde geodatabase followed by the name of the schema in which the user-schema geodatabase resides or will be created. For example: -i 5151:bpanju Note: When creating a user-schema geodatabase a service port number must be provided. Even if you do not use a service for your master sde geodatabase, one must be created (though it does not have to be started) on Windows. This service must be added to the Windows services file. On UNIX or Linux, the service must be added to the services.sde file and the /etc/service file. When you create a geodatabase in SQL Server, you can use the -i option to specify that you want the ArcSDE geodatabase to be stored in the schema of the sde user. Otherwise, if you create the geodatabase while connected as a user who is in the sysadmin fixed server role, the geodatabase is automatically created in the dbo schema. |
-l | ArcSDE authorization key or location and name of the authorization file |
-N | No verification is performed; the operation begins immediately after being invoked. |
-o | Operation |
-p |
ArcSDE administrator's DBMS password
The list operation can be run by any DBMS user, therefore, for the list operation, this could be the password of any DBMS user. |
-q | Quiet—all titles and warnings are suppressed. |
-s | Data source name |
-u |
ArcSDE administrator DBMS user name
For installation and upgrade on most DBMSs, the ArcSDE administrator must have database administrator privileges. After installation or upgrade, the ArcSDE administrator user's privileges can be returned to their run-time state. This is not true, however, for installations on SQL Server. You must run sdesetup -o install as a sysadmin or dbo user. Any DBMS user can run the list operation. |
The geodatabase system tables, stored procedures, and triggers are owned by the ArcSDE administrator. For Oracle, DB2, and Informix databases, if you do not specify the user name when you execute the sdesetup command, it is assumed that the ArcSDE administrator (usually sde) is the user. However, you must supply the ArcSDE administrator password . If you do not supply it in the command with the -p option, you are prompted for it.
For example, you could issue commands with both the administrator user name and password:
sdesetup -o install -d INFORMIX -u sde -p password
Or with neither the administrator user name nor password, in which case you are prompted to supply the ArcSDE administrator password:
sdesetup -o install -d ORACLE10G
Please enter ArcSDE DBA password:
Or specify only the administrator password and—for DB2, Oracle, and Informix databases—the ArcSDE administrator user name is assumed.
sdesetup -o install -d DB2 -D sdedb -p password
For SQL Server databases, if you do not specify the -u option, the user is assumed to be the Windows login of the user currently logged in to the computer. If that user does not have administrator privileges, sdesetup fails.
sdesetup -o install -d SQLSERVER -D thegdb -s
server5\ssinstance1 -p mine
SDE release install not complete (-51)
Beginning with ArcGIS 10, some of the geodatabase system tables have changed; they now require the use of ArcObjects to populate them. The sdesetup administration utility does not use ArcObjects and, therefore, cannot upgrade the geodatabase schema.
For this reason, you must perform your geodatabase upgrades using the Upgrade Geodatabase geoprocessing tool or Python script.
Documentation for running this tool or script is provided in the ArcGIS Desktop and ArcGIS Server help, as well as the installation guides for the ArcSDE component of ArcGIS Server at the enterprise level.
Note: Client applications are not upward compatible with ArcSDE 10 geodatabases. Therefore, before you upgrade your geodatabase, be sure all your client programs have been updated to a compatible release. Check the installation guide of your client application or the ArcGIS Resource Center for compatibility information. If you are using a custom built application that was created with the ArcSDE C or Java API, you must rebuild the application using the new ArcSDE client API libraries before it can connect to an upgraded geodatabase.
The delete operation can be used to delete an ArcSDE geodatabase from Oracle. In most cases, this will be used with geodatabases that are stored in a user's schema, rather than the master geodatabase in the sde user's schema. However, if you do not specify a schema name with the -i option, it will attempt to delete the master geodatabase. For example, if you executed the following statement, you would delete the geodatabase in the sde user's schema:
sdesetup -o delete -d ORACLE10G -i 5151
Please enter ArcSDE DBA password:
Note: If you do indeed want to delete the master geodatabase, the following rules about having no users connected and unregistering or removing data apply, plus you cannot have any unregistered tables in the master geodatabase that contain columns of type ST_Geometry or any of its subtypes.
The correct syntax to delete a geodatabase in a user's schema is as follows:
sdesetup -o delete -d ORACLE10G -i 5151:bjorn -u bjorn
When you delete a geodatabase, there can be no other users connected to any of the geodatabases—the master geodatabase or any user-schema geodatabase.
In addition, to delete a geodatabase, there can be no data registered to ArcSDE. Prior to deleting the geodatabase, remove any of the data that has been registered with ArcSDE (in other words, has an entry in the TABLE_REGISTRY system table and related system tables). This includes data in other schemas that is registered to the geodatabase that will be deleted. For example, if the sde user owned a table that was registered to a geodatabase owned by user ricardo, it would also have to be unregistered or removed.
Once all data registered with the geodatabase is removed and no users are connected, executing the sdesetup -o delete command will delete any objects that were created by ArcSDE setup, such as system tables, indexes, libraries, and triggers. The only exception to this are sequences; sequences created by ArcSDE are not deleted.
Before you create the geodatabase, you can run the prerequisite_check operation to be sure the ArcSDE administrator user has the permissions needed to create a geodatabase, that XML columns can be created in the database, and the user-defined type libraries (if necessary) are present and the correct release.
Here, the prequisite check is run on a PostgreSQL database, pgdb, on a remote server.
sdesetup -o prerequisite_check -d POSTGRESQL -d pgdb -s gisserver -u sde
Please enter ArcSDE DBA password:
Checking INSTALL privileges for geodatabase ...
Current user has privilege to install geodatabase instance.
Checking if geodatabase instance needs to be upgraded...
Current instance is at the latest geodatabase release.
Checking UPGRADE privileges for geodatabase ...
Current user has privilege to upgrade geodatabase instance.
Checking INSTALL privileges for ST_RASTER type ...
Current user has privilege to install ST_RASTER type.
Checking ST_GEOMETRY configuration setup ...
Current instance is setup for ST_GEOMETRY configuration.
Checking ST_RASTER configuration setup ...
Current instance is not correctly setup for ST_RASTER configuration.
You must copy the latest ST_RASTER and dependent libraries to the PostgreSQL software location.
Refer to the ArcSDE for PostgreSQL installation guide.
Checking geodatabase XML datatype support...
Underlying ArcSde database instance supports both native
and custom ArcSde XML data type.
In this case, the ST_Raster type and libraries are not present. However, since the ST_Raster installation is optional, if you are not using ST_Raster, you can ignore that warning. If you do want to use ST_Raster, copy the necessary library to DBMS installation directory and use the install_st_raster operation to install the ST_Raster type. Information on the install_st_raster operation is in the section "Creating the ST_Raster type in Oracle, PostgreSQL, or SQL Server". For complete details on installing ST_Raster, see your ArcSDE installation guide.
The install operation is used to create the geodatabase system tables, stored procedures, and user-defined types. If the system tables already exist, the install operation will fail.
In this example, a geodatabase is created in the same PostgreSQL database for which the prerequisite check was run.
sdesetup -o install -d POSTGRESQL -D pgdb -s gisserver -u sde
Please enter ArcSDE DBA password:
To create a geodatabase in a user's schema in Oracle, run sdesetup -o install and specify the user's name (which is also the name of the schema where the geodatabase will be stored) for the user and use the -i option to specify the connection information to the master SDE geodatabase followed by the schema name. In the following example, a geodatabase is being created in the gwillagers schema and the ArcSDE service port number for the master geodatabase is 6200. There is no need to specify the -l option because the user-schema geodatabase utilizes the license of the master geodatabase.
sdesetup -o install -d ORACLE10G -i 6200:gwillagers -u gwillagers -p not4u
Note: To run this command, gwillagers needs to be granted the same privileges the sde user requires to create the master geodatabase. Consult the ArcSDE for Oracle installation guide for a list of these privileges.
In this example, the geodatabase is created in SQL Server by a Windows login that is dbo in the SQL Server database. However, since the -i option is specified with :sde, the geodatabase will be created in the sde user's schema.
sdesetup -o install -d SQLSERVER -i :sde -D ssdb
You can access raster attributes using SQL if you store your raster data using the ST_Raster type. To use this type, you must install it into your geodatabase in an Oracle, PostgreSQL, or SQL Server DBMS.
After you install ArcSDE and create your geodatabase, run the sdesetup command with the install_st_raster operation to create the ST_Raster type and functions in the database. In certain circumstances, you have to copy specific libraries to the DBMS server. See the ArcGIS Desktop topics "Installing the ST_Raster type in a local Oracle database", "Installing the ST_Raster type in a remote Oracle database", "Installing the ST_Raster type in a local PostgreSQL database", "Installing the ST_Raster type in a remote PostgreSQL database", "Installing the ST_Raster type in a local SQL Server database", or "Installing the ST_Raster type in a remote SQL Server database". Once you have completed any required preliminary steps described in these topics, you can run sdesetup with the install_st_raster operation.
In this example, the ST_Raster type is created in a geodatabase in PostgreSQL:
sdesetup -o install_st_raster -d POSTGRESQL -D spatialdb -s dbserver -u sde
Please enter ArcSDE DBA password:
The list operation returns the version number of the ArcSDE component that is installed on your server. This operation can be run by any database user.
sdesetup -o list -d INFORMIX -p charlottetown
The update_key operation copies the supplied license key into the server configuration table, SERVER_CONFIG (SDE_server_config in SQL Server and PostgreSQL databases). The license key allows you to use the ArcGIS Server software. The license string can also be included with both the install and upgrade operations. The -l argument accepts either a file containing the license key or the license key itself. In the first example, the license key is entered directly after the -l option. (Note: You need to enclose it in quotes.) In the second example, the license key is contained within a text file, and the file is supplied as an argument to the -l option.
sdesetup -o update_key -d ORACLE10G -p quebec -l 'arcsdeserver,10,0002a56451f8,TRA4CAZYXMM00TEJH192'
sdesetup -o update_key -d SQLSERVER -D gisdata -p zeus2 -l /crow/sde/license.dat
The upgrade operation is still available on the sdesetup command, but it can only be used to upgrade ArcSDE geodatabases that are used with ArcIMS or a custom C or Java application and do not use geodatabase objects such as feature classes, feature datasets, networks, relationship classes, terrains, parcel or cadastral fabrics, topology, or replication. Basically, if there are no records present in the GDB_OBJECTCLASSES table in your 9.3.x or lower release geodatabase, you do not have geodatabase objects, in which case you can use the sdesetup command with the upgrade operation to upgrade your geodatabase.
In this example, an ArcSDE geodatabase in Oracle is being upgraded:
sdesetup -o upgrade -d ORACLE10G -s oraserver -u sde
Please enter ArcSDE DBA password:
As mentioned in previous sections of this topic, for all other ArcSDE geodatabase upgrades, use the Upgrade Geodatabase geoprocessing tool or Python script.
You need to upgrade user-schema geodatabases in Oracle separately. In this case, the owner of the geodatabase (the schema owner) must be given the permissions necessary to run an upgrade and should run the Upgrade Geodatabase geoprocessing tool or Python script on that geodatabase. Consult the installation guide for ArcSDE for Oracle to see what permissions are needed to run an upgrade. Be sure you are connected to the geodatabase in the user's schema before running the Upgrade Geodatabase tool or script.
You must upgrade the master geodatabase in the sde user's schema first; then you can upgrade any user-schema geodatabases present in the database. You cannot upgrade, for example, one of the user-schema geodatabases and not the master geodatabase. The recommended upgrade workflow is to upgrade the master geodatabase, logged in as the sde user, and then each of the user-schema geodatabases, logged in as the respective schema owners.
For more information on using geodatabases created in user schemas with your ArcSDE geodatabase in Oracle, see the ArcGIS Desktop or ArcGIS Server help.
Home
Copyright © Environmental Systems Research Institute, Inc. 2004 - 2010. |