oracle不同版本匯入
oracle資料庫不同系統版本匯入
1問題
時間:20180620
伺服器10.206.1.24出現問題
伺服器系統 windows—server2008
資料庫版本Oracle Database 10g Enterprise EditionRelease 10.2.0.3.0 – Prod
需要恢復的表 系統 XX_XXXX_20180616.DMP
2 恢復到linux系統
恢復到系統10.206.1.96
系統
CentOS release 6.5 (Final) oracle資料庫版本 SQL> select * from v$version; BANNER -------------------------------------------------------------------------------- Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production PL/SQL Release 11.2.0.4.0 - Production CORE 11.2.0.4.0 Production TNS for Linux: Version 11.2.0.4.0 - Production NLSRTL Version 11.2.0.4.0 - Production
|
主要步驟
[[email protected] ~]# su - oracle [[email protected] ~]$ sqlplus / as sysdba SQL> show user; USER is "SYS" SQL> set lin 10000 SQL> select * from dba_directories;---檢視系統備份檔案是否存在 SQL> CREATE USER zat IDENTIFIED BY 123456;---建立備份檔案賬戶
User created.
SQL> GRANT connect,dba to zat;----授予許可權
Grant succeeded. SQL>select * from dba_directories;
OWNER DIRECTORY_NAME DIRECTORY_PATH ------------------------------ - SYS DMP /home/backup
SQL> create directory dmp as '/home/backup';--不存在就建立 ‘’裡面是資料夾路徑,備份檔案所在資料夾 SQL> grant read,write on directory dmp to zat; --授予資料夾許可權
Grant succeeded.
SQL> select username, default_tablespace from dba_users ;---檢視所屬賬戶所用表空間
SQL> alter tablespace USERS rename to DY;--匯入表空間不一致倒入不了
Tablespace altered.
SQL> alter tablespace DY rename to USERS;匯入後表空間更改回來
Tablespace altered.
SQL> select username, default_tablespace from dba_users ;
|
linux指令碼檢視並修改:此檔案即相關資料備份dmp檔案的許可權及所有使用者組對應oracle和oinstall 要有執行許可權
[[email protected] backup]$ cat imp.sh #/home/ backup #!/bin/bash ORACLE_HOME=/home/app/oracle/product/db#oracle軟體目錄 ORACLE_SID=orcl #服務名 export ORACLE_HOME PATH ORACLE_SID DD=`date +%Y%m%d` export NLS_LANG=AMERICAN_AMERICA.AL32UTF8 impdp zat/123456 directory=dmp dumpfile=XX_XXXX_20180616.DMP logfile=zats_$DD.log 切換oracle使用者到目錄下面去執行imp.sh檔案
|
報錯處理
[[email protected] backup]# head -100 clportals_20180621.log ;;; Import: Release 11.2.0.4.0 - Production on Thu Jun 21 20:47:50 2018
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. ;;; Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options Master table "CLPORTALS"."SYS_IMPORT_FULL_01" successfully loaded/unloaded Starting "CLPORTALS"."SYS_IMPORT_FULL_01": clportals/******** directory=dmp dumpfile=XX_XXXX_20180616.DMP logfile=clportals_20180621.log Processing object type SCHEMA_EXPORT/USER ORA-39083: Object type USER failed to create with error: ORA-00959: tablespace 'DY' does not exist Failing sql is: CREATE USER "XX_XXXX" IDENTIFIED BY VALUES '0E1EB8CB9918542F' DEFAULT TABLESPACE "DY" TEMPORARY TABLESPACE "TEMP" Processing object type SCHEMA_EXPORT/SYSTEM_GRANT ORA-39083: Object type SYSTEM_GRANT failed to create with error: ORA-01917: user or role 'XX_XXXX' does not exist
|
建立檔案空間
日誌
[[email protected] backup]# head zats_20180621.log ;;; Import: Release 11.2.0.4.0 - Production on Thu Jun 21 21:02:52 2018
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. ;;; Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options Master table "ZAT"."SYS_IMPORT_FULL_01" successfully loaded/unloaded Starting "ZAT"."SYS_IMPORT_FULL_01": zat/******** directory=dmp dumpfile=XX_XXXX_20180616.DMP logfile=zats_20180621.log Processing object type SCHEMA_EXPORT/USER
|
[[email protected] backup]# cat zats_20180621.log ;;; Import: Release 11.2.0.4.0 - Production on Thu Jun 21 21:02:52 2018
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. ;;; Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options Master table "ZAT"."SYS_IMPORT_FULL_01" successfully loaded/unloaded Starting "ZAT"."SYS_IMPORT_FULL_01": zat/******** directory=dmp dumpfile=XX_XXXX_20180616.DMP logfile=zats_20180621.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/DB_LINK Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE Processing object type SCHEMA_EXPORT/TABLE/TABLE Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA . . imported "XX_XXXX"."CORP_TOTAL" 13.88 MB 186154 rows . . imported "XX_XXXX"."SYS_LOG" 1.830 MB 2001 rows . . imported "XX_XXXX"."PUB_EDUCATE" 2.153 MB 216 rows . . imported "XX_XXXX"."SYS_USER" 318.6 KB 2588 rows . . imported "XX_XXXX"."SYS_OFFICE" 315.3 KB 2737 rows . . imported "XX_XXXX"."FLOW_ROLE_USERS" 125.7 KB 15 rows . . imported "XX_XXXX"."SYS_AREA" 199.1 KB 1194 rows . . imported "XX_XXXX"."SYS_MENU" 140.0 KB 300 rows . . imported "XX_XXXX"."EFF_SUPERVISION" 13.79 KB 4 rows . . imported "XX_XXXX"."FLOW_INSTENCE" 11.96 KB 3 rows . . imported "XX_XXXX"."FLOW_MODEL" 8.796 KB 2 rows . . imported "XX_XXXX"."FLOW_NODE_MODEL" 12.89 KB 32 rows . . imported "XX_XXXX"."FLOW_OPRT_MODULE" 8.929 KB 3 rows . . imported "XX_XXXX"."FLOW_OPRT_TYPE" 9.070 KB 1 rows . . imported "XX_XXXX"."FLOW_ROLE" 7.914 KB 15 rows . . imported "XX_XXXX"."OA_OFFICE" 10.42 KB 84 rows . . imported "XX_XXXX"."PUB_IMAGE_MANAGEMENT" 9.765 KB 21 rows . . imported "XX_XXXX"."SYS_ATTACH" 17.17 KB 33 rows . . imported "XX_XXXX"."SYS_DICT" 41.33 KB 383 rows . . imported "XX_XXXX"."SYS_ROLE" 8.312 KB 6 rows . . imported "XX_XXXX"."SYS_ROLE_MENU" 11.61 KB 175 rows . . imported "XX_XXXX"."SYS_USER_OFOUTSIDE" 36.89 KB 592 rows . . imported "XX_XXXX"."SYS_USER_ROLE" 34.42 KB 2580 rows . . imported "XX_XXXX"."SYS_WARNING" 9.726 KB 1 rows . . imported "XX_XXXX"."TROUBLE_CLUES" 49.46 KB 3 rows . . imported "XX_XXXX"."ALARM_RECORDS" 0 KB 0 rows . . imported "XX_XXXX"."EXAMPLE_TEST" 0 KB 0 rows . . imported "XX_XXXX"."FLOWACCREDIT" 0 KB 0 rows . . imported "XX_XXXX"."FLOWACCREDITDETAILS" 0 KB 0 rows . . imported "XX_XXXX"."FLOW_BASIC_EXAMPLE" 0 KB 0 rows . . imported "XX_XXXX"."FLOW_NODE_INSTENCE" 0 KB 0 rows . . imported "XX_XXXX"."FLOW_NODE_INSTENCE_NEW" 0 KB 0 rows . . imported "XX_XXXX"."FLOW_NODE_INSTENCE_PIC" 0 KB 0 rows . . imported "XX_XXXX"."FLOW_OPRT_BILL" 0 KB 0 rows . . imported "XX_XXXX"."FLOW_ROLE_USERS_MANAGE" 0 KB 0 rows . . imported "XX_XXXX"."FOUR_BUILD_DEMAND_REPORT" 0 KB 0 rows . . imported "XX_XXXX"."FOUR_BUILD_DETAIL_REPORT" 0 KB 0 rows . . imported "XX_XXXX"."FOUR_BUILD_EQUIPMENT" 0 KB 0 rows . . imported "XX_XXXX"."FOUR_BUILD_TYPE" 0 KB 0 rows . . imported "XX_XXXX"."GROUP_HONOR" 0 KB 0 rows . . imported "XX_XXXX"."INS_BUILDING" 0 KB 0 rows . . imported "XX_XXXX"."LABOUR_ANNUAL_REPORT" 0 KB 0 rows . . imported "XX_XXXX"."LABOUR_BUILD_ACT" 0 KB 0 rows . . imported "XX_XXXX"."LABOUR_FEE_COLLECT" 0 KB 0 rows . . imported "XX_XXXX"."LABOUR_FEE_LIST" 0 KB 0 rows . . imported "XX_XXXX"."LABOUR_QUESTIONNAIRE" 0 KB 0 rows . . imported "XX_XXXX"."LABOUR_UNION_FUNDS" 0 KB 0 rows . . imported "XX_XXXX"."MEMBER_METTING_REGISTER" 0 KB 0 rows . . imported "XX_XXXX"."MESSAGE_SMS_INTF" 0 KB 0 rows . . imported "XX_XXXX"."MESSAGE_SMS_RECEIVER" 0 KB 0 rows . . imported "XX_XXXX"."MESSAGE_SMS_RECORDS" 0 KB 0 rows . . imported "XX_XXXX"."MESSAGE_SMS_SAMPLE" 0 KB 0 rows . . imported "XX_XXXX"."MESSAGE_SMS_TARIFF" 0 KB 0 rows . . imported "XX_XXXX"."NOTICE_RECEIVER" 0 KB 0 rows . . imported "XX_XXXX"."NOTICE_RECORDS" 0 KB 0 rows . . imported "XX_XXXX"."NOTICE_SAMPLE" 0 KB 0 rows . . imported "XX_XXXX"."ORG_LABOUR" 0 KB 0 rows . . imported "XX_XXXX"."ORG_PARTY" 0 KB 0 rows . . imported "XX_XXXX"."PARTY_BUILD_ACT" 0 KB 0 rows . . imported "XX_XXXX"."PARTY_CENTR_GROUP" 0 KB 0 rows . . imported "XX_XXXX"."PARTY_FEE" 0 KB 0 rows . . imported "XX_XXXX"."PARTY_FEE_COLLECT" 0 KB 0 rows . . imported "XX_XXXX"."PARTY_FEE_LIST" 0 KB 0 rows . . imported "XX_XXXX"."PSN_HONOR" 0 KB 0 rows . . imported "XX_XXXX"."PSN_HR_INFO" 0 KB 0 rows . . imported "XX_XXXX"."PSN_INFO_SIGN" 0 KB 0 rows . . imported "XX_XXXX"."PSN_PARTY_INFO" 0 KB 0 rows . . imported "XX_XXXX"."PSN_WARN" 0 KB 0 rows . . imported "XX_XXXX"."PSN_WORK" 0 KB 0 rows . . imported "XX_XXXX"."SYS_ROLE_OFFICE" 0 KB 0 rows . . imported "XX_XXXX"."ZDH_COLSE_METTING_EXECUTE" 0 KB 0 rows . . imported "XX_XXXX"."ZDH_GROUP_SURVEY" 0 KB 0 rows . . imported "XX_XXXX"."ZDH_PROPOSAL_MANAGER" 0 KB 0 rows . . imported "XX_XXXX"."ZDH_STAFF_REGISTER" 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/PROCEDURE/PROCEDURE Processing object type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDURE Processing object type SCHEMA_EXPORT/VIEW/VIEW Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
|
Job"ZAT"."SYS_IMPORT_FULL_01" successfully completed at ThuJun 21 21:03:12 2018 elapsed 0 00:00:19
成功恢復到linux
3 windows恢復
本地windows7 系統
資料庫版本 oracle11.2
Windows| bat指令碼 @echo off rem impdp 'clportals/"123456"' directory=dmp REMAP_SCHEMA=XX_XXXX:clportals dumpfile=XX_XXXX_20180616.DMP logfile=clportals_20180621.log REMAP_TABLESPACE=XX_XXXX:USERS @forfiles /p e:\backup /s /m * -d -15 /c "cmd /c del /f @file"
建立有戶名和密碼 CREATE USER clportals IDENTIFIED BY 123456; 分配許可權 GRANT connect,dba to clportals;
create or replace directory dmp as 'C:\新建資料夾'; grant read,write on directory dmp to clportals;
select username,default_tablespace,temporary_tablespace from dba_users where username='clportals' select username, default_tablespace from dba_users where username='DY';
alter tablespace USERS rename to DY;
|
建立步驟和linux下一樣
檢視select * from CORP_TOTAL;
報錯
;;;
Import: Release 11.2.0.1.0 - Production on 星期四 6月 21 15:04:11 2018
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved. ;;; 連線到: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options 已成功載入/解除安裝了主表 "CLPORTALS"."SYS_IMPORT_FULL_01" 啟動 "CLPORTALS"."SYS_IMPORT_FULL_01": "clportals/********" directory=dmp REMAP_SCHEMA=XX_XXXX:clportals dumpfile=XX_XXXX_20180616.DMP logfile=clportals_20180621.log REMAP_TABLESPACE=XX_XXXX:USERS 處理物件型別 SCHEMA_EXPORT/USER ORA-31684: 物件型別 USER:"CLPORTALS" 已存在 處理物件型別 SCHEMA_EXPORT/SYSTEM_GRANT 處理物件型別 SCHEMA_EXPORT/ROLE_GRANT 處理物件型別 SCHEMA_EXPORT/DEFAULT_ROLE 處理物件型別 SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA 處理物件型別 SCHEMA_EXPORT/DB_LINK ORA-31684: 物件型別 DB_LINK:"CLPORTALS"."LINK.CLPORTALS" 已存在 ORA-31684: 物件型別 DB_LINK:"CLPORTALS"."LINK.HRTEST1" 已存在 處理物件型別 SCHEMA_EXPORT/SEQUENCE/SEQUENCE ORA-31684: 物件型別 SEQUENCE:"CLPORTALS"."FLOWACCREDITDETAILS_SEQ" 已存在 ORA-31684: 物件型別 SEQUENCE:"CLPORTALS"."FLOWACCREDIT_SEQ" 已存在 ORA-31684: 物件型別 SEQUENCE:"CLPORTALS"."FLOWROLE_SEQ" 已存在 ORA-31684: 物件型別 SEQUENCE:"CLPORTALS"."FLOW_BASIC_EXAMPLE_SEQ" 已存在 ORA-31684: 物件型別 SEQUENCE:"CLPORTALS"."FLOW_DEAL_OPTIONAL_IDEA_SEQ" 已存在 ORA-31684: 物件型別 SEQUENCE:"CLPORTALS"."FLOW_INSTENCE_SEQ" 已存在 ORA-31684: 物件型別 SEQUENCE:"CLPORTALS"."FLOW_MODEL_SEQ" 已存在 ORA-31684: 物件型別 SEQUENCE:"CLPORTALS"."FLOW_NODE_INSTENCE_NEW_SEQ" 已存在 ORA-31684: 物件型別 SEQUENCE:"CLPORTALS"."FLOW_NODE_INSTENCE_SEQ" 已存在 ORA-31684: 物件型別 SEQUENCE:"CLPORTALS"."FLOW_NODE_MODEL_SEQ" 已存在 ORA-31684: 物件型別 SEQUENCE:"CLPORTALS"."FLOW_OPRT_BILL_SEQ" 已存在 ORA-31684: 物件型別 SEQUENCE:"CLPORTALS"."FLOW_OPRT_MODEL_SQL_CONF_SEQ" 已存在 ORA-31684: 物件型別 SEQUENCE:"CLPORTALS"."FLOW_OPRT_MODEL_SQL_FIELD_SEQ" 已存在 ORA-31684: 物件型別 SEQUENCE:"CLPORTALS"."FLOW_OPRT_MODULE_SEQ" 已存在 ORA-31684: 物件型別 SEQUENCE:"CLPORTALS"."FLOW_OPRT_TYPE_SEQ" 已存在 ORA-31684: 物件型別 SEQUENCE:"CLPORTALS"."FLOW_ROLEUSER_SEQ" 已存在 ORA-31684: 物件型別 SEQUENCE:"CLPORTALS"."FLOW_ROLE_SEQ" 已存在 ORA-31684: 物件型別 SEQUENCE:"CLPORTALS"."FLOW_TODO_DEAL_SEQ" 已存在 ORA-31684: 物件型別 SEQUENCE:"CLPORTALS"."FLOW_TRAN_EXP_SEQ" 已存在 ORA-31684: 物件型別 SEQUENCE:"CLPORTALS"."FLOW_TRAN_THREE_EXP_SEQ" 已存在 ORA-31684: 物件型別 SEQUENCE:"CLPORTALS"."SYS_COMPANY_SEQ" 已存在 處理物件型別 SCHEMA_EXPORT/TABLE/TABLE ORA-39151: 表 "CLPORTALS"."EFF_SUPERVISION" 已存在。由於跳過了 table_exists_action, 將跳過所有相關元資料和資料。 處理物件型別 SCHEMA_EXPORT/TABLE/TABLE_DATA . . 匯入了 "CLPORTALS"."CORP_TOTAL" 13.88 MB 186154 行 . . 匯入了 "CLPORTALS"."SYS_LOG" 1.830 MB 2001 行 . . 匯入了 "CLPORTALS"."PUB_EDUCATE" 2.153 MB 216 行 . . 匯入了 "CLPORTALS"."SYS_USER" 318.6 KB 2588 行 . . 匯入了 "CLPORTALS"."SYS_OFFICE" 315.3 KB 2737 行 . . 匯入了 "CLPORTALS"."FLOW_ROLE_USERS" 125.7 KB 15 行 . . 匯入了 "CLPORTALS"."SYS_AREA" 199.1 KB 1194 行 . . 匯入了 "CLPORTALS"."SYS_MENU" 140.0 KB 300 行 . . 匯入了 "CLPORTALS"."FLOW_INSTENCE" 11.96 KB 3 行 . . 匯入了 "CLPORTALS"."FLOW_MODEL" 8.796 KB 2 行 . . 匯入了 "CLPORTALS"."FLOW_NODE_MODEL" 12.89 KB 32 行 . . 匯入了 "CLPORTALS"."FLOW_OPRT_MODULE" 8.929 KB 3 行 . . 匯入了 "CLPORTALS"."FLOW_OPRT_TYPE" 9.070 KB 1 行 . . 匯入了 "CLPORTALS"."FLOW_ROLE" 7.914 KB 15 行 . . 匯入了 "CLPORTALS"."OA_OFFICE" 10.42 KB 84 行 . . 匯入了 "CLPORTALS"."PUB_IMAGE_MANAGEMENT" 9.765 KB 21 行 . . 匯入了 "CLPORTALS"."SYS_ATTACH" 17.17 KB 33 行 . . 匯入了 "CLPORTALS"."SYS_DICT" 41.33 KB 383 行 . . 匯入了 "CLPORTALS"."SYS_ROLE" 8.312 KB 6 行 . . 匯入了 "CLPORTALS"."SYS_ROLE_MENU" 11.61 KB 175 行 . . 匯入了 "CLPORTALS"."SYS_USER_OFOUTSIDE" 36.89 KB 592 行 . . 匯入了 "CLPORTALS"."SYS_USER_ROLE" 34.42 KB 2580 行 . . 匯入了 "CLPORTALS"."SYS_WARNING" 9.726 KB 1 行 . . 匯入了 "CLPORTALS"."TROUBLE_CLUES" 49.46 KB 3 行 . . 匯入了 "CLPORTALS"."ALARM_RECORDS" 0 KB 0 行 . . 匯入了 "CLPORTALS"."EXAMPLE_TEST" 0 KB 0 行 . . 匯入了 "CLPORTALS"."FLOWACCREDIT" 0 KB 0 行 . . 匯入了 "CLPORTALS"."FLOWACCREDITDETAILS" 0 KB 0 行 . . 匯入了 "CLPORTALS"."FLOW_BASIC_EXAMPLE" 0 KB 0 行 . . 匯入了 "CLPORTALS"."FLOW_NODE_INSTENCE" 0 KB 0 行 . . 匯入了 "CLPORTALS"."FLOW_NODE_INSTENCE_NEW" 0 KB 0 行 . . 匯入了 "CLPORTALS"."FLOW_NODE_INSTENCE_PIC" 0 KB 0 行 . . 匯入了 "CLPORTALS"."FLOW_OPRT_BILL" 0 KB 0 行 . . 匯入了 "CLPORTALS"."FLOW_ROLE_USERS_MANAGE" 0 KB 0 行 . . 匯入了 "CLPORTALS"."FOUR_BUILD_DEMAND_REPORT" 0 KB 0 行 . . 匯入了 "CLPORTALS"."FOUR_BUILD_DETAIL_REPORT" 0 KB 0 行 . . 匯入了 "CLPORTALS"."FOUR_BUILD_EQUIPMENT" 0 KB 0 行 . . 匯入了 "CLPORTALS"."FOUR_BUILD_TYPE" 0 KB 0 行 . . 匯入了 "CLPORTALS"."GROUP_HONOR" 0 KB 0 行 . . 匯入了 "CLPORTALS"."INS_BUILDING" 0 KB 0 行 . . 匯入了 "CLPORTALS"."LABOUR_ANNUAL_REPORT" 0 KB 0 行 . . 匯入了 "CLPORTALS"."LABOUR_BUILD_ACT" 0 KB 0 行 . . 匯入了 "CLPORTALS"."LABOUR_FEE_COLLECT" 0 KB 0 行 . . 匯入了 "CLPORTALS"."LABOUR_FEE_LIST" 0 KB 0 行 . . 匯入了 "CLPORTALS"."LABOUR_QUESTIONNAIRE" 0 KB 0 行 . . 匯入了 "CLPORTALS"."LABOUR_UNION_FUNDS" 0 KB 0 行 . . 匯入了 "CLPORTALS"."MEMBER_METTING_REGISTER" 0 KB 0 行 . . 匯入了 "CLPORTALS"."MESSAGE_SMS_INTF" 0 KB 0 行 . . 匯入了 "CLPORTALS"."MESSAGE_SMS_RECEIVER" 0 KB 0 行 . . 匯入了 "CLPORTALS"."MESSAGE_SMS_RECORDS" 0 KB 0 行 . . 匯入了 "CLPORTALS"."MESSAGE_SMS_SAMPLE" 0 KB 0 行 . . 匯入了 "CLPORTALS"."MESSAGE_SMS_TARIFF" 0 KB 0 行 . . 匯入了 "CLPORTALS"."NOTICE_RECEIVER" 0 KB 0 行 . . 匯入了 "CLPORTALS"."NOTICE_RECORDS" 0 KB 0 行 . . 匯入了 "CLPORTALS"."NOTICE_SAMPLE" 0 KB 0 行 . . 匯入了 "CLPORTALS"."ORG_LABOUR" 0 KB 0 行 . . 匯入了 "CLPORTALS"."ORG_PARTY" 0 KB 0 行 . . 匯入了 "CLPORTALS"."PARTY_BUILD_ACT" 0 KB 0 行 . . 匯入了 "CLPORTALS"."PARTY_CENTR_GROUP" 0 KB 0 行 . . 匯入了 "CLPORTALS"."PARTY_FEE" 0 KB 0 行 . . 匯入了 "CLPORTALS"."PARTY_FEE_COLLECT" 0 KB 0 行 . . 匯入了 "CLPORTALS"."PARTY_FEE_LIST" 0 KB 0 行 . . 匯入了 "CLPORTALS"."PSN_HONOR" 0 KB 0 行 . . 匯入了 "CLPORTALS"."PSN_HR_INFO" 0 KB 0 行 . . 匯入了 "CLPORTALS"."PSN_INFO_SIGN" 0 KB 0 行 . . 匯入了 "CLPORTALS"."PSN_PARTY_INFO" 0 KB 0 行 . . 匯入了 "CLPORTALS"."PSN_WARN" 0 KB 0 行 . . 匯入了 "CLPORTALS"."PSN_WORK" 0 KB 0 行 . . 匯入了 "CLPORTALS"."SYS_ROLE_OFFICE" 0 KB 0 行 . . 匯入了 "CLPORTALS"."ZDH_COLSE_METTING_EXECUTE" 0 KB 0 行 . . 匯入了 "CLPORTALS"."ZDH_GROUP_SURVEY" 0 KB 0 行 . . 匯入了 "CLPORTALS"."ZDH_PROPOSAL_MANAGER" 0 KB 0 行 . . 匯入了 "CLPORTALS"."ZDH_STAFF_REGISTER" 0 KB 0 行 處理物件型別 SCHEMA_EXPORT/TABLE/INDEX/INDEX 處理物件型別 SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT 處理物件型別 SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS 處理物件型別 SCHEMA_EXPORT/TABLE/COMMENT 處理物件型別 SCHEMA_EXPORT/PROCEDURE/PROCEDURE ORA-31684: 物件型別 PROCEDURE:"CLPORTALS"."FLOWUNTREADTOBEGIN" 已存在 ORA-31684: 物件型別 PROCEDURE:"CLPORTALS"."FLOWUNTREADTOPREV" 已存在 處理物件型別 SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDURE 處理物件型別 SCHEMA_EXPORT/VIEW/VIEW ORA-31684: 物件型別 VIEW:"CLPORTALS"."VIEWFLOWNODEINSTENCE" 已存在 處理物件型別 SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT 處理物件型別 SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS 作業 "CLPORTALS"."SYS_IMPORT_FULL_01" 已經完成, 但是有 28 個錯誤 (於 15:04:56 完成)
|
和linux成功匯入日誌對比 發現匯入的資料完全一致,報錯不影響結果
4 linux恢復到windows問題
20180622
系統 10.206.1.98
作業系統 [[email protected] backup]# cat/etc/issue
CentOS release 6.5 (Final)
資料庫版本
Connected to: Oracle Database 11gEnterprise Edition Release 11.2.0.4.0- 64bit Production
需要回複數據庫檔案
[[email protected] backup]# du -sh *
21M clhq_20180622.dmp
16K clhq_20180622.log
恢復到windows7 oracle 11.2.0.1 資料庫版本不一致
執行指令碼
@echo off
rem
impdp 'clhq/"12345"' directory=dmp dumpfile=clhq_20180622.dmp logfile=clhq_20180622.log
@forfiles /p e:\backup /s /m * -d -15 /c"cmd /c del /f @file"
報錯
;;;
Import: Release 11.2.0.1.0 - Production on 星期五 6月 22 15:45:40 2018
Copyright (c) 1982, 2009, Oracle and/or itsaffiliates. All rights reserved.
;;;
連線到: Oracle Database 11g Enterprise EditionRelease 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Miningand Real Application Testing options
ORA-39000: 轉儲檔案說明錯誤
ORA-31619: 轉儲檔案"C:\新建資料夾\scyxxt_20180620.dmp" 無效
第一檢查指令碼問題
1匯出什麼表空間,匯入也要什麼表空間。
匯出什麼使用者,匯入也要什麼使用者。
如果沒有要新建
新建了賬戶表空間,發現不是賬戶指令碼問題
2 是否檔案問題
windows-----linux和linux---windows
可能傳輸問題
發現這種錯誤一般都是檔案傳輸錯誤
5 總結
對於oracle資料庫不同系統版本恢復問題
1 使用者備份檔案不存在(新建檔案)
2 使用者沒有許可權(賦權)
3 使用者預設空間不對(修改空間)