用户之间导数据:
exp usertest/usertest@oralce file=usertestp owner=usertest
导出整个数据库对象
imp system/manager file=scott_table fromuser=scott touser=myuser tables=(emp,dept)
导出用户:
Exp username/password@databasename file=filename owner = owner
以表方式导出:
Exp user/pwd@dbname tables=(table1,table2) file=filenam
/*********************************************************/
以下命令导出指定用户模式下的所有对象。
exp yyaccp/yyaccp@oracle
file=e:/oracleExport/accp_bak.dmp owner=yyaccp
以下代码演示了导出指定的表:
exp yyaccp/yyaccp@oracle
tables=(mytable,product) file=e:/oracleExport/yyaccptable.dmp
以下代码演示了按表空间的方式导出数据:
exp yyaccp/yyaccp@oracle
tablespaces=(yyaccp)
file=e:/oracleExport/yyaccptablespace_bak.dmp
以下代码演示了参数文件的使用:
Exp parfile=’e:/oracleExport/dbinfo.txt’
用户之导数据:
imp system/manager@oracle file=e:/oracleExport/yyaccp_user.dmp fromuser=yyaccp touser=system tables=(divisions,jobs,employees2)
查看归档日志命令:
Connect system/manager as sysdba;
Archive log list;
更改成归档日志方式后执行以下命令:
alter tablespace yyaccp begin backup;
再手工备份 DBF 数据文件
alter tablespace yyaccp end backup;
再切换联机日志文件:
Alter system archive log current;
Alter system switch logfile;
Alter system switch logfile;
停止服务:
Shutdown immediate;
删除 yyaccp 的 数据文件
Select * from v$recover_file; 显示错误信息。
Alter database datafile 6 offline drop;
Alter database open;
再把备份的数据文件COPY 过来。
Recover datafile6;
指定 auto
Alter database datafile 6 online
创建一个表空间 和一个用户:
create tablespace yyaccp datafile 'D:/oracle9iInstall/ora90/oradata/oracle/yyaccp.DBF'
size 5M autoextend on
/
创建一个用户并且分配表空间:
create user yyaccp identified by yyaccp
default tablespace yyaccp
temporary tablespace temp;
分配权限:
grant create session to yyaccp;
grant dba to yyaccp;
配制OEM 操作:
删除以下文件:
D:/oracle/ora90/network/ADMIN/snmp_ro.ora
D:/oracle/ora90/network/ADMIN/snmp_rw.ora
D:/oracle/ora90/network/agent/ services.ora
删除D:/oracle/ora90/network/agent 目录下的所有 .q 文件
本文详细介绍 Oracle 数据库中数据的导出与导入方法,包括整个数据库、特定用户模式下的所有对象、指定表格及表空间的数据导出流程,并提供具体的命令实例。此外还介绍了如何通过参数文件进行数据导出以及在不同用户间转移数据的具体操作。
1万+

被折叠的 条评论
为什么被折叠?



