Oracle Rename datafile

set linesize 200
col tablespace_name format a8
col file_name format a45
select tablespace_name, file_id, file_name, bytes/1024/1024 size_m, AUTOEXTENSIBLE, INCREMENT_BY*1024/8 incre_MB
from dba_data_files
where tablespace_name=‘TESTTBS’
/

alter database datafile ‘/chhs32/chpwtst4/oradata/EDIDATATS_26.dbf’ resize 100M ;
or alter database datafile 310 resize 100M ;

alter tablespace TESTTBS read only ;

alter database datafile 310 offline ;

host mv /chhs32/chpwtst4/oradata/EDIDATATS_26.dbf /chhs32/chpwtst4/oradata/DIAMOND_128.dbf

alter database rename file ‘/chhs32/chpwtst4/oradata/EDIDATATS_26.dbf’ to ‘/chhs32/chpwtst4/oradata/DIAMOND_128.dbf’;

alter database datafile 310 online ;

alter tablespace TESTTBS read write

发表评论?

0 条评论。

发表评论


注意 - 你可以用以下 HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>