Exam 1z0-071 All QuestionsBrowse all questions from this exam
Question 16

Which two statements are true about Oracle synonyms? (Choose two.)

    Correct Answer: D, E

    A synonym can be created on an object in a package, allowing users to reference the object using the synonym name instead of the full package and object name. Additionally, synonyms can be created for other synonyms, enabling users to reference the underlying object using multiple synonym names. Therefore, these two statements are correct.

Discussion
holdfaststronglyOptions: BE

A. Any user can create a PUBLIC synonym.( x) Must have Create Publc Syn Priv. B. A synonym has an object number. C. All private synonym names must be unique in the database. (X) Unique in the schema. D. A synonym can be created on an object in a package. (X) A schema object can't be in a package E. A synonym can have a synonym.

kenan_yu

D answer is incorrect for another reason, you actually can create synonym on an object in a PL/SQL package but in won't be active(checked): CREATE OR REPLACE PACKAGE long_package_name AS FUNCTION give_me_zero RETURN NUMBER; END; / CREATE OR REPLACE PACKAGE BODY long_package_name AS FUNCTION give_me_zero RETURN NUMBER IS BEGIN RETURN 0; END; END; / CREATE OR REPLACE SYNONYM pkg_func FOR long_package_name.give_me_zero; SELECT pkg_func.give_me_zero FROM dual;

Lee_jong_suk

Right!

jm9999Options: BE

Synonym can be created for the whole package but not for components of the package.

alelejaja

But for a procedure in a package? a synonym can be created in that case

Matvey

You have created synonym on the entire package, not on the package object.

alelejaja

But for a procedure in a package? a synonym can be created in that case

ArslanAltafOptions: BE

BE is correct. syn has object. here is to find object ID. Modify it or remove the owner SELECT s.synonym_name, s.owner, o.object_id, o.object_name, o.object_type FROM dba_synonyms s JOIN dba_objects o ON s.synonym_name = o.object_name AND s.owner = o.owner and S.owner = 'HR' ;

alelejajaOptions: DE

With no so many arguments, I would answer DE in an hypothetical exam since documentation says that a synonym can be created on a Stored procedure, function, or package. Besides, I don't find accurate the way B is written since the creation of a new synonym doesn't envolve a new object id, but the synonim actually "has" the object id of the object it references...

Fredderik91Options: DE

D and E Specify the object for which the synonym is created. The schema object for which you are creating the synonym can be of the following types: Table or object table View or object view Sequence Stored procedure, function, or package Materialized view Java class schema object User-defined object type Synonym https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/CREATE-SYNONYM.html

hmatinnnOptions: DE

de should be

ismoil

b is wrong 1000%

id10111110

Assuming user has the "CREATE SYNONYM" grant, then: select * from newsyn2 -- produces error create synonym newsyn2 for dual; select * from newsyn2; --returns X select object_name, object_type, object_id from user_objects; This seems to suggest that Oracle synonyms have object ids.

yaya32Options: DE

DE for me

mavistaOptions: BE

A - user need CREATE PUBLIC SYNONYM : false C - must be unique in schema : false D - The schema object cannot be contained in a package for synonyms

zouveOptions: DE

D. A synonym can be created on an object in a package. A synonym can be created for an object in a package, allowing users to reference the object using the synonym name instead of the package and object name 1. E. A synonym can have a synonym. A synonym can be created for another synonym, allowing users to reference the underlying object using either synonym name

dilshodOptions: DE

D and E is true the rest is false