When we set up a Sybase database server, we encountered a garbled problem. We didn't encounter this problem because the development database server had been installed and set up character sets for a long time.
When we set up a Sybase database server, we encountered a garbled problem. We didn't encounter this problem because the development database server had been installed and set up character sets for a long time.
When we set up a Sybase test database server, we encountered a garbled problem. We didn't encounter this problem because the development database server had been installed and set up character sets for a long time. Therefore, some problems occurred only when the test environment was deployed, at that time, the database has been configured, all the initialization scripts have been executed, and the project has been successfully deployed on WebLogic. Open IE and run the program, it is found that all the information read from the database is garbled. If you search online for related information, you need to set the character set. However, the information you just found is basically a word phrase, no system has explained how to set character sets. Almost all of their methods have been tried. The results have not been completed, and even the console and SQL platform are garbled, I couldn't understand it, so I went to ask Gao Ren. He sent me a document dedicated to explaining character sets, which was comprehensive and finally solved the garbled problem through his help.
Next I will summarize the process of setting the character set in Sybase:
1. After Sybase is installed, if you want to set the character set to CP936, you must first install the character set because the default character set table of Sybase does not have this character set, the installation procedure is as follows: (here the installation path of SYBASE is c: \ sybase)
1. c :\>; cd \ sybase \ charsets \ cp936
2. c: \ sybase \ charsets \ cp936>;
Charset-Usa-Psa_pass-Sserver_name binary. srt cp936
Run the preceding command to install the CP936 character set in the system character set table of Sybase. However, you must restart the Sybase service twice to see the result, you can check the syscharsets table in the master database to check whether the installation is successful. We can see that the installation is successful: 1002,171, 'cp936', 'cp936 (Simplified Chinese ). ','... '
2. If CP936 is numbered 171, you must set the system character set to this ID in the Sybase attribute, as shown in:
If character integration is set, the error occurs because the tablespace in the master database is allocated only several hundred kb by default, and there is no enough space after new data is imported, therefore, you need to set a larger tablespace for the master database, right-click the master database attribute, select the tab page of The tablespace, and edit and re-allocate the size of the original tablespace, you can solve this problem by allocating all the tablespaces of the master.
3. After setting the character set, you can execute the initialization script. There are several other episodes in this article. Since the error of insufficient tablespace in step 2 is not described in any document, Guo liying and I have no idea at all, we thought Sybase had crashed. We had no way to reinstall it, but this problem still exists after installation. Later, ask someone to help us to see that it was a problem with table space, in addition, even though the character set is set, it is still garbled when I enable IE. I don't know why, but after I re-execute the script again, it's because the default character set is Cp850, therefore, the script executed in the character set must be garbled when it is read to the CP936 environment. Therefore, it is no problem to execute the script again in the CP936 environment.