PeopleSoftGuys.com Home
Navigate
October 16th, 2006

SQL Error = (226) TRUNCATE TABLE command not allowed within multi-statement transaction.

The below error was came up when one of my colleague was trying to truncate a table with in an SQR procedure. I don’t know whether this is a Sybase specific or for all the databases.

SQL Error  = (226) TRUNCATE TABLE command not allowed within multi-statement transaction.
The Solution is to COMMIT before and after the truncate table statement, So that this will commit the previous transactions.

Example:

Before:

TRUNACATE TABLE PS_CUSTOMER_TMP;

After:

COMMIT;
TRUNACATE TABLE PS_CUSTOMER_TMP;
COMMIT;

October 16th, 2006

Change Assistant: Not all environments are showing up when I run the viewer.

PeopleSoft environment agent uniquely identifies a particular instance based on a GUID. PeopleSoft assigns this Unique value to each PeopleSoft database instance (application if you have multiple versions installed on the same servers), so when an EM Agent notifies the Environment Management Hub that it has found a component belonging to an environment and if the GUID of the environment not recognized, the hub creates a new environment representation.

This problem occurs mostly because if you don’t update the GUID for an instance which is replicated (copied) from other instances. The simple solution is execute the following SQL by using your platform specific query tool.

UPDATE PSOPTIONS SET SHORTNAME = ‘NEW_DATABASE_NAME’, LONGNAME = ‘Your Custom Name for the instance’, GUID = ‘ ‘

Once this is done reboot the application server so this will automatically sets the new GUID in PSOPTIONS table.

Now the agent should pickup the new environment.

|