background image
<< SYSCS_UTIL.SYSCS_EXPORT_TABLE system procedure | COLUMNDELIMITER >>

SYSCS_UTIL.SYSCS_EXPORT_TABLE_LOBS_TO_EXTFILE

<< SYSCS_UTIL.SYSCS_EXPORT_TABLE system procedure | COLUMNDELIMITER >>
Derby Reference Manual
163
"Setting the SQL standard authorization mode" in the Derby Developer's Guide for more
information. The database owner can grant access to other users. The user must also
have SELECT privileges on the table.
Usage
For additional information on using this procedure, see the section "Importing and
exporting data" in the Derby Server and Administration Guide.
Example
The following example shows how to export information from the STAFF table in a
SAMPLE database to the
myfile.del
file.
CALL SYSCS_UTIL.SYSCS_EXPORT_TABLE (null, 'STAFF', 'myfile.del', null,
null, null);
SYSCS_UTIL.SYSCS_EXPORT_TABLE_LOBS_TO_EXTFILE system procedure
Use the
SYSCS_UTIL.SYSCS_EXPORT_TABLE_LOBS_TO_EXTFILE
system procedure
to export all the data from a table, and place the LOB data into a separate export file. A
reference to the location of the LOB data is placed in the LOB column in the main export
file.
For security concerns, and to avoid accidental file damage, this EXPORT procedure
does not export data into an existing file. You must specify a filename in the EXPORT
procedure that does not exist. When you run the procedure the file is created and the
data is exported into the new file.
The data is exported using a delimited file format.
Syntax
SYSCS_UTIL.SYSCS_EXPORT_TABLE_LOBS_TO_EXTFILE (
IN SCHEMANAME VARCHAR(128),
IN TABLENAME VARCHAR(128),
IN FILENAME VARCHAR(32672),
IN COLUMNDELIMITER CHAR(1),
IN CHARACTERDELIMITER CHAR(1),
IN CODESET VARCHAR(128)
IN LOBSFILENAME VARCHAR(32672)
)
When you run this procedure, the column data is written to the main export file in a
delimited data file format.
SCHEMANAME
Specifies the schema of the table. You can specify a NULL value to use the default
schema name. The SCHEMANAME parameter takes an input argument that is a
VARCHAR (128) data type.
TABLENAME
Specifies the table name of the table or view from which the data is to be exported.
This table cannot be a system table or a declared temporary table. The string must
exactly match the case of the table name. Specifying a NULL value results in an
error. The TABLENAME parameter takes an input argument that is a VARCHAR
(128) data type.
FILENAME
Specifies the name of a new file to which the data is to be exported. If the path
is omitted, the current working directory is used. If the name of a file that already
exists is specified, the export procedure returns an error. The specified location of
the file should refer to the server-side location if you are using the Network Server.