How do I change the IP address on Oracle 10g - oracle

What steps do I need to take to change an IP address for Oracle 10g? I cannot connect to the database after going from a dhcp address to a static IP and a reboot.

If the server's IP address changed, these are the first things I would look at:
The TNSNAMES.ORA file on the client -- does it have the IP address hardcoded? If so, change it. Does it use the machine name? If so, does the machine name resolve to the correct IP address on your client machine?
The LISTENER.ORA file on the server -- does it explicitly specify the old IP address as its listening address?

More info please. Do you mean that you have changed the ip address of the host that the database is on and now you have to connect to it from a different macine, or are you having trouble starting the database after the ip change?
... and what error message do you receive?

Most obvious files to check are:
$ORACLE_HOME/network/admin/tnsnames.ora
$ORACLE_HOME/network/admin/listener.ora
Other than that we'd need more info...
I presume you mean the Oracle 10g DB and not the Oracle 10g Application Server?
Does the database start ok?
Is there anything in the database alert log?
Are the error(s) connecting from a client or the server?
What error message(s) do you get?
Can you ping the machine on it's new address (by both name + IP address) From both client + server?
Does a TNSPING work?
Can you connect using SQL*Plus on the server?
What other tool(s) have you tried connecting with?
Update after comment
Please can you post...
Your old ip address (if you know it)
Your new ip address
Your FQDN (e.g. machine.domain.com)
The output of "ipconfig/all" (or equivalent)
Your listener.ora file
The output of "$ORACLE_HOME/bin/lsnrctl start"
The output of "$ORACLE_HOME/bin/lsnrctl status"

Check that LOCAL_LISTENER is not defined (or defined correctly) in the database - it may not be registering correctly because of an incorrect entry here. Also try 'ALTER SYSTEM REGISTER' to attempt to register with the listener (rather than waiting up to 3 minutes for an auto-register). Examine the listener.log to see the instance registered (service_update * ) and 'lsnrctl status' to see if it is there.

Did you change the hostname in DNS? Can you ping the hostname from another machine?

Related

How to fetch data from oracle data base from another computer

I am trying to execute one simple desktop application in my system that is built upon java swing.
This application fetches the data from the oracle database which is present in computer A.
I did the development in computer A and built its jar and kept the jar in another system.
I have started all the services of oracle and created an ad hoc network between the two systems, but I am not able to execute the application from another computer. I googled a lot and did the mentioned changes. Still I am getting the same error of TNS listener.
IOException: The network adapter could not establish the connection.
finally I thought to put my code here. please look at the below code:
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection connection =
DriverManager.getConnection("jdbc:oracle:thin:#//xxx.xxx.xxx.xxx:1521/XE"
,"system"
,"system" );
Please help me on this.
I have also tried modifying the tnsnames.ora file but was not helpful. can anybody please help me on this.
Check the listener.ora file - what is the IP address the service is binding to, i.e. what is the IP address specified in this file? If 127.0.0.1, that will explain why it works on Computer A but not B.
If this is the case you should fist stop teh listener service, backup the listener.ora, edit listener.ora, changing the IP address to the appropriate one for Computer A (accessible from Computer B), restart the listener, and retry.
Use tnsping to test the connection works, if you don't have TNS ping you can try "Telnet hostname port" (e.g. telnet computer-A 1521) and if it returns blank screen and flashing cursor on top left then the service is up.

What is the oracle database 12c IP Address

I just Installed Oracle Database 12c. At the end of the installation it gave me Information about my connection. SID, IP, etc. I restarted the computer run all these services (some of them already running):
OracleJobSchedulerORCL
OracleOraDB12Home1MTSRecoveryService
OracleOraDB12Home1TNSListener
OracleRemExecServiceV2
OracleServiceORCL
OracleVssWriterORCL
But I think I forgot the IP and port of my database since I tried to access the database using a webbrowser and it doesn't work (I tried https://10.10.10.10:5500/em). I don't know If the problem is really the IP:Port that I may have forgotten or if I forgot to run service. I am pretty sure the IP address look like https://10.10.x.x:xxxx/em but I don't I am not certain. Is there a way to recover the IP address and port of the database?
EDIT: I've installed it on Windows 8 x64 JP. with
In Environment Variable
with ORACLE_HOSTNAME = 10.10.10.10
ORACLE_UNQNAME = orcl
And in the host file (in System32/Drivers/etc/)
127.0.0.1 localhost
10.10.10.10 wopr.orcl wopr
Per documentation, format for accessing enterprise manager in your browser
http://hostname:portnumber/em
Once you sure that default port number is kept as default HTTP port number is 5500 then you can get your system hostname. Port numbers are recorded in $ORACLE_HOME/install/portlist.ini file.
If running windows then just run the command hostname which will give you the hostname of your machine. Then run like
http://My_hostname:5500/em
Or use the command ipconfig to see your IPV4 address and use that address
http://X.X.X.X:5500/em
Or you as well use localhost
http://localhost:5500/em
or 127.0.0.1 (loop back address) like
http://127.0.0.1:5500/em
See here for more information
Well, if you installed it on your local machine, you can always access it using localhost, so try https://localhost:5500/em.
The default port number for Enterprise Manager is indeed 5500.

tnsconnect shows operation timeout

Here is my use case:
We are using virtual machine. Couple of days ago I have created new Oracle database. I cloned this machine and it got different IP address.
Today I wanted to connect to the database using SQLPlus but I go connection timeout. I have tried tnsping command and here is the output of that command:
C:\Users\Administrator>tnsping clm
TNS Ping Utility for 64-bit Windows: Version 11.2.0.1.0 - Production on 09-JAN-2
014 08:36:31
Copyright (c) 1997, 2010, Oracle. All rights reserved.
Used parameter files:
C:\app\Administrator\product\11.2.0\dbhome_1\network\admin\sqlnet.ora
Used EZCONNECT adapter to resolve the alias
Attempting to contact (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=))(ADDRESS=(PROTO
COL=TCP)(HOST=9.142.60.187)(PORT=1521)))
TNS-12535: TNS:operation timed out
What is weird, that the current database address is different than 9.142.60.187. sqlnet.ora also does not contain any interesting data:
SQLNET.AUTHENTICATION_SERVICES= (NTS)
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
?
ADR_BASE = C:\app\Administrator\product\11.2.0\dbhome_1\log
How can I make my connection to sqlplus available?
What is interesting, I am able to connect to the database using jdbc driver and it works fine.
Your sqlnet.ora is configured to first try to use TNSNAMES (tnsnames.ora in your TNS_ADMIN directed folder as defined in registry, environment variable or taken from default location) to resolve clm to a path through your network mapping SQL*Net to TCP/IP and possibly others.
From your tnsping that seems not to resolve. Therefore, SQL*Net tries the second one: EZCONNECT. See Oracle docs on that one.
Probably you are using somewhere an EZCONNECT connection string like user/pwd#//9.142.60.187 without service name and port. Or my knowledge of EZCONNECT is too simple; somehow it seems to translate clm into //9.142.60.187. That might be explained by the answer to the following question: Do you have a hostname clm in DNS or hosts file mapping to 9.142.60.187?
I do not recommend using EZCONNECT, I always like to have tnsnames.ora hard coded, specifying everything needed. EZCONNECT can work nonetheless.
Can you include IP address of clone in your sample?
Can you include outcome of ping clm and nslookup clm in your sample?
Change the ip address in (HOST=9.142.60.187) to the current ip address of server. May be in the JDBC driver you are using host name instead of ip address and that's why it is working. You can also try giving host name in (HOST=9.142.60.187), e.g if host name is ora_server then change it to (HOST=ora_server)
Since tnsping clm is using EZConnect, your tnsnames.ora does not have an connection alias called CLM, but clm is being resolved as a host name to 9.142.60.187. It's using port 1521 by default as it has no instructions to use a specific port. The connection to that address, or at least that port, is then timing out - it might not exist, it might route somewhere unreachable, or it might be blocked by a firewall.
ping clm should show the same address, and will probably also time out. That host may exist in your hosts file, or is being resolved by DNS, possible with a default domain appended, which ping would also show. If it is the name of your old server, you might need to update your hosts file, which might magically make it start working.
If your database is actually called CLM then you can create an entry in your tnsnames.ora that points to the correct IP address for your listener, which your JDBC connection is already using. Or you can use the EZConnect format as your connect string; something like sqlplus user/password#//<your IP>:1521/<your service name>. You can use lsnrctl services to check the IP address, port and service name if you aren't sure.
If you're on the same host as the database then you don't need to do either; presumably you're currently trying sqlplus user/password#clm, but if ORACLE_SID is set you can just do sqlplus user/password and it will not trouble the listener.

Stored Endpoint IP Address after Network Configure Changes in RMI

I've got a RMI server running on a mac. Once I changed the server IP and restart the Application and clients, then clients keep connect to the old ip address with right bind and lookup address. I really have no idea what went wrong because the program is working on another linux server just with different port.
What the remote object clients got is Proxy[MinervaInterface,RemoteObjectInvocationHandler[UnicastRef [liveRef: [endpoint:[192.168.0.104:51815](remote),objID:[40d99efb:140ba232cec:-7fff, 6333954213550330995]]]]]
which 192.168.0.104 is the old IP and it should be 10.0.1.104
I've check the host file and my code, there is no anything like 192.168.0.*
Please help, Thank you.
UPDATE
I have confirmed this is a server registry problem. But I have already restarted the server. I did't remember what else did I do to the registry. Is there any way to set it manually?
UPDATE
I rune this code on that server InetAddress.getLocalHost().getHostAddress(), it returned 192.168.0.104, that can explain where this address came from. But there is no such address on the server now
SOLVED
I found java use a hostname to lookup localhost address, that hostname is not localhost and have not been updated by OS X Server for some reason. I updated the record from OS X Server console and solved this annoying problem.
NEVER THOUGHT ABOUT THAT

Cannot login to my db

I want to login to my db but an exception occur which appears in the image bellow
If there's no way to login how can I restore the data??
EDIT: check the configuration of my user
What is configured in tnsnames.ora.
Check if the server IP is properly entered and the port is also 1521
Check if oracle is configured as a service or SID.
instead of localhost use machine name or IP
You might want to check your listener.ora file as well.
Can you do a lsnrctl status to see what port the listener is running on and what services/sids are registered . I believe you are trying to run the db on your workstation. you might want to check the services.

Resources