Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

How to remove all the inactive sessions from the DEX_SESSION table in the TempDB database when you use Microsoft Dynamics GP together with Microsoft SQL Server


INTRODUCTION

This article describes how to remove all the inactive sessions from the DEX_SESSION table in the TempDB database when you use Microsoft Dynamics GP or Microsoft Business Solutions - Great Plains together with Microsoft SQL Server.

↑ Back to the top


More Information

To remove the inactive sessions, you must first find the inactive sessions. After you find the inactive sessions, you must delete them. To do this, use the appropriate method.

Microsoft SQL Server 2000

  1. Start SQL Query Analyzer.
  2. Find the inactive sessions. To do this, paste the following statement in the query window, and then run the statement against the DEX_SESSION table.
    SELECT * from TempDB..DEX_SESSION where Session_ID not in (SELECT SQLSESID from DYNAMICS..ACTIVITY) 
  3. Delete the inactive sessions in the DEX_SESSION table. To do this, paste the following statement in the query window in SQL Query Analyzer, and then run the statement against the DEX_SESSION table.
    DELETE TempDB..DEX_SESSION where Session_ID not in (SELECT SQLSESID from DYNAMICS..ACTIVITY) 

Microsoft SQL Server 2005 and Microsoft SQL Server 2008

  1. Start SQL Server Management Studio.
  2. Find the inactive sessions. To do this, paste the following statement in the New Query window, and then run the statement against the DEX_SESSION table.
    SELECT * from TempDB..DEX_SESSION where Session_ID not in (SELECT SQLSESID from DYNAMICS..ACTIVITY) 
  3. Delete the inactive sessions in the DEX_SESSION table. To do this, paste the following statement in the New Query Window, and then run the statement against the DEX_SESSION table.
    DELETE TempDB..DEX_SESSION where Session_ID not in (SELECT SQLSESID from DYNAMICS..ACTIVITY
For more information about how to remove inactive sessions from the DEX_LOCK table, click the following article number to view the article in the Microsoft Knowledge Base:

864411 Removing inactive sessions from DEX_SESSION

↑ Back to the top


Keywords: kbnosurvey, kbmbsgp10,, kbfreshness2007, kbmbspartner, kbmbsmigrate, kb

↑ Back to the top

Article Info
Article ID : 864413
Revision : 1
Created on : 3/13/2017
Published on : 1/17/2015
Exists online : False
Views : 240