cancel
Showing results for 
Search instead for 
Did you mean: 

Poweruilder and Oracle

Former Member
0 Kudos

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?

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

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.

Former Member
0 Kudos

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.

fidel_vales
Employee
Employee
0 Kudos

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.