- 论坛徽章:
- 0
|
常规的exp命令运行如下:以下到底那个对呀?第二个方法中 & 后到底有回车否? 两个都好像用不成!
UNIXWARE 7 + ORACLE 8.1.是否有高手给我确定一下详细的格式
1)
mknod exp_pipe p /* 生成命名管道 */
exp system/manager@testdb file=./exp_pipefull=y /* 将备份数据送往管道 */
compress exp_pipe >; expfull.dmp.Z /* 生成压缩备份文件*/
恢复操作也可以利用管道,跳过将文件解压缩,生成原始文件的过程,如下:
mknod imp_pipe p /* 生成相应的命名管道 */
uncompress -c expfull.dmp.Z >; imp_pipe/* 将解压缩数据送入管道 */
imp system/manager@testdb file=./imp_pipefromuser=scott \
touser=scott /* 将管道数据导入数据库testdb*/
######################################################################
2)
Oracle8i提供的imp/exp是常用的数据库备份工具程序,
但是由于32位addressing的限制,Oracle 8/8i的Installationguide明确指出imp,exp,SQL*Loader三个Utilities工具软件操作的文件大小不能超过2GB,但是随着数据库数据量的增大,很容易让备份文件大小超过2GB,如果正常使用imp/exp呢?一种方法是将数据作为多个文件export出来形成.dmp文件,还有一种方法是利用Unix提供的mknod命令创建FIFO,并启动compress在后台压缩,并同时运行imp(或者exp)程序:
exp:
#!/bin/sh
mknod yourfile.dmp p
compress <yourfile.dmp >;yourfile.dmp.Z &
exp usrename/password file=yourfile.dmp buffer=40960000 tables=(...)
imp:
#!/bin/sh
mknod yourfile.dmp p
uncompress <yourfile.dmp.Z >;yourfile.dmp &
imp usrename/password file=yourfile.dmp buffer=40960000 tables=(...)
###################################################################### |
|