好贷网好贷款

data dump for sequence

发布时间:2016-12-4 10:02:17 编辑:www.fx114.net 分享查询网我要评论
本篇文章主要介绍了"data dump for sequence",主要涉及到data dump for sequence方面的内容,对于data dump for sequence感兴趣的同学可以参考一下。

[[email protected] imp]$ sqlplus exp1/exp1 SQL*Plus: Release 11.2.0.1.0 Production on Tue Sep 3 19:33:59 2013 Copyright (c) 1982, 2009, Oracle.  All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> select table_name from user_tables; no rows selected SQL> create table t (id number); Table created. SQL> insert into t values (1); 1 row created. SQL> commit; Commit complete. SQL> select * from t;         ID ----------          1 SQL> select LAST_NUMBER from user_sequences; LAST_NUMBER -----------          32 SQL> select seq_test.nextval from dual;    NEXTVAL ----------         24 SQL> quit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options [[email protected] imp]$ expdp system/oracle schemas=exp1 directory=imp content=metadata_only dumpfile=exp1.dmp logfile=exp1.log Export: Release 11.2.0.1.0 - Production on Tue Sep 3 19:38:15 2013 Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options Starting "SYSTEM"."SYS_EXPORT_SCHEMA_01":  system/******** schemas=exp1 directory=imp content=metadata_only dumpfile=exp1.dmp logfile=exp1.log Processing object type SCHEMA_EXPORT/USER Processing object type SCHEMA_EXPORT/SYSTEM_GRANT Processing object type SCHEMA_EXPORT/ROLE_GRANT Processing object type SCHEMA_EXPORT/DEFAULT_ROLE Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE Processing object type SCHEMA_EXPORT/TABLE/TABLE Master table "SYSTEM"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded ****************************************************************************** Dump file set for SYSTEM.SYS_EXPORT_SCHEMA_01 is:   /home/oracle/imp/exp1.dmp Job "SYSTEM"."SYS_EXPORT_SCHEMA_01" successfully completed at 19:39:17 [[email protected] imp]$ sqlplus exp1/exp1 SQL*Plus: Release 11.2.0.1.0 Production on Tue Sep 3 19:39:23 2013 Copyright (c) 1982, 2009, Oracle.  All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> insert into t values(2); 1 row created. SQL> commit; Commit complete. SQL> select * from t;         ID ----------          1          2 SQL> select LAST_NUMBER from user_sequences; LAST_NUMBER -----------          32 SQL> select seq_test.nextval from dual;                ###做完expdp 序列的变化   content=metadata_only    NEXTVAL ----------         32 SQL> select LAST_NUMBER from user_sequences; LAST_NUMBER -----------          42 SQL> select seq_test.nextval from dual;    NEXTVAL ----------         33 SQL> quit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options [[email protected] imp]$ expdp system/oracle schemas=exp1 directory=imp content=metadata_only dumpfile=exp2.dmp logfile=exp2.log Export: Release 11.2.0.1.0 - Production on Tue Sep 3 19:41:31 2013 Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options Starting "SYSTEM"."SYS_EXPORT_SCHEMA_01":  system/******** schemas=exp1 directory=imp content=metadata_only dumpfile=exp2.dmp logfile=exp2.log Processing object type SCHEMA_EXPORT/USER Processing object type SCHEMA_EXPORT/SYSTEM_GRANT Processing object type SCHEMA_EXPORT/ROLE_GRANT Processing object type SCHEMA_EXPORT/DEFAULT_ROLE Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE Processing object type SCHEMA_EXPORT/TABLE/TABLE Master table "SYSTEM"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded ****************************************************************************** Dump file set for SYSTEM.SYS_EXPORT_SCHEMA_01 is:   /home/oracle/imp/exp2.dmp Job "SYSTEM"."SYS_EXPORT_SCHEMA_01" successfully completed at 19:42:14 [[email protected] imp]$ sqlplus exp1/exp1 SQL*Plus: Release 11.2.0.1.0 Production on Tue Sep 3 19:42:21 2013 Copyright (c) 1982, 2009, Oracle.  All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> select LAST_NUMBER from user_sequences; LAST_NUMBER -----------          42 SQL> select seq_test.nextval from dual;    NEXTVAL ----------         42 SQL> insert into t values(3); 1 row created. SQL> commit; Commit complete. SQL> select * from t;         ID ----------          1          2          3 SQL> select seq_test.currval from dual;    CURRVAL ----------         42 SQL> quit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options [[email protected] imp]$ expdp system/oracle schemas=exp1 directory=imp content=data_only dumpfile=exp3.dmp logfile=exp3.log Export: Release 11.2.0.1.0 - Production on Tue Sep 3 19:43:57 2013 Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options Starting "SYSTEM"."SYS_EXPORT_SCHEMA_01":  system/******** schemas=exp1 directory=imp content=data_only dumpfile=exp3.dmp logfile=exp3.log Estimate in progress using BLOCKS method... Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA Total estimation using BLOCKS method: 64 KB . . exported "EXP1"."T"                                  5.015 KB       3 rows Master table "SYSTEM"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded ****************************************************************************** Dump file set for SYSTEM.SYS_EXPORT_SCHEMA_01 is:   /home/oracle/imp/exp3.dmp Job "SYSTEM"."SYS_EXPORT_SCHEMA_01" successfully completed at 19:44:06 [[email protected] imp]$ sqlplus exp1/exp1 SQL*Plus: Release 11.2.0.1.0 Production on Tue Sep 3 19:44:13 2013 Copyright (c) 1982, 2009, Oracle.  All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> select LAST_NUMBER from user_sequences; LAST_NUMBER -----------          52 SQL> select seq_test.nextval from dual;                       ###做完expdp 序列的变化   content=data_only    NEXTVAL ----------         43 SQL> conn / as sysdba Connected. SQL> drop user exp1 cascade; User dropped. SQL> quit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options [[email protected] imp]$ impdp system/oracle directory=imp dumpfile=exp2.dmp logfile=exp2imp.log Import: Release 11.2.0.1.0 - Production on Tue Sep 3 19:47:17 2013 Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options Master table "SYSTEM"."SYS_IMPORT_FULL_01" successfully loaded/unloaded Starting "SYSTEM"."SYS_IMPORT_FULL_01":  system/******** directory=imp dumpfile=exp2.dmp logfile=exp2imp.log Processing object type SCHEMA_EXPORT/USER Processing object type SCHEMA_EXPORT/SYSTEM_GRANT Processing object type SCHEMA_EXPORT/ROLE_GRANT Processing object type SCHEMA_EXPORT/DEFAULT_ROLE Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE Processing object type SCHEMA_EXPORT/TABLE/TABLE Job "SYSTEM"."SYS_IMPORT_FULL_01" successfully completed at 19:47:22 [[email protected] imp]$ sqlplus exp1/exp1 SQL*Plus: Release 11.2.0.1.0 Production on Tue Sep 3 19:47:32 2013 Copyright (c) 1982, 2009, Oracle.  All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> select * from t; no rows selected SQL>  select LAST_NUMBER from user_sequences; LAST_NUMBER -----------          42 SQL> select seq_test.nextval from dual;                ###做完impdp 序列的变化   content=metadata_only    NEXTVAL ----------         42 SQL> quit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options [[email protected] imp]$ impdp system/oracle directory=imp dumpfile=exp3.dmp logfile=exp3imp.log Import: Release 11.2.0.1.0 - Production on Tue Sep 3 19:48:58 2013 Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options Master table "SYSTEM"."SYS_IMPORT_FULL_01" successfully loaded/unloaded Starting "SYSTEM"."SYS_IMPORT_FULL_01":  system/******** directory=imp dumpfile=exp3.dmp logfile=exp3imp.log Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA . . imported "EXP1"."T"                                  5.015 KB       3 rows Job "SYSTEM"."SYS_IMPORT_FULL_01" successfully completed at 19:49:02 [[email protected] imp]$ sqlplus exp1/exp1 SQL*Plus: Release 11.2.0.1.0 Production on Tue Sep 3 19:49:12 2013 Copyright (c) 1982, 2009, Oracle.  All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> select * from t;         ID ----------          1          2          3 SQL> select LAST_NUMBER from user_sequences; LAST_NUMBER -----------          52 SQL> select seq_test.nextval from dual;              ###做完impdp 序列的变化   content=data_only    NEXTVAL ----------         43 SQL> quit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options   expdp 导出只要涉及metadata都会影响序列的变化,impdp在导入metadata的时候已经导入,导入数据不会影响序列。  

上一篇:Android游戏开发之摄像头的原理以及更新 (五)
下一篇:mysql锁和死锁

相关文章

相关评论