1.数据库实例A为大小写不敏感,先客户要求大小写敏感,—> 备份数据,新建实例,恢复数据

    1. [kingbase@centos7-vm ~]$
    2. [kingbase@centos7-vm ~]$ ksql -Usystem -W12345678ab TEST -f db_test.sql
    3. SET
    4. SET
    5. SET
    6. SET
    7. SET
    8. SET_CONFIG
    9. -----------------
    10. "$USER", PUBLIC
    11. (1 row)
    12. SET
    13. SET
    14. SET
    15. ksql:db_test.sql:22: 警告: 数据库 "test" 不存在
    16. COMMENT
    17. SET
    18. SET
    19. ksql:db_test.sql:37: 错误: 关系 "t001" 已经存在
    20. ksql:db_test.sql:40: 错误: 角色 "SYSTEM" 不存在
    21. ksql:db_test.sql:48: 错误: 关系 "t01" 已经存在
    22. ksql:db_test.sql:51: 错误: 角色 "SYSTEM" 不存在
    23. ksql:db_test.sql:57: 错误: 关系 "PUBLIC.pathman_config" 不存在
    24. ksql:db_test.sql:58: invalid command \.
    25. ksql:db_test.sql:65: 错误: 关系 "PUBLIC.pathman_config_params" 不存在
    26. ksql:db_test.sql:66: invalid command \.
    27. COPY 33000000
    28. COPY 0
    29. [kingbase@centos7-vm ~]$ ksql -Usystem -W12345678ab -dTEST
    30. ksql (V008R003C002B0242)
    31. Type "help" for help.
    32. TEST=#
    33. TEST=# \l+
    34. List of databases
    35. Name | Owner | Encoding | Collate | Ctype | Access privileges | Size | Tablespace | Description
    36. -----------+--------+----------+-------------+-------------+--------------------+---------+-------------+----------------------------
    37. ----------------
    38. SAMPLES | system | UTF8 | zh_CN.UTF-8 | zh_CN.UTF-8 | | 13 MB | SYS_DEFAULT |
    39. SECURITY | system | UTF8 | zh_CN.UTF-8 | zh_CN.UTF-8 | | 11 MB | SYS_DEFAULT |
    40. TEMPLATE0 | system | UTF8 | zh_CN.UTF-8 | zh_CN.UTF-8 | =c/system +| 11 MB | SYS_DEFAULT | unmodifiable empty database
    41. | | | | | system=CTcb/system | | |
    42. TEMPLATE1 | system | UTF8 | zh_CN.UTF-8 | zh_CN.UTF-8 | =c/system +| 11 MB | SYS_DEFAULT | default template for new da
    43. tabases
    44. | | | | | system=CTcb/system | | |
    45. TEMPLATE2 | system | UTF8 | zh_CN.UTF-8 | zh_CN.UTF-8 | =Tc/system +| 11 MB | SYS_DEFAULT |
    46. | | | | | system=CTcb/system | | |
    47. TEST | system | UTF8 | zh_CN.UTF-8 | zh_CN.UTF-8 | | 2835 MB | SYS_DEFAULT | default administrative conn
    48. ection database
    49. (6 rows)
    50. TEST=# select count(*) from t001;
    51. 错误: 关系 "T001" 不存在
    52. LINE 1: select count(*) from t001;
    53. ^
    54. TEST=#
    55. TEST=# select count(*) from T001;
    56. 错误: 关系 "T001" 不存在
    57. LINE 1: select count(*) from T001;
    58. ^
    59. TEST=#
    60. TEST=#
    61. TEST=# \dt
    62. List of relations
    63. Schema | Name | Type | Owner
    64. --------+-----------------------+-------+--------
    65. PUBLIC | PATHMAN_CONFIG | table | system
    66. PUBLIC | PATHMAN_CONFIG_PARAMS | table | system
    67. PUBLIC | t001 | table | system
    68. PUBLIC | t01 | table | system
    69. (4 rows)
    70. TEST=#
    71. TEST=# select count(*) from t001;
    72. 错误: 关系 "T001" 不存在
    73. LINE 1: select count(*) from t001;
    74. ^
    75. TEST=#
    76. TEST=# \dn
    77. List of schemas
    78. Name | Owner
    79. --------------------+--------
    80. INFORMATION_SCHEMA | system
    81. PUBLIC | system
    82. SYSAUDIT | system
    83. SYSLOGICAL | system
    84. XLOG_RECORD_READ | system
    85. (5 rows)
    86. TEST=# \dn+
    87. List of schemas
    88. Name | Owner | Access privileges | Description
    89. --------------------+--------+-------------------+------------------------
    90. INFORMATION_SCHEMA | system | system=UC/system +|
    91. | | =U/system |
    92. PUBLIC | system | system=UC/system +| standard public schema
    93. | | =UC/system |
    94. SYSAUDIT | system | system=UC/system +|
    95. | | SYSSSO=UC/system +|
    96. | | SYSSAO=UC/system +|
    97. | | =UC/system |
    98. SYSLOGICAL | system | system=UC/system +|
    99. | | =U/system |
    100. XLOG_RECORD_READ | system | |
    101. (5 rows)
    102. TEST=#
    103. TEST=# \dt+
    104. List of relations
    105. Schema | Name | Type | Owner | Size | Description
    106. --------+-----------------------+-------+--------+------------+-------------
    107. PUBLIC | PATHMAN_CONFIG | table | system | 8192 bytes |
    108. PUBLIC | PATHMAN_CONFIG_PARAMS | table | system | 8192 bytes |
    109. PUBLIC | t001 | table | system | 2825 MB |
    110. PUBLIC | t01 | table | system | 0 bytes |
    111. (4 rows)
    112. TEST=# select count(*) from PUBLIC.t001
    113. TEST-# ;
    114. 错误: 关系 "PUBLIC.T001" 不存在
    115. LINE 1: select count(*) from PUBLIC.t001
    116. ^
    117. TEST=#
    118. TEST=# select count(*) from "PUBLIC.T001";
    119. 错误: 关系 "PUBLIC.T001" 不存在
    120. LINE 1: select count(*) from "PUBLIC.T001";
    121. ^
    122. TEST=# select count(*) from "PUBLIC.T001";
    123. 错误: 关系 "PUBLIC.T001" 不存在
    124. LINE 1: select count(*) from "PUBLIC.T001";
    125. ^
    126. TEST=#
    127. TEST=# select count(*) from public.t001;
    128. 错误: 关系 "PUBLIC.T001" 不存在
    129. LINE 1: select count(*) from public.t001;
    130. ^
    131. TEST=# select count(*) from "PUBLIC"."t001";
    132. COUNT
    133. ----------
    134. 33000000
    135. (1 row)
    136. TEST=# show case_sensitive ;
    137. case_sensitive
    138. ----------------
    139. on
    140. (1 row)
    141. TEST=#

    自动转大写

    大小写敏感双引号