I recently used Oracle for database development. I am a pure Oracle rookie. I used to operate on ms SQL Server, so Oracle is not proficient. After oracle is installed, use sqlplus to enter the command line. after entering the username Scott and password, the system always prompts: ora 12560: Protocol configuration error. This made me really depressed. After looking for a long time, I found that the variable configuration was wrong. The solution is as follows:
The Protocol configuration error is mainly caused by the following reasons:
1. The listening service is not started.
Solution: Go to the management tool, open the service panel, check whether oracleoradb11g_home1tnslistener has been started, or enter LSNRCTL start in the command line to view the listening status, as shown below:
2. The database instance is not started.
Solution: Go to Administrative Tools, open the service panel, and check whether oracleservicexxxx is started. XXXX is the name of the current database instance.
3. The environment variable oracle_sid is incorrectly configured.
Liberation method:
① Run regedit in the registry, enter HKEY_LOCAL_MACHINE \ SOFTWARE \ oracle \ key_oradb11g_home1, locate oracle_sid, and set its value to the SID of the current database.
② System variable settings: on my computer, properties -- Advanced -- environment variables -- System variables -- New, variable name = oracle_sid, variable value = XXXX, XXXX is the SID of the current database.
③ Sqlplus settings: before entering sqlplus, enter SET oracle_sid = XXXX under command line, and XXXX is the SID of the current database.
You can use either of the above three methods.
After that, the problem can be solved.