sqlcl 20.3 apex 执行与 sqlplus

发布于 2025-01-12 23:23:05 字数 3496 浏览 0 评论 0原文

我有几个环境,我们已经实现了 sqlcl 和 apex 版本控制。

Oracle 数据库 19c - SqlCL 版本 20.3

与其他环境的唯一区别是 OCI 定义了 PDB。

当尝试在 OCI 环境上实现更改时,我对

  1. SqlCL 上的 APEX 类型对象有一个奇怪的行为,“lb update -changelog f100.xml”时出错-----> ORA-20001: 包变量 g_security_group_id 必须在 SqlCL 上设置
  2. ,我尝试手动运行特定页面 -----> ORA-20001: 包变量 g_security_group_id必须在SQLPLUS上设置
  3. ,我尝试运行特定页面--->没有错误

最终测试

SQLPLUS

SQL*Plus: Release 19.0.0.0.0 - Production on Thu Mar 3 17:26:25 2022
Version 19.12.0.0.0

Copyright (c) 1982, 2021, Oracle.  All rights reserved.


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.12.0.0.0

SQL> alter session set container = pdb;

Session altered.

SQL>    begin
        apex_application_install.set_workspace_id(6217319715855887);
        apex_application_install.generate_offset;
end;
/  2    3    4    5

PL/SQL procedure successfully completed.

SQL>
SQL>
SQL>
SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.12.0.0.0

············································· ······················································· ···

SQLCL

SQLcl: Release 20.3 Production on Thu Mar 03 17:29:58 2022

Copyright (c) 1982, 2022, Oracle.  All rights reserved.

Last Successful login time: Thu Mar 03 2022 17:30:01 +01:00

Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.12.0.0.0

SQL> alter session set container = pdb;

Session altered.

SQL>     select workspace_id --into l_workspace_id
  2      from apex_workspaces
  3      where workspace = 'TEST';

       WORKSPACE_ID
___________________
   6217319715855887

SQL> begin
  2      apex_application_install.set_workspace_id(6217319715855887);
  3      apex_application_install.generate_offset;
  4  end;
  5  /

Error starting at line : 1 in command -
begin
        apex_application_install.set_workspace_id(6217319715855887);
        apex_application_install.generate_offset;
end;
Error report -
ORA-20987: APEX - Invalid workspace ID. - Contact your application administrator.
ORA-06512: at "APEX_050100.WWV_FLOW_ERROR", line 1033
ORA-06512: at "APEX_050100.WWV_FLOW_ERROR", line 1400
ORA-06512: at "APEX_050100.WWV_FLOW_APPLICATION_INSTALL", line 69
ORA-06512: at line 2

SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.12.0.0.0

将 SqlCL 更新到版本 21.4 寻找不同的结果

SQLcl: Release 21.4 Production on Tue Mar 08 15:32:22 2022

Copyright (c) 1982, 2022, Oracle.  All rights reserved.

Last Successful login time: Tue Mar 08 2022 15:32:25 +01:00

Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.12.0.0.0

SQL>   begin
  2          apex_application_install.set_workspace_id(6217319715855887);
  3          apex_application_install.generate_offset;
  4  end;
  5* /

Error starting at line : 1 in command -
  begin
        apex_application_install.set_workspace_id(6217319715855887);
        apex_application_install.generate_offset;
end;
Error report -
ORA-20987: APEX - Invalid workspace ID. - Contact your application administrator.
ORA-06512: at "APEX_050100.WWV_FLOW_ERROR", line 1033
ORA-06512: at "APEX_050100.WWV_FLOW_ERROR", line 1400
ORA-06512: at "APEX_050100.WWV_FLOW_APPLICATION_INSTALL", line 69
ORA-06512: at line 2

I have several environments where we have implemented sqlcl and apex versioning.

Oracle database 19c - SqlCL version 20.3

The only difference versus other environment is the OCI has a PDB defined.

When trying to implement changes on OCI environment i have a strange behavior on APEX type objects

  1. on SqlCL, Error when "lb update -changelog f100.xml"-----> ORA-20001:
    Package variable g_security_group_id must be set
  2. on SqlCL, I try to run an specific page manually -----> ORA-20001: Package variable
    g_security_group_id must be set
  3. on SQLPLUS, I try to run specific page ---> No errors

Final test

SQLPLUS

SQL*Plus: Release 19.0.0.0.0 - Production on Thu Mar 3 17:26:25 2022
Version 19.12.0.0.0

Copyright (c) 1982, 2021, Oracle.  All rights reserved.


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.12.0.0.0

SQL> alter session set container = pdb;

Session altered.

SQL>    begin
        apex_application_install.set_workspace_id(6217319715855887);
        apex_application_install.generate_offset;
end;
/  2    3    4    5

PL/SQL procedure successfully completed.

SQL>
SQL>
SQL>
SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.12.0.0.0

··································································································

SQLCL

SQLcl: Release 20.3 Production on Thu Mar 03 17:29:58 2022

Copyright (c) 1982, 2022, Oracle.  All rights reserved.

Last Successful login time: Thu Mar 03 2022 17:30:01 +01:00

Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.12.0.0.0

SQL> alter session set container = pdb;

Session altered.

SQL>     select workspace_id --into l_workspace_id
  2      from apex_workspaces
  3      where workspace = 'TEST';

       WORKSPACE_ID
___________________
   6217319715855887

SQL> begin
  2      apex_application_install.set_workspace_id(6217319715855887);
  3      apex_application_install.generate_offset;
  4  end;
  5  /

Error starting at line : 1 in command -
begin
        apex_application_install.set_workspace_id(6217319715855887);
        apex_application_install.generate_offset;
end;
Error report -
ORA-20987: APEX - Invalid workspace ID. - Contact your application administrator.
ORA-06512: at "APEX_050100.WWV_FLOW_ERROR", line 1033
ORA-06512: at "APEX_050100.WWV_FLOW_ERROR", line 1400
ORA-06512: at "APEX_050100.WWV_FLOW_APPLICATION_INSTALL", line 69
ORA-06512: at line 2

SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.12.0.0.0

Updating SqlCL to version 21.4 looking for a different result

SQLcl: Release 21.4 Production on Tue Mar 08 15:32:22 2022

Copyright (c) 1982, 2022, Oracle.  All rights reserved.

Last Successful login time: Tue Mar 08 2022 15:32:25 +01:00

Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.12.0.0.0

SQL>   begin
  2          apex_application_install.set_workspace_id(6217319715855887);
  3          apex_application_install.generate_offset;
  4  end;
  5* /

Error starting at line : 1 in command -
  begin
        apex_application_install.set_workspace_id(6217319715855887);
        apex_application_install.generate_offset;
end;
Error report -
ORA-20987: APEX - Invalid workspace ID. - Contact your application administrator.
ORA-06512: at "APEX_050100.WWV_FLOW_ERROR", line 1033
ORA-06512: at "APEX_050100.WWV_FLOW_ERROR", line 1400
ORA-06512: at "APEX_050100.WWV_FLOW_APPLICATION_INSTALL", line 69
ORA-06512: at line 2

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

指尖上的星空 2025-01-19 23:23:05

解决办法>>>>

  1. 转到 APEX MONITOR
  2. 管理工作区
  3. 管理工作区到架构
  4. 分配 为管理版本控制的一个添加架构
    (在我的示例中,DEVELOPER_APEX 模式甚至具有 DBA 权限,但不起作用)

这是一个“apex 权限”错误:-/
我还没有在没有 PDB 的情况下完成这个过程。在这种情况下就没有错误。

Solution>>>>

  1. Go to the APEX MONITOR
  2. Manage workspaces
  3. Manage workspace to schema assignments
  4. ADD the schema for the one managing version control
    (in my example DEVELOPER_APEX schema had even DBA privs but did not work)

It was a "apex privileges" error :-/
I have NOT done this process for implementations WITHOUT PDB.. in that case there are no errors.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文