Oracle: Not able to get value from All_Synonyms in PL/SQL Dabatase: Oracle

User: Not dba

In my oracle database, im able to do the following:

SELECT * FROM ALL_SYNONYMS


But when i do it in pl/sql, it is able to compile and execute, but the dbms.putline prints nothing:

CREATE PROCEDURE PROCEDURE_1 AS
  strName VARCHAR2(50);
  CURSOR C_NAME IS SELECT SYNONYM_NAME FROM ALL_SYNONYMS WHERE TABLE_OWNER = 'USER1';

BEGIN

   FOR R_NAME in C_NAME
   LOOP
     strName := R_NAME.SYNONYM_NAME;
     dbms_output.put_line(strName);        &lt;-----
   END LOOP;


END PROCEDURE_1 


Do we need to grant any role to a non-dba user for All_Synonyms table?
You shouldn't need any special privilege to view the ALL_* views.

If the procedure is owned by and is running as USER1 then it could be that USER1 has not been granted access to any synonyms.

If the procedure is owned by a user other than USER1 it could be that that user hasn't been granted access to any synonyms.

It all comes down to who's credentials are actually being used to run the procedure - yours, USER1, procedure owner - and what synonyms or grants to synonyms that user has.