Notes for PB + MSSQL + triggers

Source: Internet
Author: User
Petabyte + MSSQL + trigger must note: If the trigger has more than two returned values, such as two update statements, the trigger is misjudged to have changed the data and the disk is not saved successfully. Tip: Rowchangedbetweenretrieveandupdate. Nochangesmadetodatabase. Therefore, the MSSQL trigger must be processed as follows: the trigger starts to add: if

PB + ms SQL + trigger must note: If the trigger has more than two returned values, for example, two update statements, the trigger is misjudged as data has changed and the disk is not saved successfully. Tip: Row changed between retrieve and update. No changes made to database. Therefore, the ms SQL trigger must be processed as follows: the trigger starts to add: if

Note the following before using PB + ms SQL + triggers:

If the trigger has more than two returned values, for example, two update statements, it is misjudged that the data has changed and the disk is not saved successfully.

Tip:

Row changed between retrieve and update.

No changes made to database.

Therefore, ms SQL triggers must be processed as follows:

Trigger start adding:

If @ ROWCOUNT = 0 Return -- improves performance

Setnocount on -- no statistics are returned, which can reduce frequent network response and improve performance efficiency; Avoid misjudgment as data changes (sybase does not have such problems)

...

...

Termination plus:

Setnocount off

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.