After the Oracle 11g database is installed today, connecting to the database with Plsql is not connected. Also, the Database drop-down box for the Plsql Client login window is empty. See:
Oracle services and monitoring are turned on, and there is no problem checking the relevant configuration.
Later went online search, found someone said Plsql cannot directly connect 64-bit Oracle 11g database. Because Plsql is 32-bit, you need to install a 32-bit Oracle client to connect to a 64-bit database. Remember the previous use of oracle10g database when there is no such thing ah, with Plsql can be directly connected to the database.
Solution:
1. Download the Oracle client: instantclient-basic-win32-11.2.0.1.0.zip (click Download Oracle32-bit client) and unzip it to product under the Oracle installation directory:
D:\app\NiuNiu\product\instantclient_11_2.
2. Copy files: Copy the Tnsnames.ora files under the database installation directory D:\app\NiuNiu\product\11.2.0\dbhome_1\NETWORK\ADMIN to the client folder.
3, Configuration Plsql Developer:
In the tools-"perference-" connection inside set up Oracle_home and OCI Library, for example, the native set to:
Oracle home:d:\app\niuniu\product\instantclient_11_2
OCI Library:d:\app\niuniu\product\instantclient_11_2\oci.dll
4. Set Environment variables:
Modify variable: Add in Path: D:\app\NiuNiu\product\instantclient_11_2;
New variable: named "Tns_admin" with a value of "D:\app\NiuNiu\product\instantclient_11_2;"
New variable: named "Nls_lang" with a value of "simplified Chinese_china. ZHS16GBK ",
Follow the steps above to configure the test. (preferably restart the computer)
Landing Success!
Faq
Why configure the "Nls_lang" variable?
Without adding this variable, when using the database to add data, the Chinese in the table will become garbled, because our database is 64 bits, and the operating software Plsql_developer is 32 bits. That is, you write in Plsql_developer in Chinese is a 32-bit character set, and the database can only be stored correctly is a 64-bit Chinese character set, which led to write and read is not a character set, resulting in Chinese into question marks or garbled.
"Oracle Error Collection": Plsql cannot connect directly to a 64-bit oracle11g database