Question 3: Changing the font and Character Set in SQL * Plus

Source: Internet
Author: User
Problem descriptionSometimes, the data font displayed in SQL * Plus is too small. How can I change the font size displayed in SQL * Plus? Problem AnalysisThere are two types of SQL * Plus used in Oracle, one is MS-DOS-based SQL * plus, its corresponding command program is sqlplus.exe, stored in D:/Oracle/product/10.2.0/db_1/bin/directory. The other is sqlplusw.exe Based on Windows. The Registry needs to be read during the license. To change the font size, you only need to change the registry information. AnswerThe procedure is as follows. Step 1:Open the registry and Navigate to HKEY_LOCAL_MACHINE/software/Oracle/key_oradb 10g_home1. Among them, key_oradb 10g_home1 is the current Oracle Database Server installation location, if another oracle product is installed, home1 will appear, and so on. 3-10. Figure 3-10 Registry Editor Step 2:Add two "string values" under the current registry key ". · Sqlplus _ font with the value "terminal ". · Sqlplus _ font_size, with a value of 14 or other values, such as 16 and 18. Step 3:Close the registration table and start sqlplusw.exe to take effect. In addition, it is related to the display of data of different character sets. If you want to change the character set displayed on the client, change the character set of the parameter nls_lang at the MS-DOS prompt. For example, if the parameter nls_lang is set to traditional Chinese (Traditional Chinese), the command is set nls_lang = Traditional chinese_taiwan.zht16mswin950. If it is set to simplified Chinese (Simplified Chinese), the command is: set nls_lang = simplified chinese_china.zhs16gbk. In fact, the parameter value of nls_lang in the registry is not changed because of the execution of the preceding command. The parameter value is the character set used by the Oracle database. Therefore, you can only use the command set nls_lang = language_territory.character_set in MS-DOS mode to change the display content under the current language character set for each session process. This provides great convenience for displaying text information in different languages in different sessions. After changing the nls_lang parameter, you can start SQL * Plus and the content will be correctly displayed. If you want to change the nls_lang parameter permanently, open "Control Panel"> "system"> "environment variable" and create an environment variable, nls_lang, whose value is the value to be changed, for example, the Japanese value is Japan. Restart the system to take effect. Administration Assistant for Windows can also be used to set the Oracle database character set and change the font in SQL * Plus. First, start the administration assistant for Windows, expand the directories at all levels, find "oradb 10g_home1" under "Oracle main directory", right-click it, select "properties" from the drop-down list. The dialog box is displayed, as shown in Figure 3-11. Select the item to edit and modify its parameter value. Figure 3-11 attributes of oradb 10g_home1

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.