List the current user list on given database
How to get a list of the users logged on to a specific database ? (instead of SP_WHO)
2003-04-09
320 reads
How to get a list of the users logged on to a specific database ? (instead of SP_WHO)
2003-04-09
320 reads
Regarding the recent script I submitted (dropping/recreating all procedures/views) - I made an important oversight. I neglected to add a CASE statement in order to make sure that the appropriate type of object was being referenced in the DROP statement.Below is the corrected script:
2003-02-06
205 reads
There are times when you may need to drop and re-create all stored procedures and/or views in your database. For example, in cases where procedures or views are causing blocked locks or other performance problems, a recent article (http://www.sswug.org/see.asp?s=1166&id=13448) suggested dropping/re-creating procedures and views after a service pack has been installed. The installation of a […]
2003-02-05
1,245 reads
This SP will give a listing of users blocking and being blocked in a tree formation (similar to explorer tree list). It uses a User defined function that recurses through the locking information gathered from sysprocesses. The listing only shows the Hostname (username) and the SPID.First create the User Defined Function (Part One) then create […]
2002-08-19
2,128 reads
This SQL Server stored procedure generates more readable output from the system sp_lock procedureinstead of getting object ids and session ids it returns the object name and user name
2002-07-10
1,017 reads
Here's a simple SQL to give you locking information.The SQL tells you what resource type you are using, the object name, lock request mode, lock status, and also the calling program's name.And all this from a simple query on sysprocesses, and syslockinfo!
2002-07-10
666 reads
This script captures the current system lock in a temp table, then builds a temp translation table for database and object id by iterating through all of the databases. It then produces a report by joining the two tables.For better performance, you could make the translation table perminante and only update it when you are […]
2002-06-14
574 reads
If select into clause is used into transactions till the transaction commits sysobjects table can not acceses directly.It can be accessed only with 'nolock' hint.
2002-06-07
1,080 reads
sp_lock2 is similar to sp_lock, except that it displays the database name, object name and index name instead of the ids. It accepts no parameters unlike the sp_lock procedure which can take an optional spid parameter. The basis for the main query which queries the system tables for lock info was taken from the sp_lock […]
2002-06-06
4,045 reads
For jobs that run periodically and should take only a short time to run, a DBA may want to know when the job has been running for an excessive time. In this case, just checking to see IF the job is running won't do; the ability to make sure that it hasn't been running for […]
2002-01-15
3,979 reads
By Steve Jones
I had been meaning to post this, so as I finished a piece that...
By Steve Jones
fardle-din – n. a long-overdue argument that shakes up a relationship, burning wildly through...
The post Lukáš Karlovský: I got the green light from management and built Fabric...
Hi, I would like to contribute to SQLServerCentral in peer reviews. As there are...
Comments posted to this topic are about the item Getting ANY of the data
Comments posted to this topic are about the item Why Would You Do That?
I have this data in two tables:
-- Beer table BeerIDBeerNamebrewer 5Becks Interbrew 6Fat Tire New Belgium 7Mac n Jacks Mac & Jack's Brewery 8Alaskan AmberAlaskan Brewing 9Kirin Kirin Brewing -- Beercount table BeerName BottleCount Becks 5 Fat Tire 1 Mac n Jacks 2 Alaskan Amber 4 NULL 7 Corona 2 Tsing Tao 4 Kirin 12What is returned from this query?
SELECT * FROM dbo.BeerCount AS bc WHERE bc.BeerName=ANY (SELECT b2.BeerName FROM dbo.Beer AS b2);See possible answers