Syntax @SDEsql(,(|FME_FREE_STREAM)) @SDEsql(FME_FREE_ALL_STREAMS) Arguments The name of a stream defined on a configuration line. This stream is where the SQL statement is executed. Range: String The RDBMS statement that is to be executed on the defined stream. If FME_FREE_STREAM is specified instead of an RDBMS statement, then the stream specified in the first parameter will be deleted. Range: String | FME_FREE_STREAM Configuration SDEsql The name of the SDE stream upon which the SQL statement will be executed. Range: String Connection Parameters ~~~~~~~~~~~~~~~~~~~~~ There are two possible ways to connect to SDE: connecting to the ArcSDE service, which in turn communicates with the underlying database (a three- tier architecture), and connecting to the underlying database directly (a two-tier architecture). With a direct connection (the two-tier architecture), ArcSDE does not need to be installed and an ArcSdeServer license is only needed if writing to the database; reading does not require a license. Regular Connection ~~~~~~~~~~~~~~~~~~ The connection parameters needed for a regular connection are as follows: The name of the host computer upon which the commands are to be executed. Range: String The name of the SDE instance to use. Range: String The name of the SDE database to use. If unused by the underlying RDBMS, then this value is ignored. Range: String The user ID used to access the database. Range: String The password for the user ID. Range: String Direct Connection ~~~~~~~~~~~~~~~~~ The parameters needed to make a direct connection to SDE depend on the underlying database. In order to make a direct connection, the SDE must be of the same major version as the client libraries with which the @SDEsql was built. For example, a direct connection to an ArcSDE 9.1 instance could be made with an @SDEsql built using 9.0 libraries, but a connection could not be made to an ArcSDE 8.3 instance using the same @SDEsql. Oracle (option 1) Any value can be specified as the value does not get used; however, a value must be supplied. Range: String sde:oracle or sde:oracle9i (for 9i connections to use the right driver) Range: String Range: String @ Range: String Oracle (option 2) Any value can be specified as the value does not get used; however, a value must be supplied. Range: String sde:oracle:/;local= Range: String Range: String Range: String MS SQL Server Range: String sde:sqlserver: or sde:sqlserver:\ (for connecting to a named instance) Range: String Range: String Range: String DB2 (option 1) Range: String remote (if client application is remote, otherwise do not specify) Range: String sde:db2 Range: String Range: String Range: String DB2 (option 2) Any value can be specified as the value does not get used; however, a value must be supplied. Range: String remote (if client application is remote, otherwise do not specify) Range: String sde:db2: Range: String Range: String Range: String Informix Any value can be specified as the value does not get used; however, a value must be supplied. Range: String remote (if client application is remote, otherwise do not specify) Range: String sde:informix: Range: String Range: String Range: String Description Note: This function is not supported by FME Base Edition. This function enables the FME to execute arbitrary database commands through an SDE connection to the database. The SDE passes the SQL statement to the underlying RDBMS for execution. The purpose of the command is to provide access to SQL statements which enable row updates or other such statements. If you want to search a database and perform operations on the feature retrieved, then you should consult both the ArcSDE Reader/Writer chapter in the FME Readers and Writers manual, and the SDE30QueryFactory section in this manual. This command has no return value and is expected to be used as a means of performing arbitrary SQL statements. Once you have finished using a stream, you may want to free it before the end of the translation. In fact, this may be necessary if the maximum number of concurrent streams allowed by SDE has been reached and there is a need to create more streams. To delete a particular stream, use the first form of the function and specify FME_FREE_STREAM as the second parameter. To delete all streams, use the second form of the function. Assumptions This function only works with SDE 3.x/ArcSDE 8.x/9.0. There is no support for this command on versioned tables or layers. Using this command on a versioned table or layer will result in the SQL statement being applied only to the base table. No changes will be made to the additions table or to the deletions table, and no database states will be created.