Thanks!
Sangjukta Dey, April 11, 2017 - 4:28 am UTC
Hello Connor,
Thank you so much for your response.
- We are not using RAC or Oracle Restart. But we are using ASM storage. Is there anything specific we need to take care of for ASM.
- Thank you for the EM part.
- I have checked the pwd files/pfiles/spfile, but there are no mention of the hostname or any other parameter which includes the hostname. So we dont need to change anything there, right?
- Regarding the folders named as the old hostname : I could find one under ORACLE_HOME. The folder has the below within it :
-rw-r-----. 1 oracle oinstall 54 Dec 15 21:30 oraInst.loc
drwxr-----. 7 oracle oinstall 85 Dec 15 21:30 sysman
-rw-r-----. 1 oracle oinstall 6 Mar 21 16:06 emctl.pid
Can we simply rename the folder after changing the hostname?? Or it will have some impact? If yes, then how to take care of it. Kindly advise.
Also, found a log under 'ORACLE_HOME/install' named as "root_<current_hostname>_2016-08-30_03-31-25.log". But we donot have to worry about this, right??
Thanks once again for your time and patience. I am bit new to this, hence have many confusions.
April 12, 2017 - 1:26 am UTC
"I have checked the pwd files/pfiles/spfile, but there are no mention of the hostname or any other parameter which includes the hostname. So we dont need to change anything there, right? "
The names of the files themselves may need to change (if you are changing the database name as well)
Renaming the folder should be ok, and the log file you dont need to worrry about
Correction on my last followup post
Sangjukta Dey, April 11, 2017 - 7:59 am UTC
Hello Connon,
Apologies for one wrong info. spfile & pfile have db_domain as the previous one. SO I guess we have to change that as below :
SQL> alter system set db_domain='<new_domain_name>' scope=spfile;
And then restart the database.
For pfile, we will edit it manually.
Also, for service_names, we can update as below :
SQL> alter system set service_names=<> scope=both;
Kindly let me know if I am wrong.
I am not able to add comments for this question, hence keeping on adding reviews. Apologies for that.
April 12, 2017 - 1:38 am UTC
Yes, but for me, I'm not a huge fan of changing "old" to "new" (or vice versa) and having a temporary conflict, eg
old is running and you change some param/cofig to new, OR
new is running and you still have some old param in there
So my inclination would be:
- create pfile old.ora from spile
- shutdown db
- edit pfile to have new entries (call it new.ora)
- startup pfile=new.ora
- create spfile from pfile
but that might be just my paranoia :-)
Followup on the linux level changes.
Sangjukta Dey, April 21, 2017 - 6:26 am UTC
Hello Connor,
Thanks a lot for this, I will follow this approach of updating the spfile.
Our TEST db is running on pfile and there is no spfile as of now, So I can directly update the pfile and create an spfile from pfile. Then restart the db with the newly created spfile and everything should be fine, right?
Also, regarding the linux level changes, we have Oracle linux 7.0. There is no linux admin available. So we have to make the linux level changes.
I have updated the steps as below :
- As 'root', update hostname as below :
# hostname <new_hostname>
- Change the IP address and hostname in "/etc/hosts" file.
-Change the hostname in "/etc/sysconfig/network " file.
-Change the hostname in "/etc/hostname" file.
- # service network restart
-For configuring network in the VM, we have to update the IP Address and DNS Names in the network configuration window.
- Do i have to update the below or it will be automatically updated???
# cd /etc/sysconfig/network-scripts
# ls
# cat ifcfg-eno16780032
# vi ifcfg-eno16780032
- Also, do i need to update below as well or it will be automatically updated after a network restart??
# sysctl kernel.hostname=NEW_HOSTNAME
- Also, should I restart the network as "# service network restart" after all the database level changes are done OR it doesnot matter??? I can connect to database from "sqlplus / as sysdba" after restarting the network and it will not matter??
- Also, after all Linux level changes, do I have to restart the VM?? If yes, then should I do it after updating the database domain, service_name, pfile, spfile as well, and shutting the db down?? And then restart the VM and startup database???
As I am new to this, I have many confusions. Kindly be patient. Thanks for all your time.
April 22, 2017 - 1:55 am UTC
My plan of attack (and I stress...I'm not a Linux admin) would be:
- prepare db for change (eg make a pfile from spfile)
- shut all database services (db, listener, asm, etc etc)
- then make OS level changes
- then make DB config level changes (edit pfile, change directory names etc)
- start database services
so that there isnt a period of "conflict", ie, the database being up thinking the hostname is "X" when you've changed it at the OS level to "Y" etc.
This is an addition to my last question.
Sangjukta Dey, April 21, 2017 - 11:51 am UTC
Hello Connor,
Our database is using ASM storage. Do we need to carry out any specific steps for ASM to work fine after hostname and IP address change?? Kindly advise.
April 22, 2017 - 1:58 am UTC
Follow up query
S D, April 24, 2017 - 7:04 am UTC
Hello Connor,
Thank you once again for your patience and guidance.
The link provided mentions steps for RAC. But we donot have RAC or Oracle Restart. We are using only ASM storage for our database. In that case, do we need to carry out these steps, for e.g., deconfiguring ASM and reconfiguring it,etc ??
Kindly advise.