简体   繁体   中英

No transaction is active on SQL server 2000

I am dealing with some legacy code. There is a program written in vb6. That connects to an sql server 2000.

When a transaction is begun I am getting No transaction is active error.

The problem is this error occurs only on one of the clients. There are 3 pcs one server 2 clients work just fine. One doesn't.

The TCP protocol is enabled on the server. I have uninstalled and installed msdtc on server.

A connection is made. Other queries execute just fine. I am unsure what might be the problem.

If I had sufficient reputation, I would have added this as comment instead of answer...

Because it is not entirely clear to me what you mean with "When a transaction is begun" and what the actual error is for "No transaction is active error"

There are a few settings that can be done on any connection. The settings can be part of the connection configuration or set explicitly afterwards. One of them is "implicit transactions". On my machines, it is always set to "off". Maybe this setting differs between your machines.

To test that theory, you could add the line

set implicit_transactions off

or

set implicit_transactions on

as first line in the batch / stored procedure that throws the error.

If that solves the problem, you should fix the connection configuration of the troublesome machine and change the batch / stored procedure back to the original.

If these servers communicate with each other, dns information must be defined in the host file. You can check it out.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM