You can also use SP_who, sp_who2 or sp_who3 (requires download) and you can quickly identify all Connections to each database, the Login and the Application, etc.
Try it.
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
mister.magoo provided the script does help a lot in some degree.
For the server I'm talking about we haven't restarted for a while.
and the script does provide some good information.
For the database I suspected that may not be in use I got the following result by run the script specific to the database:
(No column name)Begin TimeTransaction Name
ProjectServerTest_Draft2011/06/19 17:13:34:760CREATE STATISTICS
ProjectServerTest_Draft2011/06/19 17:13:34:747SpaceAlloc
ProjectServerTest_Draft2011/06/19 17:13:34:637SplitPage
ProjectServerTest_Draft2011/06/19 17:13:34:150UpdateQPStats
ProjectServerTest_Draft2011/06/19 01:46:45:130Backup:CommitDifferentialBase
ProjectServerTest_DraftNULLNULL
I can see there are some information for backup which is done for every database, also space Alloc, I didn't see any data related access information.
For the other database the I think it on production use I run the script too, and I got:
(No column name)Begin TimeTransaction Name
ProjectServer_Published2011/06/19 01:39:26:007user_transaction
ProjectServer_Published2011/06/19 01:38:31:037Backup:CommitDifferentialBase
ProjectServer_PublishedNULLNULL
So I think the script helps in some degree, but I still cannot decide if the former database is in use or not.
Thanks
sqlfriends (6/19/2011)
So I think the script helps in some degree, but I still cannot decide if the former database is in use or not.
Have you tried what I suggested?
You could execute the code provided and move on to the next task. :hehe:
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Actually, I think the backup will stop that being useful - sorry - I did say I wasn't an expert - I think I will step aside on this one :hehe:
MM
select geometry::STGeomFromWKB(0x0106000000020000000103000000010000000B0000001000000000000840000000000000003DD8CCCCCCCCCC0840000000000000003DD8CCCCCCCCCC08408014AE47E17AFC3F040000000000104000CDCCCCCCCCEC3F9C999999999913408014AE47E17AFC3F9C99999999991340000000000000003D0000000000001440000000000000003D000000000000144000000000000000400400000000001040000000000000F03F100000000000084000000000000000401000000000000840000000000000003D0103000000010000000B000000000000000000143D000000000000003D009E99999999B93F000000000000003D009E99999999B93F8014AE47E17AFC3F400000000000F03F00CDCCCCCCCCEC3FA06666666666FE3F8014AE47E17AFC3FA06666666666FE3F000000000000003D1800000000000040000000000000003D18000000000000400000000000000040400000000000F03F000000000000F03F000000000000143D0000000000000040000000000000143D000000000000003D, 0);
Welsh Corgi (6/19/2011)
sqlfriends (6/19/2011)
So I think the script helps in some degree, but I still cannot decide if the former database is in use or not.Have you tried what I suggested?
You could execute the code provided and move on to the next task. :hehe:
As long as the database is in use when you run it....or am I wrong about that?
MM
select geometry::STGeomFromWKB(0x0106000000020000000103000000010000000B0000001000000000000840000000000000003DD8CCCCCCCCCC0840000000000000003DD8CCCCCCCCCC08408014AE47E17AFC3F040000000000104000CDCCCCCCCCEC3F9C999999999913408014AE47E17AFC3F9C99999999991340000000000000003D0000000000001440000000000000003D000000000000144000000000000000400400000000001040000000000000F03F100000000000084000000000000000401000000000000840000000000000003D0103000000010000000B000000000000000000143D000000000000003D009E99999999B93F000000000000003D009E99999999B93F8014AE47E17AFC3F400000000000F03F00CDCCCCCCCCEC3FA06666666666FE3F8014AE47E17AFC3FA06666666666FE3F000000000000003D1800000000000040000000000000003D18000000000000400000000000000040400000000000F03F000000000000F03F000000000000143D0000000000000040000000000000143D000000000000003D, 0);
Viewing 15 posts - 1 through 15 (of 27 total)
You must be logged in to reply to this topic. Login to reply