Is there anyway I can spool or write the output of sql statements to a file? I would like to spool the output of the following commands:
--Check concurrent sessions in DB.
select count(*) from sessions where datediff(minute, timestamp, getdate())< 10
--How many items are locking.
sp_lock
--Who is causing the locking. Use the spid from the sp_lock results
--and link to the spid from the sp_who results.
sp_who
We have SQL Server 2000.
Thanks in advance, Kevin