TOYS does not always order grants in the same order. What ordering does it use?
• Grantor (object’s owner first) • Grantee • Column-Name (non-column grants first) • Privilege-Name. However, where a complex sequence of grants has been performed, TOYS will re-order as necessary to sequence the grants in the correct order such that chains like the following will be handled correctly. Assuming the object in question is owned by schema HR, and we have: • HR –grants-with-grant-option-to–> SAM • SAM –grants-with-grant-option-to–> PAY • PAY –grants-with-grant-option-to–> TRAIN If TOYS used the strict sorting outlined above we would have: • HR –grants-with-grant-option-to–> SAM • PAY –grants-with-grant-option-to–> TRAIN • SAM –grants-with-grant-option-to–> PAY which would fail to execute as schema PAY would not have received the privilege at the point it attempts to grant it to schema TRAIN. Note that these are very contrived cases. Usually most grants are performed by the owner of the object (or in 9iR2, by someone possessing the system privilege GRANT ANY OBJ