Multiple file selection criteria in SELECT statement clauses

Within a single SELECT statement, all the selection criteria clauses of a single type are treated as a selection list. A file need only satisfy a single criterion of a given type to be designated.

In the following example, files in any of the db/datafiles, db/indexes, and db/logs directories, all relative to the file system mount point, would be selected:

 <SELECT>
   <DIRECTORY Flags="nonrecursive">db/datafiles</DIRECTORY>
   <DIRECTORY Flags="nonrecursive">db/indexes</DIRECTORY>
   <DIRECTORY Flags="nonrecursive">db/logs</DIRECTORY>
 </SELECT>

This example is in direct contrast to the treatment of selection criteria clauses of different types. When a SELECT statement includes multiple types of file selection criteria, a file must satisfy one criterion of each type in order for the rule's action statements to apply.

In the following example, a file must reside in one of db/datafiles, db/indexes, or db/logs and be owned by one of DBA_Manager, MFG_DBA, or HR_DBA to be designated for possible action:

 <SELECT>
   <DIRECTORY Flags="nonrecursive">db/datafiles</DIRECTORY>
   <DIRECTORY Flags="nonrecursive">db/indexes</DIRECTORY>
   <DIRECTORY Flags="nonrecursive">db/logs</DIRECTORY>
   <USER>DBA_Manager</USER>
   <USER>MFG_DBA</USER>
   <USER>HR_DBA</USER>
 </SELECT>

If a rule includes multiple SELECT statements, a file need only satisfy one of them to be selected for action. This property can be used to specify alternative conditions for file selection.

In the following example, a file need only reside in one of db/datafiles, db/indexes, or db/logs or be owned by one of DBA_Manager, MFG_DBA, or HR_DBA to be designated for possible action:

 <SELECT>
   <DIRECTORY Flags="nonrecursive">db/datafiles</DIRECTORY>
   <DIRECTORY Flags="nonrecursive">db/indexes</DIRECTORY>
   <DIRECTORY Flags="nonrecursive">db/logs</DIRECTORY>
 </SELECT>
 <SELECT>
   <USER>DBA_Manager</USER>
   <USER>MFG_DBA</USER>
   <USER>HR_DBA</USER>
 </SELECT>