|Oracle Text Reference
Part Number A90121-01
Executables, 2 of 3
ctxload to do the following with a thesaurus:
An import file is an ASCII flat file that contains entries for synonyms, broader terms, narrower terms, or related terms which can be used to expand queries.
ctxload program no longer supports the loading of text columns. To load files to a text column in batch, Oracle recommends that you use SQL*Loader.
ctxload -user username[/password][@sqlnet_address] -name object_name -file file_name [-thes] [-thescase y|n] [-thesdump] [-log file_name] [-trace] [-pk] [-export] [-update]
Specify the username and password of the user running ctxload.
The username and password can be followed immediately by @sqlnet_address to permit logon to remote databases. The value for sqlnet_address is a database connect string. If the TWO_TASK environment variable is set to a remote database, you do not have to specify a value for sqlnet_address to connect to the database.
When you use ctxload to export/import a thesaurus, use object_name to specify the name of the thesaurus to be exported/imported.
You use object_name to identify the thesaurus in queries that use thesaurus operators.
When you use
ctxload to update/export a text field, use object_name to specify the index associated with the text column.
ctxload is used to import a thesaurus, use file_name to specify the name of the import file which contains the thesaurus entries.
ctxload is used to export a thesaurus, use file_name to specify the name of the export file created by
Import a thesaurus. Specify the source file with the -file argument. You specify the name of the thesaurus to be imported with -name.
Specify y to create a case-sensitive thesaurus with the name specified by -name and populate the thesaurus with entries from the thesaurus import file specified by -file. If -thescase is y (the thesaurus is case-sensitive),
ctxload enters the terms in the thesaurus exactly as they appear in the import file.
The default for -thescase is n (case-insensitive thesaurus)
Export a thesaurus. Specify the name of the thesaurus to be exported with the -name argument. Specify the destination file with the -file argument.
Specify the name of the log file to which
ctxload writes any national-language supported (NLS) messages generated during processing. If you do not specify a log file name, the messages appear on the standard output.
Enables SQL statement tracing using ALTER SESSION SET SQL_TRACE TRUE. This command captures all processed SQL statements in a trace file, which can be used for debugging. The location of the trace file is operating-system dependent and can be modified using the USER_DUMP_DEST initialization parameter.
For more information about SQL trace and the USER_DUMP_DEST initialization parameter, see Oracle8 Administrator's Guide.
Specify the primary key value of the row to be updated or exported.
When the primary key is compound, you must enclose the values within double quotes and separate the keys with a comma.
Exports the contents of a CLOB or BLOB column in a database table into the operating system file specified by -file.
ctxload exports the CLOB or BLOB column in the row specified by -pk.
When you use the -export, you must specify a primary key with -pk.
Updates the contents of a CLOB or BLOB column in a database table with the contents of the operating system file specified by -file. ctxload updates the CLOB or BLOB column in for the row specified by -pk.
When you use -update, you must specify a primary key with -pk.
This section provides examples for some of the operations that
ctxload can perform.
For more document loading examples, see Appendix C, "Loading Examples".
The following example imports a thesaurus named
tech_doc from an import file named
The following example dumps the contents of a thesaurus named
tech_doc into a file named