在跑SytelineERP系统的后台任务的过程中,偶尔产生僵尸的现象
又没有工具去杀死这个进程,在ORACLE JDE中,有队列的概念,其中一个死掉就会造成阻塞,也可以调整优先级!
但在syteline中没有工作 只能在数据库中去删除.
方法如下:
Another solution about kill a process in SQL is as below :
Kill a Process in Sql Server
Symptom :
Kill a Process in Sql Server
System is hanging
Clarifying Fact :
Product: sltech
SL7 xx
Sql
Resolution :
Open Query Analyzer
Type sp_who2 and Run query(f5)
When results appear, view the 'BLK By' column
and make a note of the Spid causing locking/blocking EG 20
Then Type
Kill 20
and run (f5)
Legacy ID :
2003Syteline49999
Doris
The following is a Primus(R) eServer solution:
ID: 2003Syteline45313
Domain: syteline
Solution Class: Syteline
Goal Identify and kill a report that was accidentally submited with no starting and ending parameters and is consuming SQL Server resources
Fact Syteline 7 - All Versions
Fact SQL
[NOT] Fact Progress
Symptom Performance across the Syteline application is slow due to SQL server resources being tied up on a 'bad' report process
Symptom SQL tempdb grows quickly and does not shrink once the offending process is terminated.
Cause A user accidentally submitted a report to Background Task History with no starting and/or ending parameters and the process is consuming SQL Server resources, or causing SQL locking and blocking
Cause With reports that use temporary tables in the SQL tempdb for workspace (e.g. ItemWhereUsedBOM report), an open ended report will cause the tempdb to grow very quickly. Since the tempdb is just like any other SQL database, that space will not be automatically reclaimed once the report is cancelled and the transaction is rolled back. SQL will however flag the space as available for other programs.
Fix There is no quick and easy way to identify such a process automatically, however, the following recommendations may assist with getting the information required to kill the SQL server process associated with the 'bad' report.
Firstly, log into Syteline and open the Background Task History form and review recent tasks that are currently in a Running status. For each running task, review the parameter detail information searching for the report or utility that was submitted with no Starting and/or Ending data parameters. Parameters are not labeled, so you may need to look at the Report screen to see what options are available and compare them to the parameters listed in the Background Task History form.
Once you know the Syteline report which is suspected of consuming SQL server resources, open Query Analyzer on your SQL Server, select the App database from which the report was submitted, and run the following query:
SELECT scn.ContextName, scn.ProcessID, ci.UserName
FROM SessionContextNames scn (readuncommitted)
LEFT OUTER JOIN ConnectionInformation ci (readuncommitted)
ON scn.SessionID = ci.ConnectionID
WHERE ci.ConnectionID IS NOT NULL
The above query will return a list of SQL server processes and the associated Syteline information. The column ContextName should return the Syteline form that initiated the process. Search the list of displayed ContextName records for the report which you identified from the Background Task History form. Identify the specific process associated with the desired form and User, and note that ProcessID.
You can then kill the process by running the following in Query Analyzer:
kill spid
where spid would be substituted with the ProcessID value returned in the query you ran. For example, 'kill 109'.
Please note that killing the process will rollback the transaction so if it has been running for some time, it may take some time for SQL to rollback the transaction and for SQL server resources to return to normal usage levels.