RE: Deleting a datafile from a tablespace.

RE: Deleting a datafile from a tablespace.

 

  

Have you considered using the move command?

Alter table <table_name> move tablespace <tablespace_name>;

You can set the storage values and level of parallelism etc.

-----Original Message-----
From: Sheryl
[mailto:oracledba-ezmlmshield-x12107357.[Email address protected]
Sent: Wednesday, March 26, 2008 9:23 AM
To: LazyDBA Discussion
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 message is proprietary and/or confidential. If you are not the
intended recipient, please: (i) delete the message and all copies; (ii) do not disclose,
distribute or use the message in any manner; and (iii) notify the sender immediately. In addition,
please be aware that any message addressed to our domain is subject to archiving and review by
persons other than the intended recipient. Thank you.
_____________

Oracle LazyDBA home page