[oracle@srv2 Backup]$ impdp schemas=soe directory=expdpacfs dumpfile=soe.dmp logfile=soe_1.log
Import: Release 12.1.0.2.0 - Production on Wed Jul 31 13:44:23 2019
Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
Username: / as sysdba
Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Advanced Analytics and Real Application Testing options
ORA-39001: invalid argument value
ORA-39000: bad dump file specification
ORA-39142: incompatible version number 5.1 in dump file "/u01/Backup/soe.dmp"
[oracle@srv2 Backup]$
SQL> exec dbms_stats.gather_schema_stats('SOE',cascade => TRUE,estimate_percent =>30);
PL/SQL procedure successfully completed.
SQL> EXEC DBMS_UTILITY.COMPILE_SCHEMA(schema=>'SOE');
PL/SQL procedure successfully completed.
SQL> SELECT count(*),object_type,STATUS from dba_objects WHERE OWNER='SOE' group by object_type,status;
COUNT(*) OBJECT_TYPE STATUS
---------- ----------------------- -------
1 FUNCTION VALID
1 PACKAGE VALID
7 SEQUENCE VALID
1 PACKAGE BODY VALID
16 TABLE VALID
33 INDEX VALID
1 PROCEDURE VALID
2 VIEW VALID
8 rows selected.
SQL>
Import: Release 12.1.0.2.0 - Production on Wed Jul 31 13:44:23 2019
Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
Username: / as sysdba
Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Advanced Analytics and Real Application Testing options
ORA-39001: invalid argument value
ORA-39000: bad dump file specification
ORA-39142: incompatible version number 5.1 in dump file "/u01/Backup/soe.dmp"
[oracle@srv2 Backup]$
C:\Users\varunyadav>expdp directory=testdir dumpfile=soe12_1.dmp logfile=soe12_1.log version=12.1 schemas=soe
Export: Release 12.2.0.1.0 - Production on Wed Jul 31 13:31:58 2019
Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved.
Username: / as sysdba
Connected to: Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
Warning: Oracle Data Pump is exporting from a database that supports long identifiers to a version that does not support long identifiers.
Starting "SYS"."SYS_EXPORT_SCHEMA_01": /******** AS SYSDBA directory=testdir dumpfile=soe12_1.dmp logfile=soe12_1.log version=12.1 schemas=soe
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Processing object type SCHEMA_EXPORT/PACKAGE/PACKAGE_BODY
Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/FUNCTIONAL_INDEX/INDEX_STATISTICS
Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/BITMAP_INDEX/INDEX_STATISTICS
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Processing object type SCHEMA_EXPORT/STATISTICS/MARKER
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
Processing object type SCHEMA_EXPORT/TABLE/IDENTITY_COLUMN
Processing object type SCHEMA_EXPORT/PACKAGE/PACKAGE_SPEC
Processing object type SCHEMA_EXPORT/FUNCTION/FUNCTION
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/FUNCTION/ALTER_FUNCTION
Processing object type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDURE
Processing object type SCHEMA_EXPORT/VIEW/VIEW
Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
Processing object type SCHEMA_EXPORT/TABLE/INDEX/FUNCTIONAL_INDEX/INDEX
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/INDEX/BITMAP_INDEX/INDEX
. . exported "SOE"."ORDER_ITEMS" 170.4 MB 3735896 rows
. . exported "SOE"."ORDERS" 114.9 MB 1352070 rows
. . exported "SOE"."INVENTORIES" 15.27 MB 902171 rows
. . exported "SOE"."LOGON" 9.065 MB 442208 rows
. . exported "SOE"."CUSTOMERS" 4.983 MB 45703 rows
. . exported "SOE"."ADDRESSES" 4.084 MB 55703 rows
. . exported "SOE"."CARD_DETAILS" 2.402 MB 55703 rows
. . exported "SOE"."PRODUCT_DESCRIPTIONS" 224.1 KB 1000 rows
. . exported "SOE"."PRODUCT_INFORMATION" 186.4 KB 1000 rows
. . exported "SOE"."EMP" 51.39 KB 879 rows
. . exported "SOE"."WAREHOUSES" 36.03 KB 1000 rows
. . exported "SOE"."JOB_HISTORY" 14.60 KB 246 rows
. . exported "SOE"."JOBS" 5.976 KB 23 rows
. . exported "SOE"."ORDERENTRY_METADATA" 5.609 KB 4 rows
. . exported "SOE"."DEPT" 5.632 KB 7 rows
. . exported "SOE"."V" 0 KB 0 rows
Master table "SYS"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
******************************************************************************
Dump file set for SYS.SYS_EXPORT_SCHEMA_01 is:
C:\DRILL_BACKUP\SOE12_1.DMP
Job "SYS"."SYS_EXPORT_SCHEMA_01" successfully completed at Wed Jul 31 13:33:22 2019 elapsed 0 00:01:20
C:\Users\varunyadav>
[oracle@srv2 Backup]$ impdp schemas=soe directory=expdpacfs dumpfile=SOE12_1.DMP logfile=soe_1.log
Import: Release 12.1.0.2.0 - Production on Wed Jul 31 15:45:21 2019
Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
Username: / as sysdba
Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Advanced Analytics and Real Application Testing options
Master table "SYS"."SYS_IMPORT_SCHEMA_01" successfully loaded/unloaded
Starting "SYS"."SYS_IMPORT_SCHEMA_01": /******** AS SYSDBA schemas=soe directory=expdpacfs dumpfile=SOE12_1.DMP logfile=soe_1.log
Processing object type SCHEMA_EXPORT/USER
ORA-31684: Object type USER:"SOE" already exists
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
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
. . imported "SOE"."ORDER_ITEMS" 170.4 MB 3735896 rows
. . imported "SOE"."ORDERS" 114.9 MB 1352070 rows
. . imported "SOE"."INVENTORIES" 15.27 MB 902171 rows
. . imported "SOE"."LOGON" 9.065 MB 442208 rows
. . imported "SOE"."CUSTOMERS" 4.983 MB 45703 rows
. . imported "SOE"."ADDRESSES" 4.084 MB 55703 rows
. . imported "SOE"."CARD_DETAILS" 2.402 MB 55703 rows
. . imported "SOE"."PRODUCT_DESCRIPTIONS" 224.1 KB 1000 rows
. . imported "SOE"."PRODUCT_INFORMATION" 186.4 KB 1000 rows
. . imported "SOE"."EMP" 51.39 KB 879 rows
. . imported "SOE"."WAREHOUSES" 36.03 KB 1000 rows
. . imported "SOE"."JOB_HISTORY" 14.60 KB 246 rows
. . imported "SOE"."JOBS" 5.976 KB 23 rows
. . imported "SOE"."ORDERENTRY_METADATA" 5.609 KB 4 rows
. . imported "SOE"."DEPT" 5.632 KB 7 rows
. . imported "SOE"."V" 0 KB 0 rows
Processing object type SCHEMA_EXPORT/TABLE/IDENTITY_COLUMN
Processing object type SCHEMA_EXPORT/PACKAGE/PACKAGE_SPEC
Processing object type SCHEMA_EXPORT/FUNCTION/FUNCTION
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/FUNCTION/ALTER_FUNCTION
Processing object type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDURE
Processing object type SCHEMA_EXPORT/VIEW/VIEW
Processing object type SCHEMA_EXPORT/PACKAGE/PACKAGE_BODY
Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
Processing object type SCHEMA_EXPORT/TABLE/INDEX/FUNCTIONAL_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/TABLE/INDEX/STATISTICS/FUNCTIONAL_INDEX/INDEX_STATISTICS
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/INDEX/BITMAP_INDEX/INDEX
Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/BITMAP_INDEX/INDEX_STATISTICS
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Processing object type SCHEMA_EXPORT/STATISTICS/MARKER
ORA-39367: Statistcis are being skipped. Cannot locate the time zone version 26 file.
ORA-39082: Object type PACKAGE BODY:"SOE"."ORDERENTRY" created with compilation warnings
Job "SYS"."SYS_IMPORT_SCHEMA_01" completed with 3 error(s) at Wed Jul 31 15:54:36 2019 elapsed 0 00:09:05
[oracle@srv2 Backup]$
[oracle@srv2 Backup]$
SQL> exec dbms_stats.gather_schema_stats('SOE',cascade => TRUE,estimate_percent =>30);
PL/SQL procedure successfully completed.
SQL> EXEC DBMS_UTILITY.COMPILE_SCHEMA(schema=>'SOE');
PL/SQL procedure successfully completed.
SQL> SELECT count(*),object_type,STATUS from dba_objects WHERE OWNER='SOE' group by object_type,status;
COUNT(*) OBJECT_TYPE STATUS
---------- ----------------------- -------
1 FUNCTION VALID
1 PACKAGE VALID
7 SEQUENCE VALID
1 PACKAGE BODY VALID
16 TABLE VALID
33 INDEX VALID
1 PROCEDURE VALID
2 VIEW VALID
8 rows selected.
SQL>
No comments:
Post a Comment