Skip to Content
avatar image
Former Member

Poweruilder and Oracle

using PB 12.5 I am trying to execute the Oracle procedure "dbms_stats.gather_table_stats" using the basic format dbms_stats.gather_table_stats( 'ownername', 'tablename' ). this is generating an error of "Execute Error: Invalid stored procedure parameter type of 'BOOLEAN' on 'ESTIMATE_PERCENT'." I then try to provide a value for "estimate_percent" and still get the same error. When I try the same statement via SQL Developer, no issues. Do I need to provide a value for every parameter? Any other suggestions/recommendations?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Oct 31, 2016 at 03:43 PM

    Hi,

    You should only use SAP tools to calculate statistics for tables. It is not allowed to use directly dbms_stats.gather_table_stats (see note 105047)

    use BRCONNECT or one of the transactions available for that.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 31, 2016 at 05:28 PM

    I'm not 100% sure but I don't think PowerBuilder supports optional parameters. Try passing all the parameters and use the default values for the ones you aren't passing a specific value for.

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 01, 2016 at 08:13 AM

    This should work: (dynamic SQL format 1)

    execute immediate "call dbms_stats.gather_table_stats('ownername', 'tablename')";

    You may also try dynamic SQL format 2 if you want to specify the two values as input parameters.

    Add comment
    10|10000 characters needed characters exceeded