sqlcl 20.3 顶点执行与 sqlplus
sqlcl 20.3 apex execution vs sqlplus
我在几个环境中实现了 sqlcl 和 apex 版本控制。
Oracle 数据库 19c - SqlCL 版本 20.3
与其他环境的唯一区别是 OCI 定义了 PDB。
尝试在 OCI 环境中实施更改时,我在 APEX 类型对象上有一个奇怪的行为
- 在 SqlCL 上,当“lb update -changelog f100.xml”时出错-----> ORA-20001:
必须设置包变量 g_security_group_id
- 在 SqlCL 上,我尝试手动 运行 特定页面 -----> ORA-20001:包变量
g_security_group_id必须设置
- 在 SQLPLUS 上,我尝试 运行 特定页面 ---> 没有错误
期末考试
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
解决方案>>>>
- 转到 APEX MONITOR
- 管理工作区
- 管理工作区到模式的分配
- 添加管理版本控制的架构
(在我的例子中 DEVELOPER_APEX 模式甚至有 DBA 特权但没有工作)
这是一个“最高权限”错误:-/
我没有为没有 PDB 的实现完成这个过程。在那种情况下没有错误。
我在几个环境中实现了 sqlcl 和 apex 版本控制。
Oracle 数据库 19c - SqlCL 版本 20.3
与其他环境的唯一区别是 OCI 定义了 PDB。
尝试在 OCI 环境中实施更改时,我在 APEX 类型对象上有一个奇怪的行为
- 在 SqlCL 上,当“lb update -changelog f100.xml”时出错-----> ORA-20001: 必须设置包变量 g_security_group_id
- 在 SqlCL 上,我尝试手动 运行 特定页面 -----> ORA-20001:包变量 g_security_group_id必须设置
- 在 SQLPLUS 上,我尝试 运行 特定页面 ---> 没有错误
期末考试
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
解决方案>>>>
- 转到 APEX MONITOR
- 管理工作区
- 管理工作区到模式的分配
- 添加管理版本控制的架构 (在我的例子中 DEVELOPER_APEX 模式甚至有 DBA 特权但没有工作)
这是一个“最高权限”错误:-/ 我没有为没有 PDB 的实现完成这个过程。在那种情况下没有错误。