为什么我可以用 sqlplus 调用 DVF.F$LANGUAGE() 而不能用 odbc 调用? (甲骨文 19c)
Why can I call DVF.F$LANGUAGE() with sqlplus but not with odbc? (ORACLE 19c)
我是运行 2个虚拟机(VirtualBox 6.0):
- 数据库服务器:ORACLE Linux 8 with ORACLE 19c (64bit)
- ODBC 客户端:openSUSE 15.2 Linux、KDE、libsqora.so.21.1 和 g++(64 位)
我可以从 sqlplus 调用 'DVF.F$LANGUAGE()'(用户 'SYSTEM',在客户端,容器 ORCLPDB):
SET SERVEROUTPUT ON;
ALTER SESSION SET CONTAINER=ORCLPDB;
DECLARE
LANG VARCHAR2(128);
BEGIN
LANG := DVF.F$LANGUAGE();
dbms_output.put_line(LANG);
END;
/
EXIT;
输出:
SQL*Plus: Release 21.0.0.0.0 - Production on Wed Aug 18 14:24:47 2021
Version 21.1.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.
Last Successful login time: Wed Aug 18 2021 14:20:36 +02:00
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
Session altered.
ENGLISH_UNITED KINGDOM.AL32UTF8
PL/SQL procedure successfully completed.
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
我无法通过 ODBC 调用 DVF.F$LANGUAGE()(用户 'SYSTEM',在客户端,容器 ORCLPDB):
{? = CALL DVF.F$LANGUAGE()}
输出:
[Oracle][ODBC]Syntax error or access violation.
没有'Syntax error'。我能做到:
{? = CALL SYSTEM.XYZ()}
这是一个'Syntax error'!
函数 DVF$LANGUAGE() 不喜欢
{? = CALL DVF.F$LANGUAGE()}
{:1 = CALL DVF.F$LANGUAGE()}
{:0 = CALL DVF.F$LANGUAGE()}
CALL DVF.F$LANGUAGE() INTO ?;
但是喜欢
CALL DVF.F$LANGUAGE() INTO :1;
函数SYSTEM.ABC() 赞
CALL SYSTEM.ABC() INTO :1;
{? = CALL SYSTEM.ABC()}
一个函数SYSTEM.XYZ(?, ?) 不喜欢
CALL SYSTEM.XYZ(:2, :3) INTO :1;
CALL SYSTEM.XYZ(:1, :2) INTO :0;
CALL SYSTEM.XYZ INTO :1 USING :2, :3;
CALL SYSTEM.XYZ INTO :0 USING :1, :2;
但是喜欢
{? = CALL SYSTEM.XYZ(?, ?)}
我是运行 2个虚拟机(VirtualBox 6.0):
- 数据库服务器:ORACLE Linux 8 with ORACLE 19c (64bit)
- ODBC 客户端:openSUSE 15.2 Linux、KDE、libsqora.so.21.1 和 g++(64 位)
我可以从 sqlplus 调用 'DVF.F$LANGUAGE()'(用户 'SYSTEM',在客户端,容器 ORCLPDB):
SET SERVEROUTPUT ON;
ALTER SESSION SET CONTAINER=ORCLPDB;
DECLARE
LANG VARCHAR2(128);
BEGIN
LANG := DVF.F$LANGUAGE();
dbms_output.put_line(LANG);
END;
/
EXIT;
输出:
SQL*Plus: Release 21.0.0.0.0 - Production on Wed Aug 18 14:24:47 2021
Version 21.1.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.
Last Successful login time: Wed Aug 18 2021 14:20:36 +02:00
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
Session altered.
ENGLISH_UNITED KINGDOM.AL32UTF8
PL/SQL procedure successfully completed.
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
我无法通过 ODBC 调用 DVF.F$LANGUAGE()(用户 'SYSTEM',在客户端,容器 ORCLPDB):
{? = CALL DVF.F$LANGUAGE()}
输出:
[Oracle][ODBC]Syntax error or access violation.
没有'Syntax error'。我能做到:
{? = CALL SYSTEM.XYZ()}
这是一个'Syntax error'!
函数 DVF$LANGUAGE() 不喜欢
{? = CALL DVF.F$LANGUAGE()}
{:1 = CALL DVF.F$LANGUAGE()}
{:0 = CALL DVF.F$LANGUAGE()}
CALL DVF.F$LANGUAGE() INTO ?;
但是喜欢
CALL DVF.F$LANGUAGE() INTO :1;
函数SYSTEM.ABC() 赞
CALL SYSTEM.ABC() INTO :1;
{? = CALL SYSTEM.ABC()}
一个函数SYSTEM.XYZ(?, ?) 不喜欢
CALL SYSTEM.XYZ(:2, :3) INTO :1;
CALL SYSTEM.XYZ(:1, :2) INTO :0;
CALL SYSTEM.XYZ INTO :1 USING :2, :3;
CALL SYSTEM.XYZ INTO :0 USING :1, :2;
但是喜欢
{? = CALL SYSTEM.XYZ(?, ?)}