UPDATE STATISTICS using datastage
Posted: Fri Feb 17, 2006 2:57 pm
I am trying to do an UPDATE STATISTICS calling a Stored Procedure in ODBC using DataStage. This has to be done after my sequence loads all the tables.The Stored Procedure runs fine updating all the Tables in the SQL Server Query Analyzer, well it is throwing a warning message when i run the DataStage job which calls the sp. I tried updating only one table which works, but that does not serve the purpose, i need to perform update statistics on all tables in DB
Any suggestions would be greatly appreciated.
This the warning message:
[SQL statement:{call "DEV"."dbo"."sp_UpdTable"(?)}
SQLSTATE=01000, DBMS.CODE=0
[DataStage][SQL Client][ODBC][Microsoft][ODBC SQL Server Driver][SQL Server]Updating dbo.Contact_Address
SQLSTATE=37000, DBMS.CODE=226
[DataStage][SQL Client][ODBC][Microsoft][ODBC SQL Server Driver][SQL Server]UPDATE STATISTICS statement not allowed within multi-statement transaction.
SQLSTATE=01000, DBMS.CODE=0
[DataStage][SQL Client][ODBC][Microsoft][ODBC SQL Server Driver][SQL Server]Updating dbo.Customer_HIN
SQLSTATE=37000, DBMS.CODE=226
[DataStage][SQL Client][ODBC][Microsoft][ODBC SQL Server Driver][SQL Server]UPDATE STATISTICS statement not allowed within multi-statement transaction.
][/code]
Any suggestions would be greatly appreciated.
This the warning message:
[SQL statement:{call "DEV"."dbo"."sp_UpdTable"(?)}
SQLSTATE=01000, DBMS.CODE=0
[DataStage][SQL Client][ODBC][Microsoft][ODBC SQL Server Driver][SQL Server]Updating dbo.Contact_Address
SQLSTATE=37000, DBMS.CODE=226
[DataStage][SQL Client][ODBC][Microsoft][ODBC SQL Server Driver][SQL Server]UPDATE STATISTICS statement not allowed within multi-statement transaction.
SQLSTATE=01000, DBMS.CODE=0
[DataStage][SQL Client][ODBC][Microsoft][ODBC SQL Server Driver][SQL Server]Updating dbo.Customer_HIN
SQLSTATE=37000, DBMS.CODE=226
[DataStage][SQL Client][ODBC][Microsoft][ODBC SQL Server Driver][SQL Server]UPDATE STATISTICS statement not allowed within multi-statement transaction.
][/code]