内容简介:1.在Linux平台上使用disql工具创建List分区表sales时对分区键指定英文字符时,当指定多个值时可以创建成功2.在Linux平台上使用disql工具创建List分区表sales时对分区键指定中文时,当指定多个列表值时创建报错3.在Linux平台上使用disql工具创建List分区表sales时对分区键指定中文时,当指定一个列表值时创建成功
1.在 Linux 平台上使用disql工具创建List分区表sales时对分区键指定英文字符时,当指定多个值时可以创建成功
SQL> CREATE TABLE sales 2 ( 3 sales_id INT, 4 saleman CHAR(20), 5 saledate DATETIME, 6 city CHAR(10) 7 ) 8 PARTITION BY LIST(city) 9 ( 10 PARTITION p1 VALUES ('a','b'), 11 PARTITION p2 VALUES ('c','d','e'), 12 PARTITION p3 VALUES ('f','g'), 13 PARTITION p4 VALUES ('h','i') 14 ); warning: List partition not include default,partition may be not located executed successfully used time: 115.412(ms). Execute id is 2094.
2.在Linux平台上使用disql工具创建List分区表sales时对分区键指定中文时,当指定多个列表值时创建报错
SQL> drop table sales; executed successfully used time: 307.935(ms). Execute id is 2095. SQL> CREATE TABLE sales 2 ( 3 sales_id INT, 4 saleman CHAR(20), 5 saledate DATETIME, 6 city CHAR(50) 7 ) 8 PARTITION BY LIST(city) 9 ( 10 PARTITION p1 VALUES ('北京','天津'), 11 PARTITION p2 VALUES ('上海','南京','杭州'), 12 PARTITION p3 VALUES ('武汉','长沙'), 13 PARTITION p4 VALUES ('广州','深圳') 14 ); CREATE TABLE sales ( sales_id INT, saleman CHAR(20), saledate DATETIME, city CHAR(50) ) PARTITION BY LIST(city) ( PARTITION p1 VALUES ('北京','天津'), PARTITION p2 VALUES ('上海','南京','杭州'), PARTITION p3 VALUES ('武汉','长沙'), PARTITION p4 VALUES ('广州','深圳') ); PARTITION p2 VALUES ('上海','南京','杭州'), * line 11, column 30, nearby [藝娴穄 has error[-2007]: Syntax error. used time: 0.328(ms). Execute id is 0.
3.在Linux平台上使用disql工具创建List分区表sales时对分区键指定中文时,当指定一个列表值时创建成功
SQL> CREATE TABLE sales 2 ( 3 sales_id INT, 4 saleman CHAR(20), 5 saledate DATETIME, 6 city CHAR(10) 7 ) 8 PARTITION BY LIST(city) 9 ( 10 PARTITION p1 VALUES ('北京'), 11 PARTITION p2 VALUES ('上海'), 12 PARTITION p3 VALUES ('武汉'), 13 PARTITION p4 VALUES ('广州') 14 ); warning: List partition not include default,partition may be not located executed successfully used time: 19.809(ms). Execute id is 2096.
4.在win平台使用disql工具创建List分区表sales时对分区键指定中文时,当指定多个列表值时创建成功
disql V7.1.6.48-Build(2018.03.01-89507)ENT SQL> conn jy/abcd@10.10.10.1:5236 服务器[10.10.10.1:5236]:处于普通打开状态 登录使用时间: 14.001(毫秒) SQL> drop table sales; 操作已执行 已用时间: 352.729(毫秒). 执行号:2118. SQL> CREATE TABLE SALES( 2 SALES_ID INT, 3 SALEMAN CHAR(20), 4 SALEDATE DATETIME, 5 CITY CHAR(10) 6 ) 7 PARTITION BY LIST(CITY) 8 SUBPARTITION BY RANGE(SALEDATE) SUBPARTITION TEMPLATE( 9 SUBPARTITION P11 VALUES LESS THAN ('2012-04-01'), 10 SUBPARTITION P12 VALUES LESS THAN ('2012-07-01'), 11 SUBPARTITION P13 VALUES LESS THAN ('2012-10-01'), 12 SUBPARTITION P14 VALUES EQU OR LESS THAN (MAXVALUE)) 13 ( 14 PARTITION P1 VALUES ('北京','天津') 15 ( 16 SUBPARTITION P11_1 VALUES LESS THAN ('2012-10-01'), 17 SUBPARTITION P11_2 VALUES EQU OR LESS THAN (MAXVALUE) 18 ), 19 PARTITION P2 VALUES ('上海','南京','杭州'), 20 PARTITION P3 VALUES (DEFAULT) 21 ); 操作已执行 已用时间: 26.710(毫秒). 执行号:2119. SQL>
5.在Linux平台上使用管理 工具 创建List分区表sales时对分区键指定中文时,当指定多个列表值时创建也能成功
6.查看操作系统字符集为UTF-8
[root@shard1 /]# locale LANG=en_US.UTF-8 LC_CTYPE="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8" LC_PAPER="en_US.UTF-8" LC_NAME="en_US.UTF-8" LC_ADDRESS="en_US.UTF-8" LC_TELEPHONE="en_US.UTF-8" LC_MEASUREMENT="en_US.UTF-8" LC_IDENTIFICATION="en_US.UTF-8" LC_ALL=
7.修改操作系统字符集
[root@shard1 /]# vi /etc/locale.conf #LANG="en_US.UTF-8" LANG="zh_CN.gb2312" [root@shard1 ~]# locale LANG=zh_CN.gb2312 LC_CTYPE="zh_CN.gb2312" LC_NUMERIC="zh_CN.gb2312" LC_TIME="zh_CN.gb2312" LC_COLLATE="zh_CN.gb2312" LC_MONETARY="zh_CN.gb2312" LC_MESSAGES="zh_CN.gb2312" LC_PAPER="zh_CN.gb2312" LC_NAME="zh_CN.gb2312" LC_ADDRESS="zh_CN.gb2312" LC_TELEPHONE="zh_CN.gb2312" LC_MEASUREMENT="zh_CN.gb2312" LC_IDENTIFICATION="zh_CN.gb2312" LC_ALL=
8.当修改字符集后在Linux平台使用disql工具创建List分区表sales时对分区键指定中文时,当指定多个列表值时创建成功
[dmdba@shard1 bin]$ ./disql jy/abcd@10.10.10.1:5236 Server[10.10.10.1:5236]:mode is normal, state is open login used time: 9.677(ms) disql V7.1.6.46-Build(2018.02.08-89107)ENT Connected to: DM 7.1.6.46 SQL> drop table sales; executed successfully used time: 351.233(ms). Execute id is 2120. SQL> CREATE TABLE SALES( 2 SALES_ID INT, 3 SALEMAN CHAR(20), 4 SALEDATE DATETIME, 5 CITY CHAR(10) 6 ) 7 PARTITION BY LIST(CITY) 8 SUBPARTITION BY RANGE(SALEDATE) SUBPARTITION TEMPLATE( 9 SUBPARTITION P11 VALUES LESS THAN ('2012-04-01'), 10 SUBPARTITION P12 VALUES LESS THAN ('2012-07-01'), 11 SUBPARTITION P13 VALUES LESS THAN ('2012-10-01'), 12 SUBPARTITION P14 VALUES EQU OR LESS THAN (MAXVALUE)) 13 ( 14 PARTITION P1 VALUES ('北京','天津') 15 ( 16 SUBPARTITION P11_1 VALUES LESS THAN ('2012-10-01'), 17 SUBPARTITION P11_2 VALUES EQU OR LESS THAN (MAXVALUE) 18 ), 19 PARTITION P2 VALUES ('上海','南京','杭州'), 20 PARTITION P3 VALUES (DEFAULT) 21 ); executed successfully used time: 22.411(ms). Execute id is 2121.
从上面的测试来看,字符集对List分区表使用中文存在影响。
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网
猜你喜欢:- oracle查看字符集 修改字符集
- Oracle 字符集实验
- [MySQL]支持 emoji(字符集问题)
- 带你5分钟读懂MySQL字符集设置
- Docker下mysql设置字符集的方法
- Oracle-OCP学习笔记:字符集
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Practical Django Projects, Second Edition
James Bennett / Apress / 2009 / 44.99
Build a django content management system, blog, and social networking site with James Bennett as he introduces version 1.1 of the popular Django framework. You’ll work through the development of ea......一起来看看 《Practical Django Projects, Second Edition》 这本书的介绍吧!