الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

معرفة اي جداول عليها Lock ومن المستخدم القائم به

مغلق
بدأه IUnknown في 17 مايو 2006 · 3 رد · 531 مشاهدة · في قواعد بيانات Microsoft SQL Server
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

باستخدام systemtables وجدول مؤقت يمكنك معرفة اي التطبيقات اغلقت اي جدول

create table #Locks (SPID smallint , DBID smallint ,objID int ,indID smallint , Type nchar(4),resource nchar(16), mode nvarchar(8), status varchar(8))
insert into #locks execute sp_lock
select distinct object_name (objID) , Hostname , program_name,nt_userName , loginame , object_name (objID), mode
from master..sysprocesses s inner join #locks l on s.spid = l.spid
drop table #locks

تم تعديل هذه المشاركة بواسطة walmhomer في 17 مايو 2006 في 09:44

When all else fails, read the instructions.

If there is a possibility of several things going wrong the one that will cause the most damage will be the one to go wrong.

No Matter how many times you repeat, there will be someone not listening .

To beat the bureaucracy, make your problem their problem

55926083.png

#2

بارك الله فيك

بصراحة معلومات مفيدة جدا

لكن ممكن توضح اين نضع هذا الكود

هل في storedprocedure ام ماذا ؟

تم تعديل هذه المشاركة بواسطة adel_elgo في 17 مايو 2006 في 10:43

#3
adel_elgo كتب:
بارك الله فيك

بصراحة معلومات مفيدة جدا

لكن ممكن توضح اين نضع هذا الكود

هل في storedprocedure ام ماذا ؟

شكرا لك يا أخي

بالطبع يا أخي يمكنك وضعه في Stored Procedure وهو ما فعلته انا حيث يمكنني استدعاؤه مباشرة لمعرف اي الجداول مغبقة ومن اي مستخدم/ برنامج

When all else fails, read the instructions.

If there is a possibility of several things going wrong the one that will cause the most damage will be the one to go wrong.

No Matter how many times you repeat, there will be someone not listening .

To beat the bureaucracy, make your problem their problem

55926083.png

هذا الموضوع مغلق.

مواضيع مشابهة