Oracle mobile data file Method

Source: Internet
Author: User

The following two methods are applicable to the online and offline statuses of Oracle mobile data files in unix or linux environments. If you are interested, take a look.

Oracle mobile data file:

Online status of the alter tablespace method ):
This method requires that the data file neither belong to the SYSTEM tablespace nor to the tablespace containing the ACTIVE rollback segment or temporary segment.

 
 
  1. $ sqlplus '/as sysdba' 

# Offline the tablespace corresponding to the data file to be moved

 
 
  1. SQL> alter tablespace ipas_acct_data offline 

# Cp the data file to the directory you want to put.

 
 
  1. SQL> !mv /opt/oracle/wacosdata/ipas_acct_data001.dbf /opt/oracle/nms/oradata/ipas_acct_data001.dbf 

# Modify the location of database files in a tablespace.

 
 
  1. SQL> alter tablespace ipas_acct_data rename datafile '/opt/oracle/wacosdata/ipas_acct_data001.dbf' to '/opt/oracle/nms/oradata/ipas_acct_data001.dbf' 

# Online the tablespace.

 
 
  1. SQL> alter tablespace ipas_acct_data online 


# View the Modification result.

 
 
  1. SQL> select file_name from dba_data_files where tablespace_name = 'IPAS_ACCT_DATA'; 

Alter database method offline ):
This method can be used to move data files in any tablespace.

 
 
  1. $ sqlplus '/as sysdba'  
  2. SQL> shutdown immediate  
  3. SQL> !mv /opt/oracle/oradata/wacos002.dbf /ora10g/oradata/wacos002.dbf  
  4. SQL> startup mount  
  5. SQL> alter database rename file '/opt/oracle/oradata/wacos002.dbf' to '/ora10g/oradata/wacos002.dbf';  
  6. SQL> alter database open;  
  7. SQL> set head off  
  8. SQL> SELECT file_name from dba_data_files where tablespace_name = 'WACOS'; 

Oracle Log File Reconstruction Method

Concepts of oracle users

Add Oracle user information in Linux

Measure the test taker's knowledge about the ORACLE user authentication mechanism.

Oracle tablespace statements

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.