打上对应的rpm包
安装asm lib
[root@ora10g asmpkg]# /etc/init.d/oracleasm configure
Configuring the Oracle ASM library driver.
This will configure the on-boot properties of the Oracle ASM library
driver. The following questions will determine whether the driver is
loaded on boot and what permissions it will have. The current values
will be shown in brackets ('[]'). Hitting without typing an
answer will keep that current value. Ctrl-C will abort.
Default user to own the driver interface []:
Default group to own the driver interface []:
Start Oracle ASM library driver on boot (y/n) [n]:
[root@ora10g asmpkg]# /etc/init.d/oracleasm configure
Configuring the Oracle ASM library driver.
This will configure the on-boot properties of the Oracle ASM library
driver. The following questions will determine whether the driver is
loaded on boot and what permissions it will have. The current values
will be shown in brackets ('[]'). Hitting without typing an
answer will keep that current value. Ctrl-C will abort.
Default user to own the driver interface []: dba
Default group to own the driver interface []:
[root@ora10g asmpkg]# /etc/init.d/oracleasm configure
Configuring the Oracle ASM library driver.
This will configure the on-boot properties of the Oracle ASM library
driver. The following questions will determine whether the driver is
loaded on boot and what permissions it will have. The current values
will be shown in brackets ('[]'). Hitting without typing an
answer will keep that current value. Ctrl-C will abort.
Default user to own the driver interface []: oracle
Default group to own the driver interface []: dba
Start Oracle ASM library driver on boot (y/n) [n]: y
Scan for Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: done
Initializing the Oracle ASMLib driver: [ OK ]
Scanning the system for Oracle ASMLib disks: [ OK ]
[root@ora10g asmpkg]# lsmod |grep asm
oracleasm 48020 1
[root@ora10g asmpkg]# cat /proc/filesystems
nodev sysfs
nodev rootfs
nodev bdev
nodev proc
nodev sockfs
nodev binfmt_misc
nodev usbfs
nodev usbdevfs
nodev futexfs
nodev tmpfs
nodev pipefs
nodev eventpollfs
nodev devpts
ext2
nodev ramfs
nodev hugetlbfs
iso9660
nodev relayfs
nodev mqueue
ext3
nodev rpc_pipefs
nodev autofs
nodev asmdisk
nodev oracleasmfs
[root@ora10g ~]# fdisk /dev/sdd
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.
The number of cylinders for this disk is set to 1044.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
Command (m for help): m
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
m print this menu
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)
Command (m for help): p
Disk /dev/sdd: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1044, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-1044, default 1044):
Using default value 1044
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
上述方式格式 fdisk /dev/sdc
创建disk
[root@ora10g ~]# /etc/init.d/oracleasm createdisk VOL2 /dev/sdd1
Marking disk "VOL2" as an ASM disk: [ OK ]
[root@ora10g init.d]# /etc/init.d/oracleasm createdisk VOL3 /dev/sdc1
Marking disk "VOL3" as an ASM disk: [ OK ]
检查
[root@ora10g disks]# /etc/init.d/oracleasm listdisks
VOL2
VOL3
[root@ora10g disks]# /etc/init.d/oracleasm querydisk VOL2
Disk "VOL2" is a valid ASM disk
[root@ora10g disks]# /etc/init.d/oracleasm querydisk VOL3
Disk "VOL3" is a valid ASM disk
启动css,asm需要css服务支持
root@ora10g bin]# ./localconfig all
Usage:./localconfig [add] [delete] [ reset ] [-silent] [-paramfile ][root@ora10g bin]# ./localconfig add
/etc/oracle does not exist. Creating it now.
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
Configuration for local CSS has been initialized
Adding to inittab
Startup will be queued to init within 30 seconds.
Checking the status of new Oracle init process...
Expecting the CRS daemons to be up within 600 seconds.
CSS is active on these nodes.
ora10g
CSS is active on all nodes.
Oracle CSS service is installed and running under init(1M)
[root@ora10g bin]# su - oracle
[oracle@ora10g ~]$ orapwd file=orapw+ASM ENTRIES=5 password=88711009
[oracle@ora10g ~]$ export ORACLE_SID=+ASM
[oracle@ora10g ~]$ cd $ORACLE_HOME/dbs
[oracle@ora10g dbs]$ pwd
/oracle/oracle/product/ora10g/database/dbs
[oracle@ora10g dbs]$ vi init+ASM.ora
asm pfile defualt存储$ORACLE_HOME/dbs
instance_type=asm
large_pool_size=12M
remote_login_passwordfile=exclusive
asm_diskstring='/dev/oracleasm/disks/*'
asm_diskgroups='XHDG1'
background_dump_dest=/oracle/oracle/admin/+ASM/bdump
core_dump_dest=/oracle/oracle/admin/+ASM/cdump
user_dump_dest=/oracle/oracle/admin/+ASM/udump
#建立asm password文件
orapwd file=orapw+ASM entries=5 password=a123
export ORACLE_SID=+ASM
[oracle@ora10g +ASM]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.4.0 - Production on Wed Mar 3 18:43:04 2010
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to an idle instance.
SQL> startup
ASM instance started
Total System Global Area 83886080 bytes
Fixed Size 1265912 bytes
Variable Size 57454344 bytes
ASM Cache 25165824 bytes
ORA-15110: no diskgroups mounted
SQL> create spfile from pfile;
File created.
创建diskgroup
SQL> create diskgroup dg1 external redundancy disk '/dev/oracleasm/disks/VOL3';
Diskgroup created.
SQL> alter diskgroup XHDG1 add disk '/dev/oracleasm/disks/VOL2';
Diskgroup altered.
SQL> select total_mb,free_mb,USABLE_FILE_MB ,name from v$asm_diskgroup;
TOTAL_MB FREE_MB USABLE_FILE_MB NAME
---------- ---------- -------------- ------------------------------
16378 16326 16326 XHDG1
SQL> select path, free_mb,total_mb,state from v$asm_disk;
PATH
--------------------------------------------------------------------------------
FREE_MB TOTAL_MB STATE
---------- ---------- --------
/dev/oracleasm/disks/VOL3
7660 8189 NORMAL
/dev/oracleasm/disks/VOL2
8163 8189 NORMAL
SQL> exit
开始迁移
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
rman 备份target
[oracle@ora10g disks]$ export ORACLE_SID=xh
[oracle@ora10g disks]$ rman target /
Recovery Manager: Release 10.2.0.4.0 - Production on Thu Mar 4 14:31:51 2010
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database: XH (DBID=3103799895)
RMAN> backup as copy database format '+xhdg1';
Starting backup at 04-MAR-10
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=145 devtype=DISK
channel ORA_DISK_1: starting datafile copy
input datafile fno=00004 name=/oracle/oracle/oradata/xh/users01.dbf
output filename=+XHDG1/xh/datafile/users.256.712765927 tag=TAG20100304T143202 recid=23 stamp=712766289
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:06:15
channel ORA_DISK_1: starting datafile copy
input datafile fno=00001 name=/oracle/oracle/oradata/xh/system01.dbf
output filename=+XHDG1/xh/datafile/system.257.712766299 tag=TAG20100304T143202 recid=24 stamp=712766317
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:25
channel ORA_DISK_1: starting datafile copy
input datafile fno=00003 name=/oracle/oracle/oradata/xh/sysaux01.dbf
output filename=+XHDG1/xh/datafile/sysaux.258.712766323 tag=TAG20100304T143202 recid=25 stamp=712766334
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting datafile copy
input datafile fno=00002 name=/oracle/oracle/oradata/xh/undotbs01.dbf
output filename=+XHDG1/xh/datafile/undotbs1.259.712766339 tag=TAG20100304T143202 recid=26 stamp=712766343
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07
channel ORA_DISK_1: starting datafile copy
copying current control file
output filename=+XHDG1/xh/controlfile/backup.260.712766345 tag=TAG20100304T143202 recid=27 stamp=712766346
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current SPFILE in backupset
channel ORA_DISK_1: starting piece 1 at 04-MAR-10
channel ORA_DISK_1: finished piece 1 at 04-MAR-10
piece handle=+XHDG1/xh/backupset/2010_03_04/nnsnf0_tag20100304t143202_0.261.712766347 tag=TAG20100304T143202 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
Finished backup at 04-MAR-10
RMAN> exit
Recovery Manager complete.
修改target 参数(其实就是设置omf)
[oracle@ora10g disks]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.4.0 - Production on Thu Mar 4 14:39:37 2010
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> alter system set db_create_file_dest='+XHDG1';
System altered.
SQL> alter system set db_create_online_log_dest_1='+XHDG1';
System altered.
SQL> alter system set db_recovery_file_dest='+XHDG1';
System altered.
SQL> select group#,member from v$logfile;
GROUP#
----------
MEMBER
--------------------------------------------------------------------------------
3
/oracle/oracle/oradata/xh/redo03.log
2
/oracle/oracle/oradata/xh/redo02.log
1
/oracle/oracle/oradata/xh/redo01.log
SQL> alter database add logfile member member '+XHDG1' tp group 1;
alter database add logfile member member '+XHDG1' tp group 1
*
ERROR at line 1:
ORA-02236: invalid file name
SQL> alter database add logfile member '+XHDG1' tp group 1;
alter database add logfile member '+XHDG1' tp group 1
*
ERROR at line 1:
ORA-00946: missing TO keyword
SQL> alter database add logfile member '+XHDG1' tO group 1;
Database altered.
SQL> alter database add logfile member '+XHDG1' to group 2;
Database altered.
SQL> alter database add logfile member '+XHDG1' to group 3;
Database altered.
SQL> alter system switch logfile;
System altered.
SQL> desc v$log;
Name Null? Type
----------------------------------------- -------- ----------------------------
GROUP# NUMBER
THREAD# NUMBER
SEQUENCE# NUMBER
BYTES NUMBER
MEMBERS NUMBER
ARCHIVED VARCHAR2(3)
STATUS VARCHAR2(16)
FIRST_CHANGE# NUMBER
FIRST_TIME DATE
SQL> select group#,status from v$log;
GROUP# STATUS
---------- ----------------
1 INACTIVE
2 ACTIVE
3 CURRENT
SQL> alter database drop logfile member '/oracle/oracle/oradata/xh/redo01.log';
alter database drop logfile member '/oracle/oracle/oradata/xh/redo01.log'
*
ERROR at line 1:
ORA-00362: member is required to form. a valid logfile in group 1
ORA-01517: log member: '/oracle/oracle/oradata/xh/redo01.log'
SQL> alter system checkpoint;
System altered.
SQL> select group#,status from v$log;
GROUP# STATUS
---------- ----------------
1 INACTIVE
2 INACTIVE
3 CURRENT
SQL> alter database drop logfile member '/oracle/oracle/oradata/xh/redo01.log';
alter database drop logfile member '/oracle/oracle/oradata/xh/redo01.log'
*
ERROR at line 1:
ORA-00362: member is required to form. a valid logfile in group 1
ORA-01517: log member: '/oracle/oracle/oradata/xh/redo01.log'
SQL> alter database drop logfile member '/oracle/oracle/oradata/xh/redo02.log';
alter database drop logfile member '/oracle/oracle/oradata/xh/redo02.log'
*
ERROR at line 1:
ORA-00362: member is required to form. a valid logfile in group 2
ORA-01517: log member: '/oracle/oracle/oradata/xh/redo02.log'
SQL> alter database drop logfile member '/oracle/oracle/oradata/xh/redo03.log';
alter database drop logfile member '/oracle/oracle/oradata/xh/redo03.log'
*
ERROR at line 1:
ORA-01609: log 3 is the current log for thread 1 - cannot drop members
ORA-00312: online log 3 thread 1: '/oracle/oracle/oradata/xh/redo03.log'
ORA-00312: online log 3 thread 1: '+XHDG1/xh/onlinelog/group_3.264.712766587'
SQL> select group#,status from v$log;
GROUP# STATUS
---------- ----------------
1 INACTIVE
2 INACTIVE
3 CURRENT
SQL> alter database drop logfile member '/oracle/oracle/oradata/xh/redo01.log';
alter database drop logfile member '/oracle/oracle/oradata/xh/redo01.log'
*
ERROR at line 1:
ORA-00362: member is required to form. a valid logfile in group 1
ORA-01517: log member: '/oracle/oracle/oradata/xh/redo01.log'
SQL> desc v$logfile;
Name Null? Type
----------------------------------------- -------- ----------------------------
GROUP# NUMBER
STATUS VARCHAR2(7)
TYPE VARCHAR2(7)
MEMBER VARCHAR2(513)
IS_RECOVERY_DEST_FILE VARCHAR2(3)
SQL> col member for a30
SQL> select group#,memeber,status from v$logfie;
select group#,memeber,status from v$logfie
*
ERROR at line 1:
ORA-00942: table or view does not exist
SQL> select group#,memeber,status from v$logfile;
select group#,memeber,status from v$logfile
*
ERROR at line 1:
ORA-00904: "MEMEBER": invalid identifier
SQL> select group#,member,status from v$logfile;
GROUP# MEMBER STATUS
---------- ------------------------------ -------
3 /oracle/oracle/oradata/xh/redo
03.log
2 /oracle/oracle/oradata/xh/redo
02.log
1 /oracle/oracle/oradata/xh/redo STALE
01.log
1 +XHDG1/xh/onlinelog/group_1.26 INVALID
2.712766579
GROUP# MEMBER STATUS
---------- ------------------------------ -------
2 +XHDG1/xh/onlinelog/group_2.26 INVALID
3.712766585
3 +XHDG1/xh/onlinelog/group_3.26
4.712766587
6 rows selected.
SQL> alter system switch logfile;
System altered.
SQL> select group#,status from v$log;
GROUP# STATUS
---------- ----------------
1 CURRENT
2 INACTIVE
3 ACTIVE
SQL> alter system checkpoint;
System altered.
SQL> alter system switch logfile;
System altered.
SQL> alter system checkpoint;
System altered.
SQL> select group#,status from v$log;
GROUP# STATUS
---------- ----------------
1 INACTIVE
2 CURRENT
3 INACTIVE
SQL> alter database drop logfile member '/oracle/oracle/oradata/xh/redo01.log';
Database altered.
SQL> alter database drop logfile member '/oracle/oracle/oradata/xh/redo03.log';
Database altered.
SQL> alter system switch logfile;
System altered.
SQL> alter system checkpoint;
System altered.
SQL> select group#,status from v$log;
GROUP# STATUS
---------- ----------------
1 INACTIVE
2 INACTIVE
3 CURRENT
SQL> alter database drop logfile member '/oracle/oracle/oradata/xh/redo02.log';
Database altered.
redo迁就是在原组上add member(配置了omf会建立在asm中) 然后切换删除不在asm中的member,但状态必须为inactive,若为active表示redo中对应的dirty buffer还未写入disk 手动执行alter system checkpoint触发检查点强制写入
,我遇到的问题是add后状态也为inactive,但就是删除不了 不在asm中的member,最后全切换一变 让add 的member都使用了下才可以
SQL> select group#,member,status from v$logfile;
GROUP# MEMBER STATUS
---------- ------------------------------ -------
1 +XHDG1/xh/onlinelog/group_1.26
2.712766579
2 +XHDG1/xh/onlinelog/group_2.26
3.712766585
3 +XHDG1/xh/onlinelog/group_3.26
4.712766587
SQL> select ts#,name from v$tempfile;
TS#
----------
NAME
--------------------------------------------------------------------------------
3
/oracle/oracle/oradata/xh/temp01.dbf
SQL> alter tablespace temp add tempfile size 100m;
Tablespace altered.
SQL> select ts#,name from v$tempfile;
TS#
----------
NAME
--------------------------------------------------------------------------------
3
+XHDG1/xh/tempfile/temp.269.712767395
3
/oracle/oracle/oradata/xh/temp01.dbf
SQL> alter database tempfile '/oracle/oracle/oradata/xh/temp01.dbf' drop;
Database altered.
SQL> select ts#,name from v$tempfile;
TS#
----------
NAME
--------------------------------------------------------------------------------
3
+XHDG1/xh/tempfile/temp.269.712767395
SQL> show parameter controlfile
SQL> show parameter control
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_file_record_keep_time integer 7
control_files string /oracle/oracle/oradata/xh/cont
rol01.ctl, /oracle/oracle/orad
ata/xh/control02.ctl, /oracle/
oracle/oradata/xh/control03.ct
l
SQL> alter system set control_files='+XHDG1/xh/controlfile/control01','+XHDG1/xh/controlfile/control02','+XHDG1/xh/controlfile/control03' scope=spfile;
System altered.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup nomount;
ORACLE instance started.
Total System Global Area 268435456 bytes
Fixed Size 1266944 bytes
Variable Size 96471808 bytes
Database Buffers 163577856 bytes
Redo Buffers 7118848 bytes
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@ora10g disks]$ rman target /
Recovery Manager: Release 10.2.0.4.0 - Production on Thu Mar 4 15:01:14 2010
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database: xh (not mounted)
RMAN> restore controlfile from '/oracle/oracle/oradata/xh/control01.ctl';
Starting restore at 04-MAR-10
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: copied control file copy
output filename=+XHDG1/xh/controlfile/control01
output filename=+XHDG1/xh/controlfile/control02
output filename=+XHDG1/xh/controlfile/control03
Finished restore at 04-MAR-10
RMAN> exit
Recovery Manager complete.
[oracle@ora10g disks]$ alter database mount;
-bash: alter: command not found
[oracle@ora10g disks]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.4.0 - Production on Thu Mar 4 15:02:33 2010
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> alter database mount;
Database altered.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@ora10g disks]$ rman target /
Recovery Manager: Release 10.2.0.4.0 - Production on Thu Mar 4 15:02:42 2010
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database: XH (DBID=3103799895, not open)
RMAN> switch database to copy;
using target database control file instead of recovery catalog
datafile 1 switched to datafile copy "+XHDG1/xh/datafile/system.257.712766299"
datafile 2 switched to datafile copy "+XHDG1/xh/datafile/undotbs1.259.712766339"
datafile 3 switched to datafile copy "+XHDG1/xh/datafile/sysaux.258.712766323"
datafile 4 switched to datafile copy "+XHDG1/xh/datafile/users.256.712765927"
RMAN> recover database;
Starting recover at 04-MAR-10
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=158 devtype=DISK
starting media recovery
archive log thread 1 sequence 50 is already on disk as file +XHDG1/xh/archivelog/2010_03_04/thread_1_seq_50.265.712766595
archive log thread 1 sequence 51 is already on disk as file +XHDG1/xh/archivelog/2010_03_04/thread_1_seq_51.266.712767261
archive log thread 1 sequence 52 is already on disk as file +XHDG1/xh/archivelog/2010_03_04/thread_1_seq_52.267.712767273
archive log thread 1 sequence 53 is already on disk as file +XHDG1/xh/archivelog/2010_03_04/thread_1_seq_53.268.712767289
archive log filename=+XHDG1/xh/archivelog/2010_03_04/thread_1_seq_50.265.712766595 thread=1 sequence=50
archive log filename=+XHDG1/xh/archivelog/2010_03_04/thread_1_seq_51.266.712767261 thread=1 sequence=51
media recovery complete, elapsed time: 00:00:07
Finished recover at 04-MAR-10
RMAN> exit
Recovery Manager complete.
[oracle@ora10g disks]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.4.0 - Production on Thu Mar 4 15:03:36 2010
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> alter database open;
Database altered.
SQL> select name from v$controlfile;
NAME
--------------------------------------------------------------------------------
+XHDG1/xh/controlfile/control01
+XHDG1/xh/controlfile/control02
+XHDG1/xh/controlfile/control03
SQL> select name,status from v$datafile;
NAME
--------------------------------------------------------------------------------
STATUS
-------
+XHDG1/xh/datafile/system.257.712766299
SYSTEM
+XHDG1/xh/datafile/undotbs1.259.712766339
ONLINE
+XHDG1/xh/datafile/sysaux.258.712766323
ONLINE
NAME
--------------------------------------------------------------------------------
STATUS
-------
+XHDG1/xh/datafile/users.256.712765927
ONLINE
SQL> select member from v$logfile;
MEMBER
--------------------------------------------------------------------------------
+XHDG1/xh/onlinelog/group_1.262.712766579
+XHDG1/xh/onlinelog/group_2.263.712766585
+XHDG1/xh/onlinelog/group_3.264.712766587
SQL> select name,status from v$tempfile;
NAME
--------------------------------------------------------------------------------
STATUS
-------
+XHDG1/xh/tempfile/temp.269.712767395
ONLINE
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@ora10g disks]$ export ORACLE_SID=+ASM
[oracle@ora10g disks]$ asmcmd
ASMCMD> lsdg
State Type Rebal Unbal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Name
MOUNTED EXTERN N N 512 4096 1048576 16378 5546 0 5546 0 XHDG1/
ASMCMD> exit
[oracle@ora10g disks]$ export ORACLE_SID=xh
[oracle@ora10g disks]$ rman target /
Recovery Manager: Release 10.2.0.4.0 - Production on Thu Mar 4 15:05:14 2010
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database: XH (DBID=3103799895)
RMAN> delete noprompt backup;
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=140 devtype=DISK
List of Backup Pieces
BP Key BS Key Pc# Cp# Status Device Type Piece Name
------- ------- --- --- ----------- ----------- ----------
9 13 1 1 AVAILABLE DISK +XHDG1/xh/backupset/2010_03_04/nnsnf0_tag20100304t143202_0.261.712766347
deleted backup piece
backup piece handle=+XHDG1/xh/backupset/2010_03_04/nnsnf0_tag20100304t143202_0.261.712766347 recid=9 stamp=712766347
Deleted 1 objects
RMAN> exit
Recovery Manager complete.
[oracle@ora10g disks]$ export ORACLE_SID=+ASM
[oracle@ora10g disks]$ asmcmd
ASMCMD> lsdg
State Type Rebal Unbal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Name
MOUNTED EXTERN N N 512 4096 1048576 16378 5547 0 5547 0 XHDG1/
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/12020513/viewspace-629074/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/12020513/viewspace-629074/