Skip to Content
0

Poweruilder and Oracle

Oct 31, 2016 at 12:57 PM

125

avatar image

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?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Fidel Vales
Oct 31, 2016 at 03:43 PM
0

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.

Share
10 |10000 characters needed characters left characters exceeded
Roland Smith Oct 31, 2016 at 05:28 PM
0

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.

Share
10 |10000 characters needed characters left characters exceeded
René Ullrich Nov 01, 2016 at 08:13 AM
0

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.

Share
10 |10000 characters needed characters left characters exceeded