Please send your Questions & Answers or Feedback to "dvmadhavreddy@javabook.org"

Please send your Questions & Answers or Feedback to "mohan@javabook.org"

Renaming a datafile

1.offline a tablespace

2.change the datafile name at OS level.

3.issue alter tablespace command at oracle level.

4.online the tablespace.

 

SQL> select name from v$datafile;

SQL> select file_name,file_id,tablespace_name,bytes from dba_data_files;

SQL> alter tablespace madhu offline;

 

OS LEVEL :

oracle> cd /u03/app/oracle/ssss

oracle> ls

oracle> mv or cp venu01.dbf mudhu01.dbf

 

SQL> alter tablespace madhu remane

                datafile '/u03/app/oraacle/ssss/venu01.dbf' to '/u03/app/oracle/ssss/madhu01.dbf';

SQL> alter tablespace madhu nologging;

SQL> select tablespace_name,logging from dba_tablespaces;

SQL> alter tablespace madhu logging;

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...

Flag Counter