(1) ORACLE Server Configuration:
NOTE: If your Oracle is used as a server, your Oracle will start the listener service, corresponding to oracleorahome92tnslistener in the Windows Service, which is configured with IP + port + database, then others can access your machine. (In fact, local applications are also used as servers, and this service must be started)
1. Start -->Program... ---> Net manager, click listener (you can also create a new listener to see the green plus sign)
If, like my Oracle service, it is only used for LAN access, set your lan ip address and server port number
2. Switch to the Database Service, as shown in. Enter your global database name. For example, I have locorcl (I have created a database, so I write this. You can choose to delete the database in the Database Configuration Assistant Program, pull down the drop-down list to see which databases you have)
In this way, the Oracle server is configured.
(2) Client Configuration
When we use Oracle for the first time, we should use sqlplus. To start sqlplus, we need to enter the "host string" in the third input domain. What is this?
Select "service name" and click "Green +" to create a new service name. For example, create a new locorcl service name, ). However, this "service name" is not casually written. It corresponds to the database in the remote ORACLE (I write locorcl here because I created a database called locorcl in oralce ). Write the host name and port number in "Address Configuration" (the Host IP address is the IP address of the remote ORACLE Server you want to access ).
Select "file" --> "save.
How to verify it? Enter the name of the created Service locorcl in the host string. You can. Now you know what the service name and host string are! ^ From the programmer's perspective, it is an object that encapsulates IP + port + database name. Pai_^
This process is missing several figures, but the process is quite simple. ^
Key Points
1. What is a host string and a service name? This is what the client needs to know.
2. the listener should not forget to listen to that database, especially the database created by itself. If you want to access the database, do not forget to listen.
This article from the csdn blog, reproduced please indicate the source: http://blog.csdn.net/invitesun/archive/2009/12/02/4917276.aspx
This article from the csdn blog, reproduced please indicate the source: http://blog.csdn.net/invitesun/archive/2009/12/02/4917276.aspx