Showing posts with label event. Show all posts
Showing posts with label event. Show all posts

Friday, March 30, 2012

Numerous Login failed for user 'sa' entries in the event viewer

Hello,
We have a Windows 2000 Server and SQL Server 2000. Lately in my event
viewer - Application Log I see just thousands of entries that state
18456 :
Login failed for user 'sa'. It happens just at random times and as far
as I know doesn't affect the server or access to it in any way.
Has anyone experinced this before? My first guess would be that it
could be some program trying to use the local 'sa' userID to login in
to SQL.
Any suggestions?
Any help would be greatly appreciated.
AlekHi Alek,
I would suggest using SQL Profiler to trace the login attempts. If your
server is accessed via the Internet I would also look at your firewall logs.
Mike O.
"Alek" <alek@.widernet.org> wrote in message
news:7703dc03.0401151430.e66191f@.posting.google.com...
quote:

> Hello,
> We have a Windows 2000 Server and SQL Server 2000. Lately in my event
> viewer - Application Log I see just thousands of entries that state
> 18456 :
> Login failed for user 'sa'. It happens just at random times and as far
> as I know doesn't affect the server or access to it in any way.
> Has anyone experinced this before? My first guess would be that it
> could be some program trying to use the local 'sa' userID to login in
> to SQL.
> Any suggestions?
> Any help would be greatly appreciated.
>
> Alek

Numerous event 17137 in event log

Hello,
I am using SQL SERVER 2005 EXPRESS SP1 with an ASP.NET application, and I
get an event 17137 "Starting database MyDB" at each connection to my
database, which is a very frequent event.
The problem is that the application event log of the machine is full of this
event, with the consequence on old servers like Windows 2000 to get a message
saying the log is full and you have to empty it.
I would like to know how I can turn off the logging of SQL SERVER event 17137.
--
Olivier GIL
LAFON SAOliver GIL,
Is your MyDB in AUTO_CLOSE = ON mode? If so, you can turn this OFF, thus
keeping MyDB open by:
ALTER DATABASE MyDB SET AUTO_CLOSE OFF
That should get rid of the messages and make your accesses to MyDB run more
quickly.
RLF
"Olivier GIL" <ogil@.newsgroup.nospam> wrote in message
news:D985059D-D4CD-490B-8299-FB4924A4FF7F@.microsoft.com...
> Hello,
> I am using SQL SERVER 2005 EXPRESS SP1 with an ASP.NET application, and I
> get an event 17137 "Starting database MyDB" at each connection to my
> database, which is a very frequent event.
> The problem is that the application event log of the machine is full of
> this
> event, with the consequence on old servers like Windows 2000 to get a
> message
> saying the log is full and you have to empty it.
> I would like to know how I can turn off the logging of SQL SERVER event
> 17137.
> --
> Olivier GIL
> LAFON SA|||Hello,
AUTO_CLOSE OFF actually solves the problem.
It is surprising this option not being the default value for a CREATE
DATABASE command, knowing that the performance is better in that case.
--
Olivier GIL
LAFON SA
"Russell Fields" wrote:
> Oliver GIL,
> Is your MyDB in AUTO_CLOSE = ON mode? If so, you can turn this OFF, thus
> keeping MyDB open by:
> ALTER DATABASE MyDB SET AUTO_CLOSE OFF
> That should get rid of the messages and make your accesses to MyDB run more
> quickly.
> RLF
> "Olivier GIL" <ogil@.newsgroup.nospam> wrote in message
> news:D985059D-D4CD-490B-8299-FB4924A4FF7F@.microsoft.com...
> > Hello,
> >
> > I am using SQL SERVER 2005 EXPRESS SP1 with an ASP.NET application, and I
> > get an event 17137 "Starting database MyDB" at each connection to my
> > database, which is a very frequent event.
> >
> > The problem is that the application event log of the machine is full of
> > this
> > event, with the consequence on old servers like Windows 2000 to get a
> > message
> > saying the log is full and you have to empty it.
> >
> > I would like to know how I can turn off the logging of SQL SERVER event
> > 17137.
> >
> > --
> > Olivier GIL
> > LAFON SA
>
>|||Hi Olivier,
Regarding your concerns, you can find the following description regarding
AUTO_CLOSE OFF in SQL Server Books Online:
AUTO_CLOSE Default Value:
ON for all databases when using Microsoft SQL Server 2000 Desktop Engine or
SQL Server 2005 Express Edition, and OFF for all other editions, regardless
of operating system.
(REF: http://msdn2.microsoft.com/en-us/library/ms190249.aspx)
"The AUTO_CLOSE option is useful for desktop databases because it allows
database files to be managed as normal files. They can be moved, copied to
make backups, or even e-mailed to other users. The AUTO_CLOSE option should
not be used for databases accessed by an application that repeatedly makes
and breaks connections to SQL Server. The overhead of closing and reopening
the database between each connection will impair performance."
(REF: http://technet.microsoft.com/en-us/library/aa933082(SQL.80).aspx)
Please feel free to let us know if you have any other questions or
concerns. Have a nice day!
Best regards,
Charles Wang
Microsoft Online Community Support
=====================================================When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from this issue.
======================================================This posting is provided "AS IS" with no warranties, and confers no rights.
======================================================|||Hello Olivier,
AUTO_CLOSE option if ON by default only for MSDE and Express Editions.
I suggest you to take a look at the following link for further info:
http://msdn2.microsoft.com/en-us/library/ms190249.aspx
--
Ekrem Ã?nsoy
"Olivier GIL" <ogil@.newsgroup.nospam> wrote in message
news:C20E229A-83E5-4D09-9B1F-F830E84EA438@.microsoft.com...
> Hello,
> AUTO_CLOSE OFF actually solves the problem.
>
> It is surprising this option not being the default value for a CREATE
> DATABASE command, knowing that the performance is better in that case.
> --
> Olivier GIL
> LAFON SA
>
> "Russell Fields" wrote:
>> Oliver GIL,
>> Is your MyDB in AUTO_CLOSE = ON mode? If so, you can turn this OFF,
>> thus
>> keeping MyDB open by:
>> ALTER DATABASE MyDB SET AUTO_CLOSE OFF
>> That should get rid of the messages and make your accesses to MyDB run
>> more
>> quickly.
>> RLF
>> "Olivier GIL" <ogil@.newsgroup.nospam> wrote in message
>> news:D985059D-D4CD-490B-8299-FB4924A4FF7F@.microsoft.com...
>> > Hello,
>> >
>> > I am using SQL SERVER 2005 EXPRESS SP1 with an ASP.NET application, and
>> > I
>> > get an event 17137 "Starting database MyDB" at each connection to my
>> > database, which is a very frequent event.
>> >
>> > The problem is that the application event log of the machine is full of
>> > this
>> > event, with the consequence on old servers like Windows 2000 to get a
>> > message
>> > saying the log is full and you have to empty it.
>> >
>> > I would like to know how I can turn off the logging of SQL SERVER event
>> > 17137.
>> >
>> > --
>> > Olivier GIL
>> > LAFON SA
>>

Numerous event 17137 in event log

Hello,
I am using SQL SERVER 2005 EXPRESS SP1 with an ASP.NET application, and I
get an event 17137 "Starting database MyDB" at each connection to my
database, which is a very frequent event.
The problem is that the application event log of the machine is full of this
event, with the consequence on old servers like Windows 2000 to get a messag
e
saying the log is full and you have to empty it.
I would like to know how I can turn off the logging of SQL SERVER event 1713
7.
Olivier GIL
LAFON SAOliver GIL,
Is your MyDB in AUTO_CLOSE = ON mode? If so, you can turn this OFF, thus
keeping MyDB open by:
ALTER DATABASE MyDB SET AUTO_CLOSE OFF
That should get rid of the messages and make your accesses to MyDB run more
quickly.
RLF
"Olivier GIL" <ogil@.newsgroup.nospam> wrote in message
news:D985059D-D4CD-490B-8299-FB4924A4FF7F@.microsoft.com...
> Hello,
> I am using SQL SERVER 2005 EXPRESS SP1 with an ASP.NET application, and I
> get an event 17137 "Starting database MyDB" at each connection to my
> database, which is a very frequent event.
> The problem is that the application event log of the machine is full of
> this
> event, with the consequence on old servers like Windows 2000 to get a
> message
> saying the log is full and you have to empty it.
> I would like to know how I can turn off the logging of SQL SERVER event
> 17137.
> --
> Olivier GIL
> LAFON SA|||Hello,
AUTO_CLOSE OFF actually solves the problem.
It is surprising this option not being the default value for a CREATE
DATABASE command, knowing that the performance is better in that case.
Olivier GIL
LAFON SA
"Russell Fields" wrote:

> Oliver GIL,
> Is your MyDB in AUTO_CLOSE = ON mode? If so, you can turn this OFF, thus
> keeping MyDB open by:
> ALTER DATABASE MyDB SET AUTO_CLOSE OFF
> That should get rid of the messages and make your accesses to MyDB run mor
e
> quickly.
> RLF
> "Olivier GIL" <ogil@.newsgroup.nospam> wrote in message
> news:D985059D-D4CD-490B-8299-FB4924A4FF7F@.microsoft.com...
>
>|||Hi Olivier,
Regarding your concerns, you can find the following description regarding
AUTO_CLOSE OFF in SQL Server Books Online:
AUTO_CLOSE Default Value:
ON for all databases when using Microsoft SQL Server 2000 Desktop Engine or
SQL Server 2005 Express Edition, and OFF for all other editions, regardless
of operating system.
(REF: http://msdn2.microsoft.com/en-us/library/ms190249.aspx)
"The AUTO_CLOSE option is useful for desktop databases because it allows
database files to be managed as normal files. They can be moved, copied to
make backups, or even e-mailed to other users. The AUTO_CLOSE option should
not be used for databases accessed by an application that repeatedly makes
and breaks connections to SQL Server. The overhead of closing and reopening
the database between each connection will impair performance."
(REF: http://technet.microsoft.com/en-us/library/aa933082(SQL.80).aspx)
Please feel free to let us know if you have any other questions or
concerns. Have a nice day!
Best regards,
Charles Wang
Microsoft Online Community Support
========================================
=============
When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from this issue.
========================================
==============
This posting is provided "AS IS" with no warranties, and confers no rights.
========================================
==============|||Hello Olivier,
AUTO_CLOSE option if ON by default only for MSDE and Express Editions.
I suggest you to take a look at the following link for further info:
http://msdn2.microsoft.com/en-us/library/ms190249.aspx
Ekrem ?nsoy
"Olivier GIL" <ogil@.newsgroup.nospam> wrote in message
news:C20E229A-83E5-4D09-9B1F-F830E84EA438@.microsoft.com...[vbcol=seagreen]
> Hello,
> AUTO_CLOSE OFF actually solves the problem.
>
> It is surprising this option not being the default value for a CREATE
> DATABASE command, knowing that the performance is better in that case.
> --
> Olivier GIL
> LAFON SA
>
> "Russell Fields" wrote:
>

Numerous event 17137 in event log

Hello,
I am using SQL SERVER 2005 EXPRESS SP1 with an ASP.NET application, and I
get an event 17137 "Starting database MyDB" at each connection to my
database, which is a very frequent event.
The problem is that the application event log of the machine is full of this
event, with the consequence on old servers like Windows 2000 to get a message
saying the log is full and you have to empty it.
I would like to know how I can turn off the logging of SQL SERVER event 17137.
Olivier GIL
LAFON SA
Oliver GIL,
Is your MyDB in AUTO_CLOSE = ON mode? If so, you can turn this OFF, thus
keeping MyDB open by:
ALTER DATABASE MyDB SET AUTO_CLOSE OFF
That should get rid of the messages and make your accesses to MyDB run more
quickly.
RLF
"Olivier GIL" <ogil@.newsgroup.nospam> wrote in message
news:D985059D-D4CD-490B-8299-FB4924A4FF7F@.microsoft.com...
> Hello,
> I am using SQL SERVER 2005 EXPRESS SP1 with an ASP.NET application, and I
> get an event 17137 "Starting database MyDB" at each connection to my
> database, which is a very frequent event.
> The problem is that the application event log of the machine is full of
> this
> event, with the consequence on old servers like Windows 2000 to get a
> message
> saying the log is full and you have to empty it.
> I would like to know how I can turn off the logging of SQL SERVER event
> 17137.
> --
> Olivier GIL
> LAFON SA
|||Hello,
AUTO_CLOSE OFF actually solves the problem.
It is surprising this option not being the default value for a CREATE
DATABASE command, knowing that the performance is better in that case.
Olivier GIL
LAFON SA
"Russell Fields" wrote:

> Oliver GIL,
> Is your MyDB in AUTO_CLOSE = ON mode? If so, you can turn this OFF, thus
> keeping MyDB open by:
> ALTER DATABASE MyDB SET AUTO_CLOSE OFF
> That should get rid of the messages and make your accesses to MyDB run more
> quickly.
> RLF
> "Olivier GIL" <ogil@.newsgroup.nospam> wrote in message
> news:D985059D-D4CD-490B-8299-FB4924A4FF7F@.microsoft.com...
>
>
|||Hi Olivier,
Regarding your concerns, you can find the following description regarding
AUTO_CLOSE OFF in SQL Server Books Online:
AUTO_CLOSE Default Value:
ON for all databases when using Microsoft SQL Server 2000 Desktop Engine or
SQL Server 2005 Express Edition, and OFF for all other editions, regardless
of operating system.
(REF: http://msdn2.microsoft.com/en-us/library/ms190249.aspx)
"The AUTO_CLOSE option is useful for desktop databases because it allows
database files to be managed as normal files. They can be moved, copied to
make backups, or even e-mailed to other users. The AUTO_CLOSE option should
not be used for databases accessed by an application that repeatedly makes
and breaks connections to SQL Server. The overhead of closing and reopening
the database between each connection will impair performance."
(REF: http://technet.microsoft.com/en-us/library/aa933082(SQL.80).aspx)
Please feel free to let us know if you have any other questions or
concerns. Have a nice day!
Best regards,
Charles Wang
Microsoft Online Community Support
================================================== ===
When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from this issue.
================================================== ====
This posting is provided "AS IS" with no warranties, and confers no rights.
================================================== ====
|||Hello Olivier,
AUTO_CLOSE option if ON by default only for MSDE and Express Editions.
I suggest you to take a look at the following link for further info:
http://msdn2.microsoft.com/en-us/library/ms190249.aspx
Ekrem ?nsoy
"Olivier GIL" <ogil@.newsgroup.nospam> wrote in message
news:C20E229A-83E5-4D09-9B1F-F830E84EA438@.microsoft.com...[vbcol=seagreen]
> Hello,
> AUTO_CLOSE OFF actually solves the problem.
>
> It is surprising this option not being the default value for a CREATE
> DATABASE command, knowing that the performance is better in that case.
> --
> Olivier GIL
> LAFON SA
>
> "Russell Fields" wrote:
sql

Wednesday, March 28, 2012

numeric event log categories

I have been looking at this issue for over a year...but still havent found
the answer?We are running sql2k3p3a and I have noticed that the event log
entries
logged by sql server are coming up with at category that is numeric:
eg:
Event Type: Information
Event Source: MSSQLSERVER
Event Category: (6)
Event ID: 17055
Date: 2/09/2004
Time: 5:01:29 AM
User: N/A
Computer: MIDAS
Other services on the same machine log the category in the normal way:
Event Type: Information
Event Source: SQLSERVERAGENT
Event Category: Service Control
Event ID: 101
Date: 1/09/2004
Time: 5:10:34 PM
User: N/A
Computer: MIDAS
Description:
SQLServerAgent service successfully started.
Has anyone seen anything like this before? Are your MSSQLSERVER event loogin
with text categories or numerics?
Al Blake, Australia
They're text - always have been. I've noticed with Yukon, the categories
have changed from text representations of numbers (like (2) and (6)) to
actual text descriptions (like "server"). But with SQL 2000 they're numbers
as strings. It sucks but there's nothing you can do about it.
Cheers,
Mike
"Al Blake" <al@.blakes.net> wrote in message
news:e3hcusS1EHA.3364@.TK2MSFTNGP12.phx.gbl...
>I have been looking at this issue for over a year...but still havent found
> the answer?We are running sql2k3p3a and I have noticed that the event log
> entries
> logged by sql server are coming up with at category that is numeric:
> eg:
> Event Type: Information
> Event Source: MSSQLSERVER
> Event Category: (6)
> Event ID: 17055
> Date: 2/09/2004
> Time: 5:01:29 AM
> User: N/A
> Computer: MIDAS
> Other services on the same machine log the category in the normal way:
> Event Type: Information
> Event Source: SQLSERVERAGENT
> Event Category: Service Control
> Event ID: 101
> Date: 1/09/2004
> Time: 5:10:34 PM
> User: N/A
> Computer: MIDAS
> Description:
> SQLServerAgent service successfully started.
> Has anyone seen anything like this before? Are your MSSQLSERVER event
> loogin
> with text categories or numerics?
> Al Blake, Australia
>
|||Thanks for the reply Mike.
It's relief to know that there's nothing wrong with our install...even if
it is really crappy
Guess we'll have to wait for Yukon to see real event categories. It's pretty
bizzarre that every other M$ product manages to have 'proper', decriptive,
event catgories yet not their flaship database.
You think someone would have noticed during the build ?
Al.
"Mike Hodgson" <mwh_junk@.hotmail.com> wrote in message
news:ucQm0WT1EHA.4072@.TK2MSFTNGP10.phx.gbl...
> They're text - always have been. I've noticed with Yukon, the categories
> have changed from text representations of numbers (like (2) and (6)) to
> actual text descriptions (like "server"). But with SQL 2000 they're
> numbers as strings. It sucks but there's nothing you can do about it.
> --
> Cheers,
> Mike
> "Al Blake" <al@.blakes.net> wrote in message
> news:e3hcusS1EHA.3364@.TK2MSFTNGP12.phx.gbl...
>

numeric event log categories

I have been looking at this issue for over a year...but still havent found
the answer?We are running sql2k3p3a and I have noticed that the event log
entries
logged by sql server are coming up with at category that is numeric:
eg:
Event Type: Information
Event Source: MSSQLSERVER
Event Category: (6)
Event ID: 17055
Date: 2/09/2004
Time: 5:01:29 AM
User: N/A
Computer: MIDAS
Other services on the same machine log the category in the normal way:
Event Type: Information
Event Source: SQLSERVERAGENT
Event Category: Service Control
Event ID: 101
Date: 1/09/2004
Time: 5:10:34 PM
User: N/A
Computer: MIDAS
Description:
SQLServerAgent service successfully started.
Has anyone seen anything like this before? Are your MSSQLSERVER event loogin
with text categories or numerics?
Al Blake, AustraliaThey're text - always have been. I've noticed with Yukon, the categories
have changed from text representations of numbers (like (2) and (6)) to
actual text descriptions (like "server"). But with SQL 2000 they're numbers
as strings. It sucks but there's nothing you can do about it.
Cheers,
Mike
"Al Blake" <al@.blakes.net> wrote in message
news:e3hcusS1EHA.3364@.TK2MSFTNGP12.phx.gbl...
>I have been looking at this issue for over a year...but still havent found
> the answer?We are running sql2k3p3a and I have noticed that the event log
> entries
> logged by sql server are coming up with at category that is numeric:
> eg:
> Event Type: Information
> Event Source: MSSQLSERVER
> Event Category: (6)
> Event ID: 17055
> Date: 2/09/2004
> Time: 5:01:29 AM
> User: N/A
> Computer: MIDAS
> Other services on the same machine log the category in the normal way:
> Event Type: Information
> Event Source: SQLSERVERAGENT
> Event Category: Service Control
> Event ID: 101
> Date: 1/09/2004
> Time: 5:10:34 PM
> User: N/A
> Computer: MIDAS
> Description:
> SQLServerAgent service successfully started.
> Has anyone seen anything like this before? Are your MSSQLSERVER event
> loogin
> with text categories or numerics?
> Al Blake, Australia
>|||Thanks for the reply Mike.
It's relief to know that there's nothing wrong with our install...even if
it is really crappy
Guess we'll have to wait for Yukon to see real event categories. It's pretty
bizzarre that every other M$ product manages to have 'proper', decriptive,
event catgories yet not their flaship database.
You think someone would have noticed during the build ?
Al.
"Mike Hodgson" <mwh_junk@.hotmail.com> wrote in message
news:ucQm0WT1EHA.4072@.TK2MSFTNGP10.phx.gbl...
> They're text - always have been. I've noticed with Yukon, the categories
> have changed from text representations of numbers (like (2) and (6)) to
> actual text descriptions (like "server"). But with SQL 2000 they're
> numbers as strings. It sucks but there's nothing you can do about it.
> --
> Cheers,
> Mike
> "Al Blake" <al@.blakes.net> wrote in message
> news:e3hcusS1EHA.3364@.TK2MSFTNGP12.phx.gbl...
>

numeric event log categories

I have been looking at this issue for over a year...but still havent found
the answer?We are running sql2k3p3a and I have noticed that the event log
entries
logged by sql server are coming up with at category that is numeric:
eg:
Event Type: Information
Event Source: MSSQLSERVER
Event Category: (6)
Event ID: 17055
Date: 2/09/2004
Time: 5:01:29 AM
User: N/A
Computer: MIDAS
Other services on the same machine log the category in the normal way:
Event Type: Information
Event Source: SQLSERVERAGENT
Event Category: Service Control
Event ID: 101
Date: 1/09/2004
Time: 5:10:34 PM
User: N/A
Computer: MIDAS
Description:
SQLServerAgent service successfully started.
Has anyone seen anything like this before? Are your MSSQLSERVER event loogin
with text categories or numerics?
Al Blake, AustraliaThey're text - always have been. I've noticed with Yukon, the categories
have changed from text representations of numbers (like (2) and (6)) to
actual text descriptions (like "server"). But with SQL 2000 they're numbers
as strings. It sucks but there's nothing you can do about it.
--
Cheers,
Mike
"Al Blake" <al@.blakes.net> wrote in message
news:e3hcusS1EHA.3364@.TK2MSFTNGP12.phx.gbl...
>I have been looking at this issue for over a year...but still havent found
> the answer?We are running sql2k3p3a and I have noticed that the event log
> entries
> logged by sql server are coming up with at category that is numeric:
> eg:
> Event Type: Information
> Event Source: MSSQLSERVER
> Event Category: (6)
> Event ID: 17055
> Date: 2/09/2004
> Time: 5:01:29 AM
> User: N/A
> Computer: MIDAS
> Other services on the same machine log the category in the normal way:
> Event Type: Information
> Event Source: SQLSERVERAGENT
> Event Category: Service Control
> Event ID: 101
> Date: 1/09/2004
> Time: 5:10:34 PM
> User: N/A
> Computer: MIDAS
> Description:
> SQLServerAgent service successfully started.
> Has anyone seen anything like this before? Are your MSSQLSERVER event
> loogin
> with text categories or numerics?
> Al Blake, Australia
>|||Thanks for the reply Mike.
It's relief to know that there's nothing wrong with our install...even if
it is really crappy :)
Guess we'll have to wait for Yukon to see real event categories. It's pretty
bizzarre that every other M$ product manages to have 'proper', decriptive,
event catgories yet not their flaship database.
You think someone would have noticed during the build ?
Al.
"Mike Hodgson" <mwh_junk@.hotmail.com> wrote in message
news:ucQm0WT1EHA.4072@.TK2MSFTNGP10.phx.gbl...
> They're text - always have been. I've noticed with Yukon, the categories
> have changed from text representations of numbers (like (2) and (6)) to
> actual text descriptions (like "server"). But with SQL 2000 they're
> numbers as strings. It sucks but there's nothing you can do about it.
> --
> Cheers,
> Mike
> "Al Blake" <al@.blakes.net> wrote in message
> news:e3hcusS1EHA.3364@.TK2MSFTNGP12.phx.gbl...
>>I have been looking at this issue for over a year...but still havent found
>> the answer?We are running sql2k3p3a and I have noticed that the event log
>> entries
>> logged by sql server are coming up with at category that is numeric:
>> eg:
>> Event Type: Information
>> Event Source: MSSQLSERVER
>> Event Category: (6)
>> Event ID: 17055
>> Date: 2/09/2004
>> Time: 5:01:29 AM
>> User: N/A
>> Computer: MIDAS
>> Other services on the same machine log the category in the normal way:
>> Event Type: Information
>> Event Source: SQLSERVERAGENT
>> Event Category: Service Control
>> Event ID: 101
>> Date: 1/09/2004
>> Time: 5:10:34 PM
>> User: N/A
>> Computer: MIDAS
>> Description:
>> SQLServerAgent service successfully started.
>> Has anyone seen anything like this before? Are your MSSQLSERVER event
>> loogin
>> with text categories or numerics?
>> Al Blake, Australia
>>
>

Wednesday, March 21, 2012

Number of indexes can affect performance event in nearly read-only table?

I have a table with something like 4.000.000 rows, but only once per
day about 200 rows are inserted by an application, running as a
scheduled job.
So few writes per day are performed, but many reads are executed.
We have on this table 1 clustered index and 5 non-clustered indexes:
this is because the queryes applied to this table are very different,
and we have to use very different indexes.
Could the number of indexes affect performance, even if this is mainly
a read-only table?
Is there a 'maximum' number of indexes suggested for such large tables,
or i can build as many indexes as i want, nearly one for each 'where'
clause applied to the table?
Thnx i.a. for the answer
MarcoM. Simioni (m.simioni@.gmail.com) writes:
> Could the number of indexes affect performance, even if this is mainly
> a read-only table?
> Is there a 'maximum' number of indexes suggested for such large tables,
> or i can build as many indexes as i want, nearly one for each 'where'
> clause applied to the table?
The maximum number of tables is 250 if memory serves.
Can the number of index on a read-only table affect performance negatively?
Yes, from two different angles: 1) the optimizer gets more choices, and it
can take longer time to build the query plan. 2) the optimizer can pick an
index which it shouldn't. None of these issues should be given too much
weight. Most of the time the compilation time for a query is worth the
wait. And it's only occasionally the optimizer picks the wrong index. (But
I ran into that yesterday, when a customer got a problem with running a
stored procedure, and all that had happened was that I had added an index
to a table.)
So, if you feel that your table could benefit from more indexes, just do
adding them.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx