返回首页

gbase数据、南大通用产品文档:GBase8a异构引擎透明访问

更新日期:2024年09月11日

GBase UP 数据平台中GBase 8a MPP、GBase 8t、Hive on Spark 都是数据存储和数
据计算的引擎,DBA 可以将各种引擎构建为统一的Schema,对于普通的用户的
DML 查询,引擎是透明的。
扩展标准SQL DDL 中的创建表的语法:
创建表
CREATE [TEMPORARY] TABLE [IF NOT EXISTS]
[database_name.] table_name
(column_definition [,column_definition], ... [, key_options])
[table_options];
其中
table_options:
[DEFAULT] Engine = GBase8a| GBase8t|Hive
| SQL 92 create table options
| GBase 8a create table options 方言
| GBase 8t create table options 方言
| Hive create table options 方言
即DBA 创建数据表时,可以通过Engine 关键字设置表的存储引擎。应用开发工程
师,编写数据读写时,无需关注数据表的引擎,采用标准SQL92 DML 访问,从而
简化应用开发,降低数据建模的复杂度。


GBase UP 产品手册 2 产品描述

文档版本04(2021-04-21) 南大通用数据技术股份有限公司 22

参数说明:磁盘子系统可以同时有效处理的请求数。对于RAID 阵列,此参数应该是阵
列中驱动器主轴的数量。
该参数属于USERSET 类型参数,请参考表15-1 中对应设置方法进行设置。
取值范围:整型,0~1000
默认值:1


查看 GBase 8s ODBC Driver 可以返回的 SQLSTATE 值。
下表映射 GBase 8s ODBC Driver 可以返回的 SQLSTATE 值。
SQL_SUCCESS 的返回值通常表示函数执行成功,尽管 SQLSTATE 00000 也表示成功。
SQLSTATE
错误消息
从这里返回
01 000
General warning
所有的 GBase 8s ODBC Driver 函数,除了:
SQLAllocEnv SQLError
01002
Disconnect error
SQLDisconnect
01004
Data truncated
SQLBrowseConnect SQLColAttributes
SQLDataSources SQLDescribeCol
SQLDriverConnect SQLDrivers
SQLExecDirect SQLExecute
SQLExtendedFetch SQLFetch
SQLGetCursorName SQLGetData
SQLGetInfo SQLNativeSql
SQLPutData SQLSetPos
01006
Privilege not revoked
SQLExecDirect SQLExecute
01S00
Invalid connection
string attribute
SQLBrowseConnect SQLDriverConnect
01S01
Error in row
SQLExtendedFetch SQLSetPos
01S02
Option value changed
SQLSetConnectOption SQLSetStmtOption

GBase 8s ODBC Driver 程序员指南
南大通用数据技术股份有限公司
- 202 -
SQLSTATE
错误消息
从这里返回
01S03
No rows updated or
deleted
SQLExecDirect SQLExecute
SQLSetPos
01S04
More than one row
updated or deleted
SQLExecDirect SQLExecute
SQLSetPos
07001
Wrong number of
parameters
SQLExecDirect SQLExecute
07006
Restricted data type
attribute violation
SQLBindParameter SQLExtendedFetch
SQLFetchSQLGetData
08001
Unable to connect to
data source
SQLBrowseConnect SQLConnect
SQLDriverConnect
08002
Connection in use
SQLBrowseConnect SQLConnect
SQLDriverConnect SQLSetConnectOption
08003
Connection not open
SQLAllocStmt SQLDisconnect
SQLGetConnectOption SQLGetInfo
SQLNativeSql SQLSetConnectOption
SQLTransact
08004
Data source rejected
establishment of
connection
SQLBrowseConnect SQLConnect
SQLDriverConnect
08007
Connection failure
during transaction
SQLTransact
08S01
Communication link
failure
SQLBrowseConnect SQLColumnPrivileges
SQLColumns SQLConnect
SQLDriverConnect SQLExecDirect
SQLExecute SQLExtendedFetch
SQLFetch SQLForeignKeys
SQLFreeConnect SQLGetData
SQLGetTypeInfo SQLParamData
SQLPrepare SQLPrimaryKeys
SQLProcedureColumns SQLProcedures
SQLPutDataSQL SetConnectOption
SQLSetStmtOption SQLSpecialColumns
SQLStatistics SQLTablePrivileges
SQLTables
21S01
Insert value list does
not match column list
SQLExecDirect SQLPrepare
21S02
Degree of derived
table does not match
column list
SQLExecDirect SQLPrepare SQLSetPos
22001
String data right
truncation
SQLPutData

GBase 8s ODBC Driver 程序员指南
南大通用数据技术股份有限公司
- 203 -
SQLSTATE
错误消息
从这里返回
22003
Numeric value out of
range
SQLExecDirect SQLExecute
SQLExtendedFetch SQLFetch
SQLGetData SQLGetInfo
SQLPutData SQLSetPos
22005
Error in assignment
SQLExecDirect SQLExecute
SQLExtendedFetch SQLFetch
SQLGetData SQLPrepare
SQLPutData SQLSetPos
22008
Datetime field
overflow
SQLExecDirect SQLExecute
SQLExtendedFetch
SQLFetchSQLGetData
SQLPutDataSQLSetPos
22012
Division by zero
SQLExecDirect SQLExecute
SQLExtendedFetch SQLFetchSQLGetData
22026
String data, length
mismatch
SQLParamData
23000
Integrity constraint
violation
SQLExecDirect SQLExecute
SQLSetPos
24000
Invalid cursor state
SQLColAttributes SQLColumnPrivileges
SQLColumns SQLDescribeCol
SQLExecDirect SQLExecute
SQLExtendedFetch SQLFetch
SQLForeignKeys SQLGetData
SQLGetStmtOption SQLGetTypeInfo
SQLPrepare SQLPrimaryKeys
SQLProcedureColumns SQLProcedures
SQLSetCursorName SQLSetPos
SQLSetStmtOption SQLSpecialColumns
SQLStatistics SQLTablePrivileges
SQLTables
25000
Invalid transaction
state
SQLDisconnect
28000
Invalid authorization
specification
SQLBrowseConnect SQLConnectS
QLDriverConnect
34000
Invalid cursor name
SQLExecDirect SQLPrepare
SQLSetCursorName
37000
Syntax error or access
violation
SQLExecDirect SQLNativeSql
SQLPrepare
3C000
Duplicate cursor name
SQLSetCursorName
40001
Serialization failure
SQLExecDirect SQLExecute
SQLExtendedFetch SQLFetch

GBase 8s ODBC Driver 程序员指南
南大通用数据技术股份有限公司
- 204 -
SQLSTATE
错误消息
从这里返回
42000
Syntax error or access
violation
SQLExecDirect SQLExecute
SQLPrepare SQLSetPos
70100
Operation aborted
SQLCancel
IM001
Driver does not
support this function
所有的 ODBC 函数,除了:
SQLAllocConnect SQLAllocEnv
SQLDataSources SQLDrivers
SQLError SQLFreeConnect
SQLFreeEnv SQLGetFunctions
IM002
Data source name not
found and no default
driver specified
SQLBrowseConnect
SQLConnect
SQLDriverConnect
IM003
Specified driver could
not be loaded
SQLBrowseConnect SQLConnect
SQLDriverConnect
IM004
Driver's
SQLAllocEnv failed
SQLBrowseConnect SQLConnect
SQLDriverConnect
IM005
Driver's
SQLAllocConnect
failed
SQLBrowseConnect SQLConnect
SQLDriverConnect
IM006
Driver's
SQLSetConnectOptio
n failed
SQLBrowseConnect SQLConnect
SQLDriverConnect
IM007
No data source or
driver specified;
dialog prohibited
SQLDriverConnect
IM008
Dialog failed
SQLDriverConnect
IM009
Unable to load
translation shared
library (DLL)
SQLBrowseConnect SQLConnect
SQLDriverConnect SQLSetConnectOption
IM010
Data source name too
long
SQLBrowseConnect SQLDriverConnect
IM011
Driver name too long
SQLBrowseConnect SQLDriverConnect
IM012
DRIVER keyword
syntax error
SQLBrowseConnect SQLDriverConnect
IM013
Trace file error
All ODBC functions.
S0001
Base table or view
already exists
SQLExecDirectSQLPrepare
S0002
Base table not found
SQLExecDirectSQLPrepare
S0011
Index already exists
SQLExecDirectSQLPrepare
S0012
Index not found
SQLExecDirectSQLPrepare
S0021
Column already exists
SQLExecDirectSQLPrepare
S0022
Column not found
SQLExecDirectSQLPrepare

GBase 8s ODBC Driver 程序员指南
南大通用数据技术股份有限公司
- 205 -
SQLSTATE
错误消息
从这里返回
S0023
No default for column
SQLSetPos
S1000
General error
所有的 ODBC 函数
S1001
Memory allocation
failure
所有的 ODBC 函数,除了:
SQLAllocEnv SQLError
SQLFreeConnect SQLFreeEnv
S1002
Invalid column
number
SQLBindCol SQLColAttributes
SQLDescribeCol SQLExtendedFetchS
QLFetch SQLGetData
S1003
Program type out of
range
SQLBindCol SQLBindParameter
SQLGetData
S1004
SQL data type out of
range
SQLBindParameter SQLGetTypeInfo
S1008
Operation canceled
所有可以执行异步的 ODBC 函数:
SQLColAttributes SQLColumnPrivileges
SQLColumns SQLDescribeCol
SQLDescribeParam SQLExecDirect
SQLExecute SQLExtendedFetch
SQLFetch SQLForeignKeys
SQLGetData SQLGetTypeInfo
SQLMoreResults SQLNumParams
SQLNumResultCols SQLParamData
SQLPrepare SQLPrimaryKeys
SQLProcedureColumns SQLProcedures
SQLPutData SQLSetPos
SQLSpecialColumns SQLStatistics
SQLTablePrivileges SQLTables
S1009
Invalid argument
value
SQLAllocConnect SQLAllocStmt
SQLBindCol SQLBindParameter
SQLExecDirect SQLForeignKeys
SQLGetData SQLGetInfo
SQLNativeSql SQLPrepare
SQLPutData SQLSetConnectOption
SQLSetCursorName SQLSetPos
SQLSetStmtOption
S1010
Function sequence
error
SQLBindCol SQLBindParameter
SQLColAttributes SQLColumnPrivileges
SQLColumns SQLDescribeCol
SQLDisconnect SQLExecDirect
SQLExecute SQLExtendedFetch
SQLFetch SQLForeignKeys
SQLFreeConnect SQLFreeEnv

GBase 8s ODBC Driver 程序员指南
南大通用数据技术股份有限公司
- 206 -
SQLSTATE
错误消息
从这里返回
SQLFreeStmt SQLGetConnectOption
SQLGetCursorName SQLGetData
SQLGetFunctions SQLGetStmtOption
SQLGetTypeInfo SQLMoreResults
SQLNumParams SQLNumResultColsS
QLParamData SQLParamOptions
SQLPrepare SQLPrimaryKeys
SQLProcedureColumns SQLProcedures
SQLPutData SQLRowCount
SQLSetConnectOption SQLSetCursorName
SQLSetPos SQLSetScrollOptions
SQLSetStmtOption SQLSpecialColumns
SQLStatistics SQLTablePrivileges
SQLTables SQLTransact
S1011
Operation invalid at
this time
SQLGetStmtOption SQLSetConnectOption
SQLSetStmtOption
S1012
Invalid transaction
operation code
specified
SQLTransact
S1015
No cursor name
available
SQLGetCursorName
S1090
Invalid string or
buffer length
SQLBindCol SQLBindParameter
SQLBrowseConnect SQLColAttributes
SQLColumnPrivileges SQLColumns
SQLConnect SQLDataSources
SQLDescribeCol SQLDriverConnect
SQLDrivers SQLExecDirect
SQLExecute SQLForeignKeys
SQLGetCursorName SQLGetData
SQLGetInfo SQLNativeSql
SQLPrepare SQLPrimaryKeys
SQLProcedureColumns SQLProcedures
SQLPutData SQLSetCursorName
SQLSetPos SQLSpecialColumns
SQLStatistics SQLTablePrivileges
SQLTables
S1091
Descriptor type out of
range
SQLColAttributes
S1092
Option type out of
range
SQLFreeStmt SQLGetConnectOption
SQLGetStmtOption SQLSetConnectOption
SQLSetStmtOption

GBase 8s ODBC Driver 程序员指南
南大通用数据技术股份有限公司
- 207 -
SQLSTATE
错误消息
从这里返回
S1093
Invalid parameter
number
SQLBindParameter
S1094
Invalid scale value
SQLBindParameter
S1095
Function type out of
range
SQLGetFunctions
S1096
Information type out
of range
SQLGetInfo
S1097
Column type out of
range
SQLSpecialColumns
S1098
Scope type out of
range
SQLSpecialColumns
S1099
Nullable type out of
range
SQLSpecialColumns
S1100
Uniqueness option
type out of range
SQLStatistics
S1101
Accuracy option type
out of range
SQLStatistics
S1103
Direction option out
of range
SQLDataSources
SQLDrivers
S1104
Invalid precision
value
SQLBindParameter
S1105
Invalid parameter type
SQLBindParameter
S1106
Fetch type out of
range
SQLExtendedFetch
S1107
Row value out of
range
SQLExtendedFetch
SQLParamOptions SQLSetPos
SQLSetScrollOptions
S1108
Concurrency option
out of range
SQLSetScrollOptions
S1109
Invalid cursor position
SQLExecute SQLExecDirect
SQLGetData SQLGetStmtOption
SQLSetPos
S1110
Invalid driver
completion
SQLDriverConnect
S1111
Invalid bookmark
value
SQLExtendedFetch
S1C00
Driver not capable
SQLBindCol SQLBindParameter
SQLColAttributes SQLColumnPrivileges
SQLColumns SQLExecDirect
SQLExecute SQLExtendedFetch
SQLFetch SQLForeignKeys

GBase 8s ODBC Driver 程序员指南
南大通用数据技术股份有限公司
- 208 -
SQLSTATE
错误消息
从这里返回
SQLGetData SQLTablePrivileges
SQLGetInfo SQLGetStmtOption
SQLGetTypeInfo SQLPrepare
SQLPrimaryKeys SQLTransact
SQLProcedures SQLSetConnectOption
SQLSetPosSQL SQLTables
SQLSetStmtOption SQLSpecialColumns
SQLStatistics SQLTransact
SetScrollOptions
SQLProcedureColumns
SQLGetConnectOption
S1T00
Time-out expired
SQLBrowseConnect SQLColAttributes
SQLColumnPrivileges SQLColumns
SQLConnect SQLDescribeCol
SQLDriverConnect SQLExecDirect
SQLExecute SQLExtendedFetch
SQLFetch SQLForeignKeys
SQLGetData SQLGetInfo
SQLGetTypeInfo SQLMoreResults
SQLNumParams SQLNumResultCols
SQLParamData SQLPrepare
SQLPrimaryKeys SQLProcedureColumns
SQLProcedures SQLPutData
SQLSetPos SQLSpecialColumns
SQLStatistics SQLTablePrivileges
SQLTables