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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Export/Import full database 1

Status
Not open for further replies.

KenCunningham

Technical User
Mar 20, 2001
8,475
GB
Hi Folks, I was almost certain I'd posted this before, but it appears not.

I have a Sun E450 (Solaris 8) with a failing disk on which resides an index data file. I have installed a new disk to replace the failing one, but am unable to copy, tar, ufsdump or whatever the data file because of the corruption (I/O errors are generated). Because of this, none of my recent backups are viable and I am therefore resigned to having to recreate the database from a full export.

The database is still functioning, so I guess it wouldn't be adviseable to import the full export without clearing down the data in there already? I would like to create tablespaces as part of the import - a full export should have this capability as I understand it.

My apologies if this is a somewhat vague requirement, but I am a novice in creating databases from an import, having always been able to do so from an operating system level.

I want to be good, is that not enough?
 
Ken,

if memory serves, a full import won't create tablespaces for you. I believe I found this out the hard way some time ago.

I'd recommend using the DBCA to make a blank database, manually adding the application-specific tablespace(s) and then doing a full import. I'd suggest that even if you can't do the import right away, a full export should be done immediately, so that if the db fails, you've at least got something from which to attempt recovery. If your back-ups are useless, then you need to do something, and fast!

Regards

T

Grinding away at things Oracular
 
Thanks Tharg. I'm taking a full export every day whilst I decide on what to do, so hopefully that's at least the belt, if not the braces taken care of.

Has anyone else any experience as to whether tablespaces are created by an 8i full import?

Thanks again.

I want to be good, is that not enough?
 
Ken,

I've just found the thread.

thread759-1232081 refers

T

Grinding away at things Oracular
 
Ken,

as you are talking about an index data file:
Not sure about it, but it might suffice to drop and recreate indexes in another data file.
Or maybe simpler, try 'alter index <name> rebuild tablespace <name>', but not sure if this is available in 8i.
And I think I have read about dropping empty datafiles.

[ponder]
 
Thank you hoinz, yes it is indeed the index datafile.

I want to be good, is that not enough?
 
A star for hoinz for the pointer. To close this off, this is what I did:

1. Created a new tablespace with the same dimensions (if that's the correct word?) on the new disk.

2. Moved all existing indexes from the old tablespace to the new with a script generated by:

SELECT 'ALTER INDEX '||OWNER||'.'||INDEX_NAME||' REBUILD TABLESPACE [NEW_INDEX_TS] ONLINE;'
FROM DBA_INDEXES
WHERE TABLESPACE_NAME = [OLD_TS_NAME];

3. Having carried out some checks, offline and drop the old tablespace and delete the datafile (or in this case remove the defective disk).

Thanks again!

I want to be good, is that not enough?
 
Ken,

glad it helped!
[smile]
Thanks for the star,
and thanks for posting the outcome.
As I wrote, I was not sure whether it would work. So I, too, learned something new.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top