How to modify the oracle port: 1. Stop the listening service; 2. Modify the value of "PORT=" in the server "listener.ora" and "nsnames.ora" files; 3. Restart the listening service. .
The operating environment of this article: Windows 7 system, Dell G3 computer, Oracle 11g version.
How to modify the oracle port?
Oracle modified port summary
1. Open
Enter during operation cmd,Enter the console, enter:
> lsnrctl start Press Enter, and it will prompt you to start monitoring successfully(Start monitoring)
> net start OracleServiceORCL
2. Close
Enter cmd,## during operation #Enter the console, enter:
> lsnrctl stopPress Enter, and it will prompt you to start monitoring successfully(Stop monitoring)
> net stop OracleServiceORCL This is not particularly convenient. You can right-click on the desktop, create a new notepad, and enter lsnrctl startnet start OracleServiceORCLSave as"OracleStart.bat";
Similarly, the shutdown is saved as "OracleClose.bat".
3.View listening status
> lsnrctl status4.ModifyOracleListening port
①Stop the listening service first;
②Modify the server%ORACLE_HOME% The value of PORT= in the /network/admin/listener.ora file;
③Modify The value of PORT= in the server%ORACLE_HOME%/network/admin/tnsnames.ora file;
④Restart the listening service.
Note: %ORACLE_HOME% is the Oracle installation path
5.ORA-12560: TNS:Protocol error
UseSQL PlusWhen logging in to the database, the system reported ORA-12560: TNS:Protocol error
Solution:Method 1: Check whether the listening port is open, enter in the start - run services.msc or or in the control panel - management tool, enter the service, find OracleOraDb11g_home1TNSListener, and check whether it is turned on.
Method 2: Check whether the instance's service is enabled. Same as step 1, enter the service and find OracleServiceORCL(database name) , check whether it is enabled.
Method 3: Check the registry. At the start of - run, enter regedit, find HKEY_LOCAL_MACHINE-SOFTWARE-Oracle, find KEY_Oracle11g , find ORACLE_SID, and view the value.
Related recommendations: oracle database learning tutorial
The above is the detailed content of How to modify oracle port. For more information, please follow other related articles on the PHP Chinese website!