You receive a warning message in the Application log on the AOS server in Microsoft Dynamics AX: "SPID [SPID_number] for Session Id [SessionID], is still present in the database. Please delete the SPID from the database"

Article translations Article translations
Article ID: 953374 - View products that this article applies to.
Expand all | Collapse all

Symptoms

When you use Microsoft Dynamics AX 2009, Microsoft Dynamics AX 4.0, or Microsoft Dynamics AX 3.0, you receive a warning message that resembles the following in the Application log on the AOS server:


Event Type: Warning
Event Source: Dynamics Server 01
Date: 7/4/2007
Time: 12:30:14 PM
Event Category: None
Event ID: 186
Description:
Object Server 01: SPID SPID_number for Session Id SessionID, is still present in the database. Please delete the SPID from the database.


Cause

This problem may occur if an SQL SPID is still active in the database but no active client session is associated with the SQL SPID. This situation is usually caused by an abnormal client disconnection or by a task on a process that is ended by an end-user. The SPID number in the warning message is an orphaned SPID in Microsoft SQL Server.

If you experience this situation, the AOS server is waiting for SQL to return, and the AOS cannot kill the SPID because of security restrictions. In this case, when a user starts a second client that touches the same table that you use in the Microsoft Dynamics AX database, a block occurs.

Resolution

To resolve this problem, end the client session that is still in the online user's form. Or, kill the orphaned SPIDs in SQL Server. To do this, follow these steps to monitor and to clean up orphaned SQL SPIDs:
  1. Check the status of the Microsoft Dynamics AX sessions, and verify that these sessions have active SPIDs in the Microsoft Dynamics AX database where the client session is in the shut-down process. To do this, run the following SQL statement in SQL Query Analyzer or in SQL Server Management Studio:
    Select * from sysclientsessions where status = 2 or status = 3
    In the results of the statement, check the matching session ID from the warning message that appears in the Application log on the AOS server.
  2. Check the status of the orphaned SQL SPID. To do this, run the following SQL statement in SQL Query Analyzer or in SQL Server Management Studio:
    select * from master..sysprocesses 
    In the results of the statement, locate the SPID that is indicated in the warning message, and then verify the following:
    • If the SPID is blocked or if the SPID is blocking other SPIDs, and if the waittime column shows a high number, you can decide to delete the SPID. Or, you can work together with a qualified database administrator (DBA) to determine whether the SPID should be deleted. For more information, click the following article numbers to view the articles in the Microsoft Knowledge Base:
      271509 How to monitor blocking in SQL Server 2005 and in SQL Server 2000
      323630 How to resolve blocking problems that are caused by lock escalation in SQL Server
    • If the open_trans column has a value of 1 for an SPID line, there is a pending transaction for the SPID line. Additionally, if the waittime column shows a high number for this SPID line, you should delete the SPID. Or, you can work together with a qualified database administrator (DBA) to determine whether the SPID should be deleted. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

      822101 Description of the waittype and lastwaittype columns in the master.dbo.sysprocesses table in SQL Server 2000 and SQL Server 2005

    Note If SPIDs together with open transactions are left in the Microsoft Dynamics AX database for a long time, transaction log backups cannot be completed. Additionally, the transaction log will grow in overall size. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
    317375 A transaction log grows unexpectedly or becomes full on a computer that is running SQL Server

More information

In the "Resolution" section, you can verify the actual client computer, and you can verify the end-user account name that is associated with the orphaned SPID. Make sure that you try to understand the business process and the sequence of events that caused the SPID to be orphaned in the Microsoft Dynamics AX database.  For more information, click the following article number to view the article in the Microsoft Knowledge Base:
953375 How to find a user ID that is associated with a session ID of an "RPC error: RPC exception 1726 occurred in session [SessionID]" error message in the Application log on the AOS server in Microsoft Dynamics AX

Properties

Article ID: 953374 - Last Review: July 14, 2012 - Revision: 5.0
Applies to
  • Microsoft Dynamics AX 2009
  • Microsoft Dynamics AX 4.0
  • Microsoft Dynamics AX 3.0
  • Axapta Object Server
Keywords: 
kbexpertiseadvanced kbtshoot kbprb kberrmsg kbmbsmigrate kbexpertiseinter KB953374

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com