July 6, 2009 at 12:23 pm
I inherited several SQL Server databases, mostly used internally for less than 50 users. They were in the process of moving them from SQL Server 2000/Windows 2000 to a Windows Server 2003/SQL Server 2005 server when I got hired, and I am trying to finish the job by doing the last database.
The databases are being connected to by a couple of programs that were home-grown in VB 6 or VB.NET. Of course, the developers no longer work here, and I don't think I have access to the source code.
I need to know how to find:
1. The last time the database was hit by an application.
2. Which applications are connecting to it.
Is there a way to do this from within SQL Server itself?
July 6, 2009 at 12:34 pm
There is no way to find this out from SQL Server. SQL profiler can record this stuff but it has to have been running at the time.
The probability of survival is inversely proportional to the angle of arrival.
July 6, 2009 at 12:48 pm
I've usually found that running a trace on the server for a few weeks is good for that kind of thing.
What you might do first is find out if any traces are already running. Could be that a prior DBA set one up. Might solve what you need.
If you look up traces in Books Online or on MSDN, there's a good article on the basics. Will tell you what you need in order to find out if a trace is already running, and what to do to read the results of it if one is, as well as how to create one of your own and get the results from that.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
July 6, 2009 at 1:01 pm
OK, thanks. So many times, it's a matter of knowing the right words to search for. I did a search in Google for "determine what is hitting a database" (same as the title of this thread), and got a lot of stuff I couldn't use. But the word "trace" is what I probably needed. Thanks.
July 7, 2009 at 6:49 am
Yep. That's always been the biggest weakness of online data. You can't find it if you can't think of the exact words to look for. That's the major advantage of sites like this, that we can point out which words apply.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply