Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Moving datafile to ASM

John-MKMay 10 2012 — edited May 10 2012
Hello,

By mistake I created one data file in the local file system instead of ASM diskgroup. Initially I created the data file with 100MB, autoextensible to 100M,maxsize 2G, but then I stopped autoexntensible, so that less data file size would be better to move to ASM.

My concern is that now I am thinking if the datafile is full then I will move it to ASM diskgroup (script to move to ASM is already ready). I want to be sure if the data file is full, so that I move it peacefully to ASM, because otherwise datafile is not accessible if it is currently being written and moving to ASM. I dont want that stop of data written to data file, or the data file is full already and there is no risk that data fill be written to it or it will be inaccessible.

Please have a look and suggest how can I check that the data file is full actually and safe to move to ASM.

DB=11.2.0.2 EE, OS=RHL
SQL> select file_id,tablespace_name,bytes/1024/1024 "Bytes in MB",status,autoextensible,maxbytes/1024/1024 "Maxbytes in MB",user_bytes/1024/1024 from dba_data_files where file_id=62;

   FILE_ID TABLESPACE_NAME		  Bytes in MB STATUS				   AUTOEXTENSIB Maxbytes in MB USER_BYTES/1024/1024
---------- ------------------------------ ----------- ------------------------------------ ------------ -------------- --------------------
	62   KKJ				  300 AVAILABLE 			   NO			     0			299
Thank you.

Regards,
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 7 2012
Added on May 10 2012
8 comments
1,931 views