Showing posts with label windows. Show all posts
Showing posts with label windows. Show all posts

Monday, March 26, 2012

More details

I plan to upgrade my server to SQL 2005. It is a rather old machine, but still ok with the recommended hardware requirements.

It runs Windows 2000 (SBS) server, which is also a PDC, DHCP, DNS, Exchange server (I stop here but the list is long), with SQL Server 2000 Standard Edition (one single named instance). Everything localized (Italian).

I upgraded the database in a development machine and it works perfectly.

I installed SQL 2005 Standard Edition (English locale) on the server (default instance, MSSQLSERVER), and I have run in a lot of troubles.

The problem seems to reside in the TCPIP network protocols. If I enable TCPIP in the 2005 Server Configuration Manager, the new instance (MSSQLSERVER) does not start (this prevented me from upgrading to SP1 until I realized the cause, disabled TCPIP protocol and was finally able to update).

If I understand correctly, the problem is that both instances, the old 2000 one and the new one, try to listen to 1433 port. I changed manually the port to 1434 in the Server Configuration Manager. The result is that both SQL servers work, but none is working ok. I have several applications accessing the server. The asp application works. The .NET aspx one doesn't.

A tipical error I get is:

Codice evento: 3005
Messaggio evento: Eccezione non gestita. (Unhandled exception)
Ora evento: 04/05/2006 13.42.26
Ora evento (UTC): 04/05/2006 11.42.26
ID evento: 7c2749235b7d4c578591871217f74046
Sequenza evento: 175
Occorrenza evento: 24
Codice dettagli evento: 0
Informazioni applicazione:

Dominio applicazione: /LM/W3SVC/1/Root/intranet-1-127912101551093750
Livello di attendibilità: Full
Percorso virtuale applicazione: /intranet
Percorso applicazione: F:\Inetpub\wwwroot\intranet\
Nome computer: IQ
Informazioni processo:
ID processo: 684
Nome processo: aspnet_wp.exe
Nome account: mycompany\IWAM_IQ
Informazioni eccezione:
Tipo di eccezione: SqlException
Messaggio eccezione: Login failed for user 'mycompany\stefania'.
Informazioni richiesta:
URL richiesta: http://intranet/intranet/articoli/venditeProd.aspx?Codice=SOL T1
Percorso richiesta: /intranet/articoli/venditeProd.aspx
Indirizzo host utente: 10.0.0.127
Utente: mycompany\stefania
Autenticazione: True
Tipo di autenticazione: NTLM
Nome account thread: mycompany\IWAM_IQ
Informazioni thread:
ID thread: 1
Nome account thread: mycompany\IWAM_IQ
Rappresentazione: True
Analisi dello stack: in System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
in System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
in System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
in System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)
in System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
in System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
in System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
in System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
in System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
in System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
in System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
in System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
in System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
in System.Data.SqlClient.SqlConnection.Open()
in intranet.Global.Session_Start(Object sender, EventArgs e)
in System.Web.SessionState.SessionStateModule.RaiseOnStart(EventArgs e)
in System.Web.SessionState.SessionStateModule.CompleteAcquireState()
in System.Web.SessionState.SessionStateModule.BeginAcquireState(Object source, EventArgs e, AsyncCallback cb, Object extraData)
in System.Web.HttpApplication.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
in System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

I also tried to use named pipes on the 2005, but I was unable to access the SQL 2005 server instance from a network computer running the Management Studio. I need to have the new SQL server working besides the old one, for a short period, to evaluate in the production environment if the legacy hardware is actually ok to support it. Any ideas?

You should probably try a different group than Setup & Upgrade. Looks like your upgrade went through fine but now have connectivity issues.|||

Actually this IS a "setup" issue, of course tied to a connectivity problem. I could not find a more appropriate "SQL connectivity" forum anyway.

I even run in installation issues, and maybe someone at MS is interested to know: the setup routine installed the SQL 2005 server engine, but was unable to install the reporting services because it was unable to run the engine (it turned on TCPIP listening on port 1433 by default, which collided with the old 2000 instance).

I did some more research yesterday. Things are really strange. I installed the SQL Server Management Studio Express also locally on the server (I didn't originally install the management tools with the 2005 installation, because I counted on administering from the network). If I turn on either named pipes or TCPIP on the new 2005 instance (which is the default instance), the mess begins as I described above. Some applications work, correctly connecting to the 2000 named instance (namely the old ASP application). Some other not (namely the new ASPX application, which probably tries to connect to the new 2005 instance, and reports the impossibility to authenticate, because the user login is not registered in that instance).

The funny thing is that if I run the Management Studio Express, I can connect to both the default instance (which is supposed to be 2005) and the named instance. But actually both connections point to the old instance (with the old db's, and a 8.0.2039 server version string). And the Management Studio shouldn't even use named pipes or TCPIP, but instead should use shared memory to connect to local db's!

If I turn off the TCPIP or named pipes protocols for the 2005 instance, everything works ok, and I correctly connect to both instances in Management Studio (but I cannot connect from the network!).

|||

Well, after more trying, here is what I found.

I disabled shared memory in both Network Configuration and Native Client on the server, using the SQL Server Configuration Manager. I enabled just TCPIP on port 1434. I started the 2005 instance. It starts ok, no problem with any application.

But I cannot see the 2005 instance, no way. The SQL Sever Management Studio (in both the server or a network client computer) seem to connect to both the default instance (2005) and the named instance (2000). But they actually connect to the same instance (the 2000 one).

At this point I think the problem arises installing a new 2005 default instance when there is a 2000 named instance. I must say in that server I previously had a 2000 default instance, which was uninstalled long time ago. Maybe that has left traces that now are messing up the configuration and confuse the SQL browser?

I could probably try installing a new 2005 named instance to see if this leads to anything. But I will instead migrate the databases to the 2005, assuming everything will work. I will do that through backup, shut down the 2000 for good, and restore in 2005 hoping there will be no necessity of turning back!

moount points

I know how to create mount point in windows 20003 cluster, I am not sure how
to set it up with SQL 2005 running on the cluster.
Does sql need to be dependant on any of the disks? I have tried looking for
a guide, but cannot find.
current setup active active cluster running. I need to add san space which
will hold the databases. The san will be carved up into drive letters. each
drive letter will hold 3 mount points.
ie.
node 1
J:-2 mount point
k:2 mount point
l:2 mount point
node 2-
r:-2 mount point
s:2 mount point
t:2 mount point
each node would be able to own the disk if the other node failed over.
any help is appreciate. I have tried books online etc.. cannot find a good
step by step.;
Vision,
there are three area's you want to get familiar with prior to setting up a
production cluster
1) how to setup mountpoints in a cluster
http://support.microsoft.com/kb/280297
2) Be aware of this one, I have seen this once or twice after installing
SP1, if you do not have the symptom you do not need the hotfix.
http://support.microsoft.com/kb/898790
3) SQL 2005 and mount points
http://www.microsoft.com/technet/prodtechnol/sql/2005/physdbstor.mspx
http://support.microsoft.com/kb/819546
Test everything thoroughly before you put this into any production.
HTH,
_Edwin.
"vision" <vision@.discussions.microsoft.com> wrote in message
news:F0C6D7D8-F9F2-46DF-A128-2D384DACD40C@.microsoft.com...
> I know how to create mount point in windows 20003 cluster, I am not sure
how
> to set it up with SQL 2005 running on the cluster.
> Does sql need to be dependant on any of the disks? I have tried looking
for
> a guide, but cannot find.
> current setup active active cluster running. I need to add san space
which
> will hold the databases. The san will be carved up into drive letters.
each
> drive letter will hold 3 mount points.
> ie.
> node 1
> J:-2 mount point
> k:2 mount point
> l:2 mount point
> node 2-
> r:-2 mount point
> s:2 mount point
> t:2 mount point
> each node would be able to own the disk if the other node failed over.
> any help is appreciate. I have tried books online etc.. cannot find a
good
> step by step.;

Wednesday, March 21, 2012

monitoring tables access

I have a sql server 2000 in windows 2003 domain.
A third part software connects to this sql and make query and it writes
record.
How can I keep track of the activity of this software on sql tables ?
Can I see which query the software make on the sql?
Many Thanks
> Can I see which query the software make on the sql?
SQL Profiler is your friend. Do please check it in Books OnLine.
Dejan Sarka, SQL Server MVP
Mentor, www.SolidQualityLearning.com
Anything written in this message represents solely the point of view of the
sender.
This message does not imply endorsement from Solid Quality Learning, and it
does not represent the point of view of Solid Quality Learning or any other
person, company or institution mentioned in this message

monitoring tables access

I have a sql server 2000 in windows 2003 domain.
A third part software connects to this sql and make query and it writes
record.
How can I keep track of the activity of this software on sql tables ?
Can I see which query the software make on the sql?
Many Thanks> Can I see which query the software make on the sql?
SQL Profiler is your friend. Do please check it in Books OnLine.
Dejan Sarka, SQL Server MVP
Mentor, www.SolidQualityLearning.com
Anything written in this message represents solely the point of view of the
sender.
This message does not imply endorsement from Solid Quality Learning, and it
does not represent the point of view of Solid Quality Learning or any other
person, company or institution mentioned in this message

monitoring tables access

I have a sql server 2000 in windows 2003 domain.
A third part software connects to this sql and make query and it writes
record.
How can I keep track of the activity of this software on sql tables ?
Can I see which query the software make on the sql?
Many Thanks> Can I see which query the software make on the sql?
SQL Profiler is your friend. Do please check it in Books OnLine.
--
Dejan Sarka, SQL Server MVP
Mentor, www.SolidQualityLearning.com
Anything written in this message represents solely the point of view of the
sender.
This message does not imply endorsement from Solid Quality Learning, and it
does not represent the point of view of Solid Quality Learning or any other
person, company or institution mentioned in this message

Monday, March 19, 2012

Monitoring SQL Server Error Message - Severity Level Messages

Hello,
Do SQL server error messages (severilty level messages 11-16 & 17-25),
both 2000 & 2005, get written to the Windows Application Log, as well
as, the SQL server error log? I mainly monitor the server externally
(Windows Event Logs) and would like to NOT have to configure a MAPI
client on SQL to receive the SQL server severity errors.
Thanks,
Dan
The ones that are written to the errorlog are also written to the eventlog.
However, whether an error is to be written to eventlog/errorlog depends on whether it is configured
to do so. In 2000, sysmessages table, check the dlevel column. In 2005, check sys.messages. In 2000,
you can specify whether an error is to be logged (using sp_altermessage), but not in 2005.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"danfoxley@.anon.postalias" <danfoxley@.gmail.com> wrote in message
news:1187251441.579647.169310@.i38g2000prf.googlegr oups.com...
> Hello,
> Do SQL server error messages (severilty level messages 11-16 & 17-25),
> both 2000 & 2005, get written to the Windows Application Log, as well
> as, the SQL server error log? I mainly monitor the server externally
> (Windows Event Logs) and would like to NOT have to configure a MAPI
> client on SQL to receive the SQL server severity errors.
> Thanks,
> Dan
>

Monitoring SQL Server Error Message - Severity Level Messages

Hello,
Do SQL server error messages (severilty level messages 11-16 & 17-25),
both 2000 & 2005, get written to the Windows Application Log, as well
as, the SQL server error log? I mainly monitor the server externally
(Windows Event Logs) and would like to NOT have to configure a MAPI
client on SQL to receive the SQL server severity errors.
Thanks,
DanThe ones that are written to the errorlog are also written to the eventlog.
However, whether an error is to be written to eventlog/errorlog depends on whether it is configured
to do so. In 2000, sysmessages table, check the dlevel column. In 2005, check sys.messages. In 2000,
you can specify whether an error is to be logged (using sp_altermessage), but not in 2005.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"danfoxley@.anon.postalias" <danfoxley@.gmail.com> wrote in message
news:1187251441.579647.169310@.i38g2000prf.googlegroups.com...
> Hello,
> Do SQL server error messages (severilty level messages 11-16 & 17-25),
> both 2000 & 2005, get written to the Windows Application Log, as well
> as, the SQL server error log? I mainly monitor the server externally
> (Windows Event Logs) and would like to NOT have to configure a MAPI
> client on SQL to receive the SQL server severity errors.
> Thanks,
> Dan
>

Monitoring SQL Server Error Message - Severity Level Messages

Hello,
Do SQL server error messages (severilty level messages 11-16 & 17-25),
both 2000 & 2005, get written to the Windows Application Log, as well
as, the SQL server error log? I mainly monitor the server externally
(Windows Event Logs) and would like to NOT have to configure a MAPI
client on SQL to receive the SQL server severity errors.
Thanks,
DanThe ones that are written to the errorlog are also written to the eventlog.
However, whether an error is to be written to eventlog/errorlog depends on w
hether it is configured
to do so. In 2000, sysmessages table, check the dlevel column. In 2005, chec
k sys.messages. In 2000,
you can specify whether an error is to be logged (using sp_altermessage), bu
t not in 2005.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"danfoxley@.anon.postalias" <danfoxley@.gmail.com> wrote in message
news:1187251441.579647.169310@.i38g2000prf.googlegroups.com...
> Hello,
> Do SQL server error messages (severilty level messages 11-16 & 17-25),
> both 2000 & 2005, get written to the Windows Application Log, as well
> as, the SQL server error log? I mainly monitor the server externally
> (Windows Event Logs) and would like to NOT have to configure a MAPI
> client on SQL to receive the SQL server severity errors.
> Thanks,
> Dan
>

Saturday, February 25, 2012

Monitor CPU Usage by Query?

We are currently running MS SQL 8.0 on Windows 2003. I've been tasked
setting up a monitor that can identify queries that are causing CPU
spikes.
Does anyone have any suggestions about going about this? I'm at a
complete loss.The Profiler can do this. Create a new trace using the SQLProfilerStandard
trace template and add the CPU column. This will show both the query and the
CPU time, plus some other stuff. If this is a super busy production server
this can degrade performance so you might want to play with it on a test db
instance first. I typically run it from my desktop or from a remote desktop
and save the results to a local file cause if you write the result to the db
you are monitoring it too can impact your findings.
Netmon
"quixster@.gmail.com" wrote:
> We are currently running MS SQL 8.0 on Windows 2003. I've been tasked
> setting up a monitor that can identify queries that are causing CPU
> spikes.
> Does anyone have any suggestions about going about this? I'm at a
> complete loss.
>|||Thanks for the tip! Do you know of any way to use this or some other
utility to create an alert for administrators to receive when a query
has risen above a certain threshold? I can see how I can filter the
trace for CPU usage of a certain level, but I don't see how I could use
that to create an alert. Any thoughts?
On Oct 31, 2:21 pm, Netmon <Net...@.discussions.microsoft.com> wrote:
> The Profiler can do this. Create a new trace using the SQLProfilerStandard
> trace template and add the CPU column. This will show both the query and the
> CPU time, plus some other stuff. If this is a super busy production server
> this can degrade performance so you might want to play with it on a test db
> instance first. I typically run it from my desktop or from a remote desktop
> and save the results to a local file cause if you write the result to the db
> you are monitoring it too can impact your findings.
> Netmon
>
> "quixs...@.gmail.com" wrote:
> > We are currently running MS SQL 8.0 on Windows 2003. I've been tasked
> > setting up a monitor that can identify queries that are causing CPU
> > spikes.
> > Does anyone have any suggestions about going about this? I'm at a
> > complete loss.- Hide quoted text -- Show quoted text -|||You can also use this query to see what's using the CPU - highest to
lowest usage:
SELECT * FROM master..sysprocesses ORDER BY cpu DESC
Then, run this to see the actual query:
DBCC INPUTBUFFER (spid) -- spid being the # in the spid column from the
above query
hth
quixster@.gmail.com wrote:
> We are currently running MS SQL 8.0 on Windows 2003. I've been tasked
> setting up a monitor that can identify queries that are causing CPU
> spikes.
> Does anyone have any suggestions about going about this? I'm at a
> complete loss.|||You can also use the windows tool PerfMon on the server and set up your
own custom traces which can viewed realtime or logged to files and
replayed.
quixster@.gmail.com wrote:
> We are currently running MS SQL 8.0 on Windows 2003. I've been tasked
> setting up a monitor that can identify queries that are causing CPU
> spikes.
> Does anyone have any suggestions about going about this? I'm at a
> complete loss.|||No the trace is not going to do that. I'v heard that NetIQ has a product
that monitors for query execution but I'm not sure of the details on how it
works.
Like the other person (tootsuite) posted you could use perfmon however it
does not take sustained thresholds, that is if CPU > 90% over 60 seconds then
alert. So anytime the CPU is above your threshold it will alert even if it
is a short lived spike you get alerted.
I'm not sure the context within which you want to filter the trace to
generate an alert. If you have any enterprise server monitoring tools like
ProIT, MOM or Nimbus available you could just monitor the CPU via those and
have it email your admin.
Are you hoping to find the rogue/cpu intense queries in action? Or are you
desiring to know when the CPU gets hammered so an admin can log in and kill
the offending query or find out the user running it?
"quixster@.gmail.com" wrote:
> Thanks for the tip! Do you know of any way to use this or some other
> utility to create an alert for administrators to receive when a query
> has risen above a certain threshold? I can see how I can filter the
> trace for CPU usage of a certain level, but I don't see how I could use
> that to create an alert. Any thoughts?
>
> On Oct 31, 2:21 pm, Netmon <Net...@.discussions.microsoft.com> wrote:
> > The Profiler can do this. Create a new trace using the SQLProfilerStandard
> > trace template and add the CPU column. This will show both the query and the
> > CPU time, plus some other stuff. If this is a super busy production server
> > this can degrade performance so you might want to play with it on a test db
> > instance first. I typically run it from my desktop or from a remote desktop
> > and save the results to a local file cause if you write the result to the db
> > you are monitoring it too can impact your findings.
> >
> > Netmon
> >
> >
> >
> > "quixs...@.gmail.com" wrote:
> > > We are currently running MS SQL 8.0 on Windows 2003. I've been tasked
> > > setting up a monitor that can identify queries that are causing CPU
> > > spikes.
> >
> > > Does anyone have any suggestions about going about this? I'm at a
> > > complete loss.- Hide quoted text -- Show quoted text -
>|||Perfmon is just a general monitoring tool... you cannot see individual
queries.
Usually it works like this:
1. end users complain
2. look at overall picture using tool like perfmon or Quest Performance
Analysis, or even profiler (I find profiler to be flaky/unpredictable
at times, at least in 2000 it was terrible)
3. isolate queries using Quest based on various factors
4. most of our performance problems in the past have stemmed from
inadequate memory, which then in turns affects cpu, disk i/o, which
leads to blocking locks, etc - fortunately this has been resolved with
the purchase of higher performance servers + memory
so it's not enough to just isolate cpu performance, as many factors are
usually involved
so your cpu might be hammered, but the real underlying problem could be
lack of memory, etc but you wouldn't know that unless you can look at
all the various possible factors
Netmon wrote:
> No the trace is not going to do that. I'v heard that NetIQ has a product
> that monitors for query execution but I'm not sure of the details on how it
> works.
> Like the other person (tootsuite) posted you could use perfmon however it
> does not take sustained thresholds, that is if CPU > 90% over 60 seconds then
> alert. So anytime the CPU is above your threshold it will alert even if it
> is a short lived spike you get alerted.
> I'm not sure the context within which you want to filter the trace to
> generate an alert. If you have any enterprise server monitoring tools like
> ProIT, MOM or Nimbus available you could just monitor the CPU via those and
> have it email your admin.
> Are you hoping to find the rogue/cpu intense queries in action? Or are you
> desiring to know when the CPU gets hammered so an admin can log in and kill
> the offending query or find out the user running it?
> "quixster@.gmail.com" wrote:
> >
> > Thanks for the tip! Do you know of any way to use this or some other
> > utility to create an alert for administrators to receive when a query
> > has risen above a certain threshold? I can see how I can filter the
> > trace for CPU usage of a certain level, but I don't see how I could use
> > that to create an alert. Any thoughts?
> >
> >
> > On Oct 31, 2:21 pm, Netmon <Net...@.discussions.microsoft.com> wrote:
> > > The Profiler can do this. Create a new trace using the SQLProfilerStandard
> > > trace template and add the CPU column. This will show both the query and the
> > > CPU time, plus some other stuff. If this is a super busy production server
> > > this can degrade performance so you might want to play with it on a test db
> > > instance first. I typically run it from my desktop or from a remote desktop
> > > and save the results to a local file cause if you write the result to the db
> > > you are monitoring it too can impact your findings.
> > >
> > > Netmon
> > >
> > >
> > >
> > > "quixs...@.gmail.com" wrote:
> > > > We are currently running MS SQL 8.0 on Windows 2003. I've been tasked
> > > > setting up a monitor that can identify queries that are causing CPU
> > > > spikes.
> > >
> > > > Does anyone have any suggestions about going about this? I'm at a
> > > > complete loss.- Hide quoted text -- Show quoted text -
> >
> >|||The first; trying to find rogue/cpu intense queries in action so we can
identify not only the query causing the problem, but perhaps what else
is occuring simultaneously that could be contributing to the high CPU
situation. We have MOM, and it can alert us to CPU incidents, but I
was hoping to find something that could single out the individual
queries that are running to create the incident.
On Oct 31, 4:30 pm, Netmon <Net...@.discussions.microsoft.com> wrote:
> No the trace is not going to do that. I'v heard that NetIQ has a product
> that monitors for query execution but I'm not sure of the details on how it
> works.
> Like the other person (tootsuite) posted you could use perfmon however it
> does not take sustained thresholds, that is if CPU > 90% over 60 seconds then
> alert. So anytime the CPU is above your threshold it will alert even if it
> is a short lived spike you get alerted.
> I'm not sure the context within which you want to filter the trace to
> generate an alert. If you have any enterprise server monitoring tools like
> ProIT, MOM or Nimbus available you could just monitor the CPU via those and
> have it email your admin.
> Are you hoping to find the rogue/cpu intense queries in action? Or are you
> desiring to know when the CPU gets hammered so an admin can log in and kill
> the offending query or find out the user running it?
>
> "quixs...@.gmail.com" wrote:
> > Thanks for the tip! Do you know of any way to use this or some other
> > utility to create an alert for administrators to receive when a query
> > has risen above a certain threshold? I can see how I can filter the
> > trace for CPU usage of a certain level, but I don't see how I could use
> > that to create an alert. Any thoughts?
> > On Oct 31, 2:21 pm, Netmon <Net...@.discussions.microsoft.com> wrote:
> > > The Profiler can do this. Create a new trace using the SQLProfilerStandard
> > > trace template and add the CPU column. This will show both the query and the
> > > CPU time, plus some other stuff. If this is a super busy production server
> > > this can degrade performance so you might want to play with it on a test db
> > > instance first. I typically run it from my desktop or from a remote desktop
> > > and save the results to a local file cause if you write the result to the db
> > > you are monitoring it too can impact your findings.
> > > Netmon
> > > "quixs...@.gmail.com" wrote:
> > > > We are currently running MS SQL 8.0 on Windows 2003. I've been tasked
> > > > setting up a monitor that can identify queries that are causing CPU
> > > > spikes.
> > > > Does anyone have any suggestions about going about this? I'm at a
> > > > complete loss.- Hide quoted text -- Show quoted text -- Hide quoted text -- Show quoted text -|||Yes, you can do this easily using the query I provided in an earlier
post.
SELECT * FROM master..sysprocesses ORDER BY cpu DESC
DBCC INPUTBUFFER (spid) -- shows query
it can't get much clearer than this - it will list processes by CPU
usage, highest to lowest, at the given point in time you run the stmt
Or you can invest in some type of monitoring tool, like Quest
(performance analysis) or some other tool that you like if you need to
examine various performance indicators - this is what I would recommend
for a long term solution
hth
quixster@.gmail.com wrote:
> The first; trying to find rogue/cpu intense queries in action so we can
> identify not only the query causing the problem, but perhaps what else
> is occuring simultaneously that could be contributing to the high CPU
> situation. We have MOM, and it can alert us to CPU incidents, but I
> was hoping to find something that could single out the individual
> queries that are running to create the incident.
>
> On Oct 31, 4:30 pm, Netmon <Net...@.discussions.microsoft.com> wrote:
> > No the trace is not going to do that. I'v heard that NetIQ has a product
> > that monitors for query execution but I'm not sure of the details on how it
> > works.
> >
> > Like the other person (tootsuite) posted you could use perfmon however it
> > does not take sustained thresholds, that is if CPU > 90% over 60 seconds then
> > alert. So anytime the CPU is above your threshold it will alert even if it
> > is a short lived spike you get alerted.
> >
> > I'm not sure the context within which you want to filter the trace to
> > generate an alert. If you have any enterprise server monitoring tools like
> > ProIT, MOM or Nimbus available you could just monitor the CPU via those and
> > have it email your admin.
> >
> > Are you hoping to find the rogue/cpu intense queries in action? Or are you
> > desiring to know when the CPU gets hammered so an admin can log in and kill
> > the offending query or find out the user running it?
> >
> >
> >
> > "quixs...@.gmail.com" wrote:
> >
> > > Thanks for the tip! Do you know of any way to use this or some other
> > > utility to create an alert for administrators to receive when a query
> > > has risen above a certain threshold? I can see how I can filter the
> > > trace for CPU usage of a certain level, but I don't see how I could use
> > > that to create an alert. Any thoughts?
> >
> > > On Oct 31, 2:21 pm, Netmon <Net...@.discussions.microsoft.com> wrote:
> > > > The Profiler can do this. Create a new trace using the SQLProfilerStandard
> > > > trace template and add the CPU column. This will show both the query and the
> > > > CPU time, plus some other stuff. If this is a super busy production server
> > > > this can degrade performance so you might want to play with it on a test db
> > > > instance first. I typically run it from my desktop or from a remote desktop
> > > > and save the results to a local file cause if you write the result to the db
> > > > you are monitoring it too can impact your findings.
> >
> > > > Netmon
> >
> > > > "quixs...@.gmail.com" wrote:
> > > > > We are currently running MS SQL 8.0 on Windows 2003. I've been tasked
> > > > > setting up a monitor that can identify queries that are causing CPU
> > > > > spikes.
> >
> > > > > Does anyone have any suggestions about going about this? I'm at a
> > > > > complete loss.- Hide quoted text -- Show quoted text -- Hide quoted text -- Show quoted text -|||Thanks for all the help! I'm taking the tips mentioned on this post
and also talking to a Quest rep about "Spotlight on SQL Server
Enterprise" http://www.quest.com/spotlight_on_sql_server_enterprise/
This has been immensely helpful!
On Nov 1, 11:20 am, tootsu...@.gmail.com wrote:
> Yes, you can do this easily using the query I provided in an earlier
> post.
> SELECT * FROM master..sysprocesses ORDER BY cpu DESC
> DBCC INPUTBUFFER (spid) -- shows query
> it can't get much clearer than this - it will list processes by CPU
> usage, highest to lowest, at the given point in time you run the stmt
> Or you can invest in some type of monitoring tool, like Quest
> (performance analysis) or some other tool that you like if you need to
> examine various performance indicators - this is what I would recommend
> for a long term solution
> hth
>
> quixs...@.gmail.com wrote:
> > The first; trying to find rogue/cpu intense queries in action so we can
> > identify not only the query causing the problem, but perhaps what else
> > is occuring simultaneously that could be contributing to the high CPU
> > situation. We have MOM, and it can alert us to CPU incidents, but I
> > was hoping to find something that could single out the individual
> > queries that are running to create the incident.
> > On Oct 31, 4:30 pm, Netmon <Net...@.discussions.microsoft.com> wrote:
> > > No the trace is not going to do that. I'v heard that NetIQ has a product
> > > that monitors for query execution but I'm not sure of the details on how it
> > > works.
> > > Like the other person (tootsuite) posted you could use perfmon however it
> > > does not take sustained thresholds, that is if CPU > 90% over 60 seconds then
> > > alert. So anytime the CPU is above your threshold it will alert even if it
> > > is a short lived spike you get alerted.
> > > I'm not sure the context within which you want to filter the trace to
> > > generate an alert. If you have any enterprise server monitoring tools like
> > > ProIT, MOM or Nimbus available you could just monitor the CPU via those and
> > > have it email your admin.
> > > Are you hoping to find the rogue/cpu intense queries in action? Or are you
> > > desiring to know when the CPU gets hammered so an admin can log in and kill
> > > the offending query or find out the user running it?
> > > "quixs...@.gmail.com" wrote:
> > > > Thanks for the tip! Do you know of any way to use this or some other
> > > > utility to create an alert for administrators to receive when a query
> > > > has risen above a certain threshold? I can see how I can filter the
> > > > trace for CPU usage of a certain level, but I don't see how I could use
> > > > that to create an alert. Any thoughts?
> > > > On Oct 31, 2:21 pm, Netmon <Net...@.discussions.microsoft.com> wrote:
> > > > > The Profiler can do this. Create a new trace using the SQLProfilerStandard
> > > > > trace template and add the CPU column. This will show both the query and the
> > > > > CPU time, plus some other stuff. If this is a super busy production server
> > > > > this can degrade performance so you might want to play with it on a test db
> > > > > instance first. I typically run it from my desktop or from a remote desktop
> > > > > and save the results to a local file cause if you write the result to the db
> > > > > you are monitoring it too can impact your findings.
> > > > > Netmon
> > > > > "quixs...@.gmail.com" wrote:
> > > > > > We are currently running MS SQL 8.0 on Windows 2003. I've been tasked
> > > > > > setting up a monitor that can identify queries that are causing CPU
> > > > > > spikes.
> > > > > > Does anyone have any suggestions about going about this? I'm at a
> > > > > > complete loss.- Hide quoted text -- Show quoted text -- Hide quoted text -- Show quoted text -- Hide quoted text -- Show quoted text -|||Another product that you might want to consider is Idera Diagnostic Manager
http://www.idera.com/Products/SQLdm/Default.aspx
Lucas
"quixster@.gmail.com" wrote:
> Thanks for all the help! I'm taking the tips mentioned on this post
> and also talking to a Quest rep about "Spotlight on SQL Server
> Enterprise" http://www.quest.com/spotlight_on_sql_server_enterprise/
> This has been immensely helpful!
> On Nov 1, 11:20 am, tootsu...@.gmail.com wrote:
> > Yes, you can do this easily using the query I provided in an earlier
> > post.
> >
> > SELECT * FROM master..sysprocesses ORDER BY cpu DESC
> > DBCC INPUTBUFFER (spid) -- shows query
> >
> > it can't get much clearer than this - it will list processes by CPU
> > usage, highest to lowest, at the given point in time you run the stmt
> >
> > Or you can invest in some type of monitoring tool, like Quest
> > (performance analysis) or some other tool that you like if you need to
> > examine various performance indicators - this is what I would recommend
> > for a long term solution
> >
> > hth
> >
> >
> >
> > quixs...@.gmail.com wrote:
> > > The first; trying to find rogue/cpu intense queries in action so we can
> > > identify not only the query causing the problem, but perhaps what else
> > > is occuring simultaneously that could be contributing to the high CPU
> > > situation. We have MOM, and it can alert us to CPU incidents, but I
> > > was hoping to find something that could single out the individual
> > > queries that are running to create the incident.
> >
> > > On Oct 31, 4:30 pm, Netmon <Net...@.discussions.microsoft.com> wrote:
> > > > No the trace is not going to do that. I'v heard that NetIQ has a product
> > > > that monitors for query execution but I'm not sure of the details on how it
> > > > works.
> >
> > > > Like the other person (tootsuite) posted you could use perfmon however it
> > > > does not take sustained thresholds, that is if CPU > 90% over 60 seconds then
> > > > alert. So anytime the CPU is above your threshold it will alert even if it
> > > > is a short lived spike you get alerted.
> >
> > > > I'm not sure the context within which you want to filter the trace to
> > > > generate an alert. If you have any enterprise server monitoring tools like
> > > > ProIT, MOM or Nimbus available you could just monitor the CPU via those and
> > > > have it email your admin.
> >
> > > > Are you hoping to find the rogue/cpu intense queries in action? Or are you
> > > > desiring to know when the CPU gets hammered so an admin can log in and kill
> > > > the offending query or find out the user running it?
> >
> > > > "quixs...@.gmail.com" wrote:
> >
> > > > > Thanks for the tip! Do you know of any way to use this or some other
> > > > > utility to create an alert for administrators to receive when a query
> > > > > has risen above a certain threshold? I can see how I can filter the
> > > > > trace for CPU usage of a certain level, but I don't see how I could use
> > > > > that to create an alert. Any thoughts?
> >
> > > > > On Oct 31, 2:21 pm, Netmon <Net...@.discussions.microsoft.com> wrote:
> > > > > > The Profiler can do this. Create a new trace using the SQLProfilerStandard
> > > > > > trace template and add the CPU column. This will show both the query and the
> > > > > > CPU time, plus some other stuff. If this is a super busy production server
> > > > > > this can degrade performance so you might want to play with it on a test db
> > > > > > instance first. I typically run it from my desktop or from a remote desktop
> > > > > > and save the results to a local file cause if you write the result to the db
> > > > > > you are monitoring it too can impact your findings.
> >
> > > > > > Netmon
> >
> > > > > > "quixs...@.gmail.com" wrote:
> > > > > > > We are currently running MS SQL 8.0 on Windows 2003. I've been tasked
> > > > > > > setting up a monitor that can identify queries that are causing CPU
> > > > > > > spikes.
> >
> > > > > > > Does anyone have any suggestions about going about this? I'm at a
> > > > > > > complete loss.- Hide quoted text -- Show quoted text -- Hide quoted text -- Show quoted text -- Hide quoted text -- Show quoted text -
>

Monitor CPU Usage by Query?

We are currently running MS SQL 8.0 on Windows 2003. I've been tasked
setting up a monitor that can identify queries that are causing CPU
spikes.
Does anyone have any suggestions about going about this? I'm at a
complete loss.The Profiler can do this. Create a new trace using the SQLProfilerStandard
trace template and add the CPU column. This will show both the query and the
CPU time, plus some other stuff. If this is a super busy production server
this can degrade performance so you might want to play with it on a test db
instance first. I typically run it from my desktop or from a remote desktop
and save the results to a local file cause if you write the result to the db
you are monitoring it too can impact your findings.
Netmon
"quixster@.gmail.com" wrote:

> We are currently running MS SQL 8.0 on Windows 2003. I've been tasked
> setting up a monitor that can identify queries that are causing CPU
> spikes.
> Does anyone have any suggestions about going about this? I'm at a
> complete loss.
>|||Thanks for the tip! Do you know of any way to use this or some other
utility to create an alert for administrators to receive when a query
has risen above a certain threshold? I can see how I can filter the
trace for CPU usage of a certain level, but I don't see how I could use
that to create an alert. Any thoughts?
On Oct 31, 2:21 pm, Netmon <Net...@.discussions.microsoft.com> wrote:[vbcol=seagreen]
> The Profiler can do this. Create a new trace using the SQLProfilerStandar
d
> trace template and add the CPU column. This will show both the query and t
he
> CPU time, plus some other stuff. If this is a super busy production serve
r
> this can degrade performance so you might want to play with it on a test d
b
> instance first. I typically run it from my desktop or from a remote deskt
op
> and save the results to a local file cause if you write the result to the
db
> you are monitoring it too can impact your findings.
> Netmon
>
> "quixs...@.gmail.com" wrote:
>|||You can also use this query to see what's using the CPU - highest to
lowest usage:
SELECT * FROM master..sysprocesses ORDER BY cpu DESC
Then, run this to see the actual query:
DBCC INPUTBUFFER (spid) -- spid being the # in the spid column from the
above query
hth
quixster@.gmail.com wrote:
> We are currently running MS SQL 8.0 on Windows 2003. I've been tasked
> setting up a monitor that can identify queries that are causing CPU
> spikes.
> Does anyone have any suggestions about going about this? I'm at a
> complete loss.|||You can also use the windows tool PerfMon on the server and set up your
own custom traces which can viewed realtime or logged to files and
replayed.
quixster@.gmail.com wrote:
> We are currently running MS SQL 8.0 on Windows 2003. I've been tasked
> setting up a monitor that can identify queries that are causing CPU
> spikes.
> Does anyone have any suggestions about going about this? I'm at a
> complete loss.|||No the trace is not going to do that. I'v heard that NetIQ has a product
that monitors for query execution but I'm not sure of the details on how it
works.
Like the other person (tootsuite) posted you could use perfmon however it
does not take sustained thresholds, that is if CPU > 90% over 60 seconds the
n
alert. So anytime the CPU is above your threshold it will alert even if it
is a short lived spike you get alerted.
I'm not sure the context within which you want to filter the trace to
generate an alert. If you have any enterprise server monitoring tools like
ProIT, MOM or Nimbus available you could just monitor the CPU via those and
have it email your admin.
Are you hoping to find the rogue/cpu intense queries in action? Or are you
desiring to know when the CPU gets hammered so an admin can log in and kill
the offending query or find out the user running it?
"quixster@.gmail.com" wrote:

> Thanks for the tip! Do you know of any way to use this or some other
> utility to create an alert for administrators to receive when a query
> has risen above a certain threshold? I can see how I can filter the
> trace for CPU usage of a certain level, but I don't see how I could use
> that to create an alert. Any thoughts?
>
> On Oct 31, 2:21 pm, Netmon <Net...@.discussions.microsoft.com> wrote:
>|||Perfmon is just a general monitoring tool... you cannot see individual
queries.
Usually it works like this:
1. end users complain
2. look at overall picture using tool like perfmon or Quest Performance
Analysis, or even profiler (I find profiler to be flaky/unpredictable
at times, at least in 2000 it was terrible)
3. isolate queries using Quest based on various factors
4. most of our performance problems in the past have stemmed from
inadequate memory, which then in turns affects cpu, disk i/o, which
leads to blocking locks, etc - fortunately this has been resolved with
the purchase of higher performance servers + memory
so it's not enough to just isolate cpu performance, as many factors are
usually involved
so your cpu might be hammered, but the real underlying problem could be
lack of memory, etc but you wouldn't know that unless you can look at
all the various possible factors
Netmon wrote:[vbcol=seagreen]
> No the trace is not going to do that. I'v heard that NetIQ has a product
> that monitors for query execution but I'm not sure of the details on how i
t
> works.
> Like the other person (tootsuite) posted you could use perfmon however it
> does not take sustained thresholds, that is if CPU > 90% over 60 seconds t
hen
> alert. So anytime the CPU is above your threshold it will alert even if i
t
> is a short lived spike you get alerted.
> I'm not sure the context within which you want to filter the trace to
> generate an alert. If you have any enterprise server monitoring tools lik
e
> ProIT, MOM or Nimbus available you could just monitor the CPU via those an
d
> have it email your admin.
> Are you hoping to find the rogue/cpu intense queries in action? Or are you
> desiring to know when the CPU gets hammered so an admin can log in and kil
l
> the offending query or find out the user running it?
> "quixster@.gmail.com" wrote:
>|||The first; trying to find rogue/cpu intense queries in action so we can
identify not only the query causing the problem, but perhaps what else
is occuring simultaneously that could be contributing to the high CPU
situation. We have MOM, and it can alert us to CPU incidents, but I
was hoping to find something that could single out the individual
queries that are running to create the incident.
On Oct 31, 4:30 pm, Netmon <Net...@.discussions.microsoft.com> wrote:[vbcol=seagreen]
> No the trace is not going to do that. I'v heard that NetIQ has a product
> that monitors for query execution but I'm not sure of the details on how i
t
> works.
> Like the other person (tootsuite) posted you could use perfmon however it
> does not take sustained thresholds, that is if CPU > 90% over 60 seconds t
hen
> alert. So anytime the CPU is above your threshold it will alert even if i
t
> is a short lived spike you get alerted.
> I'm not sure the context within which you want to filter the trace to
> generate an alert. If you have any enterprise server monitoring tools lik
e
> ProIT, MOM or Nimbus available you could just monitor the CPU via those an
d
> have it email your admin.
> Are you hoping to find the rogue/cpu intense queries in action? Or are you
> desiring to know when the CPU gets hammered so an admin can log in and kil
l
> the offending query or find out the user running it?
>
> "quixs...@.gmail.com" wrote:
>
>
>
>
>|||Yes, you can do this easily using the query I provided in an earlier
post.
SELECT * FROM master..sysprocesses ORDER BY cpu DESC
DBCC INPUTBUFFER (spid) -- shows query
it can't get much clearer than this - it will list processes by CPU
usage, highest to lowest, at the given point in time you run the stmt
Or you can invest in some type of monitoring tool, like Quest
(performance analysis) or some other tool that you like if you need to
examine various performance indicators - this is what I would recommend
for a long term solution
hth
quixster@.gmail.com wrote:[vbcol=seagreen]
> The first; trying to find rogue/cpu intense queries in action so we can
> identify not only the query causing the problem, but perhaps what else
> is occuring simultaneously that could be contributing to the high CPU
> situation. We have MOM, and it can alert us to CPU incidents, but I
> was hoping to find something that could single out the individual
> queries that are running to create the incident.
>
> On Oct 31, 4:30 pm, Netmon <Net...@.discussions.microsoft.com> wrote:|||Thanks for all the help! I'm taking the tips mentioned on this post
and also talking to a Quest rep about "Spotlight on SQL Server
Enterprise" http://www.quest.com/spotlight_on_s...ver_enterprise/
This has been immensely helpful!
On Nov 1, 11:20 am, tootsu...@.gmail.com wrote:[vbcol=seagreen]
> Yes, you can do this easily using the query I provided in an earlier
> post.
> SELECT * FROM master..sysprocesses ORDER BY cpu DESC
> DBCC INPUTBUFFER (spid) -- shows query
> it can't get much clearer than this - it will list processes by CPU
> usage, highest to lowest, at the given point in time you run the stmt
> Or you can invest in some type of monitoring tool, like Quest
> (performance analysis) or some other tool that you like if you need to
> examine various performance indicators - this is what I would recommend
> for a long term solution
> hth
>
> quixs...@.gmail.com wrote:
>
>
>
>
>
>
>
>
>
>

Monday, February 20, 2012

MOM Alert when login failed for user 'sa'

I am trying to setup a MOM Alert when the SA account fails to login to SQL,
How can this be setup so SQL reports this into the windows event viewer and
not its own log?
Many thanks for any help,
AlastairIt does get logged in the application event log whenever login failure
happens for any account. (Standard install)
However, you can create a rule in MOM to capture error id:18456 with error
desc like "Login failed for user 'sa'".
--
Thank you,
Saleem Hakani
HTTP://WWW.SQLCOMMUNITY.COM (SQL Server Community)
SQLTips, SQL Forums, SQL Blogs, SQL RADIO, SQL Events, SQL Scripts, SQL
Articles, SQL Clinic and a lot of SQL fun.
"alastairn" wrote:
> I am trying to setup a MOM Alert when the SA account fails to login to SQL,
> How can this be setup so SQL reports this into the windows event viewer and
> not its own log?
> Many thanks for any help,
> Alastair
>|||Thanks for the fast response and help :)
"Saleem Hakani" wrote:
> It does get logged in the application event log whenever login failure
> happens for any account. (Standard install)
> However, you can create a rule in MOM to capture error id:18456 with error
> desc like "Login failed for user 'sa'".
> --
> Thank you,
> Saleem Hakani
> HTTP://WWW.SQLCOMMUNITY.COM (SQL Server Community)
> SQLTips, SQL Forums, SQL Blogs, SQL RADIO, SQL Events, SQL Scripts, SQL
> Articles, SQL Clinic and a lot of SQL fun.
>
> "alastairn" wrote:
> > I am trying to setup a MOM Alert when the SA account fails to login to SQL,
> > How can this be setup so SQL reports this into the windows event viewer and
> > not its own log?
> >
> > Many thanks for any help,
> > Alastair
> >