259.
Identify the two tablespaces whose data files are so critical that only a closed recovery is possible. (Choose two.)
A. SYSAUX
B. TOOLS
C. UNDO
D. INDEX
E. SYSTEM
F. USERS
G. TEMP
答案e肯定对那a和c会是哪个呢,通过下面的实验你就明白了
步骤
1,rman bakcup database
2,database open,os rm sysaux tablespace file
3,recovery sysaux
4,database open,os rm undo tablespace file
5,recovery undo try
6,database mount,os rm undo tablespace file
6,recovery undo retry
RMAN> backup database;
Recovery Manager complete.
[oracle@orazhang ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on 星期四 7月 14 12:03:24 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
sys@ORCL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /backup
Oldest online log sequence 13
Next log sequence to archive 16
Current log sequence 16
sys@ORCL> desc dba_data_files;
Name Null? Type
----------------------------------------------------- -------- --------------------------------------------------------
FILE_NAME VARCHAR2(513)
FILE_ID NUMBER
TABLESPACE_NAME VARCHAR2(30)
BYTES NUMBER
BLOCKS NUMBER
STATUS VARCHAR2(9)
RELATIVE_FNO NUMBER
AUTOEXTENSIBLE VARCHAR2(3)
MAXBYTES NUMBER
MAXBLOCKS NUMBER
INCREMENT_BY NUMBER
USER_BYTES NUMBER
USER_BLOCKS NUMBER
ONLINE_STATUS VARCHAR2(7)
sys@ORCL> col file_name for a50
sys@ORCL> col tablespace_name for a20
sys@ORCL> select file_name,tablespace_name from dba_data_files;
FILE_NAME TABLESPACE_NAME
-------------------------------------------------- --------------------
/u01/app/oracle/oradata/ORCL/datafile/undotbs2.dbf UNDOTBS2
/u01/app/oracle/oradata/ORCL/datafile/tt1.dbf TT
/u01/app/oracle/oradata/ORCL/datafile/o1_mf_tbslog TBSLOGMNR
mn_6vdjocp1_.dbf
/u01/app/oracle/oradata/ORCL/datafile/tt.dbf TT
/u01/app/oracle/oradata/ORCL/datafile/o1_mf_exampl EXAMPLE
e_6cgckxc7_.dbf
/u01/app/oracle/oradata/ORCL/datafile/o1_mf_users_ USERS
6cgckxds_.dbf
/u01/app/oracle/oradata/ORCL/datafile/o1_mf_sysaux SYSAUX
_6cgckx9p_.dbf
/u01/app/oracle/oradata/ORCL/datafile/test.dbf TEST
/u01/app/oracle/oradata/ORCL/datafile/o1_mf_system SYSTEM
_6cgckx95_.dbf
/u01/app/oracle/oradata/ORCL/datafile/smailtbs.dbf SMAILTBS
10 rows selected.
sys@ORCL> select open_mode from v$database;
OPEN_MODE
----------
READ WRITE
sys@ORCL> col file_name for a70
sys@ORCL> col file_name for a70
sys@ORCL> select file_name,tablespace_name from dba_data_files;
FILE_NAME TABLESPACE_NAME
---------------------------------------------------------------------- --------------------
/u01/app/oracle/oradata/ORCL/datafile/undotbs2.dbf UNDOTBS2
/u01/app/oracle/oradata/ORCL/datafile/tt1.dbf TT
/u01/app/oracle/oradata/ORCL/datafile/o1_mf_tbslogmn_6vdjocp1_.dbf TBSLOGMNR
/u01/app/oracle/oradata/ORCL/datafile/tt.dbf TT
/u01/app/oracle/oradata/ORCL/datafile/o1_mf_example_6cgckxc7_.dbf EXAMPLE
/u01/app/oracle/oradata/ORCL/datafile/o1_mf_users_6cgckxds_.dbf USERS
/u01/app/oracle/oradata/ORCL/datafile/o1_mf_sysaux_6cgckx9p_.dbf SYSAUX
/u01/app/oracle/oradata/ORCL/datafile/test.dbf TEST
/u01/app/oracle/oradata/ORCL/datafile/o1_mf_system_6cgckx95_.dbf SYSTEM
/u01/app/oracle/oradata/ORCL/datafile/smailtbs.dbf SMAILTBS
10 rows selected.
sys@ORCL> ! rm /u01/app/oracle/oradata/ORCL/datafile/o1_mf_sysaux_6cgckx9p_.dbf
sys@ORCL> alter system checkpoint;
System altered.
sys@ORCL> alter tablespace sysaux offline;
alter tablespace sysaux offline
*
ERROR at line 1:
ORA-01191: file 3 is already offline - cannot do a normal offline
ORA-01110: data file 3: '/u01/app/oracle/oradata/ORCL/datafile/o1_mf_sysaux_6cgckx9p_.dbf'
sys@ORCL> select file_name,tablespace_name,online_status from dba_data_files;
FILE_NAME TABLESPACE_NAME ONLINE_
---------------------------------------------------------------------- -------------------- -------
/u01/app/oracle/oradata/ORCL/datafile/undotbs2.dbf UNDOTBS2 ONLINE
/u01/app/oracle/oradata/ORCL/datafile/tt1.dbf TT ONLINE
/u01/app/oracle/oradata/ORCL/datafile/o1_mf_tbslogmn_6vdjocp1_.dbf TBSLOGMNR ONLINE
/u01/app/oracle/oradata/ORCL/datafile/tt.dbf TT ONLINE
/u01/app/oracle/oradata/ORCL/datafile/o1_mf_example_6cgckxc7_.dbf EXAMPLE ONLINE
/u01/app/oracle/oradata/ORCL/datafile/o1_mf_users_6cgckxds_.dbf USERS ONLINE
/u01/app/oracle/oradata/ORCL/datafile/o1_mf_sysaux_6cgckx9p_.dbf SYSAUX RECOVER
/u01/app/oracle/oradata/ORCL/datafile/test.dbf TEST ONLINE
/u01/app/oracle/oradata/ORCL/datafile/o1_mf_system_6cgckx95_.dbf SYSTEM SYSTEM
/u01/app/oracle/oradata/ORCL/datafile/smailtbs.dbf SMAILTBS ONLINE
10 rows selected.
[oracle@orazhang ~]$ rman target/
Recovery Manager: Release 10.2.0.1.0 - Production on 星期四 7月 14 12:12:10 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: ORCL (DBID=1246063822)
RMAN> restore tablespace sysaux;
Starting restore at 2011-07-14 12:12:40
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=159 devtype=DISK
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00003 to /u01/app/oracle/oradata/ORCL/datafile/o1_mf_sysaux_6cgckx9p_.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/oracle/product/10.2.0/db_1/dbs/1tmhdpcp_1_1
channel ORA_DISK_1: restored backup piece 1
piece handle=/u01/app/oracle/product/10.2.0/db_1/dbs/1tmhdpcp_1_1 tag=TAG20110714T120128
channel ORA_DISK_1: restore complete, elapsed time: 00:00:56
Finished restore at 2011-07-14 12:13:38
RMAN> recover tablespace sysaux;
Starting recover at 2011-07-14 13:00:15
using channel ORA_DISK_1
starting media recovery
media recovery complete, elapsed time: 00:00:02
Finished recover at 2011-07-14 13:00:17
RMAN> exit
Recovery Manager complete.
[oracle@orazhang ~]$ ora
SQL*Plus: Release 10.2.0.1.0 - Production on 星期四 7月 14 13:00:25 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
sys@ORCL> col file_name for a80
sys@ORCL> select file_name,tablespace_name,online_status from dba_data_files;
FILE_NAME TABLESPACE_NAME ONLINE_
-------------------------------------------------------------------------------- ------------------------------ -------
/u01/app/oracle/oradata/ORCL/datafile/undotbs2.dbf UNDOTBS2 ONLINE
/u01/app/oracle/oradata/ORCL/datafile/tt1.dbf TT ONLINE
/u01/app/oracle/oradata/ORCL/datafile/o1_mf_tbslogmn_6vdjocp1_.dbf TBSLOGMNR ONLINE
/u01/app/oracle/oradata/ORCL/datafile/tt.dbf TT ONLINE
/u01/app/oracle/oradata/ORCL/datafile/o1_mf_example_6cgckxc7_.dbf EXAMPLE ONLINE
/u01/app/oracle/oradata/ORCL/datafile/o1_mf_users_6cgckxds_.dbf USERS ONLINE
/u01/app/oracle/oradata/ORCL/datafile/o1_mf_sysaux_71wv5vkw_.dbf SYSAUX OFFLINE
/u01/app/oracle/oradata/ORCL/datafile/test.dbf TEST ONLINE
/u01/app/oracle/oradata/ORCL/datafile/o1_mf_system_6cgckx95_.dbf SYSTEM SYSTEM
/u01/app/oracle/oradata/ORCL/datafile/smailtbs.dbf SMAILTBS ONLINE
10 rows selected.
sys@ORCL> alter tablespace sysaux online;
Tablespace altered.
sys@ORCL> select file_name,tablespace_name,online_status from dba_data_files;
FILE_NAME
------------------------------------------------------------------------------------------------------------------------------------------------------
TABLESPACE_NAME ONLINE_
------------------------------ -------
/u01/app/oracle/oradata/ORCL/datafile/undotbs2.dbf
UNDOTBS2 ONLINE
/u01/app/oracle/oradata/ORCL/datafile/tt1.dbf
TT ONLINE
/u01/app/oracle/oradata/ORCL/datafile/o1_mf_tbslogmn_6vdjocp1_.dbf
TBSLOGMNR ONLINE
/u01/app/oracle/oradata/ORCL/datafile/tt.dbf
TT ONLINE
/u01/app/oracle/oradata/ORCL/datafile/o1_mf_example_6cgckxc7_.dbf
EXAMPLE ONLINE
/u01/app/oracle/oradata/ORCL/datafile/o1_mf_users_6cgckxds_.dbf
USERS ONLINE
/u01/app/oracle/oradata/ORCL/datafile/o1_mf_sysaux_71wv5vkw_.dbf
SYSAUX OFFLINE
/u01/app/oracle/oradata/ORCL/datafile/test.dbf
TEST ONLINE
/u01/app/oracle/oradata/ORCL/datafile/o1_mf_system_6cgckx95_.dbf
SYSTEM SYSTEM
/u01/app/oracle/oradata/ORCL/datafile/smailtbs.dbf
SMAILTBS ONLINE
10 rows selected.
sys@ORCL> ! rm /u01/app/oracle/oradata/ORCL/datafile/undotbs2.dbf
sys@ORCL> alter system checkpoint;
System altered.
sys@ORCL> select file_name,tablespace_name,online_status from dba_data_files;
FILE_NAME TABLESPACE_NAME ONLINE_
-------------------------------------------------------------------------------- ------------------------------ -------
/u01/app/oracle/oradata/ORCL/datafile/undotbs2.dbf UNDOTBS2 ONLINE
/u01/app/oracle/oradata/ORCL/datafile/tt1.dbf TT ONLINE
/u01/app/oracle/oradata/ORCL/datafile/o1_mf_tbslogmn_6vdjocp1_.dbf TBSLOGMNR ONLINE
/u01/app/oracle/oradata/ORCL/datafile/tt.dbf TT ONLINE
/u01/app/oracle/oradata/ORCL/datafile/o1_mf_example_6cgckxc7_.dbf EXAMPLE ONLINE
/u01/app/oracle/oradata/ORCL/datafile/o1_mf_users_6cgckxds_.dbf USERS ONLINE
/u01/app/oracle/oradata/ORCL/datafile/o1_mf_sysaux_71wv5vkw_.dbf SYSAUX ONLINE
/u01/app/oracle/oradata/ORCL/datafile/test.dbf TEST ONLINE
/u01/app/oracle/oradata/ORCL/datafile/o1_mf_system_6cgckx95_.dbf SYSTEM SYSTEM
/u01/app/oracle/oradata/ORCL/datafile/smailtbs.dbf SMAILTBS ONLINE
10 rows selected.
sys@ORCL> alter tablespace undotbs2 offline;
alter tablespace undotbs2 offline
*
ERROR at line 1:
ORA-30042: Cannot offline the undo tablespace
sys@ORCL> select open_mode from v$database;
OPEN_MODE
----------
READ WRITE
sys@ORCL> show parameter undo
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
undo_management string AUTO
undo_retention integer 900
undo_tablespace string UNDOTBS2
sys@ORCL> create table anbob.obj as select object_id from dba_objects;
Table created.
sys@ORCL> delete anbob.obj;
delete anbob.obj
*
ERROR at line 1:
ORA-01116: error in opening database file 12
ORA-01110: data file 12: '/u01/app/oracle/oradata/ORCL/datafile/undotbs2.dbf'
ORA-27041: unable to open file
Linux Error: 2: No such file or directory
Additional information: 3
sys@ORCL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
[oracle@orazhang ~]$ rman target/
Recovery Manager: Release 10.2.0.1.0 - Production on 星期四 7月 14 13:07:09 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: ORCL (DBID=1246063822)
RMAN> restore tablespace undotbs2;
Starting restore at 2011-07-14 13:07:20
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=147 devtype=DISK
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00012 to /u01/app/oracle/oradata/ORCL/datafile/undotbs2.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/oracle/product/10.2.0/db_1/dbs/1tmhdpcp_1_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 07/14/2011 13:07:21
ORA-19870: error reading backup piece /u01/app/oracle/product/10.2.0/db_1/dbs/1tmhdpcp_1_1
ORA-19573: cannot obtain exclusive enqueue for datafile 12
RMAN> exit
Recovery Manager complete.
[oracle@orazhang ~]$ ora
SQL*Plus: Release 10.2.0.1.0 - Production on 星期四 7月 14 13:08:16 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
sys@ORCL> shutdown immediate
ORA-01116: error in opening database file 12
ORA-01110: data file 12: '/u01/app/oracle/oradata/ORCL/datafile/undotbs2.dbf'
ORA-27041: unable to open file
Linux Error: 2: No such file or directory
Additional information: 3
sys@ORCL> shutdown abort
ORACLE instance shut down.
sys@ORCL> startup mount
ORACLE instance started.
Total System Global Area 1258291200 bytes
Fixed Size 1219184 bytes
Variable Size 385877392 bytes
Database Buffers 855638016 bytes
Redo Buffers 15556608 bytes
Database mounted.
sys@ORCL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
[oracle@orazhang ~]$ rman target/
Recovery Manager: Release 10.2.0.1.0 - Production on 星期四 7月 14 13:09:15 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: ORCL (DBID=1246063822, not open)
RMAN> restore tablespace undotbs2;
Starting restore at 2011-07-14 13:09:26
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00012 to /u01/app/oracle/oradata/ORCL/datafile/undotbs2.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/oracle/product/10.2.0/db_1/dbs/1tmhdpcp_1_1
channel ORA_DISK_1: restored backup piece 1
piece handle=/u01/app/oracle/product/10.2.0/db_1/dbs/1tmhdpcp_1_1 tag=TAG20110714T120128
channel ORA_DISK_1: restore complete, elapsed time: 00:00:25
Finished restore at 2011-07-14 13:09:52
RMAN> recover tablespace undotbs2;
Starting recover at 2011-07-14 13:10:06
using channel ORA_DISK_1
starting media recovery
media recovery complete, elapsed time: 00:00:03
Finished recover at 2011-07-14 13:10:09
RMAN> exit
Recovery Manager complete.
[oracle@orazhang ~]$ ora
SQL*Plus: Release 10.2.0.1.0 - Production on 星期四 7月 14 13:10:14 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
idle> alter database open;
Database altered.
idle> delete anbob.obj;
50741 rows deleted.
idle> commit;
Commit complete.
Thanks for the auspicious writeup. It in fact used to be a amusement account it. Look complicated to far brought agreeable from you! However, how could we keep in touch?
whats up http://www.anbob.com admin found your site via Google but it was hard to find and I see you could have more visitors because there are not so many comments yet. I have found site which offer to dramatically increase traffic to your site http://xrumerservice.org they claim they managed to get close to 1000 visitors/day using their services you could also get lot more targeted traffic from search engines as you have now. I used their services and got significantly more visitors to my blog. Hope this helps 🙂 They offer webmaster service bad seo backlink service backlinks seo Take care. Jay