Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL File Locks/Usage 1

Status
Not open for further replies.

chrism1

MIS
Sep 9, 2002
65
US

Does anybody know of an SQL utility that will easily show who has what file in use/locked?

Coming from a P.SQL installation it was so easy to go into Monitor and see what files were in use by what user. I can get there in SQL but I have to jump through hoops.

Thanks.
 
In MS SQL Enterprise Manager, goto management, current activity, processinfo and click on the details option under the view menu.

This will list all the users logged in, what application they are using (Macola, Crystal, F9, etc). If you right click on a process and select properties, it will show you the SQL command they are currently running. You can kill the SQL session from here as well, but be hesitant to do so if the SQL command they are running is an INSERT or UPDATE or DELETE command.

You can also send the user a message from here such as "get your a*# out of Macola". Its a very cool utility.

Let me know if you have any questions.

Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
 

Thanks Don.

I guess the issue is the way the two Macola databases are structured (P.SQL & SQL).

In SQL Enterprise Manager I can see at a glance that a user is accessing DATA_01. However, what I am really interested in seeing at a glance is who is hitting the AR Cust file. One user may have DATA_01 open a dozen times (times the number of users) -- this takes a lot of digging.
 
I think there is a SQL script to do this but I need to find it. I will keep you posted.

Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
 
Open query analyzer and paste in the below:

use msllockdb

go

select sessionid, tablename, rowid from maclocks



exec sp_who
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top