In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
The remote connection of Oracle database can be realized in many ways. In this paper, we mainly introduce four methods and matters needing attention for remote connection, and illustrate them with examples.
The first method:
If the oracle server is installed on this machine, then needless to say, the connection is just a matter of username and password.
Note, however, whether the environment variable% ORACLE_HOME%/network/admin/ is set.
The second method:
Neither the oracle server nor the oracle client is installed on this machine. However, pl sql development, toad sql development, sql navigator and other tools are installed to manage the database. An oracle server is installed on a virtual machine or another computer, that is, a virtual machine or another computer is now used as a server.
In this case, I take pl sql development remote connection to ORACLE server database as an example:
1. Configure tnsnames.ora and modify the database connection string.
The code is as follows:
Oracledata = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.0.58) (PORT = 1521)) (CONNECT_DATA = (SERVICE_NAME = oracledata))
Where oracledata is the name of the service to connect to, HOST = 192.168.0.58, is the server IP address, and PORT = 1521 is the port number.
2, add the first environment variable, named TNS_ADMIN, the value is the path of the tnsnames.ora file (such as: d:\ oraclient, especially after reloading or other operations, forget the TNS_ADMIN variable, plsql login will be unable to parse the specified connection identifier), this is to be able to find the tnsnames.ora mentioned above. This is the most important step.
Add a second environment variable (optional): "NLS_LANG = SIMPLIFIED CHINESE_CHINA.ZHS16GBK", (AMERICAN_AMERICA.US7ASCII is an ASCII encoding type, other types can go to the server or look it up on the Internet) (this step should be done correctly for the time being, if the coding is not correct, garbled codes will be generated.
3. Download and install the PL SQL Developer configuration application:
Open PL SQL Developer, log in to the interface point to cancel, and select tools- > preferences- > connection in the menu bar:
Oracle Home=D:\ oracleclient
OCI library=D:\ oracleclient\ oci.dll
4. If you open plsql again, you will have the oracledata option in database to enter the user name and password to log in.
The third method:
The ORACLE server is not installed on this machine, but the oracle client is installed, and tools for managing databases such as pl sql development, toad sql development, sql navigator and so on are also installed. An oracle server is installed on a virtual machine or another computer, that is, a virtual machine or another computer is now used as a server.
In this case, I take pl sql development remote connection to 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 connected remotely. If there is no database name to connect remotely in net manager, you can create a new one.
2. The other steps are the same as in the second method.
The fourth method:
The oracle server is not installed on this machine, and the tools for managing databases such as pl sql development, toad sql development, sql navigator 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 is now used as a server.
In this case, I take the sqlplus remote connection to the oracle server database in the oracle client as an example:
1. Open the net manager in the oracle client, and configure the database name and IP address to be connected remotely. If there is no database name to connect remotely in net manager, you can create a new one.
2. Same as step 2 in the second case.
3. Same as step 3 in the second case.
4. Open sqlplus:
(1) if you log in with a sys user, the user name: sys password: xxxxxx host string: the name of the database to be connected is as sysdba. Log in.
(2) if you log in with another user, the user name: xxx password: xxxxxx host string: the name of the database to be connected, you can log in.
Note:
1. Server and client firewalls need to be turned off
2. We often encounter that the listener service cannot be started, so we need to open Net Configuration Assistant repair or create a new listener service.
3. What if I forget the database password? Just change the password in the following ways:
Start-- > run-- > cmd
Enter: sqlplus / nolog enter
Enter: connect / as sysdba enter
User unlock: enter alter user system account unlock
Change password: alter user system identified by manager
4. How to judge whether the database is running in archived mode or non-archived mode?
Enter dbastudio, process-> Database-- > Archive view.
5. In addition, if the oracle server is installed on this machine and other machines, then if the machine wants to connect to other machines, it must modify the environment variables.
The above is the whole content of this article, I hope it will be helpful to your study, and I also hope that you will support it.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.