[oracle@my2950 ~]$ mkdir expdp
[oracle@my2950 ~]$ pwd
/home/oracle
[oracle@my2950 ~]$ cd expdp/
[oracle@my2950 expdp]$ pwd
/home/oracle/expdp
[oracle@my2950 expdp]$ ll
total 0
[oracle@my2950 expdp]$
[oracle@my2950 expdp]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Mon Jun 16 15:28:33 2014
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>
[oracle@my2950 ~]$ sqlplus cc/cc
SQL*Plus: Release 11.2.0.3.0 Production on Mon Jun 16 15:31:50 2014
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>
SQL> SELECT * FROM USER_SYS_PRIVS;
USERNAME PRIVILEGE ADM
------------------------------ ---------------------------------------- ---
CC ALTER SESSION NO
CC UNLIMITED TABLESPACE NO
CC CREATE SYNONYM NO
SQL>
SQL> SELECT * FROM USER_ROLE_PRIVS;
USERNAME GRANTED_ROLE ADM DEF OS_
------------------------------ ------------------------------ --- --- ---
CC CONNECT NO YES NO
CC RESOURCE NO YES NO
SQL>
SQL> create or replace directory exp_cc as '/home/oracle/expdp';
Directory created.
SQL> grant read,write on directory exp_cc to cc;
Grant succeeded.
SQL>
[oracle@my2950 ~]$ sqlplus cc/cc
SQL*Plus: Release 11.2.0.3.0 Production on Mon Jun 16 15:47:26 2014
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> SELECT * FROM USER_SYS_PRIVS;
USERNAME PRIVILEGE ADM
------------------------------ ---------------------------------------- ---
CC ALTER SESSION NO
CC UNLIMITED TABLESPACE NO
CC CREATE SYNONYM NO
SQL> SELECT * FROM USER_ROLE_PRIVS;
USERNAME GRANTED_ROLE ADM DEF OS_
------------------------------ ------------------------------ --- --- ---
CC CONNECT NO YES NO
CC RESOURCE NO YES NO
SQL>
[oracle@my2950 expdp]$ expdp cc/cc directory=exp_cc schemas=cc dumpfile=cc`date +%F-%H%M`.dmp logfile=cc`date +%F-%H%M`.log
Export: Release 11.2.0.3.0 - Production on Mon Jun 16 16:33:21 2014
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting "CC"."SYS_EXPORT_SCHEMA_01": cc/******** directory=exp_cc schemas=cc dumpfile=cc2014-06-16-1633.dmp logfile=cc2014-06-16-1633.log
Estimate in progress using BLOCKS method...
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 838 MB
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/SYNONYM/SYNONYM
Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE
Processing object type SCHEMA_EXPORT/TABLE/TABLE
Processing object type SCHEMA_EXPORT/TABLE/COMMENT
Processing object type SCHEMA_EXPORT/PACKAGE/PACKAGE_SPEC
Processing object type SCHEMA_EXPORT/PROCEDURE/PROCEDURE
Processing object type SCHEMA_EXPORT/PACKAGE/COMPILE_PACKAGE/PACKAGE_SPEC/ALTER_PACKAGE_SPEC
Processing object type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDURE
Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type SCHEMA_EXPORT/PACKAGE/PACKAGE_BODY
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
. . exported "CC"."CUSTACCOUNTS" 62.83 MB 1000000 rows
. . exported "CC"."CUSTCLIS" 48.31 MB 1000000 rows
. . exported "CC"."PACKAGECLIS":"PC01" 23.70 MB 624750 rows
. . exported "CC"."PACKAGECLIS":"PC02" 23.76 MB 626520 rows
. . exported "CC"."PACKAGECLIS":"PC03" 23.76 MB 626340 rows
. . exported "CC"."PACKAGECLIS":"PC04" 23.61 MB 622400 rows
. . exported "CC"."PACKAGECLIS":"PC05" 23.72 MB 625220 rows
. . exported "CC"."PACKAGECLIS":"PC06" 23.69 MB 624550 rows
. . exported "CC"."PACKAGECLIS":"PC07" 23.76 MB 626280 rows
. . exported "CC"."PACKAGECLIS":"PC08" 23.80 MB 627400 rows
. . exported "CC"."PACKAGECLIS":"PC09" 23.70 MB 624900 rows
. . exported "CC"."PACKAGECLIS":"PC10" 23.69 MB 624560 rows
. . exported "CC"."PACKAGECLIS":"PC11" 23.66 MB 623750 rows
. . exported "CC"."PACKAGECLIS":"PC12" 23.79 MB 627320 rows
. . exported "CC"."PACKAGECLIS":"PC13" 23.62 MB 622760 rows
. . exported "CC"."PACKAGECLIS":"PC15" 23.81 MB 627700 rows
. . exported "CC"."PACKAGECLIS":"PC16" 23.67 MB 624100 rows
. . exported "CC"."PACKAGECLIS":"PC14" 23.57 MB 621450 rows
. . exported "CC"."CALLPACKAGES" 7.132 KB 10 rows
. . exported "CC"."CC_PARAMS" 5.429 KB 1 rows
. . exported "CC"."DIALCODES" 66.95 KB 1002 rows
. . exported "CC"."PACKAGESLOTS" 6.468 KB 100 rows
. . exported "CC"."CUSTKEYS" 0 KB 0 rows
. . exported "CC"."TEST1" 0 KB 0 rows
Master table "CC"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
******************************************************************************
Dump file set for CC.SYS_EXPORT_SCHEMA_01 is:
/home/oracle/expdp/cc2014-06-16-1633.dmp
Job "CC"."SYS_EXPORT_SCHEMA_01" successfully completed at 16:34:58
[oracle@my2950 expdp]$
[oracle@my2950 expdp]$ pwd
/home/oracle/expdp
[oracle@my2950 expdp]$ ls -hl
total 492M
-rw-r----- 1 oracle dba 492M Jun 16 16:34 cc2014-06-16-1633.dmp
-rw-r--r-- 1 oracle dba 3.6K Jun 16 16:34 cc2014-06-16-1633.log
-rw-r--r-- 1 oracle dba 422 Jun 16 16:32 cc.log
[oracle@my2950 expdp]$
expdp cc/cc directory=exp_cc schemas=cc dumpfile=/home/oracle/expdp/cc`date +%F-%H%M`.dmp logfile=/home/oracle/expdp/cc`date +%F-%H%M`.log
create user cc identified by cc default tablespace ccdata account unlock;
grant unlimited tablespace to cc;
grant create synonym to cc;
grant connect to cc;
grant resource to cc;
删除用户SQL> drop user cc cascade;
User dropped.
SQL>
SQL> create user cc identified by cc default tablespace ccdata account unlock;
User created.
SQL>
SQL> grant create synonym to cc;
Grant succeeded.
SQL> grant unlimited tablespace to cc;
Grant succeeded.
SQL> grant connect to cc;
Grant succeeded.
SQL> grant resource to cc;
Grant succeeded.
SQL>
SQL> select count(*) from user_objects;
COUNT(*)
----------
0
SQL>
SQL>
导入数据
[oracle@my2950 expdp]$ impdp cc/cc directory=exp_cc schemas=cc dumpfile=cc2014-06-16-1633.dmp logfile=ccimp`date +%F-%H%M`.log
Import: Release 11.2.0.3.0 - Production on Mon Jun 16 17:08:37 2014
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORA-39002: invalid operation
ORA-39070: Unable to open the log file.
ORA-39087: directory name EXP_CC is invalid
[oracle@my2950 expdp]$
SQL> conn / as sysdba
Connected.
SQL> grant read,write on directory exp_cc to cc;
Grant succeeded.
SQL>
[oracle@my2950 expdp]$
[oracle@my2950 expdp]$ impdp cc/cc directory=exp_cc schemas=cc dumpfile=cc2014-06-16-1633.dmp logfile=ccimp`date +%F-%H%M`.log
Import: Release 11.2.0.3.0 - Production on Mon Jun 16 17:09:36 2014
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Master table "CC"."SYS_IMPORT_SCHEMA_01" successfully loaded/unloaded
Starting "CC"."SYS_IMPORT_SCHEMA_01": cc/******** directory=exp_cc schemas=cc dumpfile=cc2014-06-16-1633.dmp logfile=ccimp2014-06-16-1709.log
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/SYNONYM/SYNONYM
Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE
Processing object type SCHEMA_EXPORT/TABLE/TABLE
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
. . imported "CC"."CUSTACCOUNTS" 62.83 MB 1000000 rows
. . imported "CC"."CUSTCLIS" 48.31 MB 1000000 rows
. . imported "CC"."PACKAGECLIS":"PC01" 23.70 MB 624750 rows
. . imported "CC"."PACKAGECLIS":"PC02" 23.76 MB 626520 rows
. . imported "CC"."PACKAGECLIS":"PC03" 23.76 MB 626340 rows
. . imported "CC"."PACKAGECLIS":"PC04" 23.61 MB 622400 rows
. . imported "CC"."PACKAGECLIS":"PC05" 23.72 MB 625220 rows
. . imported "CC"."PACKAGECLIS":"PC06" 23.69 MB 624550 rows
. . imported "CC"."PACKAGECLIS":"PC07" 23.76 MB 626280 rows
. . imported "CC"."PACKAGECLIS":"PC08" 23.80 MB 627400 rows
. . imported "CC"."PACKAGECLIS":"PC09" 23.70 MB 624900 rows
. . imported "CC"."PACKAGECLIS":"PC10" 23.69 MB 624560 rows
. . imported "CC"."PACKAGECLIS":"PC11" 23.66 MB 623750 rows
. . imported "CC"."PACKAGECLIS":"PC12" 23.79 MB 627320 rows
. . imported "CC"."PACKAGECLIS":"PC13" 23.62 MB 622760 rows
. . imported "CC"."PACKAGECLIS":"PC15" 23.81 MB 627700 rows
. . imported "CC"."PACKAGECLIS":"PC16" 23.67 MB 624100 rows
. . imported "CC"."PACKAGECLIS":"PC14" 23.57 MB 621450 rows
. . imported "CC"."CALLPACKAGES" 7.132 KB 10 rows
. . imported "CC"."CC_PARAMS" 5.429 KB 1 rows
. . imported "CC"."DIALCODES" 66.95 KB 1002 rows
. . imported "CC"."PACKAGESLOTS" 6.468 KB 100 rows
. . imported "CC"."CUSTKEYS" 0 KB 0 rows
. . imported "CC"."TEST1" 0 KB 0 rows
Processing object type SCHEMA_EXPORT/PACKAGE/PACKAGE_SPEC
Processing object type SCHEMA_EXPORT/PROCEDURE/PROCEDURE
Processing object type SCHEMA_EXPORT/PACKAGE/COMPILE_PACKAGE/PACKAGE_SPEC/ALTER_PACKAGE_SPEC
Processing object type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDURE
Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type SCHEMA_EXPORT/PACKAGE/PACKAGE_BODY
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Job "CC"."SYS_IMPORT_SCHEMA_01" successfully completed at 17:12:20
[oracle@my2950 expdp]$
SQL>
SQL> conn cc/cc
Connected.
SQL> select count(*) from user_objects;
COUNT(*)
----------
100
SQL>
SQL> select * from tab;
TNAME TABTYPE CLUSTERID
------------------------------ ------- ----------
CA SYNONYM
CALLPACKAGES TABLE
CC SYNONYM
CC_PARAMS TABLE
CK SYNONYM
CP SYNONYM
CUSTACCOUNTS TABLE
CUSTCLIS TABLE
CUSTKEYS TABLE
DC SYNONYM
DIALCODES TABLE
TNAME TABTYPE CLUSTERID
------------------------------ ------- ----------
PACKAGECLIS TABLE
PACKAGESLOTS TABLE
PC SYNONYM
PS SYNONYM
TEST1 TABLE
16 rows selected.
SQL>
继续cc测试
发现权限不对
SQL> select * from user_sys_privs;
USERNAME PRIVILEGE ADM
------------------------------ ---------------------------------------- ---
CC UNLIMITED TABLESPACE NO
CC CREATE SYNONYM NO
SQL> select * from user_role_privs;
USERNAME GRANTED_ROLE ADM DEF OS_
------------------------------ ------------------------------ --- --- ---
CC CONNECT NO YES NO
CC RESOURCE NO YES NO
SQL>
SQL> grant alter session to cc;
Grant succeeded.
SQL>
SQL> drop user cc cascade;
User dropped.
SQL> create user cc identified by cc default tablespace ccdata account unlock;
User created.
SQL> grant connect to cc;
Grant succeeded.
SQL> grant resource to cc;
Grant succeeded.
SQL> grant unlimited tablespace to cc;
Grant succeeded.
SQL> grant create synonym to cc;
Grant succeeded.
SQL> grant alter session to cc;
Grant succeeded.
SQL> grant read,write on directory exp_cc to cc;
Grant succeeded.
SQL>
recc.sql
drop user cc cascade;
create user cc identified by cc default tablespace ccdata account unlock;
grant unlimited tablespace to cc;
grant create synonym to cc;
grant connect to cc;
grant resource to cc;
grant alter session to cc;
grant read,write on directory exp_cc to cc;
host /u01/app/oracle/product/11.2.3/db_1/bin/impdp cc/cc directory=exp_cc schemas=cc dumpfile=cc2014-06-16-1633.dmp logfile=ccimp`date +%F-%H%M`.log
2014年6月19日 11:50:02
no force logging + no zabbix +no httpd 测试三次对比一下
[oracle@my2950 bin]$ ./charbench -c ../configs/ccconfig.xml -cs //localhost/mydb1 -dt thin -cpuloc localhost -cpuuser oracle -cpupass 234561 -uc 100 -min 0 -max 100 -a -v tps,tpm,cpu,users -r rs100_0619_nofl_nozb_3.xml
[oracle@my2950 bin]$ ./bmcompare -r rs100_0619_nofl_nozb_1.xml,rs100_0619_nofl_nozb_2.xml,rs100_0619_nofl_nozb_3.xml [oracle@my2950 bin]$
每次都重启一下
加上foace logging以后 测试三次
resultscomparison9.html
影响不大...