我是Oracle noob。我試圖從一臺機器複製(expdp/impdp)架構(無數據)到另一臺機器。我不想重新映射。我只想在targetHOST上創建空表結構。 錯誤我得到的是:impdp不會創建用戶/架構
ORA-39083: Object type PROCACT_SCHEMA failed to create with error:
ORA-31625: Schema ZABBIX is needed to import this object, but is unaccessible
ORA-01435: user does not exist
我的理解是,如果執行導入的用戶擁有「導入完整的數據庫」特權,它會創建用戶在targetHOST /模式。我將它授予'斯科特',並嘗試了這一點,同樣的錯誤。
- DB版本:在SQL * Plus:發佈於星期四10月24日14時27分41秒2013
- 11.2.0.1.0生產如果它的事項上sourceHOST數據庫版本是11.2.0。
- 操作系統:Linux targetHOST 2.6.18-308.el5#1 SMP週五01月27日17點17分51秒EST 2012 x86_64的x86_64的x86_64的GNU/Linux的
導入錯誤:
(0)[email protected]$ sqlplus system/manager
SQL*Plus: Release 11.2.0.1.0 Production on Thu Oct 24 14:27:41 2013
Copyright (c) 1982, 2009, Oracle. All rights reserved.
SQL> select * from session_privs;
PRIVILEGE
----------------------------------------
IMPORT FULL DATABASE
CREATE SESSION
.......200 other privileges.......
202 rows selected.
SQL> ^D
(0)[email protected]$
(0)[email protected]$ impdp system/oracle123 directory=TEST_DIR dumpfile=ZABBIX.dmp logfile=impdpZabbix.log
Import: Release 11.2.0.1.0 - Production on Thu Oct 24 14:14:51 2013
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, 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=TEST_DIR dumpfile=ZABBIX.dmp logfile=impdpZabbix.log
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
ORA-39083: Object type PROCACT_SCHEMA failed to create with error:
ORA-31625: Schema ZABBIX is needed to import this object, but is unaccessible
ORA-01435: user does not exist
Failing sql is:
BEGIN
sys.dbms_logrep_imp.instantiate_schema(schema_name=>SYS_CONTEXT('USERENV','CURRENT_SCHEMA'), export_db_name=>'XXX.YYY.COM', inst_scn=>'7788478540892');COMMIT; END;
Processing object type SCHEMA_EXPORT/TABLE/TABLE
ORA-39083: Object type TABLE:"ZABBIX"."TABLE1" failed to create with error:
ORA-01918: user 'ZABBIX' does not exist
Failing sql is:
CREATE TABLE "ZABBIX"."TABLE1" ("COLUMN1" VARCHAR2(20 BYTE) NOT NULL ENABLE, "COLUMN2" VARCHAR2(20 BYTE), "COLUMN3" VARCHAR2(20 BYTE)) SEGMENT CREATION IMMEDIATE PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAU
Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Job "SYSTEM"."SYS_IMPORT_FULL_01" completed with 2 error(s) at 14:14:53
(5)[email protected]$
導出日誌available here.:
那麼,這裏有什麼更好的方法? 1)授予特定用戶「創建用戶」,然後記得刪除它? 2)以SYSDBA的身份執行EXPDP? 在我看來,#1是一個安全漏洞,而#2不是Oracle推薦的。 –
@ErikAnderson不確定爲什麼不推薦#2。當你知道你的導出導入需要創建模式時,我看不出有什麼理由不以sysdba身份運行。無論如何,我不知道任何選項#3,所以選擇你的選擇。 :-) – Kashyap