1Z0-043 · Question #175
In your Automatic Storage Management (ASM) instance, one of the nonempty disk groups, DGROUP1, is no longer required and you want this disk group to be removed. You execute the following command to…
The correct answer is A. This command would result in an error because the disk group is not empty. See the full explanation below for the reasoning.
Question
In your Automatic Storage Management (ASM) instance, one of the nonempty disk groups, DGROUP1, is no longer required and you want this disk group to be removed. You execute the following command to achieve this objective:
DROP DISKGROUP dgroup1 EXCLUDING CONTENTS; What would be the result of this command?
Options
- AThis command would result in an error because the disk group is not empty.
- BThe command would distribute the contents of the specified disk group among all other disk
- CThe command would result in the contents being moved to the parent disk group and dropping of
- DThe command would result in the disk group being marked as INVALID because it cannot be dropped.
- EThe command would drop the disk group, ignoring the EXCLUDING CONTENTS option.
How the community answered
(21 responses)- A81% (17)
- B10% (2)
- D5% (1)
- E5% (1)
Community Discussion
6The answer is A, and here is the sticky way to remember it forever. Think of EXCLUDING CONTENTS as a bouncer at a club door saying "I am NOT touching anything inside," so if the disk group already has stuff in it, Oracle throws its hands up and errors out immediately. The syntax you need when a disk group is nonempty is DROP DISKGROUP dgroup1 INCLUDING CONTENTS, not EXCLUDING, because INCLUDING is your permission slip that tells ASM "yes, go ahead and wipe what is in there." Picture it this way, IN is your green light and EX is your red light, and running a red light in Oracle ASM just gives you ORA-15039: diskgroup not dropped. Burn that into your brain: INCLUDE to nuke, EXCLUDE to choke.
A is right, so why did Oracle even let you write EXCLUDING CONTENTS?
Yeah A is right, EXCLUDING CONTENTS is not valid syntax for DROP DISKGROUP and Oracle will throw an error on a nonempty disk group unless you specify FORCE or first migrate the files out. The correct way to drop a nonempty ASM disk group is DROP DISKGROUP dgroup1 FORCE INCLUDING CONTENTS, which is a common trap on this exam.
FORCE alone handles a nonempty disk group just fine but INCLUDING CONTENTS is still required even with FORCE, otherwise Oracle will refuse the drop, so Bao has the right idea though you want to be clear those two clauses are independent requirements, not one doing the other's job.
A is correct, and before you move on, tell me this: what is the actual valid syntax for dropping a non-empty disk group in ASM, and what happens if you omit that specific keyword entirely, because that is exactly what this command does?
Our group went back and forth on E because EXCLUDING CONTENTS is actually the default behavior, so it almost feels like a no-op clause, but the point is that whether you write it explicitly or leave it out, Oracle will still throw an error if the disk group has contents, so A is the right call. Anyone want to confirm whether the error is ORA-15039 or something else on their test environment?