Pl/SQL remote connection to the orcle Server

Source: Internet
Author: User


Possible problems: 1. windows Firewall. 2. The environment variable PATH does not contain % ORACLE_HOME % \ bin, which leads to many ORACLE connection setting methods. Four methods are provided here, however, it is mainly about the remote connection method. First case: If the oracle server is installed on the local machine, it will not be said. The connection is just a problem with the user name and password. However, check whether the environment variable % ORACLE_HOME %/network/admin/is set. Www.2cto.com Case 2: the oracle server is not installed or the oracle client is not installed. However, pl SQL development, toad SQL development, SQL navigator, and other database management tools are installed. An oracle server is installed on a virtual machine or another computer, that is, a virtual machine or another computer. In this case, I use pl SQL development to remotely connect to the ORACLE server database as an example: 1. Search for the following files on the machine where the oracle server is installed, oci. dll ocijdbc10.dll (10 represents the oracle version, if it is another version, you need to modify it, for example, change it to ocijdbc9.dll or ocijdbc11.dll) ociw32.dll orannzsbb10.dll (10 represents the oracle server version, you need to modify it, for example, orannzsbb9.dll or orannzsbb11.dll) oraocci10.dll (10 indicates the oracle server version. If it is another version, you need to modify it, for example, oraocci9.dll or oraocci11.dll) oraociei10.dll (the server may not exist. If not, you don't need to find it) sqlnet. ora, tnsnames. ora, classes12. Jar and ojdbc14.jar copy these files to a folder, such as publish lient, and copy the folder to the client machine. For example, if the path is D: \ your lient 2, configure tnsnames. ora and modify the database connection string. Oracledata = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.0.58) (PORT = 1521) www.2cto.com (CONNECT_DATA = (SERVICE_NAME = oracledata ))) here, oracledata is the service name to be connected; HOST = 192.168.0.58 is the Server IP address; PORT = 1521 is the PORT number. 3. Add the first environment variable named TNS_ADMIN with the value tnsnames. the path of the ora file (for example, D: \ your lient, especially after reinstallation or other operations, if you forget the TNS_ADMIN variable, the connection identifier cannot be parsed when you log on to plsql ), this is to find the tnsnames mentioned above. ora. This step is the most important. Add the second environment variable (optional): "NLS_LANG = SIMPLIFIED CHINESE_CHINA.ZHS16GBK". (AMERICAN_AMERICA.US7ASCII is of the ASCII encoding type. For other types, go to the server and check it online) (This step is correct for the time being. If the encoding is incorrect, garbled characters are generated.) 4. download and install the pl SQL Developer configuration application: Open pl SQL Developer and click Cancel on the logon page, on the menu bar, choose tools> preferences> connection settings: Oracle Home = D: \ oracleclient OCI library = D: \ oracleclient \ oci. dll 5. If you enable plsql again, you can log on to the database by entering the username and password with the oracledata option. Case 3: ORACLE server is not installed on the local machine, but the oracle client is installed, and database management tools such as pl SQL development, toad SQL development, and SQL navigator are installed. An oracle server is installed on a virtual machine or another computer, that is, a virtual machine or another computer. In this case, I use pl SQL development to remotely connect to the oracle server database as an example: 1. Open the net manager in the oracle client and configure the Database Name and IP address to be remotely connected, if the net manager does not have the name of the database to be remotely connected, create a new database. Www.2cto.com 2. Other steps are the same as 2-5 in the second case. Case 4: the oracle server is not installed on the local machine, pl SQL development, toad SQL development, SQL navigator, and other database management tools are not installed, but the oracle client is installed. An ORACLE server is installed on a virtual machine or another computer, that is, a virtual machine or another computer. In this case, I use sqlplus in the oracle client to remotely connect to the oracle server database as an example: 1. Open the net manager in the oracle client and configure the Database Name and IP address to be remotely connected, if the net manager does not have the name of the database to be remotely connected, create a new database. 2. In the same case as in the second case, step 2 3. In the same case as in the second case, step 3 4. Enable sqlplus: (1) if you use the sys user to log on, the user name is sys password: xxxxxx host string: name of the database to be connected as sysdba. log on to the database. (2) If you use another user to log on, the user name is xxx password: xxxxxx host string: name of the database to be connected. log on to the database. The following are precautions: 1. The server and client firewalls need to be disabled; 2. We often encounter that the listener service cannot be started, so we need to enable the Net Configuration Assistant to fix the problem or create a new listener service. 3. What should I do if I forget my Database Password? Follow these steps to change the password: start --> Run --> cmd www.2cto.com enter: sqlplus/nolog press Enter: connect/as sysdba press enter user unlock: alter user system account unlock press ENTER Change Password: alter user system identified by manager 4. How can I determine whether the database is running in archive mode or non-archive mode? Go to dbastudio, and choose history> database> archive. 5. If the oracle server is installed on both the local host and other hosts, you must modify the environment variables if the local host is connected to another host. Oracle Database FAQ diagnostics: 1. TNS-12154 Error or ORA-12154 feature: No connection string or alias found cause 1: (1) No TNSNAMES found. ORA file measure: you need to set the TNS_ADMIN environment variable on the client. The variable value is NSNAMES. the path of the folder where the ORA file is located. Alternatively, set TNS_ADMIN to TNSNAMES in the Registry KEY_LOCAL_MACHINESoftwareOracle. ORA File Location reason 2: (2) TNSNAMES. the content format in the ORA file is incorrect. Check the file format. The standard format is as follows: oracledata = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (Host = 192.168.0.4) (Port = 1521) (CONNECT_DATA = (SID = oracledata) 2. NL-00462 Error or ORA-00462 feature: Cause of listener failure: listener. the ora file contains errors, such as unmatched parentheses, incorrect parameter names, and extra spaces. Action: reedit the file or start Net Configuration Assistant to fix 3. NL-00405 Error or ORA-00405 www.2cto.com features: listener. the ora file cannot be read or the cause cannot be found: listener. the ora file contains errors, such as unmatched parentheses, incorrect parameter names, and extra spaces. Measure: Make sure that the file location is $ ORACLE_HOME/network/admin in the default directory, or set the environment variable TNS_ADMIN to point to the location of the file. 4, TNS-01155 Error or ORA-01155 characteristics: listener. ora file SID_LIST_LISTENER variable assignment is not the cause: listener. ora file content Error, SID_LIST_LISTENER variable assignment is not correct. Measure: Make sure that the values in the file are correct. There is a sample file in the $ ORACLE_HOME/network/admin/samples Directory for your reference. 5. TNS-12537, TNS-12560, TNS-00507 Error feature: the listener. ora file references an invalid protocol adapter reason: The procotol variable assignment in the listener. ora file is incorrect. Measure: Make sure that the values in the file are correct. Generally, the TCP protocol is used. The sample file is in the $ ORACLE_HOME/network/admin/samples Directory for your reference. Use adapters tnslsnr to check protocol program 6, TNS-12203 Error www.2cto.com features: Unable to connect to target cause: Listener started; alias configured measure: Check listener started, such as lsnrctl status; check tnsnames. ora alias configuration 7. TNS-12533 Error feature: Unable to connect to target cause: Invalid address parameter measure: Check tnsnames. ora address parameter author Tender001

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.