Vincent Stefanetti

How to Clear Disconnected Users from Dynamics GP

  delete from DYNAMICS..ACTIVITY where USERID not in (select loginame from master..sysprocesses) delete from tempdb..DEX_SESSION where session_id not in (select SQLSESID from DYNAMICS..ACTIVITY) delete from tempdb..DEX_LOCK where session_id not in (select SQLSESID from DYNAMICS..ACTIVITY) delete from DYNAMICS..SY00800 where USERID not in (select USERID from DYNAMICS..ACTIVITY) delete from DYNAMICS..SY00801 where USERID not in (select USERID from…

Read More

Script to List the Compatibility Levels of Databases

    select name, compatibility_level , version_name = CASE compatibility_level    WHEN 65  THEN ‘SQL Server 6.5’    WHEN 70  THEN ‘SQL Server 7.0’    WHEN 80  THEN ‘SQL Server 2000’    WHEN 90  THEN ‘SQL Server 2005’    WHEN 100 THEN ‘SQL Server 2008/R2’    WHEN 110 THEN ‘SQL Server 2012’    WHEN 120 THEN ‘SQL Server 2014’ENDfrom sys.databases

Read More