A directory +DATA/ORCL/DATAFILE/USERS exists in ASM. USERS is a user created directory; ORCL and DATAFILE are system generated directories.
Which two statements are true about user-created directories?
A.
You can create subdirectories under the USERS directory.
B.
You cannot rename a user-created subdirectory.
C.
You cannot drop a directory containing aliases unless you delete the aliases first.
D.
You cannot create a user-defined directory at the root (+) level.
E.
You cannot create a nested subdirectory /USERS/2014 under USERS with a single
CREATE DIRETORY command even if directory USER1 doesn’t exist.
A and E are correct
https://docs.oracle.com/cd/E11882_01/server.112/e18951/asmfiles.htm#OSTMG94220
B –> false
C –> you can use force
D –> false (The directory path must start with the disk group name, preceded by a plus sign (+), followed by any subdirectory names of your choice.)
Agree D is wrong.
I can create directory +DATA/USERS2 by below command.
SQL> ALTER DISKGROUP data ADD DIRECTORY ‘+/USERS2’;
Diskgroup altered.
SQL>
Correct : AC
E is wrong
Example 7-9 Creating a new directory
ALTER DISKGROUP data ADD DIRECTORY ‘+data/orcl’;
Assuming no subdirectory exists under the directory +data/orcl, the SQL statement fails in Example 7-10.
Example 7-10 Creating a new subdirectory
ALTER DISKGROUP data
ADD DIRECTORY ‘+data/orcl/first_dir/second_dir’;
Dropping a Directory
You can delete a directory using the DROP DIRECTORY clause of the ALTER DISKGROUP statement. You cannot drop a system-created directory. You cannot drop a directory containing alias names unless you also specify the FORCE clause.
Example 7-12 deletes a directory along with its contents.
Example 7-12 Dropping a directory
ALTER DISKGROUP data DROP DIRECTORY ‘+data/yourdir’ FORCE;
Agree C is wrong
You can delete a directory using the DROP DIRECTORY clause of the ALTER DISKGROUP statement. You cannot drop a system-created directory. You cannot drop a directory containing alias names unless you also specify the FORCE clause
https://docs.oracle.com/database/121/OSTMG/GUID-F7DDEB35-2BD9-467B-ADAE-89C9A8993DCA.htm#OSTMG94223
“A”, “C” and “E”… “A” and “E” the best choice!
You can use the ALTER DISKGROUP statement to create, rename, and drop user-defined directories. You cannot rename or drop system-created directories.
When using the CREATE DIRECTORY clause, “you cannot create a nested directory unless the
parent directory already exists.” For example, the following statement fails unless first_dir
already exists:
ALTER DISKGROUP DATA ADD DIRECTORY ‘+DATA/first_dir/second_dir’;
When using the DROP DIRECTORY clause, “you cannot drop a directory that contains alias
names unless you also specify the FORCE clause”. If you specify DROP DIRECTORY …
FORCE, ASM recursively removes all the subdirectories and aliases that exist below the
specified directory.
(Página 208).
A, D, E.
A and E as explained by WGCM above. D because you can not create a directory at the root (+) level.
I believe A and C are the correct answers
A, D
D is right. Try using asmcmd and then mkdir test1234 at root and you will get an error bacuse the diskgroup doesn’t exist. Using ALTER DISKGROUP data ADD DIRECTORY ‘+/USERS2’; creates a directory under the data diskgroup, not root.
E – They can’t even spell directory right so it’s probably a typo and they mean even if the directory USERS exists. In which case you would be able to create a subdirectory /USERS/2014
Correct A, D
Source:
D81242GC10 – Oracle Database 12c: ASM Administration 5-21
Just to clarify C is wrong, “When using the DROP Directory clause, you cannot drop a directory containing aliases names unless you also specify the FORCE clause” therefore you can use DROP DIRECTORY with FORCE option, not need to delete aliases before….
D81242GC10 – Oracle Database 12c: ASM Administration 5-22