使用Oracle 11g和2台运行Windows 10的不同计算机(糟糕)
我试图通过network_link导入架构。
我遇到一些错误,有些补助金丢失了
这是错误:(其中一个,其他错误类似)
ORA-39083: Object type ROLE_GRANT failed to create with error:
ORA-01919: role 'APEX_ADMINISTRATOR_READ_ROLE' does not exist
Failing sql is:
GRANT "APEX_ADMINISTRATOR_READ_ROLE" TO "GEO127" WITH ADMIN OPTION
ORA-39083: Object type ROLE_GRANT failed to create with error:
ORA-01919: role 'APEX_GRANTS_FOR_NEW_USERS_ROLE' does not exist
Failing sql is:
GRANT "APEX_GRANTS_FOR_NEW_USERS_ROLE" TO "GEO127" WITH ADMIN OPTION
我的问题是...我知道我可以“创建角色”,但是我如何知道哪些特权属于该角色?
我确实尝试添加角色,但它不在目录中吗?
Error starting at line : 1 in command -
grant apex_administrator_read_role to geo127
Error report -
SQL Error: ORA-01919: role 'APEX_ADMINISTRATOR_READ_ROLE' does not exist
01919. 00000 - "role '%s' does not exist"
*Cause: Role by that name does not exist.
*Action: Verify you are using the correct role name.
此外,我查看了“源”数据库,并且“ APEX_ADMINISTRATOR_READ_ROLE”确实存在,我想我想知道如何在“目标”上复制它
C:\Users\COMPUTER>impdp geo127/******** directory=data_pump_dir network_link=legacy remap_schema=geo:geo127
Import: Release 11.2.0.2.0
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Express Edition Release 11.2.0.2.0 - Production
Starting "GEO127"."SYS_IMPORT_SCHEMA_01": geo127/******** directory=data_pump_dir network_link=legacy remap_schema=geo:geo127
Estimate in progress using BLOCKS method...
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 882.8 MB
Processing object type SCHEMA_EXPORT/USER
ORA-31684: Object type USER:"GEO127" already exists
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
ORA-39083: Object type ROLE_GRANT failed to create with error:
ORA-01919: role 'APEX_ADMINISTRATOR_READ_ROLE' does not exist
Failing sql is:
GRANT "APEX_ADMINISTRATOR_READ_ROLE" TO "GEO127" WITH ADMIN OPTION
ORA-39083: Object type ROLE_GRANT failed to create with error:
ORA-01919: role 'APEX_GRANTS_FOR_NEW_USERS_ROLE' does not exist
Failing sql is:
GRANT "APEX_GRANTS_FOR_NEW_USERS_ROLE" TO "GEO127" WITH ADMIN OPTION
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
ORA-39083: Object type DEFAULT_ROLE failed to create with error:
ORA-01919: role 'APEX_ADMINISTRATOR_READ_ROLE' does not exist
Failing sql is:
ALTER USER "GEO127" DEFAULT ROLE "CONNECT", "RESOURCE", "DBA", "SELECT_CATALOG_ROLE", "EXECUTE_CATALOG_ROLE", "DELETE_CATALOG_ROLE", "EXP_FULL_DATABASE", "IMP_FULL_DATABASE", "LOGSTDBY_ADMINISTRATOR", "DBFS_ROLE", "AQ_ADMINISTRATOR_ROLE", "AQ_USER_ROLE", "DATAPUMP_EXP_FULL_DATABASE", "DATAPUMP_IMP_FULL_DATABASE", "ADM_PARALLEL_EXECUTE_TASK", "GATHER_SYSTEM_STATIST
Processing object type SCHEMA_EXPORT/TABLESPACE_QUOTA
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE
ORA-31684: Object type SEQUENCE:"GEO127"."HIER_SEQ" already exists
Processing object type SCHEMA_EXPORT/TABLE/TABLE
ORA-39083: Object type TABLE:"GEO127"."NOCOUNTRY" failed to create with error:
ORA-00959: tablespace 'GEOGRAPHIC' does not exist
Failing sql is:
CREATE TABLE "GEO127"."NOCOUNTRY" ("GEONAMEID" VARCHAR2(20 BYTE), "ASCIINAME" VARCHAR2(255 BYTE), "LATITUDE" VARCHAR2(20 BYTE), "LONGITUDE" VARCHAR2(20 BYTE), "FEATURE_CLASS" VARCHAR2(255 BYTE), "FEATURE_CODE" VARCHAR2(255 BYTE), "COUNTRY_CODE" VARCHAR2(255 BYTE), "CC2" VARCHAR2(255 BYTE), "ADMIN1_CODE" VARCHAR2(255 BYTE), "ADMIN2_CODE" VARCHAR2(255 BYTE), "ADMIN
ORA-39083: Object type TABLE:"GEO127"."HIERARCHY" failed to create with error:
ORA-00959: tablespace 'GEOGRAPHIC' does not exist
Failing sql is:
CREATE TABLE "GEO127"."HIERARCHY" ("PARENTID" VARCHAR2(20 BYTE), "CHILDID" VARCHAR2(20 BYTE), "TYPE" VARCHAR2(255 BYTE), "HID" NUMBER NOT NULL ENABLE) 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 DEF
ORA-39083: Object type TABLE:"GEO127"."GEONAMES" failed to create with error:
ORA-00959: tablespace 'GEOGRAPHIC' does not exist
Failing sql is:
CREATE TABLE "GEO127"."GEONAMES" ("GEONAMEID" VARCHAR2(20 BYTE), "ASCIINAME" VARCHAR2(255 BYTE), "LATITUDE" VARCHAR2(20 BYTE), "LONGITUDE" VARCHAR2(20 BYTE), "FEATURE_CLASS" VARCHAR2(255 BYTE), "FEATURE_CODE" VARCHAR2(255 BYTE), "COUNTRY_CODE" VARCHAR2(255 BYTE), "CC2" VARCHAR2(255 BYTE), "ADMIN1_CODE" VARCHAR2(255 BYTE), "ADMIN2_CODE" VARCHAR2(255 BYTE), "ADMIN3_
ORA-39083: Object type TABLE:"GEO127"."EXPORT_JOB_SQLDEV_2712" failed to create with error:
ORA-00959: tablespace 'GEOGRAPHIC' does not exist
Failing sql is:
CREATE TABLE "GEO127"."EXPORT_JOB_SQLDEV_2712" ("PROCESS_ORDER" NUMBER, "DUPLICATE" NUMBER, "DUMP_FILEID" NUMBER, "DUMP_POSITION" NUMBER, "DUMP_LENGTH" NUMBER, "DUMP_ORIG_LENGTH" NUMBER, "DUMP_ALLOCATION" NUMBER, "COMPLETED_ROWS" NUMBER, "ERROR_COUNT" NUMBER, "ELAPSED_TIME" NUMBER, "OBJECT_TYPE_PATH" VARCHAR2(200 BYTE), "OBJECT_PATH_SEQNO" NUMBER, "O
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/TABLE/STATISTICS/TABLE_STATISTICS
Job "GEO127"."SYS_IMPORT_SCHEMA_01" completed with 9 error(s)
C:\Users\COMPUTER>
Error starting at line : 1 in command -
grant apex_administrator_read_role to geo127
Error report -
SQL Error: ORA-01919: role 'APEX_ADMINISTRATOR_READ_ROLE' does not exist
01919. 00000 - "role '%s' does not exist"
*Cause: Role by that name does not exist.
*Action: Verify you are using the correct role name.
答案 0 :(得分:1)
关于与Apex( Application Express )(https://docs.oracle.com/database/apex-18.2/HTMDB/about-utilizing-database-reporting.htm#HTMDB29893)
相关的数据库报告如果授予您APEX_ADMINISTRATOR_READ_ROLE或 APEX_ADMINISTRATOR_ROLE,然后您可以查询整个实例, 而不只是与架构用户关联的工作区。 您应授予APEX_ADMINISTRATOR_READ_ROLE来监视用户, 而例如应使用APEX_ADMINISTRATOR_ROLE 管理员,负责管理实例参数,工作区等。
似乎源数据库中安装了Apex,而目标数据库中不存在。因此,我建议您:
[阅读评论后,编辑]
我在笔记本电脑上运行11g XE。 Apex 4附带了它,因此我检查了那里是否存在引起问题的角色。显然,它不会:
SQL> select * From all_users where username like 'APEX%';
USERNAME USER_ID CREATED
------------------------------ ---------- --------
APEX_040000 47 29.05.14
APEX_PUBLIC_USER 45 29.05.14
SQL> select * From dba_roles where role like 'APEX%';
ROLE PASSWORD AUTHENTICAT
------------------------------ -------- -----------
APEX_ADMINISTRATOR_ROLE NO NONE
SQL>
看到了吗? Apex 4中没有APEX_ADMINISTRATOR_READ_ROLE
。
因此,我不会按照您建议的那样戏剧性地进行操作(重新格式化硬盘并重新开始)-升级到Apex 5.x会更简单。