3 Replies Latest reply on Feb 23, 2017 6:14 PM by rp0428

    sql developer  is not retrieving the records from a view

    2832987

      sql developer  is not retrieving the records from a view in both versions sql dev 3 and sql dev 4, but the view actually contains records and required privs are in place.

       

      While tried to retrieve the data from same view in some other machine , its working .

      Please advise ?@@

        • 1. Re: sql developer  is not retrieving the records from a view
          BPeaslandDBA

          Are you getting any errors? Those would help diagnose the problem. Screenshots, etc go a long way for us to help see what you are seeing.

           

          Cheers,
          Brian

          • 2. Re: sql developer  is not retrieving the records from a view
            Gbenga Ajakaye

            Can you try

            select * from schema_name.view_name;

            • 3. Re: sql developer  is not retrieving the records from a view

              sql developer is not retrieving the records from a view in both versions sql dev 3 and sql dev 4, but the view actually contains records and required privs are in place.

              Sorry - but that just isn't possible in Oracle.

               

              1. Views do NOT contain data - that are nothing more than a stored query.

              2. If the 'required privs are in place' and the query produces a result set that result set will be returned by Oracle.

               

              In Oracle ALL THINGS ARE FORBIDDEN except those which are granted. So it it NOT possible for a user to have the correct privileges but to not get the results when the query accesses objects and data which correspond to those privileges.

              While tried to retrieve the data from same view in some other machine , its working .

              That would indicate that:

               

              1. the user doing the query of that 'same view' from another machine is using DIFFERENT privileges

              2. the other machine may (perhaps accidentally) be connecting to a different database

              3. the privileges are different for the same user when connecting from a different machine or tool - for example an AFTER LOGON trigger could exist.

               

              In any case it has NOTHING to do with Sql Developer.

               

              Contact your DBA to help sort it out.