1

我正在研究 Apex 5,想用 apex 运行 bi publihser 报告。我在管理实例>报告打印顶点主机地址中创建了实例:本地主机端口:7001 打印服务器:/xmlpserver/convert

现在创建了报告查询,但是当我单击“测试报告查询”时,它显示错误 ORA-20001:无法访问打印引擎,因为指定的 URL 不正确或需要指定代理 URL。

我的 BI 配置组件是配置组件

    Oracle Enterprise Manager
        http://naeemshahzad-PC:7001/em
    Business Intelligence Enterprise Edition
        naeemshahzad-PC:9704/analytics
    Business Intelligence Publisher
        naeemshahzad-PC:9704/xmlpserver

请帮我。

4

2 回答 2

1

此错误的原因:

ORA-20001: The printing engine could not be reached because either the URL specified is incorrect or a proxy URL needs to be specified.

是因为默认情况下,与网络服务交互的能力在Oracle Database 12c. 因此,如果您使用 运行Oracle Application Express 5.0,则Oracle Database 12c必须使用新DBMS_NETWORK_ACL_ADMIN包为APEX_050000数据库用户授予对任何主机的连接权限。

因此,您应该授予连接特权APEX_050000

解决方案:

SYS通过指定SYSDBA角色连接到安装了 Oracle Application Express 的数据库。(以 sysdba 用户身份通过​​ sys 连接到 sqlplus)

然后运行以下plsql:

DECLARE
  ACL_PATH  VARCHAR2(4000);
BEGIN
  -- Look for the ACL currently assigned to '*' and give APEX_050000
  -- the "connect" privilege if APEX_050000 does not have the privilege yet.

  SELECT ACL INTO ACL_PATH FROM DBA_NETWORK_ACLS
   WHERE HOST = '*' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL;

  IF DBMS_NETWORK_ACL_ADMIN.CHECK_PRIVILEGE(ACL_PATH, 'APEX_050000',
     'connect') IS NULL THEN
      DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(ACL_PATH,
     'APEX_050000', TRUE, 'connect');
  END IF;

EXCEPTION
  -- When no ACL has been assigned to '*'.
  WHEN NO_DATA_FOUND THEN
  DBMS_NETWORK_ACL_ADMIN.CREATE_ACL('power_users.xml',
    'ACL that lets power users to connect to everywhere',
    'APEX_050000', TRUE, 'connect');
  DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL('power_users.xml','*');
END;
/
COMMIT;

在那次运行之后:

DECLARE
  ACL_PATH  VARCHAR2(4000);
BEGIN
  -- Look for the ACL currently assigned to 'localhost' and give APEX_050000
  -- the "connect" privilege if APEX_040200 does not have the privilege yet.
  SELECT ACL INTO ACL_PATH FROM DBA_NETWORK_ACLS
   WHERE HOST = 'localhost' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL;

  IF DBMS_NETWORK_ACL_ADMIN.CHECK_PRIVILEGE(ACL_PATH, 'APEX_050000',
     'connect') IS NULL THEN
      DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(ACL_PATH,
     'APEX_050000', TRUE, 'connect');
  END IF;

EXCEPTION
  -- When no ACL has been assigned to 'localhost'.
  WHEN NO_DATA_FOUND THEN
  DBMS_NETWORK_ACL_ADMIN.CREATE_ACL('local-access-users.xml',
    'ACL that lets users to connect to localhost',
    'APEX_050000', TRUE, 'connect');
  DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL('local-access-users.xml','localhost');
END;
/
COMMIT;
于 2016-11-29T12:01:54.363 回答
0

Another solution is to check:

manage instance> instance settings> print server host address

Maybe you just changed the IP Address.

于 2020-08-08T06:02:53.040 回答