Which two statements are true about Oracle synonyms? (Choose two.)
Which two statements are true about Oracle synonyms? (Choose two.)
A synonym in Oracle has an object number assigned to it, as it is considered a database object. Additionally, a synonym can have another synonym, which allows for flexibility in naming and referencing objects in the database. Therefore, these two statements are true regarding Oracle synonyms.
The same question as in 1z0-071 Question #: 270
A: FALSE, a user needs privilege CREATE PUBLIC SYNONYM to do it B: TRUE SQL> SELECT owner, object_type, object_name, object_id FROM dba_objects WHERE object_id=20770; OWNER OBJECT_TYPE OBJECT_NAME OBJECT_ID -------------------- ----------- ---------------- ---------- GSMADMIN_INTERNAL SYNONYM DDL_REQUESTS_PWD 20770 C: FALSE; D: FALSE SQL> SELECT object_name, object_type, object_id, owner FROM dba_objects WHERE object_type='SYNONYM' AND owner LIKE 'KOTELNIK%'; OBJECT_NAME OBJECT_TYPE OBJECT_ID OWNER --------------- ----------- ---------- ----------- EMPLOYEES_S SYNONYM 76119 KOTELNIK1 EMPLOYEES_S SYNONYM 76128 KOTELNIK2E: E: TRUE, https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/CREATE-SYNONYM.html#GUID-A806C82F-1171-478E-A910-F9C6C42739B2 Use the CREATE SYNONYM statement to create a synonym, which is an alternative name for ... another synonym
B D is correct
Provided answer are wrong, C and E are corrects in my opinion: A. Any user can create a public synonym. --> False, you need grants. B. A synonym has an object number. --> False, OBJECT ID C. A synonym can be created on an object in a package. --> True. you can grant to object type like function, store procedure, etc. D. All private synonym names must be unique in the database. --> False, must be unique in the SCHEMA. E. A synonym can have a synonym. --> True.
C. A synonym can be created on an object in a package. --> True. you can link* to object type like function, store procedure, etc.
https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/CREATE-SYNONYM.html#GUID-A806C82F-1171-478E-A910-F9C6C42739B2
From the same link: "Restriction on the FOR Clause The schema object cannot be contained in a package." From the same link
https://asktom.oracle.com/pls/apex/f%3Fp%3D100:11:0::::P11_QUESTION_ID:4743759113231 according to that link you cant create a synonym for an object in a package. yes you can create a synonym for the package itself but not for the objects inside the package so C is wrong
CE same question in 1z0-071
select object_id, object_name, OBJECT_TYPE from all_objects; i can see object_id to every synonym
AD is correct. A -TRUE: You can create both public and private synonyms. A public synonym is owned by the special user group named PUBLIC and is accessible to every user in a database. A private synonym is contained in the schema of a specific user and available only to the user and to grantees for the underlying object.
the question says Any user...and it's not true. Not any user can create a public synonym but as you say a special user group.