|
SQL> @LABS/tbsinfo2
SQL> select t.name tablespace_name, f.name file_name, f.status, f.enabled
2 from v$tablespace t, v$datafile f
3 where t.ts# = f.ts#;
TABLESPACE_NAME FILE_NAME STATUS ENABLED
-------------------- ---------------------------------------- ------- ----------
SYSTEM /home/human/oradata/HUMAN/system01.dbf SYSTEM READ WRITE
UNDOTBS1 /home/human/oradata/HUMAN/undotbs01.dbf ONLINE READ WRITE
CWMLITE /home/human/oradata/HUMAN/cwmlite01.dbf ONLINE READ WRITE
DRSYS /home/human/oradata/HUMAN/drsys01.dbf ONLINE READ WRITE
EXAMPLE /home/human/oradata/HUMAN/example01.dbf ONLINE READ WRITE
INDX /home/human/oradata/HUMAN/indx01.dbf ONLINE READ WRITE
ODM /home/human/oradata/HUMAN/odm01.dbf ONLINE READ WRITE
TOOLS /home/human/oradata/HUMAN/tools01.dbf ONLINE READ WRITE
USERS /home/human/oradata/HUMAN/users01.dbf ONLINE READ WRITE
SQL> alter database datafile '/home/human/oradata/HUMAN/users01.dbf' offline;
Database altered.
SQL> @LABS/tbsinfo2
SQL> select t.name tablespace_name, f.name file_name, f.status, f.enabled
2 from v$tablespace t, v$datafile f
3 where t.ts# = f.ts#;
TABLESPACE_NAME FILE_NAME STATUS ENABLED
-------------------- ---------------------------------------- ------- ----------
SYSTEM /home/human/oradata/HUMAN/system01.dbf SYSTEM READ WRITE
UNDOTBS1 /home/human/oradata/HUMAN/undotbs01.dbf ONLINE READ WRITE
CWMLITE /home/human/oradata/HUMAN/cwmlite01.dbf ONLINE READ WRITE
DRSYS /home/human/oradata/HUMAN/drsys01.dbf ONLINE READ WRITE
EXAMPLE /home/human/oradata/HUMAN/example01.dbf ONLINE READ WRITE
INDX /home/human/oradata/HUMAN/indx01.dbf ONLINE READ WRITE
ODM /home/human/oradata/HUMAN/odm01.dbf ONLINE READ WRITE
TOOLS /home/human/oradata/HUMAN/tools01.dbf ONLINE READ WRITE
USERS /home/human/oradata/HUMAN/users01.dbf RECOVER READ WRITE
SQL> !cp ONBACKUP/users01.dbf $HOME/oradata/HUMAN/
SQL> recover datafile '$HOME/oradata/HUMAN/users01.dbf';
ORA-00279: change 846239 generated at 07/23/2003 17:37:23 needed for thread 1
ORA-00289: suggestion : /home/human/arch/log/33.ARC
ORA-00280: change 846239 for thread 1 is in sequence #33
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
auto
SQL> @LABS/tbsinfo2
SQL> select t.name tablespace_name, f.name file_name, f.status, f.enabled
2 from v$tablespace t, v$datafile f
3 where t.ts# = f.ts#;
TABLESPACE_NAME FILE_NAME STATUS ENABLED
-------------------- ---------------------------------------- ------- ----------
SYSTEM /home/human/oradata/HUMAN/system01.dbf SYSTEM READ WRITE
UNDOTBS1 /home/human/oradata/HUMAN/undotbs01.dbf ONLINE READ WRITE
CWMLITE /home/human/oradata/HUMAN/cwmlite01.dbf ONLINE READ WRITE
DRSYS /home/human/oradata/HUMAN/drsys01.dbf ONLINE READ WRITE
EXAMPLE /home/human/oradata/HUMAN/example01.dbf ONLINE READ WRITE
INDX /home/human/oradata/HUMAN/indx01.dbf ONLINE READ WRITE
ODM /home/human/oradata/HUMAN/odm01.dbf ONLINE READ WRITE
TOOLS /home/human/oradata/HUMAN/tools01.dbf ONLINE READ WRITE
USERS /home/human/oradata/HUMAN/users01.dbf OFFLINE READ WRITE
SQL> alter database datafile '$HOME/oradata/HUMAN/users01.dbf' online;
Database altered.
|