How can I call ttOptUpdateStats from PL/SQL

I would like to: call ttOptUpdateStats from within a PL/SQL block.

An example of one: run immediately using the input arguments in the PL/SQL Developer's Guide.

The examples cover only builtin procedures returning data.

Thanks for the help!  Here's my working version:

Create procedure UPDATE_STATS as

type of TblList is the table sys. TBL_STATS. TYPE % TBLID;

tblids TblList;

TBL VARCHAR2 (255);

flag for number: = 1;

plsql_block VARCHAR2 (255);

LASTDATE SYS. TBL_STATS. TYPE % LASTSTATSUPDATE;

Start

plsql_block: = "call ttOptUpdateStats(:tbl,:flag)";

Select TBLID bulk collect into SYS tblids. TABLES where the TBLOWNER not in ('SYS', 'TTREP', 'GRID');

because me in tblids. FIRST... tblids. LAST

loop

Select trim (TBLOWNER): '. ' || Trim (TBLNAME) tbl of SYS. TABLES where SYS. TABLES. TBLID = tblids (i);

execute immediate plsql_block using tbl, flag;

Select LASTSTATSUPDATE from SYS lastdate. TBL_STATS where SYS. TBL_STATS. TBLID = tblids (i);

dbms_output.put_line ('< '="" ||="" rpad(tbl,45)="" ||="" '="" '="" ||="" lastdate="" ||="" '="">');

end loop;

exception

while others

then

Rollback;

end UPDATE_STATS;

/

Ed...

Tags: Database

Similar Questions

Maybe you are looking for

  • cannot signin and asked the link change password and have not received. I asked at least 5 times!

    I understand the accounts settings before 2010 to reset password, but it's difficult if you can not receive the link to get the discount to zero fact. Please can we get this support. I made several request for the link, at least 6 in the last two wee

  • What better way to macbook pro chrome or firefox

    Hello I need to have my 2 email and Facebook 2 accounts open at the same time keeping instead of having to connect and again, which is better for the macbook pro firefox or chrome? Thanks in advance Tracey xx

  • printing from ipad on hp3052a printer

    I can't print a document from the ipad2 at 3052 on the 3g network a printer. WIFI and email works great. Is there a setting I need to turn on the printer or the ipad?

  • stupid password

    How reset you your passward 8.1 on windows, because it is a new computer, I have no recollection of losing. I hoped to reset to factory settings, I can not get the uefi to boot from my USB drive, I am not computer savy

  • Windows XP Home disc replacement

    My drive was broken when trampled by my son. Can I get a replacement disk?