Home » RDBMS Server » Backup & Recovery » How to restore Oracle after reinstalling Windows Server (12 C, Windows Server 2016)
How to restore Oracle after reinstalling Windows Server [message #684604] Mon, 05 July 2021 15:17 Go to next message
marcinsgdz
Messages: 14
Registered: December 2017
Junior Member
If Windows Server will not start and reinstall the operating system on the same machine and I keep the files, what should I do to make Oracle work?

1. Install new Oracle o SID new = SID old?
2. Stop services Oracle
3. I'm replacing USERx.DBF files
4. What about database files that were left on this machine after the previous installation? I also replace them (if I don't have the export files) and then do:
- start services Oracle
- connect / as sysdba
- alter database open;

Anything else?
Re: How to restore Oracle after reinstalling Windows Server [message #684606 is a reply to message #684604] Tue, 06 July 2021 12:33 Go to previous messageGo to next message
John Watson
Messages: 8960
Registered: January 2010
Location: Global Village
Senior Member
Restoring a database after some sort of operating system disaster is simple - if you have backups and the necessary skills Smile
Taking your points in order:


Quote:
1. Install new Oracle o SID new = SID old?
In DBA work, you must be precise. You install an Oracle Home, then (if you wish) you create a database. Which of these do you mean?


Quote:
2. Stop services Oracle
What services are your speaking of?


Quote:
3. I'm replacing USERx.DBF files
Do you mean that you are restoring some data files for tablespaces containing user data? What about the system, sysaux, and undo tablespaces? And the redo logfiles and controlfile?


Quote:
4. What about database files that were left on this machine after the previous installation? I also replace them (if I don't have the export files) and then do:
To what files are you referring? And what do you mean by "export"? If you mean Data Pump, that is totally different from any restore operation.


I don't want to be negative, but you must be precise in everything you say and do. THe database is unbelievably precise, and we have to work with that.
Re: How to restore Oracle after reinstalling Windows Server [message #684608 is a reply to message #684606] Tue, 06 July 2021 22:56 Go to previous messageGo to next message
marcinsgdz
Messages: 14
Registered: December 2017
Junior Member
I would like tips on how to act after reinstalling Oracle on the new operating system - when the files of the previous Oracle server and databases are on the server's disk and I cannot export.

Will I reinstall Windows Server, Oracle Server with the same SID as before, create a database with the same name as the previous one, stop all Oracle services (OracleService%SID%, OracleVssWriter%SID%, OracleOraDB12Home2TNSListener), replace files with user settings USERS01.DBF from the previous Oracle SID and pfile and spfile. And what's next?

What about the system, sysaux, and undo tablespaces? And the redo? How to use them with instance streams to new instance?
Re: How to restore Oracle after reinstalling Windows Server [message #684609 is a reply to message #684608] Wed, 07 July 2021 00:06 Go to previous messageGo to next message
Michel Cadot
Messages: 68718
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator

Quote:
replace files with user settings USERS01.DBF from the previous Oracle SID and pfile and spfile. And what's next?

That won't work.

Quote:
What about the system, sysaux, and undo tablespaces? And the redo? How to use them with instance streams to new instance?

After reinstalling Oracle software, if you have ALL the previous database files at the same place, you just have to:
1/ Use ORADIM to create the service without the option to start the instance.
2/ Start the instance using SQL*Plus with or without RESETLOGS option depending on what happens (try first without)
3/ RECOVER or not the database depending on what happens on previous step
4/ Shutdown the database and instance
5/ Stop the service
7/ Modify the service start parameters using ORADIM
8/ Restart the service

[Updated on: Wed, 07 July 2021 00:08]

Report message to a moderator

Re: How to restore Oracle after reinstalling Windows Server [message #684610 is a reply to message #684609] Wed, 07 July 2021 00:11 Go to previous messageGo to next message
marcinsgdz
Messages: 14
Registered: December 2017
Junior Member
Can you give which command to use for the given actions?
Re: How to restore Oracle after reinstalling Windows Server [message #684611 is a reply to message #684610] Wed, 07 July 2021 01:25 Go to previous message
Michel Cadot
Messages: 68718
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator

No I can't it depends on your environment.

For ORADIM, type ORADIM at DOS prompt and have a look at Administrator's Reference Guide for Microsoft Windows for your version.
For startup/shutdown/recover commands, have a look at SQL*Plus User's Guide and Reference.

Previous Topic: How to recover the database when running only on buffer cache
Next Topic: User managed backup fails with OSD-04002
Goto Forum:
  


Current Time: Tue Dec 03 11:33:44 CST 2024