dbimport input-file location options

The input-file location specifies the location of the database.exp directory, which contains the files that the dbimport utility imports.

If you do not specify an input-file location, dbimport searches for data files in the directory database.exp under the current directory and for the schema file in database.exp/database.sql.
Read syntax diagramSkip visual syntax diagram
dbimport input-file location

|--+-------------------------------------------------------------------+--|
   +- -i--directory----------------------------------------------------+   
   '- -t--device--+-------------------------------+--+---------------+-'   
                  '- -b--blocksize-- -s--tapesize-'  '- -f--pathname-'     

Element Purpose Key Considerations
-b blocksize Specifies, in kilobytes, the block size of the tape device If you are importing from tape, you must use the same block size that you used to export the database.

If you do not use the -b option, the default block size is 1.

-f pathname Specifies where dbimport can find the schema file to use as input to create the database when the data files are read from tape If you use the -f option to export a database, you typically use the same path name that you specified in the dbexport command. If you specify only a file name, dbimport looks for the file in the .exp subdirectory of your current directory.

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

-i directory Specifies the complete path name on disk of the database.exp directory, which holds the input data files and schema file that dbimport uses to create and load the new database. The directory name must be the same as the database name. This directory must be the same directory that you specified with the dbexport -o option. If you change the directory name, you also rename your database.
-s tapesize Specifies, in kilobytes, the amount of data that you can store on the tape To read to the end of the tape, specify a tape size of 0.

If you are importing from tape, you must use the same tape size that you used to export the database. The maximum size is 2 097 151 KB.

If you do not use the -s option, the default value is 0 (read to the end of the tape).

-t device Specifies the path name of the tape device that holds the input files You cannot specify a remote tape device.

Examples showing input file location on UNIX or Linux

To import the stores_demo database from a tape with a block size of 16 KB and a capacity of 24 000 KB, issue this command:

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

The schema file is read from /tmp/stores_demo.imp.

To import the stores_demo database from the stores_demo.exp directory under the /work/exports directory, issue this command:
dbimport -c -i /work/exports stores_demo

The schema file is assumed to be /work/exports/stores_demo.exp/stores_demo.sql.

Examples showing input file location on Windows

To import the stores_demo database from a tape with a block size of 16 KB and a capacity of 24 000 KB, issue this command:

dbimport -c  -t \\.\TAPEDRIVE -b 16 -s 24000 -f 
   C:\temp\stores_demo.imp stores_demo

The schema file is read from C:\temp\stores_demo.imp.

To import the stores_demo database from the stores_demo.exp directory under the D:\work\exports directory, issue this command:
dbimport -c -i D:\work\exports stores_demo 

The schema file is assumed to be D:\work\exports\stores_demo.exp\stores_demo.sql.


Copyright© 2018 HCL Technologies Limited