1z0-071 Exam QuestionsBrowse all questions from this exam

1z0-071 Exam - Question 16


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

Show Answer
Correct Answer: BDE

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

12 comments
Sign in to comment
holdfaststronglyOptions: BE
Sep 20, 2022

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
Sep 26, 2022

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
Dec 8, 2023

Right!

Matvey
Feb 3, 2023

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

alelejaja
May 23, 2024

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

jm9999Options: BE
Sep 27, 2023

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

alelejaja
May 23, 2024

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

dilshodOptions: DE
Jun 9, 2023

D and E is true the rest is false

zouveOptions: DE
Jul 5, 2023

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

mavistaOptions: BE
Oct 16, 2023

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

yaya32Options: DE
Jan 11, 2024

DE for me

ismoil
Jan 11, 2024

b is wrong 1000%

id10111110
Mar 21, 2024

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.

hmatinnnOptions: DE
Jan 14, 2024

de should be

Fredderik91Options: DE
May 13, 2024

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

alelejajaOptions: DE
May 23, 2024

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...

ArslanAltafOptions: BE
Jun 15, 2024

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' ;