题目:
14. Consider the following configuration:
/devices/D1 is a member of disk group dgroupA.
/devices/D2 is a member of disk group dgroupA.
/devices/D3 is a member of disk group dgroupA.
You plan to add a new disk, /devices/D4,to the disk group dgroupA.You execute the following command:
SQL> ALTER DISKGROUP dgroupA ADD DISK '/devices/D*';
Which task would be accomplished by the command?
A. The command adds the new disk, D4, to the disk group.
B. The command would result in an error because the is no disk by the name "'/devices/D*'"
C. The command will be ignored because disks starting with "D" are already members of the disk group.
D. The command would result in an error because no wildcard characters can be used in the disk name.
E. The command first detaches all the member disks starting with ‘D’,and the reattaches them including the new disk.
Answer: A
题目翻译:ALTER DISKGROUP dgroupA ADD DISK '/devices/D*' 执行了这个语句,完成了什么工作?
答案解释:这个语句是对DISKGROUP的操作,先看文档:
ALTER DISKGROUP
This SQL statement is valid only if you are using Automatic Storage Management and you have started an Automatic Storage Management instance. You must issue this statement from within the Automatic Storage Management instance, not from a normal database instance. For information on starting an Automatic Storage Management instance,
Purpose
The ALTER
DISKGROUP
statement lets you perform a number of operations on a disk group or on the disks in a disk group.
其实本题就是考的search_string的理解:
search_string For each disk you are adding to the disk group, specify the operating system dependent search string that Automatic Storage Management will use to find the disk. The search_string
must point to a subset of the disks returned by discovery using the strings in the ASM_DISKSTRING
initialization parameter. If search_string
does not point to any disks the Oracle Database user has read/write access to, then Automatic Storage Management returns an error. If it points to one or more disks that have already been assigned to a different disk group, then Oracle Database returns an error unless you also specify FORCE
.
For each valid candidate disk, Automatic Storage Management formats the disk header to indicate that it is a member of the new disk group.
这是在ASM模式下的一个添加disk的方法,可以不用指明disk_name,但是search_string要写正确;