当前位置:  数据库>oracle

Oracle修改数据文件名以及移动数据文件

    来源: 互联网  发布时间:2017-06-26

    本文导语: 生产上有时会用到数据文件的迁移,下边示例几种Oracle数据文件的迁移方法。 数据库版本 sys@ORCL>select * from v$version;select * from v$version;BANNER--------------------------------------------------------------------------------Oracle Database 11g Enterprise Edition...

生产上有时会用到数据文件的迁移,下边示例几种Oracle数据文件的迁移方法。

数据库版本

sys@ORCL>select * from v$version;
select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
PL/SQL Release 11.2.0.4.0 - Production
CORE11.2.0.4.0Production
TNS for Linux: Version 11.2.0.4.0 - Production
NLSRTL Version 11.2.0.4.0 - Production
sys@ORCL>select name from v$datafile;
select name from v$datafile;
NAME
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
/u02/app/oracle/oradata/orcl/system01.dbf
/u02/app/oracle/oradata/orcl/sysaux01.dbf
/u02/app/oracle/oradata/orcl/undotbs01.dbf
/u02/app/oracle/oradata/orcl/users01.dbf
/u02/app/oracle/oradata/orcl/DEV_svctbl.dbf
/u02/app/oracle/oradata/orcl/DEV_ias_opss.dbf
/u02/app/oracle/oradata/orcl/DEV_iau.dbf
/u02/app/oracle/oradata/orcl/DEV_veridata_user.dbf
/u02/app/oracle/oradata/orcl/DEV3_mds.dbf
/u02/app/oracle/oradata/orcl/DEV3_wlsservices.dbf
/u02/app/oracle/oradata/orcl/DEV3_iau.dbf
/u02/app/oracle/oradata/orcl/DEV3_ias_opss.dbf
/u02/app/oracle/oradata/orcl/DEV3_oggmon.dbf
/u02/app/oracle/oradata/orcl/DEV2_ias_opss.dbf
/u02/app/oracle/oradata/orcl/DEV3_UMS.dbf
/u02/app/oracle/oradata/orcl/DEV3_svctbl.dbf
/u02/app/oracle/oradata/orcl/DEV2_oggmon.dbf
/home/oracle/tt.bdf
/home/oracle/undo02.dbf
19 rows selected.

一、关闭数据库修改

1、使用mv方式(适用于文件系统)

sys@ORCL>shutdown immediate;
shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
sys@ORCL>! mv /home/oracle/tt.bdf /home/oracle/tt_mv.dbf
! mv /home/oracle/tt.bdf /home/oracle/tt_mv.dbf
l /home/oracle/tt_! ls -l /home/oracle/tt_mv.dbf
-rw-r----- 1 oracle oinstall 1073750016 Oct 29 08:31 /home/oracle/tt_mv.dbf
sys@ORCL>startup mount;
startup mount;
ORACLE instance started.
Total System Global Area  784998400 bytes
Fixed Size    2257352 bytes
Variable Size  478154296 bytes
Database Buffers  297795584 bytes
Redo Buffers    6791168 bytes
Database mounted.
sys@ORCL>alter database rename file '/home/oracle/tt.bdf' to '/home/oracle/tt_mv.dbf';
alter database rename file '/home/oracle/tt.bdf' to '/home/oracle/tt_mv.dbf';
Database altered.
sys@ORCL>select name from v$datafile;
select name from v$datafile;
NAME
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
/u02/app/oracle/oradata/orcl/system01.dbf
/u02/app/oracle/oradata/orcl/sysaux01.dbf
/u02/app/oracle/oradata/orcl/undotbs01.dbf
/u02/app/oracle/oradata/orcl/users01.dbf
/u02/app/oracle/oradata/orcl/DEV_svctbl.dbf
/u02/app/oracle/oradata/orcl/DEV_ias_opss.dbf
/u02/app/oracle/oradata/orcl/DEV_iau.dbf
/u02/app/oracle/oradata/orcl/DEV_veridata_user.dbf
/u02/app/oracle/oradata/orcl/DEV3_mds.dbf
/u02/app/oracle/oradata/orcl/DEV3_wlsservices.dbf
/u02/app/oracle/oradata/orcl/DEV3_iau.dbf
/u02/app/oracle/oradata/orcl/DEV3_ias_opss.dbf
/u02/app/oracle/oradata/orcl/DEV3_oggmon.dbf
/u02/app/oracle/oradata/orcl/DEV2_ias_opss.dbf
/u02/app/oracle/oradata/orcl/DEV3_UMS.dbf
/u02/app/oracle/oradata/orcl/DEV3_svctbl.dbf
/u02/app/oracle/oradata/orcl/DEV2_oggmon.dbf
/home/oracle/tt_mv.dbf
/home/oracle/undo02.dbf
19 rows selected.
sys@ORCL>alter database open;
alter database open;
Database altered.

2、RMAN备份方式(适用于文件系统、祼设备、ASM)

sys@ORCL>shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
sys@ORCL>exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@rhel6 ~]$ rman target /
Recovery Manager: Release 11.2.0.4.0 - Production on Sat Oct 29 21:13:36 2016
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
connected to target database (not started)
RMAN> startup mount;
Oracle instance started
database mounted
Total System Global Area    784998400 bytes
Fixed Size                    2257352 bytes
Variable Size                478154296 bytes
Database Buffers            297795584 bytes
Redo Buffers                  6791168 bytes
RMAN> backup as copy datafile '/u02/app/oracle/oradata/orcl/users01.dbf' format '/dev/raw/raw1';
Starting backup at 29-OCT-16
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=133 device type=DISK
channel ORA_DISK_1: starting datafile copy
input datafile file number=00004 name=/u02/app/oracle/oradata/orcl/users01.dbf
output file name=/dev/raw/raw1 tag=TAG20161029T211402 RECID=2 STAMP=926543658
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:15
Finished backup at 29-OCT-16
RMAN> switch datafile '/u02/app/oracle/oradata/orcl/users01.dbf' to copy;
datafile 4 switched to datafile copy "/dev/raw/raw1"
RMAN> alter database open;
database opened
RMAN> exit
Recovery Manager complete.
[oracle@rhel6 ~]$ ss
SQL*Plus: Release 11.2.0.4.0 Production on Sat Oct 29 21:15:03 2016
Copyright (c) 1982, 2013, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
sys@ORCL>select name from v$datafile;
NAME
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
/u02/app/oracle/oradata/orcl/system01.dbf
/u02/app/oracle/oradata/orcl/sysaux01.dbf
/u02/app/oracle/oradata/orcl/undotbs01.dbf
/dev/raw/raw1
/u02/app/oracle/oradata/orcl/DEV_svctbl.dbf
/u02/app/oracle/oradata/orcl/DEV_ias_opss.dbf
/u02/app/oracle/oradata/orcl/DEV_iau.dbf
/u02/app/oracle/oradata/orcl/DEV_veridata_user.dbf
/u02/app/oracle/oradata/orcl/DEV3_mds.dbf
/u02/app/oracle/oradata/orcl/DEV3_wlsservices.dbf
/u02/app/oracle/oradata/orcl/DEV3_iau.dbf
/u02/app/oracle/oradata/orcl/DEV3_ias_opss.dbf
/u02/app/oracle/oradata/orcl/DEV3_oggmon.dbf
/u02/app/oracle/oradata/orcl/DEV2_ias_opss.dbf
/u02/app/oracle/oradata/orcl/DEV3_UMS.dbf
/u02/app/oracle/oradata/orcl/DEV3_svctbl.dbf
/u02/app/oracle/oradata/orcl/DEV2_oggmon.dbf
/home/oracle/tt_mv3.dbf
/home/oracle/undo02.dbf
19 rows selected.

二、在线修改

1、表空间OFFLINE方式

sys@ORCL>col file_name for a70
sys@ORCL>select file_name,tablespace_name,status,online_status from dba_data_files;
select file_name,tablespace_name,status,online_status from dba_data_files;
FILE_NAME      TABLESPACE_NAME      STATUSONLINE_
---------------------------------------------------------------------- ------------------------------ --------- -------
/u02/app/oracle/oradata/orcl/users01.dbf      USERS      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/undotbs01.dbf      UNDOTBS1      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/sysaux01.dbf      SYSAUX      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/system01.dbf      SYSTEM      AVAILABLE SYSTEM
/u02/app/oracle/oradata/orcl/DEV_svctbl.dbf      DEV_STB      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV_ias_opss.dbf      DEV_IAS_OPSS      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV_iau.dbf      DEV_IAU      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV_veridata_user.dbf      DEV_VERIDATA_USER      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV3_mds.dbf      DEV3_MDS      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV3_wlsservices.dbf      DEV3_WLS      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV3_iau.dbf      DEV3_IAU      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV3_ias_opss.dbf      DEV3_IAS_OPSS      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV3_oggmon.dbf      DEV3_OGGMON      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV2_ias_opss.dbf      DEV2_IAS_OPSS      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV3_UMS.dbf      DEV3_IAS_UMS      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV3_svctbl.dbf      DEV3_STB      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV2_oggmon.dbf      DEV2_OGGMON      AVAILABLE ONLINE
/home/oracle/tt_mv.dbf      TT      AVAILABLE ONLINE
/home/oracle/undo02.dbf        UNDOTBS1      AVAILABLE ONLINE
19 rows selected.
sys@ORCL>alter tablespace tt offline;
alter tablespace tt offline;
Tablespace altered.
sys@ORCL>select file_name,tablespace_name,status,online_status from dba_data_files;
select file_name,tablespace_name,status,online_status from dba_data_files;
FILE_NAME      TABLESPACE_NAME      STATUSONLINE_
---------------------------------------------------------------------- ------------------------------ --------- -------
/u02/app/oracle/oradata/orcl/users01.dbf      USERS      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/undotbs01.dbf      UNDOTBS1      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/sysaux01.dbf      SYSAUX      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/system01.dbf      SYSTEM      AVAILABLE SYSTEM
/u02/app/oracle/oradata/orcl/DEV_svctbl.dbf      DEV_STB      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV_ias_opss.dbf      DEV_IAS_OPSS      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV_iau.dbf      DEV_IAU      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV_veridata_user.dbf      DEV_VERIDATA_USER      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV3_mds.dbf      DEV3_MDS      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV3_wlsservices.dbf      DEV3_WLS      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV3_iau.dbf      DEV3_IAU      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV3_ias_opss.dbf      DEV3_IAS_OPSS      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV3_oggmon.dbf      DEV3_OGGMON      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV2_ias_opss.dbf      DEV2_IAS_OPSS      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV3_UMS.dbf      DEV3_IAS_UMS      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV3_svctbl.dbf      DEV3_STB      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV2_oggmon.dbf      DEV2_OGGMON      AVAILABLE ONLINE
/home/oracle/tt_mv.dbf      TT      AVAILABLE OFFLINE
/home/oracle/undo02.dbf        UNDOTBS1      AVAILABLE ONLINE
19 rows selected.
sys@ORCL>! mv /home/oracle/tt_mv.dbf /home/oracle/tt_mv2.dbf
! mv /home/oracle/tt_mv.dbf /home/oracle/tt_mv2.dbf
sys@ORCL>! ls -l /home/oracle/tt_mv2.dbf
! ls -l /home/oracle/tt_mv2.dbf
-rw-r----- 1 oracle oinstall 1073750016 Oct 29 08:39 /home/oracle/tt_mv2.dbf
sys@ORCL>alter database rename file '/home/oracle/tt_mv.db';
alter database rename file '/home/oracle/tt_mv.dbf' to '/home/oracle/tt_mv2.dbf';
Database altered.
sys@ORCL>select file_name,tablespace_name,status,online_status from dba_data_files;
select file_name,tablespace_name,status,online_status from dba_data_files;
FILE_NAME      TABLESPACE_NAME      STATUSONLINE_
---------------------------------------------------------------------- ------------------------------ --------- -------
/u02/app/oracle/oradata/orcl/users01.dbf      USERS      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/undotbs01.dbf      UNDOTBS1      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/sysaux01.dbf      SYSAUX      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/system01.dbf      SYSTEM      AVAILABLE SYSTEM
/u02/app/oracle/oradata/orcl/DEV_svctbl.dbf      DEV_STB      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV_ias_opss.dbf      DEV_IAS_OPSS      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV_iau.dbf      DEV_IAU      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV_veridata_user.dbf      DEV_VERIDATA_USER      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV3_mds.dbf      DEV3_MDS      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV3_wlsservices.dbf      DEV3_WLS      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV3_iau.dbf      DEV3_IAU      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV3_ias_opss.dbf      DEV3_IAS_OPSS      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV3_oggmon.dbf      DEV3_OGGMON      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV2_ias_opss.dbf      DEV2_IAS_OPSS      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV3_UMS.dbf      DEV3_IAS_UMS      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV3_svctbl.dbf      DEV3_STB      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV2_oggmon.dbf      DEV2_OGGMON      AVAILABLE ONLINE
/home/oracle/tt_mv2.dbf        TT      AVAILABLE OFFLINE
/home/oracle/undo02.dbf        UNDOTBS1      AVAILABLE ONLINE
19 rows selected.
sys@ORCL>alter tablespace tt online;
alter tablespace tt online;
Tablespace altered.
sys@ORCL>select file_name,tablespace_name,status,online_status from dba_data_files;
select file_name,tablespace_name,status,online_status from dba_data_files;
FILE_NAME      TABLESPACE_NAME      STATUSONLINE_
---------------------------------------------------------------------- ------------------------------ --------- -------
/u02/app/oracle/oradata/orcl/users01.dbf      USERS      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/undotbs01.dbf      UNDOTBS1      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/sysaux01.dbf      SYSAUX      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/system01.dbf      SYSTEM      AVAILABLE SYSTEM
/u02/app/oracle/oradata/orcl/DEV_svctbl.dbf      DEV_STB      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV_ias_opss.dbf      DEV_IAS_OPSS      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV_iau.dbf      DEV_IAU      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV_veridata_user.dbf      DEV_VERIDATA_USER      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV3_mds.dbf      DEV3_MDS      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV3_wlsservices.dbf      DEV3_WLS      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV3_iau.dbf      DEV3_IAU      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV3_ias_opss.dbf      DEV3_IAS_OPSS      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV3_oggmon.dbf      DEV3_OGGMON      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV2_ias_opss.dbf      DEV2_IAS_OPSS      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV3_UMS.dbf      DEV3_IAS_UMS      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV3_svctbl.dbf      DEV3_STB      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV2_oggmon.dbf      DEV2_OGGMON      AVAILABLE ONLINE
/home/oracle/tt_mv2.dbf        TT      AVAILABLE ONLINE
/home/oracle/undo02.dbf        UNDOTBS1      AVAILABLE ONLINE
19 rows selected.

2、数据文件OFFLINE方式(需要开户归档模式)

sys@ORCL>archive log list
archive log list
Database log mode      Archive Mode
Automatic archival      Enabled
Archive destination      /u02/app/oracle/product/11.2.4/db1/dbs/arch
Oldest online log sequence    3
Next log sequence to archive  5
Current log sequence      5
sys@ORCL>alter database datafile '/home/oracle/tt_mv2.dbf' offline;
alter database datafile '/home/oracle/tt_mv2.dbf' offline;
Database altered.
sys@ORCL>! mv /home/oracle/tt_mv2
! mv /home/oracle/tt_mv2.dbf /home/oracle/tt_mv3.dbf
sys@ORCL>! ls -l /home/oracle/tt_mv3.dbf
! ls -l /home/oracle/tt_mv3.dbf
-rw-r----- 1 oracle oinstall 1073750016 Oct 29 08:41 /home/oracle/tt_mv3.dbf
sys@ORCL>alter database rename file '/home/oracle/tt_mv2.dbf'to';
alter database rename file '/home/oracle/tt_mv2.dbf' to '/home/oracle/tt_mv3.dbf';
Database altered.
sys@ORCL>select file_name,tablespace_name,status,online_status from dba_data_files;
select file_name,tablespace_name,status,online_status from dba_data_files;
FILE_NAME      TABLESPACE_NAME      STATUSONLINE_
---------------------------------------------------------------------- ------------------------------ --------- -------
/u02/app/oracle/oradata/orcl/users01.dbf      USERS      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/undotbs01.dbf      UNDOTBS1      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/sysaux01.dbf      SYSAUX      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/system01.dbf      SYSTEM      AVAILABLE SYSTEM
/u02/app/oracle/oradata/orcl/DEV_svctbl.dbf      DEV_STB      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV_ias_opss.dbf      DEV_IAS_OPSS      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV_iau.dbf      DEV_IAU      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV_veridata_user.dbf      DEV_VERIDATA_USER      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV3_mds.dbf      DEV3_MDS      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV3_wlsservices.dbf      DEV3_WLS      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV3_iau.dbf      DEV3_IAU      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV3_ias_opss.dbf      DEV3_IAS_OPSS      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV3_oggmon.dbf      DEV3_OGGMON      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV2_ias_opss.dbf      DEV2_IAS_OPSS      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV3_UMS.dbf      DEV3_IAS_UMS      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV3_svctbl.dbf      DEV3_STB      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV2_oggmon.dbf      DEV2_OGGMON      AVAILABLE ONLINE
/home/oracle/tt_mv3.dbf        TT      AVAILABLE RECOVER
/home/oracle/undo02.dbf        UNDOTBS1      AVAILABLE ONLINE
19 rows selected.
sys@ORCL>alter database datafile '/home/oracle/tt_mv3.dbf' online;
alter database datafile '/home/oracle/tt_mv3.dbf' online;
alter database datafile '/home/oracle/tt_mv3.dbf' online
*
ERROR at line 1:
ORA-01113: file 18 needs media recovery
ORA-01110: data file 18: '/home/oracle/tt_mv3.dbf'
sys@ORCL>recover datafile '/home/oracle/tt_mv3.dbf';
recover datafile '/home/oracle/tt_mv3.dbf';
Media recovery complete.
sys@ORCL>alter database datafile '/home/oracle/tt_mv3.dbf' online;
alter database datafile '/home/oracle/tt_mv3.dbf' online;
Database altered.
sys@ORCL>select file_name,tablespace_name,status,online_status from dba_data_files;
select file_name,tablespace_name,status,online_status from dba_data_files;
FILE_NAME      TABLESPACE_NAME      STATUSONLINE_
---------------------------------------------------------------------- ------------------------------ --------- -------
/u02/app/oracle/oradata/orcl/users01.dbf      USERS      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/undotbs01.dbf      UNDOTBS1      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/sysaux01.dbf      SYSAUX      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/system01.dbf      SYSTEM      AVAILABLE SYSTEM
/u02/app/oracle/oradata/orcl/DEV_svctbl.dbf      DEV_STB      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV_ias_opss.dbf      DEV_IAS_OPSS      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV_iau.dbf      DEV_IAU      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV_veridata_user.dbf      DEV_VERIDATA_USER      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV3_mds.dbf      DEV3_MDS      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV3_wlsservices.dbf      DEV3_WLS      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV3_iau.dbf      DEV3_IAU      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV3_ias_opss.dbf      DEV3_IAS_OPSS      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV3_oggmon.dbf      DEV3_OGGMON      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV2_ias_opss.dbf      DEV2_IAS_OPSS      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV3_UMS.dbf      DEV3_IAS_UMS      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV3_svctbl.dbf      DEV3_STB      AVAILABLE ONLINE
/u02/app/oracle/oradata/orcl/DEV2_oggmon.dbf      DEV2_OGGMON      AVAILABLE ONLINE
/home/oracle/tt_mv3.dbf        TT      AVAILABLE ONLINE
/home/oracle/undo02.dbf        UNDOTBS1      AVAILABLE ONLINE
19 rows selected.


    
 
 

您可能感兴趣的文章:

  • Linux平台下Oracle 密码文件重建
  • Oracle数据库访问参数文件的顺序
  • Oracle 对数据文件大小的限制
  • Oracle移动数据文件到新分区步骤分析
  • 在jsp文件中怎么设置oracle的路径:很简单的,只是因为我不会;
  • Oracle的spfile参数文件
  • linux下通过对文件读取方式查询oracle的版本信息
  • 求高手指点shell导入.dat文件到ORACLE数据库
  • jsp文件连接oracle失败
  • linux 安装 oracle 运行./runinstall 提示没有这个文件
  • oracle删除文件后数据库启动不了的处理方法
  • 请教:为什么删除不掉?我用超级用户删除某一文件夹rm -R oracle失败。
  • Oracle控制文件多元化处理
  • Oracle数据库逻辑备份的SH文件
  • 利用多个转储文件导出大量Oracle数据
  • 50分的题:如何给oracle减肥?在linux多目录的环境下查找体积最大的单个文件??
  • 用oracle pl/sql 从A unix机器,去读取B unix机器上的一个文件,怎么实现?
  • 读取oracle数据库表写文件慢
  • 如何向oracle中写入一个大文件?谢谢!
  • jsp文件上传smartupload到oracle数据库中没有longblob的数据类型如何处理的?
  • Oracle 数据库(oracle Database)Select 多表关联查询方式
  • oracle数据库导出和oracle导入数据的二种方法(oracle导入导出数据)
  • oracle中如何把表中具有相同值列的多行数据合并成一行
  • Oracle 数据库开发工具 Oracle SQL Developer
  • Oracle数据库(Oracle Database)体系结构及基本组成介绍
  • 请问大家用oracle数据库, 用import oracle.*;下的东西么? 还是用标准库?
  • ORACLE数据库常用字段数据类型介绍
  • 怎样调出ORACLE数据库中的数据,该如何连接?
  • Oracle 数据库(oracle Database)性能调优技术详解
  • 用JDBC连接Oracle数据库时,如何向数据库中写日期型数据(格式)?谢了!
  • 关于JDBC连接Oracle数据库,是否必须有Oracle客户端
  •  
    本站(WWW.169IT.COM)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
    本站(WWW.169IT.COM)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。












  • 相关文章推荐
  • Oracle 12c发布简单介绍及官方下载地址
  • 在linux下安装oracle,如何设置让oracle自动启动!也就是让oracle那个服务自动启动,不是手动的
  • oracle 11g最新版官方下载地址
  • 请问su oracle 和su - oracle有什么不同?
  • 如何设置让Oracle SQL Developer显示的时间包含时分秒
  • 虚拟机装Oracle R12与Oracle10g
  • Oracle 10g和Oracle 11g网格技术介绍
  • Oracle EBS R12 支持 Oracle Database 11g
  • ORACLE日期相关操作
  • SCO unix下安装oracle,但没有光盘,请大家推荐一个oracle下载站点(unix版本的)。谢谢!!!!
  • Oracle 12c的九大最新技术特性介绍
  • Linux /$ORACLE_HOME $ORACLE_HOME
  • ORACLE中DBMS_RANDOM随机数生成包
  • Linux系统下Oracle的启动与Oracle监听的启动
  • 请问在solaris下安装ORACLE,用root用户和用oracle用户安装有什么区别么?
  • 网间Oracle的连接,远程连接Oracle服务器??
  • 请教:.profile中:if [ -d /opt/oracle/db01/app/oracle/product/9.2.0 ]是什么意思?
  • 在linux 中如何删除oracle db 与卸载oracle.
  • linux下安装oracle后使用命令行启动的方法 linux启动oracle
  • 如何将Aix上的oracle 物理备份 然后再在linux 系统上还原oracle
  • 那里有免费的oracle odbc driver for linux?或怎么破解easysoft oracle odbc driver安装包?急


  • 站内导航:


    特别声明:169IT网站部分信息来自互联网,如果侵犯您的权利,请及时告知,本站将立即删除!

    ©2012-2017,169IT.COM,E-mail:www_169it_com#163.com(请将#改为@)

    浙ICP备11055608号