tag:blogger.com,1999:blog-25740336.post6838808006565202650..comments2023-08-24T22:26:48.675+01:00Comments on The PeopleSoft DBA Blog: %UpdateStats() -v- Optimizer Dynamic SamplingDavid Kurtzhttp://www.blogger.com/profile/00468908370233805717noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-25740336.post-85940399989396172152007-05-29T00:23:00.000+01:002007-05-29T00:23:00.000+01:00You can't put an anonymous PL/SQL block in the DDL...You can't put an anonymous PL/SQL block in the DDL model, but you can call a PL/SQL procedure - either one supplied by Oracle, or written by yourself.<BR/>In PT8.47 and earlier, you cannot call DBMS_STATS.GATHER_TABLE_STATS directly because [TBNAME] contains both the schema and table name and must be separated. In PT8.48 the schema name moves to [DBNAME], and [TBNAME] contains only the table name. A different version of the wrapper is required. You can download wrapper.sql as a part of the <A HREF="http://www.apress.com/ApressCorporate/supplement/1/366/1590594223-2273.zip" REL="nofollow">code examples</A> for <A HREF="http://www.psftdba.com" REL="nofollow">PeopleSoft for the Oracle DBA</A> (if you have the book see page 122).<BR/>The wrapper in the book does not handle the exception raised when analysing a table with locked statistics. I'll leave that as a exercise.David Kurtzhttps://www.blogger.com/profile/00924323960047469300noreply@blogger.comtag:blogger.com,1999:blog-25740336.post-32785947170630756212007-05-25T17:51:00.000+01:002007-05-25T17:51:00.000+01:00OK. I understand the package that you have create...OK. I understand the package that you have created.... and you can't put a PL/SQL block in DDL model <BR/>but what do we put into the PSDDLMODEL to call this new procedure ? We are 10G and 8.47.03 of Tools.Bruce Hubbellhttps://www.blogger.com/profile/04035725562604679836noreply@blogger.com