The input-file location tells dbimport where to look for the database.exp directory, which contains the files that dbimport will import. If you do not specify an input-file location, dbimport looks for data files in the directory database.exp under the current directory and for the schema file in database.exp/database.sql.
Input-File Location: |--+--------------------------------------------+---------------| +- -i--directory-----------------------------+ +- -t--device-- -b--blocksize-- -s--tapesize-+ '- -t--pathname------------------------------'
Element | Purpose | Key Considerations |
---|---|---|
-b blocksize | Specifies, in kilobytes, the block size of the tape device | Restrictions: If you are importing from tape, you must use the same block size that you used to export the database. |
-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 | Additional Information: If you use the -f option to export a database, you typically use the same pathname that you specified in the dbexport command. If you specify only a filename, dbimport looks for the file in the .exp subdirectory of your current directory. |
-i directory | Specifies the complete pathname 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 should be the same as the database name. | Additional Information: This directory should 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 | Additional Information: To
read to the end of the tape, specify a tape size of 0.
Restrictions: If you are importing from tape, you must use the same tape size that you used to export the database. If you do not specify 0 as the tapesize, then the maximum tapesize is 2,097,151 kilobytes. |
-t device | Specifies the pathname of the tape device that holds the input files | Restrictions: The -t option does not allow you to specify a remote tape device. |
The following command imports the stores_demo database from a tape with a block size of 16 kilobytes and a capacity of 24,000 kilobytes. The schema file is read from /tmp/stores_demo.imp.
dbimport -c -t /dev/rmt0 -b 16 -s 24000 -f /tmp/stores_demo.imp stores_demo
The following command imports the stores_demo database from the stores_demo.exp directory under the /work/exports directory. The schema file is assumed to be /work/exports/stores_demo.exp/stores_demo.sql.
dbimport -c -i /work/exports stores_demo
The following command imports the stores_demo database from a tape with a block size of 16 kilobytes and a capacity of 24,000 kilobytes. The schema file is read from C:\temp\stores_demo.imp.
dbimport -c -t \\.\TAPEDRIVE -b 16 -s 24000 -f C:\temp\stores_demo.imp stores_demo
The following command imports the stores_demo database from the stores_demo.exp directory under the D:\work\exports directory. The schema file is assumed to be D:\work\exports\stores_demo.exp\stores_demo.sql.
dbimport -c -i D:\work\exports stores_demo