用戶之間導(dǎo)數(shù)據(jù):
exp usertest/usertest@oralce file=usertestp owner=usertest
導(dǎo)出整個(gè)數(shù)據(jù)庫對(duì)象
imp system/manager file=scott_table fromuser=scott touser=myuser tables=(emp,dept)
導(dǎo)出用戶:
Exp username/password@databasename file=filename owner = owner
以表方式導(dǎo)出:
Exp user/pwd@dbname tables=(table1,table2) file=filenam
/*********************************************************/
以下命令導(dǎo)出指定用戶模式下的所有對(duì)象。
exp yyaccp/yyaccp@oracle
file=e:\oracleExport\accp_bak.dmp owner=yyaccp
以下代碼演示了導(dǎo)出指定的表:
exp yyaccp/yyaccp@oracle
tables=(mytable,product) file=e:\oracleExport\yyaccptable.dmp
以下代碼演示了按表空間的方式導(dǎo)出數(shù)據(jù):
exp yyaccp/yyaccp@oracle
tablespaces=(yyaccp)
file=e:\oracleExport\yyaccptablespace_bak.dmp
以下代碼演示了參數(shù)文件的使用:
Exp parfile=’e:\oracleExport\dbinfo.txt’
用戶之導(dǎo)數(shù)據(jù):
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;
更改成歸檔日志方式后執(zhí)行以下命令:
alter tablespace yyaccp begin backup;
再手工備份 DBF 數(shù)據(jù)文件
alter tablespace yyaccp end backup;
再切換聯(lián)機(jī)日志文件:
Alter system archive log current;
Alter system switch logfile;
Alter system switch logfile;
停止服務(wù):
Shutdown immediate;
刪除 yyaccp 的 數(shù)據(jù)文件
Select * from v$recover_file; 顯示錯(cuò)誤信息。
Alter database datafile 6 offline drop;
Alter database open;
再把備份的數(shù)據(jù)文件COPY 過來。 Recover datafile6; 指定 auto Alter database datafile 6 online 創(chuàng)建一個(gè)表空間 和一個(gè)用戶: create tablespace yyaccp datafile ''D:\oracle9iInstall\ora90\oradata\oracle\yyaccp.DBF'' size 5M autoextend on / 創(chuàng)建一個(gè)用戶并且分配表空間: create user yyaccp identified by yyaccp default tablespace yyaccp temporary tablespace temp; 分配權(quán)限: 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 文件
聯(lián)系客服