Use a EXEC DBMS_STATS in a tOracleRow or another component ?

One Star

Use a EXEC DBMS_STATS in a tOracleRow or another component ?

Hello,
Is it possible to do an "exec dbms_stats" with a Talend job ?
I am trying to execute this statement:
"EXEC DBMS_STATS.GATHER_SCHEMA_STATS('my_schema', cascade=>TRUE)"
with a tOracleRow but I get the error ORA-00900: invalid SQL Statement. It's the same with a ; at the end of the line.
When I execute this statement in SQLPlus/TOAD it works fine.
I'm on Oracle 11g, and Talend 4.0.3.
Any idea please ?
Thx in advance !
Sorry for my english.. Smiley Happy
One Star

Re: Use a EXEC DBMS_STATS in a tOracleRow or another component ?

I created a stored proc then call it using the tOracle SP operator: CREATE OR REPLACE PROCEDURE REFRESH_STATS
(in_table_name varchar2)
as
BEGIN
DBMS_STATS.GATHER_TABLE_STATS(OWNNAME => 'BI_DM', TABNAME => in_table_name, CASCADE => TRUE, ESTIMATE_PERCENT => 100, DEGREE => DBMS_STATS.AUTO_DEGREE);
END;
/
Two Stars tpk
Two Stars

Re: Use a EXEC DBMS_STATS in a tOracleRow or another component ?

Hi,
Just remove the EXEC command and type the remaining part of the statement with ";". Your wish will be fulfilled.
Cheers!
Thanks and Regards,
Pavan
Hello,
Is it possible to do an "exec dbms_stats" with a Talend job ?
I am trying to execute this statement:
"EXEC DBMS_STATS.GATHER_SCHEMA_STATS('my_schema', cascade=>TRUE)"
with a tOracleRow but I get the error ORA-00900: invalid SQL Statement. It's the same with a ; at the end of the line.
When I execute this statement in SQLPlus/TOAD it works fine.
I'm on Oracle 11g, and Talend 4.0.3.
Any idea please ?
Thx in advance !
Sorry for my english.. Smiley Happy

What’s New for Talend Spring ’19

Watch the recorded webinar!

Watch Now

Agile Data lakes & Analytics

Accelerate your data lake projects with an agile approach

Watch

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.

Download

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch