1Z0-071 practice question 19 of 35

Which two statements are true about Oracle synonyms?

Full set: 326 questions
Answer options
A: A synonym can have a synonym. Correct answer
B: All private synonym names must be unique in the database.
C: Any user can create a PUBLIC synonym.
D: A synonym can be created on an object in a package.
E: A synonym has an object number. Correct answer
Correct Answer:
A. A synonym can have a synonym.; E. A synonym has an object number.
Explanation

A synonym is an alias for another schema object. It is possible to create a synonym that points to another synonym, and Oracle will resolve this chain to find the base object (A). Synonyms are schema objects stored in the data dictionary and, as such, are assigned a unique object number (OBJECTID) within the database, which can be queried from views like DBAOBJECTS (E). This confirms they are distinct database objects.

Why Incorrect

B. Private synonym names must be unique within a schema, not across the entire database. Different users can have private synonyms with the same name.
C. Creating a PUBLIC synonym requires the CREATE PUBLIC SYNONYM system privilege, which is a powerful privilege not granted to users by default.
D. A synonym can be created for a package, but not for a specific procedure, function, or variable within that package.

References

1. Oracle Database SQL Language Reference, 19c, "CREATE SYNONYM". The documentation notes that object can be a "table, view, sequence, procedure, stored function, package, materialized view, Java class schema object, user-defined object type, or another synonym." This supports option A.

2. Oracle Database Reference, 19c, "Static Data Dictionary Views", Section "DBAOBJECTS". This view description lists SYNONYM as a possible OBJECTTYPE, and the OBJECTID column is described as the "Object number of the object," confirming synonyms have object numbers. This supports option E.

3. Oracle Database Administrator's Guide, 19c, "Managing Users and Security", Section "Managing Privileges and Roles". This guide details system privileges, including CREATE PUBLIC SYNONYM, confirming it is a specific, non-default privilege. This refutes option C.

Scroll to Top