Showing posts with label logs. Show all posts
Showing posts with label logs. Show all posts

Wednesday, March 28, 2012

How often an index is hit

Anyone have a script/process that would count how often indexes are actually
used? Are there sys optimizer tabs or logs or such?
Mike
If data falls in the woods and nobody is there to see it ...... ?Are you talking SQL 2005? If so then yes there are some dynamic management
views that give you all sorts of details for index usage. In 2000 there is
no built in way to do this.
Andrew J. Kelly SQL MVP
"Tigermikefl" <Tigermikefl@.discussions.microsoft.com> wrote in message
news:D209E173-1D85-4969-B2FE-C17A2F4B63A9@.microsoft.com...
> Anyone have a script/process that would count how often indexes are
> actually
> used? Are there sys optimizer tabs or logs or such?
> --
> Mike
> If data falls in the woods and nobody is there to see it ...... ?|||In SQL Server 2005 you have a variety of DMVs to use, for example:
DECLARE @.TableName SYSNAME;
SET @.TableName = N'YourTableName';
DECLARE
@.ObjectID INT,
@.DBID INT;
SELECT
@.ObjectID = OBJECT_ID(@.TableName),
@.DBID = DB_ID();
SELECT
-- s.* just to illustrate:
i.name, s.*
FROM sys.dm_db_index_usage_stats s
INNER JOIN sys.indexes i
ON s.object_id = i.object_id
AND s.index_id = i.index_id
WHERE s.database_id = @.DBID
AND s.object_id = @.ObjectID
AND i.object_id = @.ObjectID;
This will tell you number of and most recent scan/s/lookup/update, both
user and system. Variety of useful applications for this data, if you are
heavy into data mining for tuning opportunities.
"Tigermikefl" <Tigermikefl@.discussions.microsoft.com> wrote in message
news:D209E173-1D85-4969-B2FE-C17A2F4B63A9@.microsoft.com...
> Anyone have a script/process that would count how often indexes are
> actually
> used? Are there sys optimizer tabs or logs or such?
> --
> Mike
> If data falls in the woods and nobody is there to see it ...... ?|||Its surprising that we don't have any in SQL Server 2000

Friday, March 9, 2012

how long before sleeping connections disappear

Using SS2000 SP4. How long does it take after a user logs out before their
"sleeping connection" in EM/Current Activity/Process Info disappears? Is
there a way short of rebooting or stopping/starting services to get it to
disappear sooner?
Thanks,
--
Dan D.Hello,
The inactive connections will be removed from SQL Server based on the
application time out setup in appllication layer. Sleeping status doesnt
mean that status is orphan
connection, because most of the time if the process wait for a user Input
or waiting for a lock will be in sleeping mode. It can go for Running
status any time.
Take a look into the below URL:-
http://support.microsoft.com/kb/Q137983
Thanks
Hari
"Dan D." <DanD@.discussions.microsoft.com> wrote in message
news:04CB0892-63B1-4B6F-8E7F-5E5581A73563@.microsoft.com...
> Using SS2000 SP4. How long does it take after a user logs out before their
> "sleeping connection" in EM/Current Activity/Process Info disappears? Is
> there a way short of rebooting or stopping/starting services to get it to
> disappear sooner?
> Thanks,
> --
> Dan D.|||The connections are held until the application closes them. Many
applications use connection pooling so that closed connections are pooled
for reuse. These will disappear after a short period, IIRC 30-60 seconds.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Dan D." <DanD@.discussions.microsoft.com> wrote in message
news:04CB0892-63B1-4B6F-8E7F-5E5581A73563@.microsoft.com...
> Using SS2000 SP4. How long does it take after a user logs out before their
> "sleeping connection" in EM/Current Activity/Process Info disappears? Is
> there a way short of rebooting or stopping/starting services to get it to
> disappear sooner?
> Thanks,
> --
> Dan D.|||These connections are persisting longer than that. Maybe the application has
changed the timeout. Thanks.
--
Dan D.
"Dan Guzman" wrote:
> The connections are held until the application closes them. Many
> applications use connection pooling so that closed connections are pooled
> for reuse. These will disappear after a short period, IIRC 30-60 seconds.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Dan D." <DanD@.discussions.microsoft.com> wrote in message
> news:04CB0892-63B1-4B6F-8E7F-5E5581A73563@.microsoft.com...
> > Using SS2000 SP4. How long does it take after a user logs out before their
> > "sleeping connection" in EM/Current Activity/Process Info disappears? Is
> > there a way short of rebooting or stopping/starting services to get it to
> > disappear sooner?
> >
> > Thanks,
> > --
> > Dan D.
>|||Interesting article. Thanks.
--
Dan D.
"Hari Prasad" wrote:
> Hello,
> The inactive connections will be removed from SQL Server based on the
> application time out setup in appllication layer. Sleeping status doesnt
> mean that status is orphan
> connection, because most of the time if the process wait for a user Input
> or waiting for a lock will be in sleeping mode. It can go for Running
> status any time.
> Take a look into the below URL:-
> http://support.microsoft.com/kb/Q137983
> Thanks
> Hari
> "Dan D." <DanD@.discussions.microsoft.com> wrote in message
> news:04CB0892-63B1-4B6F-8E7F-5E5581A73563@.microsoft.com...
> > Using SS2000 SP4. How long does it take after a user logs out before their
> > "sleeping connection" in EM/Current Activity/Process Info disappears? Is
> > there a way short of rebooting or stopping/starting services to get it to
> > disappear sooner?
> >
> > Thanks,
> > --
> > Dan D.
>
>

how long before sleeping connections disappear

Using SS2000 SP4. How long does it take after a user logs out before their
"sleeping connection" in EM/Current Activity/Process Info disappears? Is
there a way short of rebooting or stopping/starting services to get it to
disappear sooner?
Thanks,
Dan D.
Hello,
The inactive connections will be removed from SQL Server based on the
application time out setup in appllication layer. Sleeping status doesnt
mean that status is orphan
connection, because most of the time if the process wait for a user Input
or waiting for a lock will be in sleeping mode. It can go for Running
status any time.
Take a look into the below URL:-
http://support.microsoft.com/kb/Q137983
Thanks
Hari
"Dan D." <DanD@.discussions.microsoft.com> wrote in message
news:04CB0892-63B1-4B6F-8E7F-5E5581A73563@.microsoft.com...
> Using SS2000 SP4. How long does it take after a user logs out before their
> "sleeping connection" in EM/Current Activity/Process Info disappears? Is
> there a way short of rebooting or stopping/starting services to get it to
> disappear sooner?
> Thanks,
> --
> Dan D.
|||The connections are held until the application closes them. Many
applications use connection pooling so that closed connections are pooled
for reuse. These will disappear after a short period, IIRC 30-60 seconds.
Hope this helps.
Dan Guzman
SQL Server MVP
"Dan D." <DanD@.discussions.microsoft.com> wrote in message
news:04CB0892-63B1-4B6F-8E7F-5E5581A73563@.microsoft.com...
> Using SS2000 SP4. How long does it take after a user logs out before their
> "sleeping connection" in EM/Current Activity/Process Info disappears? Is
> there a way short of rebooting or stopping/starting services to get it to
> disappear sooner?
> Thanks,
> --
> Dan D.
|||These connections are persisting longer than that. Maybe the application has
changed the timeout. Thanks.
Dan D.
"Dan Guzman" wrote:

> The connections are held until the application closes them. Many
> applications use connection pooling so that closed connections are pooled
> for reuse. These will disappear after a short period, IIRC 30-60 seconds.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Dan D." <DanD@.discussions.microsoft.com> wrote in message
> news:04CB0892-63B1-4B6F-8E7F-5E5581A73563@.microsoft.com...
>
|||Interesting article. Thanks.
Dan D.
"Hari Prasad" wrote:

> Hello,
> The inactive connections will be removed from SQL Server based on the
> application time out setup in appllication layer. Sleeping status doesnt
> mean that status is orphan
> connection, because most of the time if the process wait for a user Input
> or waiting for a lock will be in sleeping mode. It can go for Running
> status any time.
> Take a look into the below URL:-
> http://support.microsoft.com/kb/Q137983
> Thanks
> Hari
> "Dan D." <DanD@.discussions.microsoft.com> wrote in message
> news:04CB0892-63B1-4B6F-8E7F-5E5581A73563@.microsoft.com...
>
>

how long before sleeping connections disappear

Using SS2000 SP4. How long does it take after a user logs out before their
"sleeping connection" in EM/Current Activity/Process Info disappears? Is
there a way short of rebooting or stopping/starting services to get it to
disappear sooner?
Thanks,
--
Dan D.Hello,
The inactive connections will be removed from SQL Server based on the
application time out setup in appllication layer. Sleeping status doesnt
mean that status is orphan
connection, because most of the time if the process wait for a user Input
or waiting for a lock will be in sleeping mode. It can go for Running
status any time.
Take a look into the below URL:-
http://support.microsoft.com/kb/Q137983
Thanks
Hari
"Dan D." <DanD@.discussions.microsoft.com> wrote in message
news:04CB0892-63B1-4B6F-8E7F-5E5581A73563@.microsoft.com...
> Using SS2000 SP4. How long does it take after a user logs out before their
> "sleeping connection" in EM/Current Activity/Process Info disappears? Is
> there a way short of rebooting or stopping/starting services to get it to
> disappear sooner?
> Thanks,
> --
> Dan D.|||The connections are held until the application closes them. Many
applications use connection pooling so that closed connections are pooled
for reuse. These will disappear after a short period, IIRC 30-60 seconds.
Hope this helps.
Dan Guzman
SQL Server MVP
"Dan D." <DanD@.discussions.microsoft.com> wrote in message
news:04CB0892-63B1-4B6F-8E7F-5E5581A73563@.microsoft.com...
> Using SS2000 SP4. How long does it take after a user logs out before their
> "sleeping connection" in EM/Current Activity/Process Info disappears? Is
> there a way short of rebooting or stopping/starting services to get it to
> disappear sooner?
> Thanks,
> --
> Dan D.|||These connections are persisting longer than that. Maybe the application has
changed the timeout. Thanks.
--
Dan D.
"Dan Guzman" wrote:

> The connections are held until the application closes them. Many
> applications use connection pooling so that closed connections are pooled
> for reuse. These will disappear after a short period, IIRC 30-60 seconds.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Dan D." <DanD@.discussions.microsoft.com> wrote in message
> news:04CB0892-63B1-4B6F-8E7F-5E5581A73563@.microsoft.com...
>|||Interesting article. Thanks.
--
Dan D.
"Hari Prasad" wrote:

> Hello,
> The inactive connections will be removed from SQL Server based on the
> application time out setup in appllication layer. Sleeping status doesnt
> mean that status is orphan
> connection, because most of the time if the process wait for a user Input
> or waiting for a lock will be in sleeping mode. It can go for Running
> status any time.
> Take a look into the below URL:-
> http://support.microsoft.com/kb/Q137983
> Thanks
> Hari
> "Dan D." <DanD@.discussions.microsoft.com> wrote in message
> news:04CB0892-63B1-4B6F-8E7F-5E5581A73563@.microsoft.com...
>
>