SELECT concat('+'||gname, sys_connect_by_path(aname, '/')) full_path, gnumber group_number, gname group_name, file_number, system_created, nvl(file_type, 'Directory') file_type, decode(file_type, null, 'N', decode (system_created, 'N', 'Y', 'N')) file_alias, block_size, blocks, bytes, space, redundancy, striped, creation_date, modification_date , redundancy_lowered FROM (SELECT g.name gname, g.group_number gnumber, a.parent_index pindex, a.name aname, a.reference_index rindex , a.system_created, a.alias_directory, f.file_number, f.type file_type, f.block_size, f.blocks, f.bytes, f.space, f.redundancy, f.striped, f.creation_date, f.modification_date ,f.redundancy_lowered FROM v$asm_alias a, v$asm_diskgroup g, v$asm_file f WHERE a.group_number = g.group_number and a.group_number = 20 and a.group_number = f.group_number (+) and a.file_number = f.file_number (+)) START WITH (mod(pindex, power(2, 24))) = 0 CONNECT BY PRIOR rindex = pindex
Oracle ASM
Oracle – RMAN DROP DATABASE
-- set ORACLE env first export ORACLE_SID=ORCL12 export ORACLE_HOME=/oracle/..... oracle@oravm:~/ [ORCL12] rman target / Recovery Manager: Release 12.1.0.1.0 - Production on Wed Dec 27 09:45:33 2017 Copyright (c) 1982, 2013, Oracle and/or its affiliates. All rights reserved. connected to target database (not started) RMAN> startup force mount; Oracle instance started database mounted Total System Global Area 4275781632 bytes Fixed Size 5218048 bytes Variable Size 2415919360 bytes Database Buffers 1845493760 bytes Redo Buffers 9150464 bytes RMAN> show db_unique_name; using target database control file instead of recovery catalog RMAN configuration parameters for database with db_unique_name ORCL12 are: RMAN configuration has no stored or default parameters RMAN> SQL 'ALTER SYSTEM ENABLE RESTRICTED SESSION'; sql statement: ALTER SYSTEM ENABLE RESTRICTED SESSION RMAN> DROP DATABASE INCLUDING BACKUPS NOPROMPT; database name is "ORCL12" and DBID is 2242343723 allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=51 device type=DISK specification does not match any backup in the repository released channel: ORA_DISK_1 allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=51 device type=DISK specification does not match any datafile copy in the repository specification does not match any control file copy in the repository specification does not match any control file copy in the repository List of Archived Log Copies for database with db_unique_name ORCL12 ===================================================================== Key Thrd Seq S Low Time ------- ---- ------- - -------- 1 1 1 A 30.11.17 Name: +ORA_DATA/ORCL12/ARCHIVELOG/2017_11_30/thread_1_seq_1.407.961431639 2 1 2 A 30.11.17 Name: +ORA_DATA/ORCL12/ARCHIVELOG/2017_11_30/thread_1_seq_2.414.961431685 3 1 3 A 30.11.17 Name: +ORA_DATA/ORCL12/ARCHIVELOG/2017_12_01/thread_1_seq_3.316.961561207 deleted archived log archived log file name=+ORA_DATA/ORCL12/ARCHIVELOG/2017_11_30/thread_1_seq_1.407.961431639 RECID=1 STAMP=961431639 deleted archived log archived log file name=+ORA_DATA/ORCL12/ARCHIVELOG/2017_11_30/thread_1_seq_2.414.961431685 RECID=2 STAMP=961431684 deleted archived log archived log file name=+ORA_DATA/ORCL12/ARCHIVELOG/2017_12_01/thread_1_seq_3.316.961561207 RECID=3 STAMP=961561206 Deleted 3 objects database name is "ORCL12" and DBID is 2242343723 database dropped RMAN>
Linux – close file descriptors without killing process
-- get list of file descriptors # lsof /dev/mapper/XYZ_* -- example output oracle 31814 oracle 256u BLK 253,7 0t0 20968 /dev/mapper/../dm-7 -- above, fd 256 is open for update (could also be w (write)) -- attach to process with gdb debugger # gdb -p 31814 -- close file descriptor(s) gdb> p close(256)