Hey all my impdp for oracle is listing quite a few errors that look like the following:
Failing sql is:
BEGIN
SYS.DBMS_AQ_IMP_INTERNAL.CLEANUP_SCHEMA_IMPORT;COMMIT; END;
ORA-39083: Object type PROCACT_SCHEMA failed to create with error:
ORA-31625: Schema OPENDEMO_SNAP is needed to import this object, but is unaccesscible
ORA-01435: user does not exist
I am importing and exporting as user system and to make double sure I ran the follow SQL commands:
GRANT DATAPUMP_EXP_FULL_DATABASE TO system;
GRANT DATAPUMP_IMP_FULL_DATABASE TO system;
The import and export commands are as follows:
expdp system/password directory=dp_dir transportable=always full=y dumpfile=full_tts.dmp log=full_tts_export.log
impdp system/password directory=dp_dir dumpfile=full_tts.dmp logfile=full_tts_imp.log transport_datafiles='/tmp/oracle-db/users*','/tmp/oracle-db/data*'
Any help would be appreciated thanks!
EDIT: Here is the full export log.
;;;
Export: Release 12.1.0.2.0 - Production on Tue Sep 27 09:35:55 2022
Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
;;;
Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
;;; Legacy Mode Active due to the following parameters:
;;; Legacy Mode Parameter: "log=full_tts_export.log" Location: Command Line, Replaced with: "logfile=full_tts_export.log"
;;; Legacy Mode has set reuse_dumpfiles=true parameter.
Starting "SYSTEM"."SYS_EXPORT_FULL_01": system/******** directory=dp_dir transportable=always full=y dumpfile=full_tts.dmp logfile=full_tts_export.log reuse_dumpfiles=true
Estimate in progress using BLOCKS method...
Processing object type DATABASE_EXPORT/PLUGTS_FULL/FULL/PLUGTS_TABLESPACE
Processing object type DATABASE_EXPORT/PLUGTS_FULL/PLUGTS_BLK
ORA-31642: the following SQL statement fails:
BEGIN "SYS"."DBMS_RULE_EXP_RULES".SCHEMA_CALLOUT(:1,0,1,'12.01.00.02.00'); END;
ORA-01950: no privileges on tablespace 'SYSAUX'
ORA-31642: the following SQL statement fails:
BEGIN "SYS"."DBMS_RULE_EXP_RULES".SCHEMA_CALLOUT(:1,0,1,'12.01.00.02.00'); END;
ORA-01950: no privileges on tablespace 'SYSAUX'
ORA-31642: the following SQL statement fails:
BEGIN "SYS"."DBMS_RULE_EXP_RULES".SCHEMA_CALLOUT(:1,0,1,'12.01.00.02.00'); END;
ORA-01950: no privileges on tablespace 'SYSAUX'
ORA-31642: the following SQL statement fails:
BEGIN "SYS"."DBMS_RULE_EXP_RULES".SCHEMA_CALLOUT(:1,0,1,'12.01.00.02.00'); END;
ORA-01950: no privileges on tablespace 'SYSAUX'
ORA-31642: the following SQL statement fails:
BEGIN "SYS"."DBMS_RULE_EXP_RULES".SCHEMA_CALLOUT(:1,0,1,'12.01.00.02.00'); END;
ORA-01950: no privileges on tablespace 'SYSAUX'
ORA-31642: the following SQL statement fails:
BEGIN "SYS"."DBMS_RULE_EXP_RULES".SCHEMA_CALLOUT(:1,0,1,'12.01.00.02.00'); END;
ORA-01950: no privileges on tablespace 'SYSAUX'
ORA-31642: the following SQL statement fails:
BEGIN "SYS"."DBMS_RULE_EXP_RULES".SCHEMA_CALLOUT(:1,0,1,'12.01.00.02.00'); END;
ORA-01950: no privileges on tablespace 'SYSAUX'
Processing object type DATABASE_EXPORT/EARLY_OPTIONS/VIEWS_AS_TABLES/TABLE_DATA
Processing object type DATABASE_EXPORT/NORMAL_OPTIONS/TABLE_DATA
Processing object type DATABASE_EXPORT/NORMAL_OPTIONS/VIEWS_AS_TABLES/TABLE_DATA
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 1002. MB
Processing object type DATABASE_EXPORT/PRE_SYSTEM_IMPCALLOUT/MARKER
Processing object type DATABASE_EXPORT/PRE_INSTANCE_IMPCALLOUT/MARKER
Processing object type DATABASE_EXPORT/TABLESPACE
Processing object type DATABASE_EXPORT/PROFILE
Processing object type DATABASE_EXPORT/SYS_USER/USER
Processing object type DATABASE_EXPORT/SCHEMA/USER
Processing object type DATABASE_EXPORT/RADM_FPTM
Processing object type DATABASE_EXPORT/GRANT/SYSTEM_GRANT/PROC_SYSTEM_GRANT
Processing object type DATABASE_EXPORT/SCHEMA/GRANT/SYSTEM_GRANT
Processing object type DATABASE_EXPORT/SCHEMA/ROLE_GRANT
Processing object type DATABASE_EXPORT/SCHEMA/DEFAULT_ROLE
Processing object type DATABASE_EXPORT/SCHEMA/ON_USER_GRANT
Processing object type DATABASE_EXPORT/SCHEMA/TABLESPACE_QUOTA
Processing object type DATABASE_EXPORT/RESOURCE_COST
Processing object type DATABASE_EXPORT/SCHEMA/DB_LINK
Processing object type DATABASE_EXPORT/TRUSTED_DB_LINK
Processing object type DATABASE_EXPORT/SCHEMA/SEQUENCE/SEQUENCE
Processing object type DATABASE_EXPORT/DIRECTORY/DIRECTORY
Processing object type DATABASE_EXPORT/DIRECTORY/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type DATABASE_EXPORT/SCHEMA/LIBRARY/LIBRARY
Processing object type DATABASE_EXPORT/SCHEMA/TYPE/TYPE_SPEC
Processing object type DATABASE_EXPORT/SYSTEM_PROCOBJACT/PRE_SYSTEM_ACTIONS/PROCACT_SYSTEM
Processing object type DATABASE_EXPORT/SYSTEM_PROCOBJACT/PROCOBJ
Processing object type DATABASE_EXPORT/SYSTEM_PROCOBJACT/POST_SYSTEM_ACTIONS/PROCACT_SYSTEM
Processing object type DATABASE_EXPORT/SCHEMA/PROCACT_SCHEMA
Processing object type DATABASE_EXPORT/EARLY_OPTIONS/VIEWS_AS_TABLES/TABLE
Processing object type DATABASE_EXPORT/EARLY_POST_INSTANCE_IMPCALLOUT/MARKER
Processing object type DATABASE_EXPORT/NORMAL_OPTIONS/TABLE
Processing object type DATABASE_EXPORT/NORMAL_OPTIONS/VIEWS_AS_TABLES/TABLE
Processing object type DATABASE_EXPORT/NORMAL_POST_INSTANCE_IMPCALLOU/MARKER
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/TABLE
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/COMMENT
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/IDENTITY_COLUMN
Processing object type DATABASE_EXPORT/SCHEMA/PACKAGE/PACKAGE_SPEC
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/INDEX/INDEX
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/INDEX/FUNCTIONAL_INDEX/INDEX
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/CONSTRAINT/CONSTRAINT
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/INDEX/STATISTICS/FUNCTIONAL_INDEX/INDEX_STATISTICS
Processing object type DATABASE_EXPORT/SCHEMA/VIEW/VIEW
Processing object type DATABASE_EXPORT/SCHEMA/PACKAGE_BODIES/PACKAGE/PACKAGE_BODY
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/CONSTRAINT/REF_CONSTRAINT
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/STATISTICS/TABLE_STATISTICS
Processing object type DATABASE_EXPORT/STATISTICS/MARKER
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/TRIGGER
Processing object type DATABASE_EXPORT/SCHEMA/MATERIALIZED_VIEW
Processing object type DATABASE_EXPORT/END_PLUGTS_BLK
Processing object type DATABASE_EXPORT/FINAL_POST_INSTANCE_IMPCALLOUT/MARKER
Processing object type DATABASE_EXPORT/SCHEMA/POST_SCHEMA/PROCOBJ
Processing object type DATABASE_EXPORT/SCHEMA/POST_SCHEMA/PROCACT_SCHEMA
Processing object type DATABASE_EXPORT/AUDIT_UNIFIED/AUDIT_POLICY_ENABLE
Processing object type DATABASE_EXPORT/POST_SYSTEM_IMPCALLOUT/MARKER
. . exported "SYS"."KU$_USER_MAPPING_VIEW" 6.593 KB 65 rows
. . exported "ORDDATA"."ORDDCM_DOCS" 252.9 KB 9 rows
. . exported "WMSYS"."WM$CONSTRAINTS_TABLE$" 0 KB 0 rows
. . exported "SYS"."AUD$" 0 KB 0 rows
. . exported "WMSYS"."WM$LOCKROWS_INFO$" 0 KB 0 rows
. . exported "WMSYS"."WM$UDTRIG_INFO$" 0 KB 0 rows
. . exported "LBACSYS"."OLS$AUDIT_ACTIONS" 5.757 KB 8 rows
. . exported "LBACSYS"."OLS$DIP_EVENTS" 5.539 KB 2 rows
. . exported "LBACSYS"."OLS$INSTALLATIONS" 6.960 KB 2 rows
. . exported "LBACSYS"."OLS$PROPS" 6.234 KB 5 rows
. . exported "SYS"."DAM_CLEANUP_EVENTS$" 0 KB 0 rows
. . exported "SYS"."DAM_CLEANUP_JOBS$" 0 KB 0 rows
. . exported "SYS"."DAM_CONFIG_PARAM$" 6.531 KB 14 rows
. . exported "SYS"."TSDP_ASSOCIATION$" 0 KB 0 rows
. . exported "SYS"."TSDP_CONDITION$" 0 KB 0 rows
. . exported "SYS"."TSDP_FEATURE_POLICY$" 0 KB 0 rows
. . exported "SYS"."TSDP_PARAMETER$" 5.953 KB 1 rows
. . exported "SYS"."TSDP_POLICY$" 5.921 KB 1 rows
. . exported "SYS"."TSDP_PROTECTION$" 0 KB 0 rows
. . exported "SYS"."TSDP_SENSITIVE_DATA$" 0 KB 0 rows
. . exported "SYS"."TSDP_SENSITIVE_TYPE$" 0 KB 0 rows
. . exported "SYS"."TSDP_SOURCE$" 0 KB 0 rows
. . exported "SYS"."TSDP_SUBPOL$" 6.328 KB 1 rows
. . exported "SYSTEM"."REDO_DB" 25.59 KB 1 rows
. . exported "SYSTEM"."REDO_LOG" 0 KB 0 rows
. . exported "WMSYS"."WM$BATCH_COMPRESSIBLE_TABLES$" 0 KB 0 rows
. . exported "WMSYS"."WM$CONS_COLUMNS$" 0 KB 0 rows
. . exported "WMSYS"."WM$ENV_VARS$" 6.015 KB 3 rows
. . exported "WMSYS"."WM$EVENTS_INFO$" 5.812 KB 12 rows
. . exported "WMSYS"."WM$HINT_TABLE$" 9.453 KB 75 rows
. . exported "WMSYS"."WM$MODIFIED_TABLES$" 0 KB 0 rows
. . exported "WMSYS"."WM$MP_GRAPH_WORKSPACES_TABLE$" 0 KB 0 rows
. . exported "WMSYS"."WM$MP_PARENT_WORKSPACES_TABLE$" 0 KB 0 rows
. . exported "WMSYS"."WM$NESTED_COLUMNS_TABLE$" 0 KB 0 rows
. . exported "WMSYS"."WM$NEXTVER_TABLE$" 6.375 KB 1 rows
. . exported "WMSYS"."WM$REMOVED_WORKSPACES_TABLE$" 0 KB 0 rows
. . exported "WMSYS"."WM$RESOLVE_WORKSPACES_TABLE$" 0 KB 0 rows
. . exported "WMSYS"."WM$RIC_LOCKING_TABLE$" 0 KB 0 rows
. . exported "WMSYS"."WM$RIC_TABLE$" 0 KB 0 rows
. . exported "WMSYS"."WM$RIC_TRIGGERS_TABLE$" 0 KB 0 rows
. . exported "WMSYS"."WM$UDTRIG_DISPATCH_PROCS$" 0 KB 0 rows
. . exported "WMSYS"."WM$VERSION_HIERARCHY_TABLE$" 5.984 KB 1 rows
. . exported "WMSYS"."WM$VERSION_TABLE$" 0 KB 0 rows
. . exported "WMSYS"."WM$VT_ERRORS_TABLE$" 0 KB 0 rows
. . exported "WMSYS"."WM$WORKSPACES_TABLE$" 12.10 KB 1 rows
. . exported "WMSYS"."WM$WORKSPACE_PRIV_TABLE$" 7.054 KB 10 rows
. . exported "WMSYS"."WM$WORKSPACE_SAVEPOINTS_TABLE$" 0 KB 0 rows
. . exported "LBACSYS"."OLS$AUDIT" 0 KB 0 rows
. . exported "LBACSYS"."OLS$COMPARTMENTS" 0 KB 0 rows
. . exported "LBACSYS"."OLS$DIP_DEBUG" 0 KB 0 rows
. . exported "LBACSYS"."OLS$GROUPS" 0 KB 0 rows
. . exported "LBACSYS"."OLS$LAB" 0 KB 0 rows
. . exported "LBACSYS"."OLS$LEVELS" 0 KB 0 rows
. . exported "LBACSYS"."OLS$POL" 0 KB 0 rows
. . exported "LBACSYS"."OLS$POLICY_ADMIN" 0 KB 0 rows
. . exported "LBACSYS"."OLS$POLS" 0 KB 0 rows
. . exported "LBACSYS"."OLS$POLT" 0 KB 0 rows
. . exported "LBACSYS"."OLS$PROFILE" 0 KB 0 rows
. . exported "LBACSYS"."OLS$PROFILES" 0 KB 0 rows
. . exported "LBACSYS"."OLS$PROG" 0 KB 0 rows
. . exported "LBACSYS"."OLS$SESSINFO" 0 KB 0 rows
. . exported "LBACSYS"."OLS$USER" 0 KB 0 rows
. . exported "LBACSYS"."OLS$USER_COMPARTMENTS" 0 KB 0 rows
. . exported "LBACSYS"."OLS$USER_GROUPS" 0 KB 0 rows
. . exported "LBACSYS"."OLS$USER_LEVELS" 0 KB 0 rows
. . exported "SYS"."FGA_LOG$FOR_EXPORT" 0 KB 0 rows
. . exported "SYSTEM"."SCHEDULER_JOB_ARGS" 0 KB 0 rows
. . exported "SYSTEM"."SCHEDULER_PROGRAM_ARGS" 9.515 KB 12 rows
. . exported "SYS"."AUDTAB$TBS$FOR_EXPORT" 5.953 KB 2 rows
. . exported "SYS"."DBA_SENSITIVE_DATA" 0 KB 0 rows
. . exported "SYS"."DBA_TSDP_POLICY_PROTECTION" 0 KB 0 rows
. . exported "SYS"."NACL$_ACE_EXP" 9.929 KB 1 rows
. . exported "SYS"."NACL$_HOST_EXP" 6.914 KB 1 rows
. . exported "SYS"."NACL$_WALLET_EXP" 0 KB 0 rows
. . exported "WMSYS"."WM$EXP_MAP" 7.718 KB 3 rows
. . exported "SYSTEM"."TEST1" 697.0 MB 20895367 rows
. . exported "SYSTEM"."TEST2" 125.6 MB 3805424 rows
. . exported "SYSTEM"."TEST_SPEAKERS" 4.876 MB 121874 rows
. . exported "SYSTEM"."SYS_IMPORT_SCHEMA_01" 3.468 MB 1842 rows
. . exported "SYSTEM"."SYS_IMPORT_SCHEMA_02" 3.467 MB 1842 rows
. . exported "SYSTEM"."SYS_IMPORT_SCHEMA_03" 3.469 MB 1843 rows
. . exported "SYSTEM"."SYS_IMPORT_SCHEMA_04" 3.468 MB 1842 rows
. . exported "SYSTEM"."SYS_IMPORT_SCHEMA_05" 3.468 MB 1842 rows
Master table "SYSTEM"."SYS_EXPORT_FULL_01" successfully loaded/unloaded
Dump file set for SYSTEM.SYS_EXPORT_FULL_01 is:
/u01/app/datafiles/full_tts.dmp
Datafiles required for transportable tablespace DATA:
/export/u11/app/oracle/oradata/orcl/data01.dbf
/export/u11/app/oracle/oradata/orcl/data02.dbf
/export/u11/app/oracle/oradata/orcl/data03.dbf
/export/u11/app/oracle/oradata/orcl/data04.dbf
/export/u11/app/oracle/oradata/orcl/data05.dbf
/export/u11/app/oracle/oradata/orcl/data06.dbf
/export/u11/app/oracle/oradata/orcl/data07.dbf
/export/u11/app/oracle/oradata/orcl/data08.dbf
/export/u11/app/oracle/oradata/orcl/data09.dbf
/export/u11/app/oracle/oradata/orcl/data10.dbf
/export/u11/app/oracle/oradata/orcl/data11.dbf
/export/u11/app/oracle/oradata/orcl/data12.dbf
/export/u11/app/oracle/oradata/orcl/data13.dbf
/export/u11/app/oracle/oradata/orcl/data14.dbf
/export/u11/app/oracle/oradata/orcl/data15.dbf
Datafiles required for transportable tablespace USERS:
/export/u10/app/oracle/oradata/orcl/users01.dbf
Job "SYSTEM"."SYS_EXPORT_FULL_01" successfully completed at Tue Sep 27 09:51:37 2022 elapsed 0 00:15:40
Here is the command that fixed my issue.
GRANT UNLIMITED TABLESPACE TO PUBLIC;
It is my understanding that this gives permissions to all users and allowed me to skip creating a script for this.
Be warned granted unlimited tablespace can have adverse effects!
Related
I have a set of 5 tables that have 2 millions rows and 450 columns approximately
My job look like this :
tDBInput 1 ---tMap-----
tDBInput 1 ---tMap-----
tDBInput 1 ---tMap---tUnite---tDBOutput
tDBInput 1 ---tMap-----
tDBInput 1 ---tMap-----
It's my 5 tables tables that I'm trying to union, with the tMap where I'm adding an Id to trace which table date come from + reduce number of columns (from 450 to 20)
Then I unite the 5 in one tUnite that load a table in Truncate - Insert mode
I'm trying to make it work but always have the same error which is "The code of method tDBInput-10Process is exceeding the 65535 bytes limit"
If you use only 20 of 450 columns, you could select only those columns in each of your tDBInput, instead of extracting all columns and filtering them in tMap.
I'm trying to import oracle 11g DB dump file into my new 18c XE by following these instructions:
To import data in your 18c XE database, perform the following steps:
Connect to the 18c XE database as user SYS using the SYSDBA privilege.
Create directory object DUMP_DIR and grant READ and WRITE privileges on the directory to the SYSTEM user.
sqlplus / AS SYSDBA
SQL> ALTER SESSION SET CONTAINER=XEPDB1;
SQL> CREATE DIRECTORY DUMP_DIR AS '\dump_folder';
SQL> GRANT READ, WRITE ON DIRECTORY DUMP_DIR TO SYSTEM;
Import data to the 18c XE database from the dump folder.
impdp system/system_password#localhost:listnerport/xepdb1 full=Y EXCLUDE=SCHEMA:\"LIKE \'APEX_%\'\",SCHEMA:\"LIKE \'FLOWS_%\'\" directory=DUMP_DIR dumpfile=DB11G.dmp logfile=impdpDB11G.log
and I'm getting the following response witch looks like success:
but when I connect to xepdb1, I find that REPORTS schema and users are not imported, non of the data are loaded
am I missing something?
update 1: The full text log
;;;
Import: Release 18.0.0.0.0 - Production on Tue Jun 23 11:26:23 2020
Version 18.4.0.0.0
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
;;;
Connected to: Oracle Database 18c Express Edition Release 18.0.0.0.0 - Production
Master table "SYSTEM"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
Starting "SYSTEM"."SYS_IMPORT_FULL_01": system/********#localhost:1521/xepdb1 full=Y EXCLUDE=SCHEMA:"LIKE \'APEX_%\'",SCHEMA:"LIKE \'FLOWS_%\'" directory=DUMP1_DIR dumpfile=DATABASE2.dmp logfile=DATABASE2.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/TYPE/TYPE_SPEC
Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE
Processing object type SCHEMA_EXPORT/TABLE/TABLE
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
. . imported "REPORTS"."TV_REPORTS" 14.14 KB 13 rows
. . imported "REPORTS"."DEMO_PRODUCT_INFO" 25.38 KB 10 rows
. . imported "REPORTS"."EBA_DP_DATA_SOURCES" 11.34 KB 2 rows
. . imported "REPORTS"."Y_AUDIT" 17.78 KB 78 rows
. . imported "REPORTS"."A7BAR1" 9.648 KB 184 rows
. . imported "REPORTS"."A7BAR_TEST" 8.656 KB 86 rows
. . imported "REPORTS"."CENTER" 5.5 KB 5 rows
. . imported "REPORTS"."CONSTRAINT_LOOKUP" 5.515 KB 1 rows
. . imported "REPORTS"."DEMO_CONSTRAINT_LOOKUP" 5.679 KB 4 rows
. . imported "REPORTS"."DEMO_CUSTOMERS" 11.01 KB 7 rows
. . imported "REPORTS"."DEMO_ORDERS" 7.367 KB 10 rows
. . imported "REPORTS"."DEMO_ORDER_ITEMS" 7.734 KB 49 rows
. . imported "REPORTS"."DEMO_STATES" 6.242 KB 51 rows
. . imported "REPORTS"."DEMO_TAGS" 8.25 KB 6 rows
. . imported "REPORTS"."DEMO_TAGS_SUM" 5.476 KB 3 rows
. . imported "REPORTS"."DEMO_TAGS_TYPE_SUM" 5.906 KB 3 rows
. . imported "REPORTS"."DEPT" 5.937 KB 4 rows
. . imported "REPORTS"."DISTENY_REPORT" 5.414 KB 1 rows
. . imported "REPORTS"."EBA_DP_ACCESS_LEVELS" 5.468 KB 3 rows
. . imported "REPORTS"."EBA_DP_CATEGORIES" 8.359 KB 1 rows
. . imported "REPORTS"."EBA_DP_DATASRC_TYPES" 8.492 KB 2 rows
. . imported "REPORTS"."EBA_DP_DEMO_PROJECTS" 17.32 KB 73 rows
. . imported "REPORTS"."EBA_DP_DEMO_TABLE" 14.75 KB 121 rows
. . imported "REPORTS"."EBA_DP_ERROR_LOOKUP" 5.882 KB 1 rows
. . imported "REPORTS"."EBA_DP_FORMAT_MASKS" 6.875 KB 25 rows
. . imported "REPORTS"."EBA_DP_PREFERENCES" 8.101 KB 10 rows
. . imported "REPORTS"."EBA_DP_RESERVED_NAMES" 7.562 KB 1 rows
. . imported "REPORTS"."EBA_DP_RPT_TYPES" 10.28 KB 5 rows
. . imported "REPORTS"."EBA_DP_TAGS" 8.382 KB 8 rows
. . imported "REPORTS"."EBA_DP_TAGS_SUM" 5.5 KB 6 rows
. . imported "REPORTS"."EBA_DP_TAGS_TYPE_SUM" 5.968 KB 6 rows
. . imported "REPORTS"."EBA_DP_USERS" 8.328 KB 1 rows
. . imported "REPORTS"."EBA_DP_WHITELIST_OBJECTS" 8.484 KB 2 rows
. . imported "REPORTS"."EBA_DP_WIDGET_TYPES" 15.90 KB 4 rows
. . imported "REPORTS"."EMP" 8.570 KB 14 rows
. . imported "REPORTS"."EMPLOYEE" 7.914 KB 3 rows
. . imported "REPORTS"."GUEST" 6.765 KB 5 rows
. . imported "REPORTS"."JOB_TITLE" 5.476 KB 3 rows
. . imported "REPORTS"."REPORTEMPLOYEELINK" 5.859 KB 3 rows
. . imported "REPORTS"."REPORTEVAL" 5.976 KB 6 rows
. . imported "REPORTS"."REPORT_GUESTLINK" 5.453 KB 3 rows
. . imported "REPORTS"."REPORT_SHOW" 5.851 KB 2 rows
. . imported "REPORTS"."REPORT_TAPELINK" 5.875 KB 4 rows
. . imported "REPORTS"."REPORT_TYPE" 5.421 KB 1 rows
. . imported "REPORTS"."R_ORGANIZATION" 6.367 KB 4 rows
. . imported "REPORTS"."TAPETYPE" 5.421 KB 2 rows
. . imported "REPORTS"."TAPE_INFO" 5.843 KB 3 rows
. . imported "REPORTS"."TVPROGRAM" 5.882 KB 3 rows
. . imported "REPORTS"."USERS_YARA" 6.257 KB 2 rows
. . imported "REPORTS"."APEX$_ACL" 0 KB 0 rows
. . imported "REPORTS"."APEX$_WS_FILES" 0 KB 0 rows
. . imported "REPORTS"."APEX$_WS_HISTORY" 0 KB 0 rows
. . imported "REPORTS"."APEX$_WS_LINKS" 0 KB 0 rows
. . imported "REPORTS"."APEX$_WS_NOTES" 0 KB 0 rows
. . imported "REPORTS"."APEX$_WS_ROWS" 0 KB 0 rows
. . imported "REPORTS"."APEX$_WS_TAGS" 0 KB 0 rows
. . imported "REPORTS"."APEX$_WS_WEBPG_SECTIONS" 0 KB 0 rows
. . imported "REPORTS"."APEX$_WS_WEBPG_SECTION_HISTORY" 0 KB 0 rows
. . imported "REPORTS"."EBA_DP_CALENDARS" 0 KB 0 rows
. . imported "REPORTS"."EBA_DP_DATA_SOURCE_PERMS" 0 KB 0 rows
. . imported "REPORTS"."EBA_DP_ERRORS" 0 KB 0 rows
. . imported "REPORTS"."EBA_DP_FAVORITES" 0 KB 0 rows
. . imported "REPORTS"."EBA_DP_FILES" 0 KB 0 rows
. . imported "REPORTS"."EBA_DP_FILTER_REPORT" 0 KB 0 rows
. . imported "REPORTS"."EBA_DP_FILTER_RPT_FILTERS" 0 KB 0 rows
. . imported "REPORTS"."EBA_DP_HISTORY" 0 KB 0 rows
. . imported "REPORTS"."EBA_DP_INVOCATIONS" 0 KB 0 rows
. . imported "REPORTS"."EBA_DP_NOTES" 0 KB 0 rows
. . imported "REPORTS"."EBA_DP_NOTIFICATIONS" 0 KB 0 rows
. . imported "REPORTS"."EBA_DP_PDF_RPT" 0 KB 0 rows
. . imported "REPORTS"."EBA_DP_PDF_RPT_SRC" 0 KB 0 rows
. . imported "REPORTS"."EBA_DP_PDF_RPT_SRC_COLS" 0 KB 0 rows
. . imported "REPORTS"."EBA_DP_REPORTS" 0 KB 0 rows
. . imported "REPORTS"."EBA_DP_REPORT_PERMS" 0 KB 0 rows
. . imported "REPORTS"."EBA_DP_REPORT_VALIDATIONS" 0 KB 0 rows
. . imported "REPORTS"."EBA_DP_RPT_VAL_DEPENDENCYS" 0 KB 0 rows
. . imported "REPORTS"."EBA_DP_USER_PREF" 0 KB 0 rows
. . imported "REPORTS"."EBA_DP_VIEWERS" 0 KB 0 rows
. . imported "REPORTS"."EBA_DP_VIEWER_GROUPS" 0 KB 0 rows
. . imported "REPORTS"."EBA_DP_VIEWER_GROUP_REF" 0 KB 0 rows
. . imported "REPORTS"."EBA_DP_WIDGETS" 0 KB 0 rows
. . imported "REPORTS"."REPORT_ORGALINK" 0 KB 0 rows
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/TABLE/COMMENT
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/CONSTRAINT/REF_CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/TRIGGER
Processing object type SCHEMA_EXPORT/TABLE/INDEX/FUNCTIONAL_AND_BITMAP/INDEX
Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/FUNCTIONAL_AND_BITMAP/INDEX_STATISTICS
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Processing object type SCHEMA_EXPORT/POST_SCHEMA/PROCOBJ
Job "SYSTEM"."SYS_IMPORT_FULL_01" successfully completed at Tue Jun 23 11:27:00 2020 elapsed 0 00:00:29
To check imported data in a pluggable database, you need to be connected to the target pluggable database with:
alter session set container=<pdb>;
I have ORC files stored in different folders on HDFS as follows:
/DATA/UNIVERSITY/DEPT/STUDENT/part-00000.orc
/DATA/UNIVERSITY/DEPT/CREDIT/part-00000.orc
I do not know how many columns are present in each of those tables (STUDENT, CREDIT, etc). Is there a way to get the schemas from these files? I'm looking for obtaining columns names and their data types so that I could write CREATE statements for Hive EXTERNAL tables.
Hive orc dump command will solve your purpose
hive --orcfiledump /DATA/UNIVERSITY/DEPT/STUDENT/part-00000
you will get column, their types, Min, Max values,count or records and other many more stats as shown below
Rows: 6 .
Compression: ZLIB .
Compression size: 262144 .
Type: struct<_col0:string,_col1:string> .
Stripe Statistics:
Stripe 1:
Column 0: count: 6 .
Column 1: count: 6 min: abc max: mno sum: 17 .
Column 2: count: 6 min: def max: tre sum: 18 .
File Statistics:
Column 0: count: 6 .
Column 1: count: 6 min: abc max: mno sum: 17 .
Column 2: count: 6 min: def max: tre sum: 18 .
Stripes:
Stripe: offset: 3 data: 58 rows: 6 tail: 49 index: 67 .
Stream: column 0 section ROW_INDEX start: 3 length 9 .
Stream: column 1 section ROW_INDEX start: 12 length 29 .
Stream: column 2 section ROW_INDEX start: 41 length 29 .
Stream: column 1 section DATA start: 70 length 20 .
Stream: column 1 section LENGTH start: 90 length 12 .
Stream: column 2 section DATA start: 102 length 21 .
Stream: column 2 section LENGTH start: 123 length 5 .
Encoding column 0: DIRECT .
Encoding column 1: DIRECT_V2 .
Encoding column 2: DIRECT_V2 .
Found a way to get the details (column names, data types) I wanted via Spark
data = sqlContext.sql("SELECT * FROM orc.`<HDFS_path>`");
data.printSchema()
This will print the output in below format, which is exaclty the information I want to extract from the ORC files on HDFS:
root
|-- <column_name1>: <datatype> (nullable = <true/false>)
|-- <column_name2>: <datatype> (nullable = <true/false>)
|-- <column_name3>: <datatype> (nullable = <true/false>)
|-- <column_name4>: <datatype> (nullable = <true/false>)
|-- <column_name5>: <datatype> (nullable = <true/false>)
/DATA/UNIVERSITY/DEPT/STUDENT/part-00000.orc
you can create data frame using this file.
val df=spark.read.option("header","true").orc("/DATA/UNIVERSITY/DEPT/STUDENT/part-00000.orc")
df.printSchema()
I'm running the following command to export the schema and data of all the tables/views of schema dbname:
expdp dbname/pwd DIRECTORY=backups DUMPFILE=data-2019-7-10.dmp
LOGFILE=export.log SCHEMAS=dbname
Problem is that one of the tables is called ACTIVITY_LOG and it is ignored by the export (I don't see the table in the output list). What could be the reason?
UPDATE
I can see the ACTIVITY_LOG table in SQL developer:
But in the dump log it's not in the list:
;;;
Export: Release 18.0.0.0.0 - Production on Wed Jul 10 10:26:06 2019
Version 18.4.0.0.0
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
;;;
Connected to: Oracle Database 18c Express Edition Release 18.0.0.0.0 - Production
Starting "BK0001PRODCONFIG"."SYS_EXPORT_SCHEMA_01": BK0001PRODCONFIG/******** DIRECTORY=backups DUMPFILE=config-data-2019-7-10.dmp LOGFILE=config_export.log SCHEMAS=BK0001PRODCONFIG
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Processing object type SCHEMA_EXPORT/STATISTICS/MARKER
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/COMMENT
Processing object type SCHEMA_EXPORT/TABLE/IDENTITY_COLUMN
Processing object type SCHEMA_EXPORT/VIEW/VIEW
Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
. . exported "BK0001PRODCONFIG"."FORMULA_FUNCTIONS" 87.08 KB 1139 rows
. . exported "BK0001PRODCONFIG"."BI_CHARTS" 43.60 KB 2 rows
. . exported "BK0001PRODCONFIG"."VALUE_ITEMS" 31.18 KB 21 rows
. . exported "BK0001PRODCONFIG"."TABLES" 28.71 KB 14 rows
. . exported "BK0001PRODCONFIG"."EXPORTS" 27.45 KB 6 rows
. . exported "BK0001PRODCONFIG"."BI_MAPS" 23.57 KB 6 rows
. . exported "BK0001PRODCONFIG"."SYSTEM_LOG" 0 KB 0 rows
. . exported "BK0001PRODCONFIG"."TABLE_COLUMNS" 18.25 KB 39 rows
. . exported "BK0001PRODCONFIG"."OLAP_QUERIES" 18.53 KB 1 rows
. . exported "BK0001PRODCONFIG"."BI_SNAPSHOTS" 182.7 KB 3 rows
. . exported "BK0001PRODCONFIG"."FORMULAS" 16.82 KB 6 rows
. . exported "BK0001PRODCONFIG"."FILE_REST_PROPERTIES" 16.17 KB 8 rows
. . exported "BK0001PRODCONFIG"."VALUES2" 14.46 KB 3 rows
. . exported "BK0001PRODCONFIG"."USERS" 13.77 KB 4 rows
. . exported "BK0001PRODCONFIG"."PALETTES" 13.07 KB 4 rows
. . exported "BK0001PRODCONFIG"."EXPORT_COLUMNS" 12.93 KB 52 rows
. . exported "BK0001PRODCONFIG"."STT_FEATURE_DATASETS" 12.56 KB 18 rows
. . exported "BK0001PRODCONFIG"."BI_CHART_COORDS" 12.19 KB 5 rows
. . exported "BK0001PRODCONFIG"."META_COLUMNS" 11.85 KB 87 rows
. . exported "BK0001PRODCONFIG"."SQL_QUERIES" 11.59 KB 15 rows
. . exported "BK0001PRODCONFIG"."QB_FILTERS" 11.64 KB 2 rows
. . exported "BK0001PRODCONFIG"."DS_VARS" 11.50 KB 22 rows
. . exported "BK0001PRODCONFIG"."DASH_ELEMENTS" 11.68 KB 1 rows
. . exported "BK0001PRODCONFIG"."ADDITIONAL_DATA_COLUMNS" 11.24 KB 14 rows
. . exported "BK0001PRODCONFIG"."QUERY_BUILDERS" 10.60 KB 2 rows
. . exported "BK0001PRODCONFIG"."BI_CHART_COLUMNS" 10.62 KB 13 rows
. . exported "BK0001PRODCONFIG"."BI_MAP_ITEMS" 10.50 KB 28 rows
. . exported "BK0001PRODCONFIG"."VISUAL_VALUES" 10.18 KB 80 rows
. . exported "BK0001PRODCONFIG"."ADDITIONAL_DATA_TABLES" 9.625 KB 8 rows
. . exported "BK0001PRODCONFIG"."BI_CHART_ADV_OPTIONS" 8.656 KB 44 rows
. . exported "BK0001PRODCONFIG"."STT_LIABILITIES" 8.820 KB 1 rows
. . exported "BK0001PRODCONFIG"."PERMISSIONS" 8.812 KB 42 rows
. . exported "BK0001PRODCONFIG"."USER_ROLE_PERMISSIONS" 9.007 KB 113 rows
. . exported "BK0001PRODCONFIG"."STT_ASSETS" 8.812 KB 1 rows
. . exported "BK0001PRODCONFIG"."FILE_FIELD_PATHS" 8.617 KB 12 rows
. . exported "BK0001PRODCONFIG"."ANALYSIS" 8.460 KB 7 rows
. . exported "BK0001PRODCONFIG"."VISUAL_DSS" 8.593 KB 32 rows
. . exported "BK0001PRODCONFIG"."STT_FEATURES" 8.460 KB 3 rows
. . exported "BK0001PRODCONFIG"."STT_MODELS" 8.296 KB 1 rows
. . exported "BK0001PRODCONFIG"."USER_ROLES" 8.046 KB 4 rows
. . exported "BK0001PRODCONFIG"."ADDITIONAL_DATA_GROUPS" 7.992 KB 5 rows
. . exported "BK0001PRODCONFIG"."QB_COLUMNS" 8.046 KB 8 rows
. . exported "BK0001PRODCONFIG"."META_TABLES" 7.960 KB 5 rows
. . exported "BK0001PRODCONFIG"."QB_TABLES" 7.523 KB 4 rows
. . exported "BK0001PRODCONFIG"."STT_ASSET_COLUMNS" 7.492 KB 3 rows
. . exported "BK0001PRODCONFIG"."STT_LIABILITY_COLUMNS" 7.5 KB 3 rows
. . exported "BK0001PRODCONFIG"."QB_LINKS" 7.5 KB 2 rows
. . exported "BK0001PRODCONFIG"."EMAIL_SELECTION" 7.218 KB 7 rows
. . exported "BK0001PRODCONFIG"."SYSTEM_TASKS" 6.968 KB 1 rows
. . exported "BK0001PRODCONFIG"."TAG_SELECTION" 6.703 KB 9 rows
. . exported "BK0001PRODCONFIG"."META_FOLDERS" 6.539 KB 5 rows
. . exported "BK0001PRODCONFIG"."STT_FEATURE_GROUPS" 6.531 KB 4 rows
. . exported "BK0001PRODCONFIG"."TAGS" 6.437 KB 10 rows
. . exported "BK0001PRODCONFIG"."BI_CHART_OPTIONS" 6.539 KB 3 rows
. . exported "BK0001PRODCONFIG"."FOLDER_PROPERTIES" 6.414 KB 1 rows
. . exported "BK0001PRODCONFIG"."BI_MAP_OPTIONS" 6.492 KB 1 rows
. . exported "BK0001PRODCONFIG"."BI_MAP_ADV_OPTIONS" 6.085 KB 10 rows
. . exported "BK0001PRODCONFIG"."DASHBOARDS" 6.062 KB 2 rows
. . exported "BK0001PRODCONFIG"."EMAIL_ADDRESSES" 5.601 KB 3 rows
. . exported "BK0001PRODCONFIG"."META_IND_COL_NOTES" 5.585 KB 1 rows
. . exported "BK0001PRODCONFIG"."META_IND_TABLE_NOTES" 5.585 KB 1 rows
. . exported "BK0001PRODCONFIG"."EMAILS" 0 KB 0 rows
. . exported "BK0001PRODCONFIG"."OLAP_DIMENSIONS" 0 KB 0 rows
. . exported "BK0001PRODCONFIG"."OLAP_LEVELS" 0 KB 0 rows
. . exported "BK0001PRODCONFIG"."REPORTS" 0 KB 0 rows
Master table "BK0001PRODCONFIG"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
******************************************************************************
Dump file set for BK0001PRODCONFIG.SYS_EXPORT_SCHEMA_01 is:
D:\BACKUPS\DATA\CONFIG-DATA-2019-7-10.DMP
Job "BK0001PRODCONFIG"."SYS_EXPORT_SCHEMA_01" successfully completed at Wed Jul 10 10:26:55 2019 elapsed 0 00:00:49
I'm trying to import an oracle dump while remapping schema and tablespace:
impdp usr/pass \
EXCLUDE=table_statistics \
DIRECTORY=EXPDP \
REMAP_SCHEMA=ORG_USR:NEW_USR \
REMAP_TABLESPACE=ORG_TS:NEW_TS \
DUMPFILE=FILE.dmp \
PARALLEL=2 \
LOGFILE=FILE.imp.log
The job imports all tables and then starts processing object types:
Import: Release 12.1.0.2.0 - Production on Thu Aug 17 11:13:06 2017
[ ... the import remaps correct ]
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
. . imported "NEW_USR"."SOMETABLE" 112.4 MB 1402414 rows
. . imported "NEW_USR"."SOMEOTHERTABLE" 235.9 MB 955249 rows
. . imported "NEW_USR"."SOMETABLE3" 86.91 MB 440513 rows
[... everything works until ...]
Processing object type SCHEMA_EXPORT/TABLE/TRIGGER
Processing object type SCHEMA_EXPORT/STATISTICS/MARKER
Processing object type SCHEMA_EXPORT/TABLE/POST_TABLE_ACTION
ORA-39083: Object type POST_TABLE_ACTION failed to create with error:
ORA-01435: user does not exist
Failing sql is:
BEGIN
SYS.DBMS_SNAPSHOT_UTL.SYNC_UP_LOG('ORG_USR','TABLEA');
END;
ORA-39083: Object type POST_TABLE_ACTION failed to create with error:
ORA-01435: user does not exist
Failing sql is:
BEGIN
SYS.DBMS_SNAPSHOT_UTL.SYNC_UP_LOG('ORG_USR','TABLEB');
END;
ORA-39083: Object type POST_TABLE_ACTION failed to create with error:
ORA-01435: user does not exist
Failing sql is:
BEGIN
SYS.DBMS_SNAPSHOT_UTL.SYNC_UP_LOG('ORG_USR','TABLEC');
END;
Processing object type SCHEMA_EXPORT/MATERIALIZED_VIEW
Processing object type SCHEMA_EXPORT/TABLE/MATERIALIZED_VIEW_LOG
Job "SYSTEM"."SYS_IMPORT_FULL_01" completed with 3 error(s) at Thu Aug 17 11:19:02 2017 elapsed 0 00:05:56
I did specify REMAP_SCHEMA and REMAP_TABLESPACE, and the import runs mostly correct.
BUT at the end part trying Processing object type SCHEMA_EXPORT/TABLE/POST_TABLE_ACTION it somehow fails using the OLD User.
Can someone tell me what ist going wrong and how to fix it?
The soulution was to import excluding post_table_action and execute the statements manually after altering the schemaname to the correct value:
impdp usr/pass \
EXCLUDE=post_table_action \
DIRECTORY=EXPDP \
REMAP_SCHEMA=ORG_USR:NEW_USR \
REMAP_TABLESPACE=ORG_TS:NEW_TS \
DUMPFILE=FILE.dmp \
PARALLEL=2 \
LOGFILE=FILE.imp.log
and
BEGIN
SYS.DBMS_SNAPSHOT_UTL.SYNC_UP_LOG('ORG_USR','TABLEA');
END;
BEGIN
SYS.DBMS_SNAPSHOT_UTL.SYNC_UP_LOG('ORG_USR','TABLEB');
END;
BEGIN
SYS.DBMS_SNAPSHOT_UTL.SYNC_UP_LOG('ORG_USR','TABLEC');
END;