Last login: Wed Jul 18 15:51:45 2012 from 172.16.80.103
[root@GG-rac1 ~]# su - oracle
[oracle@GG-rac1 ~]$ export ORACLE_SID=sbdb1
[oracle@GG-rac1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Wed Jul 18 15:53:49 2012
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, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SQL> create user nby identified by nby default tablespace users;
User created.
SQL> grant resource,create session,unlimited tablespace to nby;
Grant succeeded.
SQL> grant read on directory DP_GOLDENGATE to nby;
Grant succeeded.
SQL> grant write on directory DP_GOLDENGATE to nby;
Grant succeeded.
SQL> conn nby/nby
Connected.
SQL> create table t_nby(id number);
Table created.
SQL> SELECT segment_created FROM user_tables WHERE table_name='T_NBY';
SEG
---
NO
SQL> !
[oracle@GG-rac1 ~]$ expdp system/oracle directory=DP_GOLDENGATE dumpfile=nby.dmp schemas=nby
Export: Release 11.2.0.3.0 - Production on Wed Jul 18 16:00:45 2012
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, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
FLASHBACK automatically enabled to preserve database integrity.
Starting "SYSTEM"."SYS_EXPORT_SCHEMA_01": system/******** directory=DP_GOLDENGATE dumpfile=nby.dmp schemas=nby
Estimate in progress using BLOCKS method...
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 0 KB
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/TABLE/TABLE
. . exported "NBY"."T_NBY" 0 KB 0 rows
Master table "SYSTEM"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
******************************************************************************
Dump file set for SYSTEM.SYS_EXPORT_SCHEMA_01 is:
/u03/dp_goldengate/nby.dmp
Job "SYSTEM"."SYS_EXPORT_SCHEMA_01" successfully completed at 16:01:48
[oracle@GG-rac1 ~]$ exit
exit
SQL> conn / as sysdba
Connected.
SQL> drop user nby cascade;
User dropped.
SQL> !
[oracle@GG-rac1 ~]$ impdp system/oracle directory=DP_GOLDENGATE dumpfile=nby.dmp
Import: Release 11.2.0.3.0 - Production on Wed Jul 18 16:02:30 2012
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, Real Application Clusters, Automatic Storage Management, 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=DP_GOLDENGATE dumpfile=nby.dmp
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/TABLE/TABLE
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
. . imported "NBY"."T_NBY" 0 KB 0 rows
Job "SYSTEM"."SYS_IMPORT_FULL_01" successfully completed at 16:02:36
[oracle@GG-rac1 ~]$ exit
exit
SQL> conn nby/nby
Connected.
SQL> select * from t_nby;
no rows selected
SQL>