Plsql Developer non-installed configuration directory for file directory 1 is C:\Program files\oracle\instantclient-basic-nt-11.2.0.4.0\instantclient_11_22 is c \ Program Files\oracle\instantclient-basic-nt-11.2.0.4.0\instantclient_11_2\oci.dll then add the variable name to the environment variable tns_admin variable value c \ Program Files\oracle\instantclient-basic-nt-11.2.0.4.0\instantclient_11_2 (or Oracle server-side installation directory such as: D:\app\zhangwl\ Product\11.2.0\dbhome_1\network\admin) Login Plsql read Tnsnames.ora is actually the directory under the variable value. If viewing Chinese in the database is garbled, you need to configure the variable name Nls_lang variable value simplified Chinese_china in the environment variable. ZHS16GBK when the Oracle server is installed, it is not configured to use the own tool directly (default path C:\ProgramData\Microsoft\Windows\Start menu\programs\oracle-oradb11g_ home1\ configuration and porting tools) Configure Listener.ora monitoring using NET Configuration Assistant in the configuration Tnsnames.ora using the Net Manager Add service (you can see the address of the listener, You can also see the services in Tnsnames.ora) Oracle Database listener configuration (listening is Listener.ora service is Tnsnames.ora)
The listener is an Oracle server-based network service that listens to client connection requests to the database server side. Since it is based on server-side services, it only exists on the database server side, and the listener settings are also done on the database server side.
The Oracle client-server connection is a connection request made through the client, a client connection request is legitimately checked by the server-side listener, and the connection is rejected if the connection request is valid.
The local service name is one of the Oracle client network configurations, plus the Oracle name server (Oracle Names server). Oracle's Common client configuration is the local service name, and is primarily based on the local service name configuration.
Configuring the Oracle Server side and client can be done in their own graphical Oracle Network Manager (Oracle Net Manager) (it is highly recommended to complete the configuration of the Oracle service side or client under this graphical tool). Under Windows, click "Start/program/oracle-orahome92/configuration and Migration Tools/net Manager" to launch the Oracle Network Manager tool, under Linux/unix, Use the Netmgr command to start the graphical Oracle network manager, such as:
Oracle Listener Configuration (LISTENER)
As shown in figure (a), select the Listener in the tree directory, and then click on the upper left "+" button to add listeners, click the Listener directory, the default new listener name is listener (the name can also be named by any legal characters). Select the name, select "Listening Location" in the drop-down option in the right column of the window, and click the Add Address button. Select "TCP/IP" in the Protocol drop-down option in the network address bar that appears, enter the host name or the address in the Host text box (if the host is used as the server as the client, one of the two entries is valid; If the host is a server and requires a network connection, the IP address is recommended), Enter a digital port in the Port text box, which is 1521 by default, or you can customize any valid digital port. The configured listener locations are as follows:
Select "Database Service" in the drop-down option in the right column of the window and click the Add Database button. Enter the global database name in the database column that appears, such as MyOracle. Note that the global database name differs from the database SID, and the global database name actually controls the uniqueness of the global naming of the database within the same network segment, such as the domain controller under Windows, where you can enter myoracle.192.168.1.5. The Oracle home directory can be entered without filling in the SID, such as MyOracle. The complete database service configuration is as follows:
Save the above configuration, the default is to find the listening profile under the ORACLE installation directory (under Windows such as D:oracleora92networkadminlistener.ora,linux/unix $ oracle_home/network /admin/listerer.ora). At this point, the Oracle server-side listener configuration is complete.
- 4
Local Service name configuration (tnsnames)
The local service name is based on the Oracle client-side network configuration, so if the client needs to connect to the database server for operation, the client needs to be configured to be attached to any PC that wants to connect to the database server or to the database server itself. As described earlier, the Oracle client configuration can be completed using the graphical management tools Net Manager that comes with Oracle. Select the service name in (a), then click the "+" button on the top left to pop up the dialog box as shown:
- 5
Enter the net service name, such as MyOracle, and click Next to enter the Display dialog box:
- 6
Select TCP/IP (Internet Protocol) and click Next, as shown in:
- 7
Enter the host name and port number. Note that the hostname and port number must be the same as the host name and port number configured by the database server-side listener. Click Next, as shown in:
- 8
Select the (oracle8i or later) service name and enter the service name. The service name here is actually the global database name in the database server-side listener configuration, which must be the same as the former. Connection types usually choose a dedicated server, depending on the configuration of the database server, if the configuration of the shared database server, the connection type here is the choice of a shared server, otherwise it is recommended to select a dedicated server (for the introduction of a dedicated server see related documents). Once configured, click Next, as shown in:
- 9
If the database server-side related services are started, you can click the Test button to test the connection. Oracle defaults to a test connection through the Scott/tiger user, and since the Scott user is a sample user with Oracle, the user may not be configured for a formal business database or a professional test database, so changing to a valid user login is likely to test successfully. If the test connection here is unsuccessful, it does not matter, first click Finish button to end the configuration.
Go back to the Oracle Network Manager (Oracle Net Manager) main window and save the configuration by default to locate the local Service name profile under the Oracle installation directory (Windows D:o Racleora92networkadmintnsnames.ora,linux/unix under $ oracle_home/network/admin/tnsnames.ora). Configure the completed local service name as shown:
- 10
Service naming under the tree directory can be changed to a service name consisting of any legal character by renaming the menu in the Edit menu, note that the service name must not have a space character before it may not connect to the database server.
- 11
Connecting to the database server
(1) Start server-side Listener and database service
Linux/unix, start the listener:
$ lsnrctl Start
To turn off the listener:
$ lsnrctl Stop
To view the listening status:
$ LSNRCTL Status
Start the database:
$ sqlplus/nolog
Sql>conn [email protected] as SYSDBA--here The myoracle is the client local service name configured previously
Or
Sql>conn/as SYSDBA
Sql>startup
Under Windows, start the listener:
C:lsnrctl start
To start the Oracle instance service:
C:oradim? A href= "Http://game.pchome.net/pcgame" class= "None" title= "cs" rel= "external" >cstartup–sid myoracle
To turn off Oracle Instance services:
C:oradim–shutdown–sid myoracle
The above services must be started at the same time for the client to connect to the database. Because the default configured listener name is listener, the above command starts the listener normally, and if the listener name is a different name, such as Alistener, it needs to be started in the following ways:
Linux/unix under:
$ lsnrctl Start Alistener
Under Windows:
C:lsnrctl Start Alistener
(2) Test Connection database server
There are a variety of testing methods that can be tested with local service names configured above or third-party client tools, such as PL/SQL Developer, and most conveniently with Oracle's own Sqlplus tools, which are tested using Sqlplus:
C:sqlplus/nolog
Sql>conn [email protected]
is connected.
- 12
Client Connection server-side FAQ Troubleshooting method
To troubleshoot client-to-server connectivity issues, first check that the client configuration is correct (the client configuration must be consistent with the database server-side listener configuration), and then resolve it based on the error. Several common connectivity issues are listed below:
1, Ora-12541:tns: No listener
It is obvious that the server-side listener does not start, and check that the client IP address or port is filled in correctly. To start the listener:
$ lsnrctl Start
Or
C:lsnrctl start
2. Ora-12500:tns: The listener cannot start the private server process
For Windows, the Oracle instance service is not started. To start the instance service:
C:oradim–startup-sid myoracle
3, Ora-12535:tns: Operation timeout
There are many reasons for this problem, but it is mainly related to the network. To solve this problem, first check whether the network of client and server is unblocked, if the network is connected, check whether the firewall on both sides is blocking the connection.
4. Ora-12154:tns: Unable to process service name
Check that the service name entered is consistent with the configured service name. Also note that the generated local service name file (under Windows such as D:oracleora92networkadmin Tnsnames.ora,linux/unix under/network/admin/tnsnames.ora) is the first of each service Cannot have spaces before the line service name.
5. Ora-12514:tns: The listening process cannot parse the service_name given in the connection descriptor
Open Net Manager, check the service name and verify that the service name entered in the Service tab is correct. The service name must be the same as the global database name configured by the server-side listener.
6, Windows startup monitoring service prompt cannot find the path
You cannot find a path by using a command or starting a listener in the Services window, or listen for a service startup exception. Open the registry, enter the Hkey_local_machine/system/current Controlset/services/oracleorahome92tnslistener entry, and see if the ImagePath string entry exists. If not, the setting value is D:oracleora92bintnslsnr, and the different installation path setting values are changed accordingly. The same approach applies to Oracle instance services, as above, to find servicemyoracle items like Hkey_local_machine/system/current controlset/services/oracle, See if the ImagePath string entry exists, and if not, create a new set value of D:oracleora92 BinORACLE.EXE myoracle.
These are some of the common problems with Oracle client connection servers, and certainly not all connection exceptions. The key to solving the problem lies in methods and ideas, not every question has a fixed answer.
END
experience content is for reference only, if you need to solve specific problems (especially in the areas of law, medicine, etc.), we recommend that you consult the relevant professionals in detail. ReportAuthor's statement: This experience is based on the actual experience of the original, without permission, declined reproduced. vote (9) few (0) I have questions (0) Exchange of relevant experience
Related tags today expense meta write experience rich >> LFM Monsoon author's experience
• • •If you want to complain, please go to Baidu Experience Complaint Center, if you want to put forward comments, suggestions, please go to Baidu Experience Management bar feedback. Popular magazines
+©2015baidu use Baidu before must read Baidu Experience agreement author works agreement qq1159924411 "tanning Experience" Summer Exclusive cool gifts! Speed to get >>123