Home > database >  GBase 8 s how the default character set new database
GBase 8 s how the default character set new database

Time:11-27

A, the enterprise manager steps

Enterprise manager is GBase graphical client, can run under Windows or Linux system,

Newly created GB18030 character set GBK (of a character set that database, using the enterprise manager's operation steps are as follows:

1. Check the database character set

2. Disconnect from the database connection, a new connection and set the character set parameters for GB18030, connect to the database

3. New database

Step1: check the database character set

In enterprise manager on the left side of the tree, find the testdb database, and double-click on the right side appears testdb window, check the "check" column values, shows the database character set for the zh_CN. 57372 UTF8 character set (said),



Step2: disconnect from the database connection, the connection and set up the new character set parameters, and to connect to the database

Click enterprise manager on the left side of the tree of data connection, right-click pop-up menu select "disconnect", then disconnect from the database connection,

On the data connection to right click on the "edit connection" set,



In the pop-up "connection configuration", set "database/model" into the sysmaster system library, library system as any character set can be connected,



Click the "drive on the left side of the property," CLIENT_LOCALE set character set parameters and DB_LOCALE. Two parameters for the zh_cn GB18030-2000 GBK character set (said)



Click "ok" button to complete set,

Continue to right-click on the data connection, select "connect" in the pop-up menu, reconnect to the database,

Step3: a new database

Click the enterprise manager database on the left side of the tree, right click the pop-up menu, select "new database", "create a database" popup Windows,



Fill in the name of the database, create position (spatial database name), log mode (with the buffer cache logs, no buffer cache log, no log three choose one), click the "ok" button to create the database,



Established under the database tables are GB18030 character set,


Second, dbaccess steps

Dbaccess GBase 8 s own command line client tools, running under the Linux system,

The newly created GB18030 character set GBK (of a character set that database, use dbaccess command operation steps are as follows:

1. Set character set in the environment variable parameter

2. Let the environment variables take effect

3. Use dbaccess new database

Step1: set character set in the environment variable parameter

Gbasedbt environment configuration files in the database account. In the following, keeping the original environment variable on the basis of supplementary character set the environment variable DB_LOCALE and CLIENT_LOCALE:

Export DB_LOCALE=zh_cn. GB18030-2000
Export CLIENT_LOCALE=zh_cn. GB18030-2000



Step2: let the environment variables take effect

[gbasedbt @ node176 ~] $source. The following

Step3: use dbaccess new database

Use dbaccess to connect to the database, using new database SQL statement db_18030
[gbasedbt @ node176 ~] $dbaccess - -
The create database db_18030 in rootdbs with log;



Database creation is successful, established under the database tables are GB18030 character set,
  • Related