sdeexport

The sdeexport command creates an ArcSDE export file of a specific dataset.

Usage syntax

sdeexport [-o create] -t <table> [-V <version_name>] [-O] [-q]
[-a {all | file=<file_name>}] -f <{export_file | -}> [-X <volume_size>]
[-r <target_ArcSDE_version_number>] [-w <"where_clause">]
[-i {<service> | <port#> | <direct connection>}] [-s <server_name>]
[-D <database_name>] -u <DB_user_name> [-p <DB_user_password>]
 

sdeexport [-o create] -l <table,column> [-V <version_name>] [-O] [-q]
[-a {all | file=<file_name>}] -f <{export_file | -}> [-X <volume_size>]
[-r <target_ArcSDE_version_number>] [-w <"where_clause">]
[-i {<service> | <port#> | <direct connection>}] [-s <server_name>]
[-D <database_name>] -u <DB_user_name> [-p <DB_user_password>]
 

sdeexport -h  

sdeexport -?
 

Operations

Operation Description
create Creates export format file

 

Options

Options Description
-a Attribute modes

all: Loads all columns into the export file

file=<file_name>: File containing a list of columns to be exported
-D Database or data source name (not supported on Oracle)
-f Export format file name; exports to standard output if set to -
-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 "-\?".
-i ArcSDE service name, port number, or direct connection information (default: esri_sde or 5151)
-l The table and either the spatial column or raster column name
-o Operation
-O Export in spatial index order
-p DBMS user password
-q Quietall titles and warnings are suppressed
-r The export version number

Used to create an export file that is backward compatible with an earlier ArcSDE client release.  However, if the file contains data not supported by the earlier release, you may not be able to import the file to an earlier release ArcSDE geodatabase. For example, if the export file is created from an ArcSDE 9.2 geodatabase and contains a network dataset or Oracle data stored in ST_Geometry format, you may not be able to load the file into an ArcSDE 9.0 geodatabase.

-s ArcSDE server host name (default: localhost)
-t Table or feature class to be exported
-u DBMS user name
-V Version name; if specified, uses only the data that belongs to that version; if not specified, uses the default version (default: sde.DEFAULT)

Version names are case sensitive; for example, SDE.DEFAULT is a different version than SDE.default.

-w SQL WHERE clause; the length of the WHERE clause is limited by your DBMS or operating system.
-X Maximum file size in bytes, kilobytes, megabytes, or gigabytes for each export file volume

The upper limit is dependent on the O/S file size. The minimum volume size that may be specified with the -X option is 4096 bytes or 4K. When specified, the export files are created with the extensions .000 through .999.

 

Discussion

The sdeexport command creates an export format that can be imported by the sdeimport command or examined with the sdexinfo command.

If the table or feature class you are exporting is versioned, you can only export the edits from one version. The -V option specifies the version to be exported. The base table or feature class and all edits unique to that version are exported. Note: Versions should be created using ArcGIS Desktop applications but can be created with the sdeversion command.

If you intend to import the file into an earlier version of ArcSDE, you must use the -r option and specify the version. For example, if you want to export from ArcSDE 10 then import to ArcSDE 9.2, you must specify -r 9.2.

The -f option specifies the output file to which you want to export. You can enable file volumes by specifying the -X option. When file volumes are enabled, the extension .000 is appended to the file name specified at the -f option. When this file volume fills to the limit specified by the -X option, a new file with the extension .001 is created and sdeexport continues to export data to this file. Up to 1,000 file volumes may be created with extensions from .000 through .999 given that enough space exists. The minimum volume size that may be specified with the -X option is 4,096 bytes, or 4K (kilobytes). The maximum volume size is determined by the limits imposed by the file system where the volume is being created. See your system documentation for the appropriate limits. The file volume sizes are specified in bytes, but they may also be specified in either kilobytes, megabytes, or gigabytes by appending the modifiers K, M, or G to the integer value.

The -O option allows you to create an export file in spatial index order. You should be aware that ArcSDE issues a SQL ORDER BY clause on the spatial index and, therefore, uses DBMS sort space to sort the records prior to writing the data to the export file. For this option to work, you may need to increase the size of the DBMS sort space.

Note: If you have altered column definitions using a SQL interface while the data was stored in an ArcSDE geodatabase, exporting the data may fail. 

Code page

By default, if you generate an ArcSDE export file from an ArcSDE 9.1 or lower geodatabase environment on a Windows computer and the national language support environment variable is set, the export file's string data is in OEM code page. If the national language support variable is not set, the export file's string data is in ANSI code page. If you generate an ArcSDE export file from an ArcSDE 9.1 or lower geodatabase environment on a UNIX machine, the export file's string data will be in ISO code page.

Be sure the code page variable for the client computer is set to the correct locale before you export from an ArcSDE 9.1 or lower release geodatabase. The variables to set for each DBMS are as follows:

Export files created from an ArcSDE 9.2 or greater release geodatabase use Unicode encoding and, therefore, do not require these variables to be set.

Examples

The following sdeexport command creates file volumes that are no larger than 500 megabytes, named roadex.000, roadex.001, and so on.

sdeexport -l roads,shape -f roadex -X 500M -u gisuser

Note: The create operation is optional since it is the only operation available for the sdeexport command.

You may direct sdeexport to export to standard output by specifying the - with the -f option. This is useful if you want to pipe standard output to a device such as a tape device. For example, you could pipe standard output to the UNIX dd command that is writing to the tape device.

sdeexport -l roads,shape -f - -u gisuser | dd of=/dev/rmt/Ocn bs=16k

You may export either a business table by specifying the -t option or a feature class, raster catalog, or raster dataset by specifying the -l option. If the -t option is used to export a business table that contains a spatial column or a raster column, all the dependent tables are exported as well. In fact, if the -t option is used to export a business table containing a spatial column, the resulting export file is equivalent to one created by the -l option specifying the table and spatial column of a feature class. The following examples would create export files that contain the same data, assuming that the roads business table specified by the -t option contains the spatial column shape. Here, the feature class faults has a spatial column called shape, so it can be exported with -l or -t.

sdeexport -l faults,shape -f c:\GISData\faultex -u dataowner

or

sdeexport -t faults -f c:\GISData\faultex -u dataowner
Password:

SDEX File Export Administration Utility
---------------------------------------------------------------
Exporting ArcSDE object to "c:\GISData\faultex" in SDEX 9.0 export format ...
Exporting table "faults".
Spatial column "SHAPE"
18239 features converted.
18239 features exported.

You may specify only the records of a specific version be exported by including the -V option. Only the records of the base table and the edits unique to the states of the specified version are included in the sdexport file.

sdeexport -t roads -f roadex_newpavement -u gisuser -V newpavement

 

Home

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