> -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of Alan Bourke > Sent: Thursday, March 26, 2009 2:14 PM > To: [email protected] > Subject: Re: [NF] SQL Server - is a table locked? > > Some T-SQL to do it: > > <snip> > SELECT t1.request_session_id as spid, t1.resource_type as > type, t1.resource_database_id as dbid, > <snipped> > > -- > Alan Bourke > [email protected] > >
Thanks Alan... but I'm getting an error msg when I run it... Is this code for SQL Server 2000? I've run it with all my DB's and can't find the missing sys related files: Server: Msg 208, Level 16, State 1, Line 1 Invalid object name 'sys.partitions'. Server: Msg 208, Level 16, State 1, Line 1 Invalid object name 'sys.dm_tran_locks'. Server: Msg 208, Level 16, State 1, Line 1 Invalid object name 'sys.dm_os_waiting_tasks'. I'm assuming I'm just missing something obvious... Matt Jarvis Programmer/DBA King | Retail Solutions 541-349-8512 Electronic Privacy Notice. This e-mail, and any attachments, contains information that is, or may be, covered by electronic communications privacy laws, and is also confidential and proprietary in nature. If you are not the intended recipient, please be advised that you are legally prohibited from retaining, using, copying, distributing, or otherwise disclosing this information in any manner. Instead, please reply to the sender that you have received this communication in error, and then immediately delete it. Thank you in advance for your cooperation. _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[email protected] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

