dbexport destination options

The dbexport utility supports disk and tape destination options.

Destination options

1  -o directory
1  -t device -b blocksize -s tapesize?  -f pathname
Element Purpose Key Considerations
-b blocksize Specifies, in kilobytes, the block size of the tape device. None.
-f pathname Specifies the name of the path where you want the schema file stored, if you are storing the data files on tape. The path name can be a complete path name or a file name. If only a file name is given, the file is stored in the current directory.

If you do not use the -f option, the SQL source code is written to the tape.

-o directory Specifies the directory on disk in which dbexport creates the database.exp directory.

This directory holds the data files and the schema file that dbexport creates for the database.

The specified directory must exist.
-s tapesize Specifies, in kilobytes, the amount of data that you can store on the tape. To write to the end of the tape, set the value to 0.

If you do not specify 0, the maximum size is 2 097 151 KB.

-t device Specifies the path name of the tape device where you want the text files and, possibly, the schema file stored. You cannot specify a remote tape device.

When you write to disk, dbexport creates a subdirectory, database.exp, in the directory that the -o option specifies. The dbexport utility creates a file with the .unl extension for each table in the database. The schema file is written to the file database.sql. The .unl and .sql files are in the database.exp directory.

If you do not specify a destination for the data and schema files, the subdirectory database.exp is placed in the current working directory.

When you write the data files to tape, you can use the -f option to store the schema file to disk. You are not required to name the schema file database.sql. You can give it any name.

UNIX/Linux Only
For database servers on UNIX™ or Linux™, the command is:
dbexport //finland/reports 

The following command exports the database stores_demo to tape with a block size of 16 KB and a tape capacity of 24 000 KB. The command also writes the schema file to /tmp/stores_demo.imp.

dbexport -t /dev/rmt0 -b 16 -s 24000 -f /tmp/stores_demo.imp 
   stores_demo 

The following command exports the same stores_demo database to the directory named /work/exports/stores_demo.exp. The resulting schema file is /work/exports/stores_demo.exp/stores_demo.sql.

dbexport -o /work/exports stores_demo 
Windows™ Only
For Windows, the following command exports the database stores_demo to tape with a block size of 16 KB and a tape capacity of 24 000 KB. The schema file is written to C:\temp\stores_demo.imp.
dbexport -t \\.\TAPE2 -b 16 -s 24000 -f 
   C:\temp\stores_demo.imp  stores_demo 

The following command exports the same stores_demo database to the directory named D:\work\exports\stores_demo.exp. The resulting schema file is D:\work\exports\stores_demo.exp\stores_demo.sql.

dbexport -o D:\work\exports stores_demo