Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need to load the datafiles and table info to need install.

Status
Not open for further replies.

shaan00

IS-IT--Management
Nov 7, 2004
23
US
lost a drive on my oracle server Solaris 8. The drive held the Oracle 8.1.7 install.
reinstalled Oracle 8.1.7.
need to load the datafiles and table info that is saved on another drive so that the new install will see it.
 
How do I load the datafiles and table info that is saved on another drive so that the new install will see it?
 
The "new install" doesn't have any database-identifying information, per se. The identity of the database resides in your database control files. The location of the control files appears in your parameter/spfile.

Therefore, if the data files for your database are addressable with the same locations/names as before (either by their residing in the same paths as before or with logical links), then your database should start right up.

Let us know if this scenario is/is not possible and we can provide more help.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)

Do you use Oracle and live or work in Utah, USA?
Then click here to join Utah Oracle Users Group on Tek-Tips.
 
You need to recreate the database. You can do this using the database configuration assistant (DBCA), which comes with the Oracle 8.1.7 software which you have already reinstalled. The database which you create will be a throw-away. Once it is created, shut it down and modifiy the init.ora file to point to the control files of the old database. Then, when you open up the db, it will "see" all the old table info that resides on the other drive.

That is the basic strategy. There may be complications along the way. Please let us know how things go.
 
Karl, I beg to differ. Why would Shaan need to create a new/throwaway database? Even if the old database data files reside in a different location from before, provided that the parameter/spfile file points to the correct current location of the control files, Shaan can
Code:
startup mount
alter database rename file
'<old_file_1>','<old_file_2>',...'<old_file_N>'
to
'<new_file_1>','<new_file_2>',...'<new_file_N>';
alter database open;

Puzzled...

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)

Do you use Oracle and live or work in Utah, USA?
Then click here to join Utah Oracle Users Group on Tek-Tips.
 
Shaan00 has lost his entire Oracle software install. That includes the instance that used to exist. He has to recreate the instance before he can issue a "startup mount" command. At least that's how it works in Windows. I assume Solaris is no different.
 
I opened a tar with Oracle.
I will update on progress thanks guys for any suggests.
 
Karl,

For Shaan's benefit and for clarification, let's review some Oracle-architecture basics. Here are the components of a running Oracle database:

1) Installed software. Made up of Oracle executables.
2) Oracle instance. Made up of:
a) Shared Pool
b) Database buffer cache
c) Log buffer
d) Background processes (DBWR, LGWR, CKPT, SMON, PMON, et cetera)
3) Oracle database. Made up of:
a) Control files
b) Database datafiles (that store tables, indexes, et cetera)
c) On-line redo log files

Shaan has re-installed the Oracle software (thus taking care of item #1). Shaan has preserved all the Oracle database files (thus taking care of item #3).

As far as item #2, there is nothing tangible or residual about the Oracle instance. It exists only after a privileged DBA issues a "startup..." command and the instance dies when the DBA issues a "shutdown..." command, or if the power fails, or some other abnormal termination occurs.

The "definition" of an Oracle instance resides in the init<SID>.ora parameter file or the spfile. When the instance is "down", there is nothing about the instance that exists. We actually do nothing special to "create" an Oracle instance besides the command, "startup...".

Karl, does this match your understanding?



[santa]Mufasa
(aka Dave of Sandy, Utah, USA)

Do you use Oracle and live or work in Utah, USA?
Then click here to join Utah Oracle Users Group on Tek-Tips.
 
No, it doesn't. In a Windows environment there is a lot more to an Oracle database than what you describe - registry keys and a Windows service, to name two. It's hopeless to try to start an instance unless all this configuration is in place. For Shaan00, some of it may be, but the scope of the failure he is trying to overcome strongly suggests that his database will need to be recreated. That is why I suggested he run DBCA. There is no better way to find out whether Oracle can "see" the database. It will be listed in DBCA if Oracle thinks it still exists. If not, DBCA is a good tool for recreating it. It's clearly the first thing Shaan00 should check after reinstalling Oracle. Hence my earlier post.
 
Shaan said:
lost a drive on my oracle server Solaris 8.

Karl, if Shaan were talking about at Windows installation, then I would have suggested confirming the existence of the instance-related objects in the registry and amongst the machine's Services. But since we're not talking about Windows, there is no need to waste my breath on that topic.

If Shaan does a re-install of Oracle 8.1.7 on Solaris 8, then there is no need to do any of the DBCA/oradim stuff if everything else from the database is still in place.

The best way for Shaan to test/confirm my suggestion is to try it and to advise us of the results. Shaan, is this an acceptable strategy for you? It is certainly less work than an alternative, and if it doesn't work, nothing prevents you from using a more labor-intensive method. (The reason I am confident of your success, however, is because I have reliably used this method many times myself to pull the bacon out of the fire for other unfortunate DBAs.)

Please let us know your findings.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)

Do you use Oracle and live or work in Utah, USA?
Then click here to join Utah Oracle Users Group on Tek-Tips.
 
I agree that there is no need to waste our breath on the subject, especially since shaan00 has logged a TAR on the issue. The experts at Oracle will probably get him up and running without additional input from us. However, my advice still stands. DBCA is the right tool to use when checking the status of a database after this type of software failure.
 
KarlUK said:
You need to recreate the database.

Your suggestion to recreate the database is what I took issue with, Karl. That is a totally unnecessary waste of time/space on any platform to resurrect an instance. Even on Windows, with all of its idiosyncracies, you needn't create a dummy database. The simplest diagnostic method is to attempt a database startup once you have reinstated the missing software. If it works, it works...if it doesn't, the failure diagnostic will tell you what simple piece is missing, and you fix it. But you certainly do not "need to recreate the database" as you asserted earlier.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)

Do you use Oracle and live or work in Utah, USA?
Then click here to join Utah Oracle Users Group on Tek-Tips.
 
I suggest you drop the subject, SantaMufasa, in the absence of a specific question from shaan00. You do things your way, I do them mine, and I certainly stand by all my suggestions in this thread. If you prefer to manually edit the Windows registry instead of having DBCA do it for you, you are certainly welcome to try it.
 
Karl,

Suggesting that I "drop the subject" indictes that you are done, and since you are done that I should be done, as well. I understand and accept your feelings. We, however, have an obligation not only to Shaan (who has not responded since creating an Oracle TAR), but we have an obligation to the many Tek-Tipsters who will read this thread in the future, looking for the most simple, definitive solution to a problem that matches Shaan's problem. Just because Shaan is not asking additional followup questions does not mean that we can leave the thread hanging in ambiguity.

The ambiguity arises from your assertion that "You need to recreate the database," to resurrect an instance versus my assertion that recreating the database is unnecessary provided that the database data files are intact.

If I am a Tek-Tipster with Shaan's problem and I'm looking to this thread for help, I am left with the question, "Do I or Don't I need to recreate a (dummy) database in order to get the (real) database running again?"

It is absolutely true as you said, "You do things your way, I do them mine," but just because you can drive from London to Dover via Edinburgh does not mean we should advocate that for those who want to know the most economical route.

You also muddied the waters when you said, "If you prefer to manually edit the Windows registry instead of having DBCA do it for you, you are certainly welcome to try it." Shaan never had an issue with Windows, Windows registries, or DBCA...you took the thread off into the weeds with those topics, when, in fact, re-creating a database does not refresh or re-create services, registry entries, or anything else having to do with an Oracle Instance per se. One can modify registry entries and services with a variety of software (including DBCA), doing a "CREATE DATABASE..." is not one of those pieces of software.

The original, central issue in this thread, which you have been silent about, is whether or not one must re-create an extraneous database in Unix in order to bring an intact database back into service. My assertion is that you don't need to go through that hassle. Your assertion is clearly different.

So, I am not looking to embarrass you, Karl, or to demand your surrender on this issue; my intent is to assert the most economical (read "least steps/effort") method to resurrect an instance for an intact database.

If you wish to "drop the subject" at this juncture, then that is certainly your choice. But in any case, my hope is that we have reduced/eliminated any ambiguity.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)

Do you use Oracle and live or work in Utah, USA?
Then click here to join Utah Oracle Users Group on Tek-Tips.
 
hi all,
I currently have given up getting back the data.
I am recreating the databases and repopulating the data.
All my users have agreed it would be the fastest solution,

Thank you all for your suggests

Shaan
 
Most disappointing, shaan00. SantaMufasa and I have a big disagreement about how to proceed, but we are both certain that you can get your data back, assuming you haven't lost any critical files. Perhaps your problems were more severe than you indicated. Otherwise Oracle support should have been able to help you with the recovery.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top