add extract ext, tranlog, begin now
add exttrail ./dirdat/ll, EXTRACT ext, megabytes 100
GGSCI (twserver) 5> edit params ext
EXTRACT ext
USERID ogg,PASSWORD ogg
DYNAMICRESOLUTION
Gettruncates
report at 1:59
reportrollover at 2:00
warnlongtrans 3h, checkinterval 10m
TRANLOGOPTIONS RAWDEVICEOFFSET 0
EXTTRAIL ./dirdat/ll
TABLE user1.t1;
TABLE user1.t2;
add extract pump1 , exttrailsource ./dirdat/ll
add rmttrail ./dirdat/ee, ext pump1, megabytes 100
GGSCI (twserver) 6> edit params pump1
EXTRACT pump1
DYNAMICRESOLUTION
USERID ogg,PASSWORD ogg
RMTHOST 192.168.1.21,MGRPORT 7890,COMPRESS
RMTTRAIL ./dirdat/ee
TABLE user1.t1;
add extract pump2 , exttrailsource ./dirdat/ll
add rmttrail ./dirdat/ff, ext pump2, megabytes 100
GGSCI (twserver) 6> edit params pump2
EXTRACT pump2
DYNAMICRESOLUTION
USERID ogg,PASSWORD ogg
RMTHOST 192.168.1.21,MGRPORT 7890,COMPRESS
RMTTRAIL ./dirdat/ff
TABLE user1.t2;
ADD REPLICAT rep1, EXTTRAIL ./dirdat/ee
GGSCI (twserver) 5> edit params rep1
REPLICAT rep1
ASSUMETARGETDEFS
HANDLECOLLISIONS
USERID ogg, PASSWORD ogg
DISCARDFILE ./dirrpt/rep1.dsc, PURGE
MAP user1.t1, TARGET user1.t1;
ADD REPLICAT rep2, EXTTRAIL ./dirdat/ff
GGSCI (twserver) 5> edit params rep2
REPLICAT rep2
ASSUMETARGETDEFS
HANDLECOLLISIONS
USERID ogg, PASSWORD ogg
DISCARDFILE ./dirrpt/rep2.dsc, PURGE
MAP user1.t2, TARGET user1.t2;
GGSCI (dest) 2> exit
[oracle@dest ogg]$ sqlplus /nolog
SQL*Plus: Release 11.2.0.4.0 Production on Fri May 22 12:55:14 2015
Copyright (c) 1982, 2013, Oracle. All rights reserved.
SQL> connect /as sysDBA
Connected.
SQL> create user user1 identified by oracle account unlock;
User created.
SQL> gran dba to user1;
SP2-0734: unknown command beginning "gran dba t..." - rest of line ignored.
SQL> grant dba to user1;
Grant succeeded.
SQL> connect user1/oracle
Connected.
SQL> create table t1 as select * from dba_objects where 1=2;
Table created.
SQL> create table t2 as select * from dba_tables where 1=2;
Table created.
SQL>
SQL> alter table t1 add primary key (object_id);
Table altered.
SQL> desc t2
Name Null? Type
----------------------------------------- -------- ----------------------------
OWNER NOT NULL VARCHAR2(30)
TABLE_NAME NOT NULL VARCHAR2(30)
TABLESPACE_NAME VARCHAR2(30)
CLUSTER_NAME VARCHAR2(30)
IOT_NAME VARCHAR2(30)
STATUS VARCHAR2(8)
PCT_FREE NUMBER
PCT_USED NUMBER
INI_TRANS NUMBER
MAX_TRANS NUMBER
INITIAL_EXTENT NUMBER
NEXT_EXTENT NUMBER
MIN_EXTENTS NUMBER
MAX_EXTENTS NUMBER
PCT_INCREASE NUMBER
FREELISTS NUMBER
FREELIST_GROUPS NUMBER
LOGGING VARCHAR2(3)
BACKED_UP VARCHAR2(1)
NUM_ROWS NUMBER
BLOCKS NUMBER
EMPTY_BLOCKS NUMBER
AVG_SPACE NUMBER
CHAIN_CNT NUMBER
AVG_ROW_LEN NUMBER
AVG_SPACE_FREELIST_BLOCKS NUMBER
NUM_FREELIST_BLOCKS NUMBER
DEGREE VARCHAR2(20)
INSTANCES VARCHAR2(20)
CACHE VARCHAR2(10)
TABLE_LOCK VARCHAR2(8)
SAMPLE_SIZE NUMBER
LAST_ANALYZED DATE
PARTITIONED VARCHAR2(3)
IOT_TYPE VARCHAR2(12)
TEMPORARY VARCHAR2(1)
SECONDARY VARCHAR2(1)
NESTED VARCHAR2(3)
BUFFER_POOL VARCHAR2(7)
FLASH_CACHE VARCHAR2(7)
CELL_FLASH_CACHE VARCHAR2(7)
ROW_MOVEMENT VARCHAR2(8)
GLOBAL_STATS VARCHAR2(3)
USER_STATS VARCHAR2(3)
DURATION VARCHAR2(15)
SKIP_CORRUPT VARCHAR2(8)
MONITORING VARCHAR2(3)
CLUSTER_OWNER VARCHAR2(30)
DEPENDENCIES VARCHAR2(8)
COMPRESSION VARCHAR2(8)
COMPRESS_FOR VARCHAR2(12)
DROPPED VARCHAR2(3)
READ_ONLY VARCHAR2(3)
SEGMENT_CREATED VARCHAR2(3)
RESULT_CACHE VARCHAR2(7)
SQL> alter table t2 add primary key (OWNER,TABLE_NAME);
Table altered.
SQL> |
|