返回首页

gbase数据、南大通用产品文档:GBase8sSQLProcedureColumns(仅限二级)

更新日期:2024年09月11日

SQLProcedureColumns 返回输入和输出参数的列表,和组成特定过程的结果集的列。
驱动程序将返回的信息作为特定 hstmt 的结果集。
下表描述了 SQLProcedureColumns 的 SQLSTATE 和错误值。
SQLSTATE
错误值
错误消息
01000
-11001
General warning
08S01
-11020
Communication link failure
24000
-11031
Invalid cursor state
IM001
-11040
Driver does not support this function
S1000
-11060
General error
S1001
-11061
Memory-allocation failure
S1008
-11065
Operation canceled
S1010
-11067
Function sequence error
S1090
-11071
Invalid string or buffer length

GBase 8s ODBC Driver 程序员指南
南大通用数据技术股份有限公司
- 236 -
SQLSTATE
错误值
错误消息
S1C00
-11092
Driver not capable
S1T00
-11094
Time-out expired
S1C00
-11300
SQL_DEFAULT_PARAM not supported
08S01
-11301
A protocol error has been detected. Current connection is
closed.
S1000
-11310
Create and Drop must be executed within a ServerOnly
Connection
S1000
-11320
Syntax error
S1000
-11323
The statement contained an escape clause not supported by
this database driver


GBase 8s JDBC Driver 程序员指南
南大通用数据技术股份有限公司
- 92 -
如果启用 GBase 8s
“自动释放”
特性,
则当数据库服务器关闭游标时,
它自动释放该游标。
因此,应用程序不必发送两个单独的请求,来关闭然后再释放游标—关闭游标就足够了。
可通过在数据库 URL 中将 IFX_AUTOFREE 变量设置为 TRUE,
来启用
“自动释放”
特性,
如此示例所示:
jdbc:gbasedbt-sqli://123.45.67.89:1533:GBASEDBTSERVER=myserver;
user=rdtest;password=test;ifx_autofree=true;
还可使用下列方法之一:
public void setAutoFree (boolean flag)
public boolean getAutoFree()
在 executeQuery() 方法之前,应调用 setAutoFree() 方法,但在 executeQuery() 之前或之后,
都可调用 getAutoFree()。
要使用这些方法,应用程序必须从 GBase 8s 软件包 com.gbasedbt.jdbc 导入这些类,并
将 Statement 类强制转型为 IfmxStatement 类,如下所示:
import com.gbasedbt.jdbc.*;
...
(IfmxStatement)stmt.setAutoFree(true);

扩容报错互信问题
问题现象
Error: execute cmd [ssh -o UserKnownHostsFile=/dev/null -o
StrictHostkeyChecking=no gbase@*.*.*.* ‘rm -rf /tmp/gnode_sys_tbl/
/opt/*.*.*.*/gnode/userdata/gbase/testdb
--exclude=gbase/adult_log.* ./gbase;mv ./gbase.tar /tmp/gnode_sys_tbl/’]failed,error
no[225]
Error cause: ).
build data packet at node [*.*.*.*] failed
解决方法
1.检查扩容节点与管理节点之间的互信。
2.将扩容节点home/ gbase/.bash_profile 这个文件里面的export
SSH_GBASE_PASSWORD 这行参数与扩容前的节点保持一致
3.批量检查SSH_GBASE_PASSWORD 参数,
cexec all: ‘env |grep PASSWD’确保一致
4.采用Python 对上一步输出的SSH_GBASE_PASSWORD 这个参数进行解密转换。
[gbase@localhost sys_tablespace]$ python
Python 2.7.5 (default, Oct 30 2018, 23:45:53)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import base64
>>>base64.b16decode('ssh_..那串数字')
得到解密后的数字
5.将所有节点的gbase 用户密码改为解密后的数字

GBase 8a MPP Cluster 最佳实践
5 FAQ
文档版本(2022-02-11)
南大通用数据技术股份有限公司
162