Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Installation of Oracle&PLSQL and solution of garbled code

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

1. First go to the Oracle website to download Instant Client. If you have an old version, you don't have to download it.

Download back is a compressed file, the decompressed folder is called: D:/instantclient_11_2. Just put it in your favorite directory. For example: D:/instantclient_11_2

2 、

two。 Create a new directory network under the D:/instantclient_11_2 directory, a new admin directory under the network directory, and a new file tnsnames.ora under the admin directory. Use a text editor to open and write the following:

MWDB=

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.0.58) (PORT = 1521))

)

(CONNECT_DATA =

(SERVICE_NAME = MWDB)

)

)

3. Add an environment variable named TNS_ADMIN, whose value is the path where the tnsnames.ora file is located. For example, my local computer is: D:/instantclient_11_2/network/admin

4. Set the language of ORACLE, add the environment variable NLS_LANG, and the value is SIMPLIFIED CHINESE_CHINA.ZHS16GBK

If you don't set the language, there will be garbled codes.

When inserting data in PLSQL, there is a problem: Chinese cannot be displayed in the table in PLSQL, Chinese cannot be saved and output, and Chinese displays question marks in the table.

It is found that the source of the problem is not on PLSQL, but on our Oracle because the character set in our Oracle database does not support Chinese.

Set our environment variables, computer (right)-- > Properties-> Advanced system Settings-- > Advanced-- > Environment variables-- > New, personal suggestion to create new user variables, variable name input: "NLS_LANG", variable value input: "SIMPLIFIED CHINESE_CHINA.ZHS16GBK". Click OK, and we're done here.

Shut down PLSQL, restart, Chinese appears as expected

5. Download and install the PL.SQL.Developer configuration application

Configure tools- > preferences- > connection

Oracle Home

D:/instantclient_11_2

OCI library

D:/instantclient_11_2/oci.dll

PL/SQL Developer in Chinese is

Tools-- > preferences-- > connections

Oracle home directory

D:/instantclient_11_2

OCI library

D:/instantclient_11_2/oci.dll

6. Close PL/SQL Developer and restart Developer.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report