Re: Deleting a datafile from a tablespace.

Re: Deleting a datafile from a tablespace.

 

  

What about exporting the objects in that tablespace. Drop the tablespace
with huge datafile sizes, recreate with smaller data file sizes then
import the objects.




"Sheryl" <oracledba-ezmlmshield-x12107357.[Email address protected]
03/26/2008 09:23 AM

To
"LazyDBA Discussion" <[Email address protected]
cc

Subject
Deleting a datafile from a tablespace.






Hi All,

My prod DB is a 2-node Oracle 10g R1 RAC on HP-UX. The datafiles reside on
RAW Device.

We are presently doing a resizing of the Db. As a part of this activity we
were re-allocating the space from those Tablespaces that don't have much
usage , to the others with greater space usage.

I have a tablespace of 16 GB - two datafiles each of 8GB. But the space
utilization is approx 1 GB. And the data is not expected to grow much for
this tablespace. So I want to drop one of the datafiles associated with
this tablespace. The data is spread over both the datafiles.

To do the dropping of the datafile I have the following statements,

Either

Alter database datafile 'Path_of_datafile' offline;
Alter database datafile 'Path_of_datafile' drop;

Or

Alter database datafile 'Path_of_datafile' offline drop;

Now my queries are:-

1. Will the system allow me to drop the datafile if there is data in it
and it is offline?
2. How do I transfer data from one Dbf of tbs to other? that is,
If the tablespace A has 2 dbf's - A1.dbf and A2.dbf , how do I transfer
the data from A2.dbf to A1.dbf ?
3. Is export of tablespace --> drop tablespace --> recreate tablespace -->
import data to the new tablespace, the only option??
4. Will resizing the datafile to 0K as in "" Alter database datafile
'Path_of_datafile' resize 0 K; "" force the data to move from one dbf to
other of the same tbs? Or will it throw an error ,. since it has data more
than 0K size???


Thanks in advance,

Warm Regards,

Sheryl Philip



DISCLAIMER:
This message contains privileged and confidential information and is
intended only for an individual named. If you are not the intended
recipient, you should not disseminate, distribute, store, print, copy or
deliver this message. Please notify the sender immediately by e-mail if
you have received this e-mail by mistake and delete this e-mail from your
system. E-mail transmission cannot be guaranteed to be secure or
error-free as information could be intercepted, corrupted, lost,
destroyed, arrive late or incomplete or contain viruses. The sender,
therefore, does not accept liability for any errors or omissions in the
contents of this message which arise as a result of e-mail transmission.
If verification is required, please request a hard-copy version.


---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html





The information contained in this communication is confidential and may constitute non-public and/or "inside" information. It is intended only for the use of the addressee and is the property of TAP Pharmaceutical Products Inc. Unauthorized use, disclosure, or copying of this communication, or any part thereof, is strictly prohibited and may be unlawful. If you received this communication in error, please notify me immediately by return e-mail and destroy this communication and all copies thereof, including all attachments.

Oracle LazyDBA home page