Home » Default » Oracle11G数据库的导入导出记录

su - roacle
sqlplus /nolog
conn /as sysdba
show parameter dump_dir

expdp system/password directory=dump_dir dumpfile=file.dump logfile=file.log schemas=user1,user2,user3

c:\users\Administrator>sqlplus /nolog
SQL>conn / as sysdba
SQL>select tablespace_name from dba_tablespaces;
shutdown immediate;
startup;
//优化
alter system set log_buffer=67108864 sid='*' scope=spfile;
alter system set open_cursors=1000 sid='*' scope=spfile;
alter system set session_cached_cursors=800 sid='*' scope=spfile;
alter system set "_serial_direct_read"=never sid='*' scope=spfile;
alter system set deferred_segment_creation=false sid='*' scope=both;
alter system set sec_case_sensitive_logon=false sid='*' scope=both;
alter system set "_optimizer_use_feedback" = false scope=spfile;
alter system set "_optimizer_extended_cursor_sharing_rel"=none sid='*' scope=both;
alter system set "_optimizer_extended_cursor_sharing"=none sid='*' scope=both;
alter system set "_optimizer_adaptive_cursor_sharing"=false sid='*' scope=both;
alter system set audit_trail='none' sid='*' scope=spfile;
alter system set "_use_adaptive_log_file_sync"=false sid='*' scope=spfile;
alter system set resource_manager_plan='' sid='*' scope=spfile;
alter system set "_resource_manager_always_off" = true scope=spfile;
alter system set "_resource_manager_always_on" = false scope=spfile;
alter system set "_cleanup_rollback_entries" = 400 scope=spfile;
alter system set "_dbms_sql_security_level" =0 scope=spfile;
alter system set "_bloom_pruning_enabled" = false scope=spfile;
alter system set "_bloom_filter_enabled" = false scope=spfile;
alter system set "_smu_debug_mode" = 134217728 scope=spfile;
alter system set event='28401 trace name context forever,level 1' scope=spfile;
alter system set "_pga_max_size"=100M scope=spfile;
alter profile default limit failed_login_attempts unlimited;
alter profile default limit password_life_time unlimited;
exec dbms_stats.gather_fixed_objects_stats();
exec dbms_scheduler.disable('ORACLE_OCM.MGMT_CONFIG_JOB');
exec dbms_scheduler.disable('ORACLE_OCM.MGMT_STATS_CONFIG_JOB');
//优化
alter tablespace users add datafile '\users02.dbf' size 1024M autoextend no next 100M;
alter tablespace users add datafile '\users03.dbf' size 1024M autoextend no next 100M;
alter tablespace users add datafile '\users04.dbf' size 1024M autoextend no next 100M;
alter tablespace users add datafile '\users05.dbf' size 1024M autoextend no next 100M;
alter tablespace users add datafile '\users06.dbf' size 1024M autoextend no next 100M;
alter tablespace users add datafile '\users06.dbf' size 1024M autoextend no next 100M;
sqlplus /nolog
conn / as sysdba
create or replace directory dump_dir as '\';
grant read,write on directory dump_dir to system;

impdp system/password directory=dump_dir dumpfile=file.dump logfile=file.log schemas=user1,user2,user3 cluster=no 

标签: Oracle 11g expdp impdp

添加新评论

V