Let's talk about the problem. When a 64-bit oracle is installed on a 64-bit operating system, the default encoding is SIMPLIFIED CHINESE_CHINA.ZHS16GBK, but this encoding is not available during actual installation. After installation, the data in sqlplus is garbled, I found a lot of information on the Internet and finally found a reliable solution, that is, to add an item in the environment variable, NLS_LANG = SIMPLIFIED CHINESE_CHINA.ZHS16GBK and then solve the problem with garbled code.
Since plsql developer does not have a 64-bit version, it cannot be used in a 64-bit operating system if nothing is configured. The solution is as follows:
First download an oracle client, decompress the obtained file, and put the obtained file into the product under the oracle installation directory, then, the root directory of the folder decompressed by the oracle client copies the NETWORK folder under the oracle installation directory, next, select oci from the oracle client in the oci database under the tool-preference-oracle-connection in plsql developer. dll file path.
However, when plsql developer connects to the database, it will find garbled characters, mainly Encoding Problems. Which encoding is not very clear? The solution is as follows:
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount ORACLE instance started.
Total System Global Area 236000356 bytes
Fixed Size 451684 bytes
Variable Size 201326592 bytes
Database Buffers 33554432 bytes
Redo Buffers 667648 bytes
Database mounted.
SQL> ALTER SYSTEM ENABLE RESTRICTED SESSION;
System altered.
SQL> ALTER SYSTEM SET JOB_QUEUE_PROCESSES = 0;
System altered.
SQL> ALTER SYSTEM SET AQ_TM_PROCESSES = 0;
System altered.
SQL> alter database open;
Database altered.
SQL> ALTER DATABASE CHARACTER SET ZHS16GBK;
Alter database character set ZHS16GBK ERROR at line 1:
ORA-12712: new character set must be a superset of old character set
Note: The new character set must be a superset of the old one. In this case, we can skip the superset check and make changes:
SQL> ALTER DATABASE character set INTERNAL_USE ZHS16GBK;
Database altered.
Alter system disable restricted session; // This statement sets that all users can log on to the database.
This article is from the "Dark unbounded" blog and will not be reposted!