如何使用Oracle PL/SQL Developer创建转储?
我需要将用户的转储(包括表,过程等)作为FILENAME.dmp
.
I need to take dump of a user (including tables, procedures ,etc.) as FILENAME.dmp
.
如果我创建一个新用户并导入FILENAME.dmp
,则应该创建所有内容.
If I create a new user and import that FILENAME.dmp
, then everything should be created.
如何创建此转储文件?
不要打电话给我使用Run > EXP
或Run > IMP
函数,因为由于某些问题,该功能对我不起作用.
Don't tel me to use the Run > EXP
or Run > IMP
functions because, due to some problem, that feature is not working for me.
EXP(导出)和IMP(导入)是您需要的两个工具.最好尝试在命令行和同一台计算机上运行它们.
EXP (export) and IMP (import) are the two tools you need. It's is better to try to run these on the command line and on the same machine.
它可以从远程运行,您只需要正确设置TNSNAMES.ORA
并安装与数据库相同版本的所有开发人员工具即可.不知道您正在遇到的错误消息,那么我就无法帮助您使exp/imp正常工作.
It can be run from remote, you just need to setup you TNSNAMES.ORA
correctly and install all the developer tools with the same version as the database. Without knowing the error message you are experiencing then I can't help you to get exp/imp to work.
导出单个用户的命令:
exp userid=dba/dbapassword OWNER=username DIRECT=Y FILE=filename.dmp
这将创建导出转储文件.
This will create the export dump file.
要将转储文件导入不同的用户架构,请首先在 SQLPLUS 中创建newuser:
To import the dump file into a different user schema, first create the newuser in SQLPLUS:
SQL> create user newuser identified by 'password' quota unlimited users;
然后导入数据:
imp userid=dba/dbapassword FILE=filename.dmp FROMUSER=username TOUSER=newusername
如果有大量数据,请研究增加BUFFERS
或研究expdp/impdp
If there is a lot of data then investigate increasing the BUFFERS
or look into expdp/impdp
设置了exp和imp的最常见错误.检查您的PATH
包括$ORACLE_HOME/bin
,检查$ORACLE_HOME
设置正确,并且检查$ORACLE_SID
设置
Most common errors for exp and imp are setup. Check your PATH
includes $ORACLE_HOME/bin
, check $ORACLE_HOME
is set correctly and check $ORACLE_SID
is set