问题描述
已为我设置了DB2 for z / OS数据库。现在我想知道数据库的编码方案,如果数据库是其他类型的编码,将其更改为Unicode。
A DB2 for z/OS database has been setup for me. Now I want to know the encoding scheme of the database and change it to Unicode if the database is other type of encoding.
我该如何做?我可以在Java应用程序中使用动态SQL语句吗?
How can I do this? Can I do this using dynamic SQL statements in my Java application?
谢谢!
推荐答案
当您使用CCSID UNICODE子句创建表(和数据库和表)时,需要指定编码方案为UNICODE。
You need to specify that the encoding scheme is UNICODE when you are creating your table (and database and tablepsace) by using the CCSID UNICODE clause.
根据到文档:
有关更多信息,请参阅 。
For more, see Creating a Unicode Table in the DB2 for z/os documentation.
您可以通过Java / JDBC创建表,但我怀疑您将能够以这种方式创建数据库和表空间。我不会推荐它,我会找到你最接近的z / os DBA,让那个人来帮助你。
You are able to create tables via Java/JDBC, but I doubt that you will be able to create databases and tablespaces that way. I wouldn't recommend it anyway, I would find your closest z/os DBA and get that person to help you.
这篇关于如何使用动态SQL语句获取和更改DB2 z / OS数据库的编码模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!