Coder Social home page Coder Social logo

Comments (12)

serge-rider avatar serge-rider commented on May 29, 2024

Is there anything in error log?

from dbeaver.

steromano87 avatar steromano87 commented on May 29, 2024

Hi Serge,

the error log is empty, but I observed that one of the metadata queries that are called to retrieve data gives 0 rows as result:

oraclepackage

I don't know if this information can be helpful...

from dbeaver.

serge-rider avatar serge-rider commented on May 29, 2024

Thanks for info. At least I'll fix source loading text.
Could you please check that this package body is loaded in other Oracle tools?

from dbeaver.

steromano87 avatar steromano87 commented on May 29, 2024

Hi Serge,

I confirm that the package body is correctly loaded and parsed by TOAD using the same user.

TOAD retrieves also a slightly different package declaration in header.
TOAD:

CREATE OR REPLACE package SER_MIFID.PKG_CALCOLO_PATRIMONIALE as
    TYPE elencoCLI is varray(8) of char(11);

DBeaver:

package           PKG_CALCOLO_PATRIMONIALE as
    TYPE elencoCLI is varray(8) of char(11);

from dbeaver.

serge-rider avatar serge-rider commented on May 29, 2024

Yet another strange issue.
Are you working as SYSDBA or as a normal user? Could try it as SYSDBA (if you have such permissions)?

There is a difference in package declarations because TOAD makes additional source processing and inserts CREATE OR REPLACE operator. I think DBeaver also should do it..

from dbeaver.

serge-rider avatar serge-rider commented on May 29, 2024

I think that this problem has the same nature as #37. Something about permissions.
But if you are using the same user then the only possible difference is a different connection role (SYSDBA, SYSOPER, Normal). Or maybe some additional initialization queries.
Did you try any other tools besides DBeaver and TOAD?

from dbeaver.

steromano87 avatar steromano87 commented on May 29, 2024

Hi Serge,

using TOAD I connect to the same DB using the same user and the same role (normal).
I tried using SqlDbx too, and I can see the package body without issues connecting as normal user.

from dbeaver.

serge-rider avatar serge-rider commented on May 29, 2024

I'm frustrated a bit.
Could you try this trick:
Execute query

SELECT TEXT FROM SYS.ALL_SOURCE WHERE TYPE='PACKAGE BODY' AND OWNER='SER_MIFID' AND NAME='PKG_CALCOLO_PATRIMONIALE'

in DBeaver and in TOAD. Is there any difference?

from dbeaver.

steromano87 avatar steromano87 commented on May 29, 2024

Hi Serge,

executing the query on DBeaver and TOAD gives no result on both of them :-( I also checked and TOAD uses the same connection to execute queries and to retrieve package body.

Hoping to be more helpful, if I inpect the current user privileges using the following query:

select * from session_privs

I obtain the following privileges:

  • CREATE SESSION
  • ALTER SESSION
  • UNLIMITED TABLESPACE
  • CREATE TABLE
  • SELECT ANY TABLE
  • INSERT ANY TABLE
  • UPDATE ANY TABLE
  • DELETE ANY TABLE
  • CREATE CLUSTER
  • CREATE SEQUENCE
  • ALTER ANY SEQUENCE
  • SELECT ANY SEQUENCE
  • CREATE PROCEDURE
  • ALTER ANY PROCEDURE
  • EXECUTE ANY PROCEDURE
  • CREATE TRIGGER
  • CREATE TYPE
  • CREATE OPERATOR
  • CREATE INDEXTYPE
  • SELECT ANY DICTIONARY
  • ADVISOR

from dbeaver.

steromano87 avatar steromano87 commented on May 29, 2024

Hi Serge,

after some googlin I found the solution of the issue :-)

The correct schema to retrieve the package body if the current user has EXECUTE PACKAGE permissions and the package belongs to another schema is SYS.DBA_SOURCE and not SYS.ALL_SOURCE.
If you execute this query on DBeaver and on TOAD:

SELECT TEXT FROM SYS.DBA_SOURCE
WHERE TYPE='PACKAGE BODY'
    AND OWNER='SER_MIFID'
    AND NAME='PKG_CALCOLO_PATRIMONIALE'
ORDER BY line

I get the package body.

References: TOAD Wiki, Oracle Community

from dbeaver.

serge-rider avatar serge-rider commented on May 29, 2024

Hey,

Thanks a lot for information.
However I doubt that using DBA* views everywhere is the best choice. These views are usually not accessible to users without DBA permissions.
But I think I could try to read info from both DBA and ALL views. If DBA* view is missing/not accessible or contains no data then try to read from ALL* (or even USER*).

Will try to fix this in the next version.

from dbeaver.

serge-rider avatar serge-rider commented on May 29, 2024

Now DBeaver will read sources from DBA_SOURCE view (if it is available for current user).

from dbeaver.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.