Databases Reference
In-Depth Information
As you learned from your Exadata Owner's Guide or Recipe 7-7, the dcli command to list the same information
for a specific storage cell looks like this:
[oracle@cm01dbm01 ~]$ dcli -c cm01cel01 cellcli -e list griddisk where diskType='HardDisk'
cm01cel01: DATA_CD_00_cm01cel01 active
cm01cel01: DATA_CD_01_cm01cel01 active
... Additional grid disks omitted
In this specific case, the special character is the single quote ('), and in situations when the CellCLI list
command is simple, no escape sequences are required. If, however, you enclose your dcli command in double
quotes, as is sometimes required based on the CellCLI or host command you are executing, you need to escape the
single quotes with a backslash character. Run the following dcli command to list the same information, this time
enclosing the entire cellcli command in double quotes and escaping the single quotes with a backslash:
[oracle@cm01dbm01 ~]$ dcli -c cm01cel01 "cellcli -e list griddisk where diskType=\'HardDisk\'"
cm01cel01: DATA_CD_00_cm01cel01 active
cm01cel01: DATA_CD_01_cm01cel01 active
... Additional grid disks omitted
When is it required to enclose your dcli commands in single quotes? With dcli , double quotes are required any
time the command contains punctuation marks or special characters. For example, consider the following CellCLI
list alerthistory command, which displays alerts generated after a specific time:
CellCLI> list alerthistory attributes name,severity -
> where beginTime > '2012-10-17T02:00:42-04:00';
1_1 warning
1_2 critical
1_3 clear
CellCLI>
Try running the above cellcli command using dcli without using the backslash special character and
double quotes:
[oracle@cm01dbm01 ~]$ dcli -c cm01cel01 cellcli -e list alerthistory \
> attributes name,severity where beginTime > '2012-10-17T02:00:42-04:00'
[oracle@cm01dbm01 ~]$
As you can see, no errors were reported but, unfortunately, no output was returned. To generate the proper
output, enclose the entire cellcli command with double quotes and use the backslash to escape the > and single
quote characters:
[oracle@cm01dbm01 ~]$ dcli -c cm01cel01 "cellcli -e \
> list alerthistory attributes name,severity where beginTime \> \'2012-10-17T02:00:42-04:00\'"
cm01cel01: 1_1 warning
cm01cel01: 1_2 critical
cm01cel01: 1_3 clear
[oracle@cm01dbm01 ~]$
Notice the double quotes surrounding the entire cellcli command as well as the escape character preceding
the greater than symbol and each single quote. In the next example, we will demonstrate using escape characters to
implement an I/O Resource Management plan on each of our storage cells. In this example, you will see backslash
Search WWH ::




Custom Search