DM8 初始化参数 CASE_SENSITIVE 控制大小写敏感性测试

DM8 初始化参数 CASE_SENSITIVE 控制大小写敏感性测试 大小写敏感控制参数。可以通过SF_GET_CASE_SENSITIVE_FLAG函数查询。SQL select SF_GET_CASE_SENSITIVE_FLAG(); 行号 SF_GET_CASE_SENSITIVE_FLAG() ---------- ---------------------------- 1 10表示不敏感系统会将大写字母全部转为小写再比较1表示敏感小写的标识符应用括起否则被系统自动转换为大写。简单来讲CASE_SENSITIVE0时双引号也无法起到大小写敏感作用CASE_SENSITIVE1时使用双引号来保证严格大小写敏感和Oracle行为一致。当CASE_SENSITIVE1时。表名大小写测试无引号create table t_case_test ( id int, name varchar(20) ); select * from t_case_test;--成功 select * from T_CASE_TEST;--成功 select * from t_case_test;--报错 select * from T_CASE_TEST;--成功实际测试只有t_case_test测试报错。符合CASE_SENSITIVE1时的预期。SQL create table t_case_test ( id int, name varchar(20) );2 3 4 操作已执行 已用时间: 66.490(毫秒). 执行号:3406. SQL select * from t_case_test; 未选定行 已用时间: 5.404(毫秒). 执行号:3407. SQL select * from T_CASE_TEST; 未选定行 已用时间: 3.601(毫秒). 执行号:3408. SQL select * from t_case_test; select * from t_case_test; 第1 行附近出现错误[-2106]:无效的表或视图名[t_case_test]. 已用时间: 2.035(毫秒). 执行号:0. SQL select * from T_CASE_TEST; 未选定行 已用时间: 3.604(毫秒). 执行号:3409. SQL表名大小写测试带引号drop table t_case_test; create table t_case_test ( id int, name varchar(20) ); select * from t_case_test;--报错 select * from T_CASE_TEST;--报错 select * from t_case_test;--成功 select * from T_CASE_TEST;--报错实际测试如果大小写敏感当建表使用双引号时查询也必须带有双引号且要完全一致。SQL create table t_case_test ( id int, name varchar(20) );2 3 4 操作已执行 已用时间: 9.916(毫秒). 执行号:3419. SQL select * from t_case_test; select * from t_case_test; 第1 行附近出现错误[-2106]:无效的表或视图名[T_CASE_TEST]. 已用时间: 1.957(毫秒). 执行号:0. SQL select * from T_CASE_TEST; select * from T_CASE_TEST; 第1 行附近出现错误[-2106]:无效的表或视图名[T_CASE_TEST]. 已用时间: 1.763(毫秒). 执行号:0. SQL select * from t_case_test; 未选定行 已用时间: 4.052(毫秒). 执行号:3420. SQL select * from T_CASE_TEST; select * from T_CASE_TEST; 第1 行附近出现错误[-2106]:无效的表或视图名[T_CASE_TEST]. 已用时间: 2.054(毫秒). 执行号:0.字段名大小写测试无引号drop table t_case_test; create table t_case_test ( id int, userName varchar(20) ); select id, username from t_case_test;--成功 select id, USERNAME from t_case_test;--成功 select id, userName from t_case_test;--成功实际测试SQL create table t_case_test ( id int, userName varchar(20) );2 3 4 操作已执行 已用时间: 14.031(毫秒). 执行号:3412. SQL select id, username from t_case_test; 未选定行 已用时间: 3.763(毫秒). 执行号:3413. SQL select id, USERNAME from t_case_test; 未选定行 已用时间: 3.719(毫秒). 执行号:3414. SQL select id, userName from t_case_test; 未选定行 已用时间: 2.613(毫秒). 执行号:3415.字段名带双引号drop table t_case_test; create table t_case_test ( id int, userName varchar(20), UserAge int ); select id, userName from t_case_test;--报错 select id, userName from t_case_test;--成功 select id, USERNAME from t_case_test;--报错 select id, USERNAME from t_case_test;--报错实际测试SQL create table t_case_test ( id int, userName varchar(20), UserAge int );2 3 4 5 操作已执行 已用时间: 9.033(毫秒). 执行号:3422. SQL select id, userName from t_case_test;--报错 select id, userName from t_case_test;--报错 第1 行附近出现错误[-2111]:无效的列名[USERNAME]. 已用时间: 3.372(毫秒). 执行号:0. SQL select id, userName from t_case_test;--成功 未选定行 已用时间: 3.279(毫秒). 执行号:3423. SQL select id, USERNAME from t_case_test;--报错 select id, USERNAME from t_case_test;--报错 第1 行附近出现错误[-2111]:无效的列名[USERNAME]. 已用时间: 1.674(毫秒). 执行号:0. SQL select id, USERNAME from t_case_test;--报错 select id, USERNAME from t_case_test;--报错 第1 行附近出现错误[-2111]:无效的列名[USERNAME]. 已用时间: 2.057(毫秒). 执行号:0.新初始化CASE_SENSITIVE0的库重复以上测试。#dmdba用户执行 dminit PATH/dm/datatest PAGE_SIZE16 SYSDBA_PWDDMdba_123 SYSAUDITOR_PWDDMauditor_123 SYSSSO_PWDDMsysso_123 CASE_SENSITIVE0 PORT_NUM5336 DB_NAMEDMBMG #root用户执行 ./dm_service_installer.sh -t dmserver -dm_ini /dm/datatest/DMBMG/dm.ini -p DMBMG #执行完启动数据库 [dmdbalocalhost bin]$ ./DmServiceDMBMG start Starting DmServiceDMBMG: [ OK ] #进库查询大小写敏感性 disql SYSDBA/DMdba_123127.0.0.1:5336 SQL select SF_GET_CASE_SENSITIVE_FLAG(); 行号 SF_GET_CASE_SENSITIVE_FLAG() ---------- ---------------------------- 1 0 已用时间: 2.835(毫秒). 执行号:67601.表名大小写测试无引号drop table t_case_test; create table t_case_test ( id int, name varchar(20) ); select * from t_case_test;--成功 select * from T_CASE_TEST;--成功 select * from t_case_test;--成功 select * from T_CASE_TEST;--成功实际测试均可以成功t_case_test也能查到SQL create table t_case_test ( id int, name varchar(20) );2 3 4 操作已执行 已用时间: 413.344(毫秒). 执行号:67602. SQL select * from t_case_test; 未选定行 已用时间: 134.961(毫秒). 执行号:67603. SQL select * from T_CASE_TEST; 未选定行 已用时间: 14.708(毫秒). 执行号:67604. SQL select * from t_case_test; 未选定行 已用时间: 4.638(毫秒). 执行号:67605. SQL select * from T_CASE_TEST; 未选定行 已用时间: 14.039(毫秒). 执行号:67606. SQL表名大小写测试带引号drop table t_case_test; create table t_case_test ( id int, name varchar(20) ); select * from t_case_test; select * from T_CASE_TEST; select * from t_case_test; select * from T_CASE_TEST;实际测试也是均可以成功SQL create table t_case_test ( id int, name varchar(20) );2 3 4 操作已执行 已用时间: 24.325(毫秒). 执行号:67608. SQL select * from t_case_test; 未选定行 已用时间: 55.193(毫秒). 执行号:67609. SQL select * from T_CASE_TEST; 未选定行 已用时间: 13.178(毫秒). 执行号:67610. SQL select * from t_case_test; 未选定行 已用时间: 3.944(毫秒). 执行号:67611. SQL select * from T_CASE_TEST; 未选定行 已用时间: 11.733(毫秒). 执行号:67612.字段名大小写测试无引号drop table t_case_test; create table t_case_test ( id int, userName varchar(20) ); select id, username from t_case_test; select id, USERNAME from t_case_test; select id, userName from t_case_test;实际测试均可以成功SQL create table t_case_test ( id int, userName varchar(20) );2 3 4 操作已执行 已用时间: 18.164(毫秒). 执行号:67614. SQL select id, username from t_case_test; 未选定行 已用时间: 13.156(毫秒). 执行号:67615. SQL select id, USERNAME from t_case_test; 未选定行 已用时间: 13.663(毫秒). 执行号:67616. SQL select id, userName from t_case_test; 未选定行 已用时间: 12.227(毫秒). 执行号:67617.字段名带双引号drop table t_case_test; create table t_case_test ( id int, userName varchar(20), UserAge int ); select id, userName from t_case_test; select id, userName from t_case_test; select id, USERNAME from t_case_test; select id, USERNAME from t_case_test;实际测试均可以成功SQL create table t_case_test ( id int, userName varchar(20), UserAge int );2 3 4 5 操作已执行 已用时间: 19.962(毫秒). 执行号:67619. SQL select id, userName from t_case_test; 未选定行 已用时间: 23.667(毫秒). 执行号:67620. SQL select id, userName from t_case_test; 未选定行 已用时间: 14.698(毫秒). 执行号:67621. SQL select id, USERNAME from t_case_test; 未选定行 已用时间: 3.654(毫秒). 执行号:67622. SQL select id, USERNAME from t_case_test; 未选定行 已用时间: 15.573(毫秒). 执行号:67623.数据库测完后可以先停库。[dmdbalocalhost bin]$ ./DmServiceDMBMG stop Stopping DmServiceDMBMG: [ OK ]注销服务[rootlocalhost root]# ./dm_service_uninstaller.sh -n DmServiceDMBMG 是否删除服务(DmServiceDMBMG)?(Y/y:是 N/n:否): Y Removed /etc/systemd/system/multi-user.target.wants/DmServiceDMBMG.service. 删除服务文件(/usr/lib/systemd/system/DmServiceDMBMG.service)完成 删除服务(DmServiceDMBMG)完成删除数据库目录节省空间资源。[dmdbalocalhost dm]$ rm -rf datatest社区地址https://eco.dameng.com