Showing posts with label enterprise. Show all posts
Showing posts with label enterprise. Show all posts

Wednesday, March 28, 2012

Profile / Stored Procedure

Hi,

I have created a Stored Procedure, under Stored procedures section under Enterprise Manager on SQL server 2000.

Could anybody tell me, how and what are the steps to follow to TRACE the procedure , using SQL PROFILER ?

Please advice me !

NicolFrom Enterprise Manager:
-- choose Tools
-- SQL Profiler
-- File
-- New
-- Trace
-- select/enter connection informatin as appropriate (I was able to accept the defaults)
-- press OK
-- click the General tab of the Trace Properties window
-- from the "Template name:" dropdown choose SQLProfilerTSQL_SPs
-- choose RUN
-- do whatever it is you need to do to run your Stored Procedure (from within Query Analyzer or ASP.NET)
-- go back to Profiler and click the red square "stop selected trace" icon
-- review the results

Terri|||Thanks Tmorton,

I got started with checking SP using SQL profiler.. :)

Now I found, I think, I have problem with coding in VB.NET or problem in SP.

Even though, I have given valid Username/Password, RETURNVALUE is always showing zero .

Stored procedure
-------
CREATE PROCEDURE test
(@.username varchar(100),
@.userpwd varchar(200)
)
AS
set nocount on
return (select count(*) as s from employer
WHERE user_name like '%@.username%' and
password ='@.userpwd')

GO

VB.NET Code using SP
--------
CmdCoInfo = New SqlCommand("test", ConVM)
CmdCoInfo.CommandType = CommandType.StoredProcedure
CmdCoInfo.Parameters.Add("@.username", Trim(StrUser))
CmdCoInfo.Parameters.Add("@.userpwd", Trim(StrPass))
Dim paramOut As SqlParameter
paramOut = CmdCoInfo.Parameters.Add("Returnvalue", SqlDbType.Int)
paramOut.Direction = ParameterDirection.ReturnValue
paramOut.Size = 40
' Retrieve the record that matches the username/password
ConVM.Open()
CmdCoInfo.ExecuteNonQuery()

Dim retrr As String
If Not IsDBNull(CmdCoInfo.Parameters("Returnvalue").Value) Then
retrr = (CmdCoInfo.Parameters("Returnvalue").Value)
Else
retrr = "Not know"
End If
Response.Write(retrr)

--------------

Is there problem with SP or VB.net code ?

Please advice !|||The problem is in your stored procedure.

Instead of this:

return (select count(*) as s from employer
WHERE user_name like '%@.username%' and
password ='@.userpwd')
GO

This would be more correct:


DECLARE @.RecordCount integer
select @.RecordCount= count(*) from employer
WHERE user_name like '%'+@.username +'%' and
password =@.userpwd
RETURN @.RecordCount

GO

HOWEVER, ReturnValue is meant to signal back to the calling program whether or not the stored procedure was successful. So you are misusing it to return a COUNT. You should use an Output parameter instead. Add an additional parameter called RecordCount with ParameterDirection of Output. Add the Output parameter to your stored procedure, which will look like this:

CREATE PROCEDURE test
(@.username varchar(100),
@.userpwd varchar(200) ,
@.RecordCount int OUTPUT
)
AS
set nocount on
select @.RecordCount= count(*) from employer
WHERE user_name like '%'+@.username +'%' and
password =@.userpwd
RETURN @.@.ERROR

GO


I haven't tested this code but it should be about right.

Terri|||Terri,

ur 2nd option worked for me. But i didnt understand why I am still getting zero as ReturnValue , when I tried with 1st option(given below), eventhough record exists for that username/pwd.

DECLARE @.RecordCount integer
select @.RecordCount= count(*) from employer
WHERE user_name like '%'+@.username +'%' and
password =@.userpwd
RETURN @.RecordCount
GO

Please advice !|||I used that same stored procedure, and your code modified slightly which executes the procedure and puts the returnvalue into a label and it works as expected:


CmdCoInfo = New SqlCommand("returntest", SqlConnection)
CmdCoInfo.CommandType = CommandType.StoredProcedure
CmdCoInfo.Parameters.Add("@.test1", 1)
Dim paramOut As SqlParameter
paramOut = CmdCoInfo.Parameters.Add("Returnvalue", SqlDbType.Int)
paramOut.Direction = ParameterDirection.ReturnValue
paramOut.Size = 40

SqlConnection.Open()
CmdCoInfo.ExecuteNonQuery()

Label1.Text = CmdCoInfo.Parameters("ReturnValue").Value

Terrisql

Friday, March 23, 2012

ProClarity Slicersel parameters

Hi,

I am using ProClarity 6.1 and Enterprise version of analysis server 2005. (not sure if I need an proclarity update or a fix for ProClarity because i guess there is a newer version 6.2)

Because of one of the performance optimizations that I did after following some blogs on the net, I can't specify slicerSel parameters to my proclarity graphs! Let me explain:

I have a slicer in Proclarity graph for which I used to specify a url querystring parameter as slicerSel=xxxxxx. This was working until I modified the dimension.

The modification: initially my dimension had the following attributes: Key, Name. Now I just have one attribute Name, whose key column points to KEY (db) and Name column points to NAME (db). because of this my slicerSel parameters do not work.

I checked the html of proclarity by doing an view souce and found the following difference.

before:

<option value ="[CLIENTNAME].[NAME].&amp;[ABCDE FGHIJK]">ABCDE FGHIJK<option>

After modifing the Keycolumn and Namecolumn:

<option value ="[CLIENTNAME].[NAME].&amp;[4.94735E6]">ABCDE FGHIJK</option>

Now I can't specify the slicer using the number 4.94735E6 which i dont think is the key (its in scientific format).

My question is, Is there any way out to specify the slicer as ABCDE FGHIJK (Name) as before ?

If it is not possible, shall I add another attribute to the dimension called Key and then seperate the Key and Name from the single attribute? will this impact the performance? especially because the dimension will have another attribute which contains just the key, which will not be displayed but used in the relationships. Is there any specific way to design this? (Key is the primary key column of the database table, which is used for storing dimension values and referenced in the Fact tables).

Regards

Your key is 494735.

The only way you will get the name there is to set-up the name only as a separate attribute. Then the name will be used as a key, slightly less efficient. ProClarity generates the MDX with the key element of the attribute value that is selected from the slicer.

You can also change the data type of the key when creating the attributes in Visual Studio. Sometimes it defaults to a double if the data is sourced from a view rather than a table.

Wednesday, March 21, 2012

Processor question

Hello Everyone,
When a certain platform let it be standard or enterprise, the processor
limitation on Standard is currently 4. Does that mean 4 physical processors
or if you had 2 physical processors with hyper threading which in Windows
would give you 4? I a bit confused about that.
Thank you
Alex Anderson
Alex Anderson wrote:
> Hello Everyone,
> When a certain platform let it be standard or enterprise, the
> processor limitation on Standard is currently 4. Does that mean 4
> physical processors or if you had 2 physical processors with hyper
> threading which in Windows would give you 4? I a bit confused about
> that.
> Thank you
> Alex Anderson
Physical. In fact, it's my understanding that dual-core processors are
going to be treated as a single processor according to the Microsoft
Licensing. SO you need to license the physical CPUs in the box (for CPU
licensing). As always, check with Microsoft Licensing for any licensing
issues and questions.
David Gugick - SQL Server MVP
Quest Software
|||David is correct. Multi-core and hyperthreaded processors count as a single
processor for licensing and edition processor limits. This makes MS
licensing highly competitive and much simpler than "the other guys".
Geoff N. Hiten
Senior Database Administrator
Microsoft SQL Server MVP
"David Gugick" <david.gugick-nospam@.quest.com> wrote in message
news:ebZRcptIGHA.1760@.TK2MSFTNGP10.phx.gbl...
> Alex Anderson wrote:
> Physical. In fact, it's my understanding that dual-core processors are
> going to be treated as a single processor according to the Microsoft
> Licensing. SO you need to license the physical CPUs in the box (for CPU
> licensing). As always, check with Microsoft Licensing for any licensing
> issues and questions.
> --
> David Gugick - SQL Server MVP
> Quest Software
>
|||Thank you both for the information. You know Microsoft, you never know when
the wool will be pulled over our eyes.
Thank you
Alex Anderson
"Geoff N. Hiten" <SQLCraftsman@.gmail.com> wrote in message
news:eJ1sIGuIGHA.1288@.TK2MSFTNGP09.phx.gbl...
> David is correct. Multi-core and hyperthreaded processors count as a
> single processor for licensing and edition processor limits. This makes
> MS licensing highly competitive and much simpler than "the other guys".
> --
> Geoff N. Hiten
> Senior Database Administrator
> Microsoft SQL Server MVP
>
>
> "David Gugick" <david.gugick-nospam@.quest.com> wrote in message
> news:ebZRcptIGHA.1760@.TK2MSFTNGP10.phx.gbl...
>
|||Microsoft is often confusing, but most of the time they avoid active
stupidity. Remember, MS is a very large organization and sometimes it takes
a while for feedback to trickle through. This time, they appear to have
gotten it right.
Geoff N. Hiten
Senior Database Administrator
Microsoft SQL Server MVP
"Alex Anderson" <AAnderson@.Murrieta.org> wrote in message
news:O0Cuq31IGHA.2708@.tk2msftngp13.phx.gbl...
> Thank you both for the information. You know Microsoft, you never know
> when the wool will be pulled over our eyes.
> Thank you
> Alex Anderson
> "Geoff N. Hiten" <SQLCraftsman@.gmail.com> wrote in message
> news:eJ1sIGuIGHA.1288@.TK2MSFTNGP09.phx.gbl...
>

Processor question

Hello Everyone,
When a certain platform let it be standard or enterprise, the processor
limitation on Standard is currently 4. Does that mean 4 physical processors
or if you had 2 physical processors with hyper threading which in Windows
would give you 4? I a bit confused about that.
Thank you
Alex AndersonAlex Anderson wrote:
> Hello Everyone,
> When a certain platform let it be standard or enterprise, the
> processor limitation on Standard is currently 4. Does that mean 4
> physical processors or if you had 2 physical processors with hyper
> threading which in Windows would give you 4? I a bit confused about
> that.
> Thank you
> Alex Anderson
Physical. In fact, it's my understanding that dual-core processors are
going to be treated as a single processor according to the Microsoft
Licensing. SO you need to license the physical CPUs in the box (for CPU
licensing). As always, check with Microsoft Licensing for any licensing
issues and questions.
--
David Gugick - SQL Server MVP
Quest Software|||David is correct. Multi-core and hyperthreaded processors count as a single
processor for licensing and edition processor limits. This makes MS
licensing highly competitive and much simpler than "the other guys".
--
Geoff N. Hiten
Senior Database Administrator
Microsoft SQL Server MVP
"David Gugick" <david.gugick-nospam@.quest.com> wrote in message
news:ebZRcptIGHA.1760@.TK2MSFTNGP10.phx.gbl...
> Alex Anderson wrote:
>> Hello Everyone,
>> When a certain platform let it be standard or enterprise, the
>> processor limitation on Standard is currently 4. Does that mean 4
>> physical processors or if you had 2 physical processors with hyper
>> threading which in Windows would give you 4? I a bit confused about
>> that.
>> Thank you
>> Alex Anderson
> Physical. In fact, it's my understanding that dual-core processors are
> going to be treated as a single processor according to the Microsoft
> Licensing. SO you need to license the physical CPUs in the box (for CPU
> licensing). As always, check with Microsoft Licensing for any licensing
> issues and questions.
> --
> David Gugick - SQL Server MVP
> Quest Software
>|||Thank you both for the information. You know Microsoft, you never know when
the wool will be pulled over our eyes.
Thank you
Alex Anderson
"Geoff N. Hiten" <SQLCraftsman@.gmail.com> wrote in message
news:eJ1sIGuIGHA.1288@.TK2MSFTNGP09.phx.gbl...
> David is correct. Multi-core and hyperthreaded processors count as a
> single processor for licensing and edition processor limits. This makes
> MS licensing highly competitive and much simpler than "the other guys".
> --
> Geoff N. Hiten
> Senior Database Administrator
> Microsoft SQL Server MVP
>
>
> "David Gugick" <david.gugick-nospam@.quest.com> wrote in message
> news:ebZRcptIGHA.1760@.TK2MSFTNGP10.phx.gbl...
>> Alex Anderson wrote:
>> Hello Everyone,
>> When a certain platform let it be standard or enterprise, the
>> processor limitation on Standard is currently 4. Does that mean 4
>> physical processors or if you had 2 physical processors with hyper
>> threading which in Windows would give you 4? I a bit confused about
>> that.
>> Thank you
>> Alex Anderson
>> Physical. In fact, it's my understanding that dual-core processors are
>> going to be treated as a single processor according to the Microsoft
>> Licensing. SO you need to license the physical CPUs in the box (for CPU
>> licensing). As always, check with Microsoft Licensing for any licensing
>> issues and questions.
>> --
>> David Gugick - SQL Server MVP
>> Quest Software
>|||Microsoft is often confusing, but most of the time they avoid active
stupidity. Remember, MS is a very large organization and sometimes it takes
a while for feedback to trickle through. This time, they appear to have
gotten it right.
--
Geoff N. Hiten
Senior Database Administrator
Microsoft SQL Server MVP
"Alex Anderson" <AAnderson@.Murrieta.org> wrote in message
news:O0Cuq31IGHA.2708@.tk2msftngp13.phx.gbl...
> Thank you both for the information. You know Microsoft, you never know
> when the wool will be pulled over our eyes.
> Thank you
> Alex Anderson
> "Geoff N. Hiten" <SQLCraftsman@.gmail.com> wrote in message
> news:eJ1sIGuIGHA.1288@.TK2MSFTNGP09.phx.gbl...
>> David is correct. Multi-core and hyperthreaded processors count as a
>> single processor for licensing and edition processor limits. This makes
>> MS licensing highly competitive and much simpler than "the other guys".
>> --
>> Geoff N. Hiten
>> Senior Database Administrator
>> Microsoft SQL Server MVP
>>
>>
>> "David Gugick" <david.gugick-nospam@.quest.com> wrote in message
>> news:ebZRcptIGHA.1760@.TK2MSFTNGP10.phx.gbl...
>> Alex Anderson wrote:
>> Hello Everyone,
>> When a certain platform let it be standard or enterprise, the
>> processor limitation on Standard is currently 4. Does that mean 4
>> physical processors or if you had 2 physical processors with hyper
>> threading which in Windows would give you 4? I a bit confused about
>> that.
>> Thank you
>> Alex Anderson
>> Physical. In fact, it's my understanding that dual-core processors are
>> going to be treated as a single processor according to the Microsoft
>> Licensing. SO you need to license the physical CPUs in the box (for CPU
>> licensing). As always, check with Microsoft Licensing for any licensing
>> issues and questions.
>> --
>> David Gugick - SQL Server MVP
>> Quest Software
>>
>

Processor question

Hello Everyone,
When a certain platform let it be standard or enterprise, the processor
limitation on Standard is currently 4. Does that mean 4 physical processors
or if you had 2 physical processors with hyper threading which in Windows
would give you 4? I a bit confused about that.
Thank you
Alex AndersonAlex Anderson wrote:
> Hello Everyone,
> When a certain platform let it be standard or enterprise, the
> processor limitation on Standard is currently 4. Does that mean 4
> physical processors or if you had 2 physical processors with hyper
> threading which in Windows would give you 4? I a bit confused about
> that.
> Thank you
> Alex Anderson
Physical. In fact, it's my understanding that dual-core processors are
going to be treated as a single processor according to the Microsoft
Licensing. SO you need to license the physical CPUs in the box (for CPU
licensing). As always, check with Microsoft Licensing for any licensing
issues and questions.
David Gugick - SQL Server MVP
Quest Software|||David is correct. Multi-core and hyperthreaded processors count as a single
processor for licensing and edition processor limits. This makes MS
licensing highly competitive and much simpler than "the other guys".
Geoff N. Hiten
Senior Database Administrator
Microsoft SQL Server MVP
"David Gugick" <david.gugick-nospam@.quest.com> wrote in message
news:ebZRcptIGHA.1760@.TK2MSFTNGP10.phx.gbl...
> Alex Anderson wrote:
> Physical. In fact, it's my understanding that dual-core processors are
> going to be treated as a single processor according to the Microsoft
> Licensing. SO you need to license the physical CPUs in the box (for CPU
> licensing). As always, check with Microsoft Licensing for any licensing
> issues and questions.
> --
> David Gugick - SQL Server MVP
> Quest Software
>|||Thank you both for the information. You know Microsoft, you never know when
the wool will be pulled over our eyes.
Thank you
Alex Anderson
"Geoff N. Hiten" <SQLCraftsman@.gmail.com> wrote in message
news:eJ1sIGuIGHA.1288@.TK2MSFTNGP09.phx.gbl...
> David is correct. Multi-core and hyperthreaded processors count as a
> single processor for licensing and edition processor limits. This makes
> MS licensing highly competitive and much simpler than "the other guys".
> --
> Geoff N. Hiten
> Senior Database Administrator
> Microsoft SQL Server MVP
>
>
> "David Gugick" <david.gugick-nospam@.quest.com> wrote in message
> news:ebZRcptIGHA.1760@.TK2MSFTNGP10.phx.gbl...
>|||Microsoft is often confusing, but most of the time they avoid active
stupidity. Remember, MS is a very large organization and sometimes it takes
a while for feedback to trickle through. This time, they appear to have
gotten it right.
Geoff N. Hiten
Senior Database Administrator
Microsoft SQL Server MVP
"Alex Anderson" <AAnderson@.Murrieta.org> wrote in message
news:O0Cuq31IGHA.2708@.tk2msftngp13.phx.gbl...
> Thank you both for the information. You know Microsoft, you never know
> when the wool will be pulled over our eyes.
> Thank you
> Alex Anderson
> "Geoff N. Hiten" <SQLCraftsman@.gmail.com> wrote in message
> news:eJ1sIGuIGHA.1288@.TK2MSFTNGP09.phx.gbl...
>

Monday, March 12, 2012

Processes seen in enterprise manager

Hi,
We are using a new third party application that has SQL Server 2000 as the
database. It is an ASP page front end and uses ODBC to connect. There are
about 20 people who use it during the day. When I look in EM at the
processes there are well over 100. Even in the morning after everyone has
logged out the night before. All the processes are sleeping so they aren't
using any resources. I feel kind of dumb here but is there a server
property setting where I can set a value for these to expire? Looked in BOL
and in my other books but this doesn't seem to be available. Only timeout
settings when waiting for a connection or running a query. I wasn't worried
about these thinking SQL Server was managing them but then I noticed that
our in house application that uses the same type of setup doesn't have this
problem.
Thanks,
Wayne
I have worked with one third party application whose idea of connection
pooling was to open up 100 connections on start-up, even though it never
used more than 2 during the time we used it. Your third party application
might have been designed by a similarly brilliant and knowledgeable
developer.
You can't set a timeout for the connections, but you can schedule a job to
run the following script on a regular basis. This example kills all
connections that have not been used for 6 hours:
DECLARE @.sql varchar(4000)
WHILE 1=1
BEGIN
SET @.sql = (SELECT TOP 1 'KILL ' + CAST(spid AS VARCHAR(10))
FROM master.dbo.sysprocesses WHERE DATEDIFF(hh, last_batch,
GETDATE()) >= 6
AND spid <> @.@.spid AND spid >= 50)
IF @.sql IS NULL BREAK
EXEC (@.sql)
END
Jacco Schalkwijk
SQL Server MVP
"Wayne Antinore" <wantinore@.veramark.com> wrote in message
news:OPecmwqLEHA.1340@.TK2MSFTNGP12.phx.gbl...
> Hi,
> We are using a new third party application that has SQL Server 2000 as the
> database. It is an ASP page front end and uses ODBC to connect. There
are
> about 20 people who use it during the day. When I look in EM at the
> processes there are well over 100. Even in the morning after everyone has
> logged out the night before. All the processes are sleeping so they
aren't
> using any resources. I feel kind of dumb here but is there a server
> property setting where I can set a value for these to expire? Looked in
BOL
> and in my other books but this doesn't seem to be available. Only timeout
> settings when waiting for a connection or running a query. I wasn't
worried
> about these thinking SQL Server was managing them but then I noticed that
> our in house application that uses the same type of setup doesn't have
this
> problem.
> Thanks,
> Wayne
>
|||Thanks Jacco,
I'll give the script a try. Based on other things I've seen with this app I
would not be surprised if they are doing something similar.
Thanks again,
Wayne
"Jacco Schalkwijk" <NOSPAMjaccos@.eurostop.co.uk> wrote in message
news:%23m6mO%23qLEHA.3516@.TK2MSFTNGP11.phx.gbl...[vbcol=seagreen]
> I have worked with one third party application whose idea of connection
> pooling was to open up 100 connections on start-up, even though it never
> used more than 2 during the time we used it. Your third party application
> might have been designed by a similarly brilliant and knowledgeable
> developer.
> You can't set a timeout for the connections, but you can schedule a job to
> run the following script on a regular basis. This example kills all
> connections that have not been used for 6 hours:
> DECLARE @.sql varchar(4000)
> WHILE 1=1
> BEGIN
> SET @.sql = (SELECT TOP 1 'KILL ' + CAST(spid AS VARCHAR(10))
> FROM master.dbo.sysprocesses WHERE DATEDIFF(hh, last_batch,
> GETDATE()) >= 6
> AND spid <> @.@.spid AND spid >= 50)
> IF @.sql IS NULL BREAK
> EXEC (@.sql)
> END
>
> --
> Jacco Schalkwijk
> SQL Server MVP
>
> "Wayne Antinore" <wantinore@.veramark.com> wrote in message
> news:OPecmwqLEHA.1340@.TK2MSFTNGP12.phx.gbl...
the[vbcol=seagreen]
> are
has[vbcol=seagreen]
> aren't
> BOL
timeout[vbcol=seagreen]
> worried
that
> this
>
|||Ok, don't be surprised though if the application either fails to work when
it's 100 or so connections aren't there, or just recreates them on a regular
basis after you have killed them....
Jacco Schalkwijk
SQL Server MVP
"Wayne Antinore" <wantinore@.veramark.com> wrote in message
news:uJQkvJrLEHA.3904@.TK2MSFTNGP09.phx.gbl...
> Thanks Jacco,
> I'll give the script a try. Based on other things I've seen with this app
I[vbcol=seagreen]
> would not be surprised if they are doing something similar.
> Thanks again,
> Wayne
>
> "Jacco Schalkwijk" <NOSPAMjaccos@.eurostop.co.uk> wrote in message
> news:%23m6mO%23qLEHA.3516@.TK2MSFTNGP11.phx.gbl...
application[vbcol=seagreen]
to[vbcol=seagreen]
> the
There[vbcol=seagreen]
> has
in
> timeout
> that
>

Friday, March 9, 2012

Processes seen in enterprise manager

Hi,
We are using a new third party application that has SQL Server 2000 as the
database. It is an ASP page front end and uses ODBC to connect. There are
about 20 people who use it during the day. When I look in EM at the
processes there are well over 100. Even in the morning after everyone has
logged out the night before. All the processes are sleeping so they aren't
using any resources. I feel kind of dumb here but is there a server
property setting where I can set a value for these to expire? Looked in BOL
and in my other books but this doesn't seem to be available. Only timeout
settings when waiting for a connection or running a query. I wasn't worried
about these thinking SQL Server was managing them but then I noticed that
our in house application that uses the same type of setup doesn't have this
problem.
Thanks,
WayneI have worked with one third party application whose idea of connection
pooling was to open up 100 connections on start-up, even though it never
used more than 2 during the time we used it. Your third party application
might have been designed by a similarly brilliant and knowledgeable
developer.
You can't set a timeout for the connections, but you can schedule a job to
run the following script on a regular basis. This example kills all
connections that have not been used for 6 hours:
DECLARE @.sql varchar(4000)
WHILE 1=1
BEGIN
SET @.sql = (SELECT TOP 1 'KILL ' + CAST(spid AS VARCHAR(10))
FROM master.dbo.sysprocesses WHERE DATEDIFF(hh, last_batch,
GETDATE()) >= 6
AND spid <> @.@.spid AND spid >= 50)
IF @.sql IS NULL BREAK
EXEC (@.sql)
END
Jacco Schalkwijk
SQL Server MVP
"Wayne Antinore" <wantinore@.veramark.com> wrote in message
news:OPecmwqLEHA.1340@.TK2MSFTNGP12.phx.gbl...
> Hi,
> We are using a new third party application that has SQL Server 2000 as the
> database. It is an ASP page front end and uses ODBC to connect. There
are
> about 20 people who use it during the day. When I look in EM at the
> processes there are well over 100. Even in the morning after everyone has
> logged out the night before. All the processes are sleeping so they
aren't
> using any resources. I feel kind of dumb here but is there a server
> property setting where I can set a value for these to expire? Looked in
BOL
> and in my other books but this doesn't seem to be available. Only timeout
> settings when waiting for a connection or running a query. I wasn't
worried
> about these thinking SQL Server was managing them but then I noticed that
> our in house application that uses the same type of setup doesn't have
this
> problem.
> Thanks,
> Wayne
>|||Thanks Jacco,
I'll give the script a try. Based on other things I've seen with this app I
would not be surprised if they are doing something similar.
Thanks again,
Wayne
"Jacco Schalkwijk" <NOSPAMjaccos@.eurostop.co.uk> wrote in message
news:%23m6mO%23qLEHA.3516@.TK2MSFTNGP11.phx.gbl...
> I have worked with one third party application whose idea of connection
> pooling was to open up 100 connections on start-up, even though it never
> used more than 2 during the time we used it. Your third party application
> might have been designed by a similarly brilliant and knowledgeable
> developer.
> You can't set a timeout for the connections, but you can schedule a job to
> run the following script on a regular basis. This example kills all
> connections that have not been used for 6 hours:
> DECLARE @.sql varchar(4000)
> WHILE 1=1
> BEGIN
> SET @.sql = (SELECT TOP 1 'KILL ' + CAST(spid AS VARCHAR(10))
> FROM master.dbo.sysprocesses WHERE DATEDIFF(hh, last_batch,
> GETDATE()) >= 6
> AND spid <> @.@.spid AND spid >= 50)
> IF @.sql IS NULL BREAK
> EXEC (@.sql)
> END
>
> --
> Jacco Schalkwijk
> SQL Server MVP
>
> "Wayne Antinore" <wantinore@.veramark.com> wrote in message
> news:OPecmwqLEHA.1340@.TK2MSFTNGP12.phx.gbl...
the[vbcol=seagreen]
> are
has[vbcol=seagreen]
> aren't
> BOL
timeout[vbcol=seagreen]
> worried
that[vbcol=seagreen]
> this
>|||Ok, don't be surprised though if the application either fails to work when
it's 100 or so connections aren't there, or just recreates them on a regular
basis after you have killed them....
Jacco Schalkwijk
SQL Server MVP
"Wayne Antinore" <wantinore@.veramark.com> wrote in message
news:uJQkvJrLEHA.3904@.TK2MSFTNGP09.phx.gbl...
> Thanks Jacco,
> I'll give the script a try. Based on other things I've seen with this app
I
> would not be surprised if they are doing something similar.
> Thanks again,
> Wayne
>
> "Jacco Schalkwijk" <NOSPAMjaccos@.eurostop.co.uk> wrote in message
> news:%23m6mO%23qLEHA.3516@.TK2MSFTNGP11.phx.gbl...
application[vbcol=seagreen]
to[vbcol=seagreen]
> the
There[vbcol=seagreen]
> has
in[vbcol=seagreen]
> timeout
> that
>

Processes seen in enterprise manager

Hi,
We are using a new third party application that has SQL Server 2000 as the
database. It is an ASP page front end and uses ODBC to connect. There are
about 20 people who use it during the day. When I look in EM at the
processes there are well over 100. Even in the morning after everyone has
logged out the night before. All the processes are sleeping so they aren't
using any resources. I feel kind of dumb here but is there a server
property setting where I can set a value for these to expire? Looked in BOL
and in my other books but this doesn't seem to be available. Only timeout
settings when waiting for a connection or running a query. I wasn't worried
about these thinking SQL Server was managing them but then I noticed that
our in house application that uses the same type of setup doesn't have this
problem.
Thanks,
WayneI have worked with one third party application whose idea of connection
pooling was to open up 100 connections on start-up, even though it never
used more than 2 during the time we used it. Your third party application
might have been designed by a similarly brilliant and knowledgeable
developer.
You can't set a timeout for the connections, but you can schedule a job to
run the following script on a regular basis. This example kills all
connections that have not been used for 6 hours:
DECLARE @.sql varchar(4000)
WHILE 1=1
BEGIN
SET @.sql = (SELECT TOP 1 'KILL ' + CAST(spid AS VARCHAR(10))
FROM master.dbo.sysprocesses WHERE DATEDIFF(hh, last_batch,
GETDATE()) >= 6
AND spid <> @.@.spid AND spid >= 50)
IF @.sql IS NULL BREAK
EXEC (@.sql)
END
Jacco Schalkwijk
SQL Server MVP
"Wayne Antinore" <wantinore@.veramark.com> wrote in message
news:OPecmwqLEHA.1340@.TK2MSFTNGP12.phx.gbl...
> Hi,
> We are using a new third party application that has SQL Server 2000 as the
> database. It is an ASP page front end and uses ODBC to connect. There
are
> about 20 people who use it during the day. When I look in EM at the
> processes there are well over 100. Even in the morning after everyone has
> logged out the night before. All the processes are sleeping so they
aren't
> using any resources. I feel kind of dumb here but is there a server
> property setting where I can set a value for these to expire? Looked in
BOL
> and in my other books but this doesn't seem to be available. Only timeout
> settings when waiting for a connection or running a query. I wasn't
worried
> about these thinking SQL Server was managing them but then I noticed that
> our in house application that uses the same type of setup doesn't have
this
> problem.
> Thanks,
> Wayne
>|||Thanks Jacco,
I'll give the script a try. Based on other things I've seen with this app I
would not be surprised if they are doing something similar.
Thanks again,
Wayne
"Jacco Schalkwijk" <NOSPAMjaccos@.eurostop.co.uk> wrote in message
news:%23m6mO%23qLEHA.3516@.TK2MSFTNGP11.phx.gbl...
> I have worked with one third party application whose idea of connection
> pooling was to open up 100 connections on start-up, even though it never
> used more than 2 during the time we used it. Your third party application
> might have been designed by a similarly brilliant and knowledgeable
> developer.
> You can't set a timeout for the connections, but you can schedule a job to
> run the following script on a regular basis. This example kills all
> connections that have not been used for 6 hours:
> DECLARE @.sql varchar(4000)
> WHILE 1=1
> BEGIN
> SET @.sql = (SELECT TOP 1 'KILL ' + CAST(spid AS VARCHAR(10))
> FROM master.dbo.sysprocesses WHERE DATEDIFF(hh, last_batch,
> GETDATE()) >= 6
> AND spid <> @.@.spid AND spid >= 50)
> IF @.sql IS NULL BREAK
> EXEC (@.sql)
> END
>
> --
> Jacco Schalkwijk
> SQL Server MVP
>
> "Wayne Antinore" <wantinore@.veramark.com> wrote in message
> news:OPecmwqLEHA.1340@.TK2MSFTNGP12.phx.gbl...
> > Hi,
> > We are using a new third party application that has SQL Server 2000 as
the
> > database. It is an ASP page front end and uses ODBC to connect. There
> are
> > about 20 people who use it during the day. When I look in EM at the
> > processes there are well over 100. Even in the morning after everyone
has
> > logged out the night before. All the processes are sleeping so they
> aren't
> > using any resources. I feel kind of dumb here but is there a server
> > property setting where I can set a value for these to expire? Looked in
> BOL
> > and in my other books but this doesn't seem to be available. Only
timeout
> > settings when waiting for a connection or running a query. I wasn't
> worried
> > about these thinking SQL Server was managing them but then I noticed
that
> > our in house application that uses the same type of setup doesn't have
> this
> > problem.
> >
> > Thanks,
> > Wayne
> >
> >
>|||Ok, don't be surprised though if the application either fails to work when
it's 100 or so connections aren't there, or just recreates them on a regular
basis after you have killed them....
--
Jacco Schalkwijk
SQL Server MVP
"Wayne Antinore" <wantinore@.veramark.com> wrote in message
news:uJQkvJrLEHA.3904@.TK2MSFTNGP09.phx.gbl...
> Thanks Jacco,
> I'll give the script a try. Based on other things I've seen with this app
I
> would not be surprised if they are doing something similar.
> Thanks again,
> Wayne
>
> "Jacco Schalkwijk" <NOSPAMjaccos@.eurostop.co.uk> wrote in message
> news:%23m6mO%23qLEHA.3516@.TK2MSFTNGP11.phx.gbl...
> > I have worked with one third party application whose idea of connection
> > pooling was to open up 100 connections on start-up, even though it never
> > used more than 2 during the time we used it. Your third party
application
> > might have been designed by a similarly brilliant and knowledgeable
> > developer.
> >
> > You can't set a timeout for the connections, but you can schedule a job
to
> > run the following script on a regular basis. This example kills all
> > connections that have not been used for 6 hours:
> >
> > DECLARE @.sql varchar(4000)
> > WHILE 1=1
> > BEGIN
> > SET @.sql = (SELECT TOP 1 'KILL ' + CAST(spid AS VARCHAR(10))
> > FROM master.dbo.sysprocesses WHERE DATEDIFF(hh, last_batch,
> > GETDATE()) >= 6
> > AND spid <> @.@.spid AND spid >= 50)
> > IF @.sql IS NULL BREAK
> > EXEC (@.sql)
> > END
> >
> >
> > --
> > Jacco Schalkwijk
> > SQL Server MVP
> >
> >
> > "Wayne Antinore" <wantinore@.veramark.com> wrote in message
> > news:OPecmwqLEHA.1340@.TK2MSFTNGP12.phx.gbl...
> > > Hi,
> > > We are using a new third party application that has SQL Server 2000 as
> the
> > > database. It is an ASP page front end and uses ODBC to connect.
There
> > are
> > > about 20 people who use it during the day. When I look in EM at the
> > > processes there are well over 100. Even in the morning after everyone
> has
> > > logged out the night before. All the processes are sleeping so they
> > aren't
> > > using any resources. I feel kind of dumb here but is there a server
> > > property setting where I can set a value for these to expire? Looked
in
> > BOL
> > > and in my other books but this doesn't seem to be available. Only
> timeout
> > > settings when waiting for a connection or running a query. I wasn't
> > worried
> > > about these thinking SQL Server was managing them but then I noticed
> that
> > > our in house application that uses the same type of setup doesn't have
> > this
> > > problem.
> > >
> > > Thanks,
> > > Wayne
> > >
> > >
> >
> >
>

processadmin cannot kill

We are trying to enforce some security on our SQL server,
and I am trying to move several people away from logging
on to enterprise manager with the sa user and password. I
am hoping to use Windows Authentication, but I am having
problems with a user not being able to kill processes. I
have given the user access to all of the databases and
added them to the processadmin role. They still cannot
kill processes through enterprise manager. The SQL server
itself has not been topped & restarted, but that shouldn't
be nescisary, right (?).Hi Jason,
Could you give me an explanation of what process the user would need
to kill?
Are you referring to NT Processes or SQL spids ?
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.|||Hi,
It is not required to stop and start sql server after giving a role. Can you
try execution the below in query analyzer to create a SQL Server login and
assign processadmin role.
sp_addlogin <Login_name>
go
sp_addsrvrolemember <login_name>,processadmin
After executing the script, login to Querry analyser using the new sql
server login.
Execute sp_who to identify the process id and execute KILL <SPID> to kill a
process.
Once you are ok with this, try killing the process from Enterprise manager
by registering using this new user.
Thanks
Hari
MCDBA
"Jason" <jeliason@.youth-guidance.org> wrote in message
news:1c7e101c4524e$e2872190$a001280a@.phx
.gbl...
> We are trying to enforce some security on our SQL server,
> and I am trying to move several people away from logging
> on to enterprise manager with the sa user and password. I
> am hoping to use Windows Authentication, but I am having
> problems with a user not being able to kill processes. I
> have given the user access to all of the databases and
> added them to the processadmin role. They still cannot
> kill processes through enterprise manager. The SQL server
> itself has not been topped & restarted, but that shouldn't
> be nescisary, right (?).|||They are SQL SPIDs as viewed under Locaks/Process IDs
under Management in Enterprise Manager. A custom
application we use sometime generates "blocking locks"
which need to be cleared by the CIS manager.
Thanks!
Jason

>--Original Message--
>Hi Jason,
> Could you give me an explanation of what process the
user would need
>to kill?
>Are you referring to NT Processes or SQL spids ?
>Thanks,
>Kevin McDonnell
>Microsoft Corporation
>This posting is provided AS IS with no warranties, and
confers no rights.
>
>.
>

Wednesday, March 7, 2012

Process license ?

Hello Everyone,
Our company is currently under the Enterprise agreement with Microsoft
and I was wondering when it came to clustering, how many processors do we
have to licenses if both boxes has four processors in each box? The way
we're running the cluster is Active/Passive. We are using SQL 2000 Standard
edition along with Enterprise edition of Microsoft Windows 2003 Server. If
someone could give me some insight I would highly appreciate it.
Thank you
Alex AndersonSQL Server 2000 Standard Edition doesn't support clustering, so that is your
first problem. Now ignoring that, in an Active/Passive configuration you
need only license the maximum number of processors on any server in that
configuration. In your case that would mean 4. If you had a configuration
where the usually active system had 4 and the usually passive system had 8
then you'd need to license 8.
Hal Berenson, President
PredictableIT, LLC
http://www.predictableit.com
"Alex Anderson" <AAnderson@.Murrieta.org> wrote in message
news:usdeZCoJGHA.668@.TK2MSFTNGP11.phx.gbl...
> Hello Everyone,
> Our company is currently under the Enterprise agreement with Microsoft
> and I was wondering when it came to clustering, how many processors do we
> have to licenses if both boxes has four processors in each box? The way
> we're running the cluster is Active/Passive. We are using SQL 2000
> Standard edition along with Enterprise edition of Microsoft Windows 2003
> Server. If someone could give me some insight I would highly appreciate
> it.
> Thank you
> Alex Anderson
>
>|||Alex Anderson wrote:

> Hello Everyone,
> Our company is currently under the Enterprise agreement with Microsoft
> and I was wondering when it came to clustering, how many processors do we
> have to licenses if both boxes has four processors in each box? The way
> we're running the cluster is Active/Passive. We are using SQL 2000 Standa
rd
> edition along with Enterprise edition of Microsoft Windows 2003 Server. I
f
> someone could give me some insight I would highly appreciate it.
> Thank you
> Alex Anderson
SQL Server 2000 Standard Edition doesn't support failover clustering.
Your options are to upgrade to Enterprise Edition or to SQL Server 2005
Standard Edition, which do both support clustering.
"Under each of these editions, keeping a passive server for failover
purposes does not require a license as long as the passive server has
the same or fewer processors than the active server (under the per
processor scenario)."
http://www.microsoft.com/sql/howtobuy/faq.mspx
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--|||Thank you both. Understood!
Alex Anderson
"Alex Anderson" <AAnderson@.Murrieta.org> wrote in message
news:usdeZCoJGHA.668@.TK2MSFTNGP11.phx.gbl...
> Hello Everyone,
> Our company is currently under the Enterprise agreement with Microsoft
> and I was wondering when it came to clustering, how many processors do we
> have to licenses if both boxes has four processors in each box? The way
> we're running the cluster is Active/Passive. We are using SQL 2000
> Standard edition along with Enterprise edition of Microsoft Windows 2003
> Server. If someone could give me some insight I would highly appreciate
> it.
> Thank you
> Alex Anderson
>
>

Process license ?

Hello Everyone,
Our company is currently under the Enterprise agreement with Microsoft
and I was wondering when it came to clustering, how many processors do we
have to licenses if both boxes has four processors in each box? The way
we're running the cluster is Active/Passive. We are using SQL 2000 Standard
edition along with Enterprise edition of Microsoft Windows 2003 Server. If
someone could give me some insight I would highly appreciate it.
Thank you
Alex AndersonSQL Server 2000 Standard Edition doesn't support clustering, so that is your
first problem. Now ignoring that, in an Active/Passive configuration you
need only license the maximum number of processors on any server in that
configuration. In your case that would mean 4. If you had a configuration
where the usually active system had 4 and the usually passive system had 8
then you'd need to license 8.
--
Hal Berenson, President
PredictableIT, LLC
http://www.predictableit.com
"Alex Anderson" <AAnderson@.Murrieta.org> wrote in message
news:usdeZCoJGHA.668@.TK2MSFTNGP11.phx.gbl...
> Hello Everyone,
> Our company is currently under the Enterprise agreement with Microsoft
> and I was wondering when it came to clustering, how many processors do we
> have to licenses if both boxes has four processors in each box? The way
> we're running the cluster is Active/Passive. We are using SQL 2000
> Standard edition along with Enterprise edition of Microsoft Windows 2003
> Server. If someone could give me some insight I would highly appreciate
> it.
> Thank you
> Alex Anderson
>
>|||Alex Anderson wrote:
> Hello Everyone,
> Our company is currently under the Enterprise agreement with Microsoft
> and I was wondering when it came to clustering, how many processors do we
> have to licenses if both boxes has four processors in each box? The way
> we're running the cluster is Active/Passive. We are using SQL 2000 Standard
> edition along with Enterprise edition of Microsoft Windows 2003 Server. If
> someone could give me some insight I would highly appreciate it.
> Thank you
> Alex Anderson
SQL Server 2000 Standard Edition doesn't support failover clustering.
Your options are to upgrade to Enterprise Edition or to SQL Server 2005
Standard Edition, which do both support clustering.
"Under each of these editions, keeping a passive server for failover
purposes does not require a license as long as the passive server has
the same or fewer processors than the active server (under the per
processor scenario)."
http://www.microsoft.com/sql/howtobuy/faq.mspx
--
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--|||Thank you both. Understood!
Alex Anderson
"Alex Anderson" <AAnderson@.Murrieta.org> wrote in message
news:usdeZCoJGHA.668@.TK2MSFTNGP11.phx.gbl...
> Hello Everyone,
> Our company is currently under the Enterprise agreement with Microsoft
> and I was wondering when it came to clustering, how many processors do we
> have to licenses if both boxes has four processors in each box? The way
> we're running the cluster is Active/Passive. We are using SQL 2000
> Standard edition along with Enterprise edition of Microsoft Windows 2003
> Server. If someone could give me some insight I would highly appreciate
> it.
> Thank you
> Alex Anderson
>
>

Process license ?

Hello Everyone,
Our company is currently under the Enterprise agreement with Microsoft
and I was wondering when it came to clustering, how many processors do we
have to licenses if both boxes has four processors in each box? The way
we're running the cluster is Active/Passive. We are using SQL 2000 Standard
edition along with Enterprise edition of Microsoft Windows 2003 Server. If
someone could give me some insight I would highly appreciate it.
Thank you
Alex Anderson
SQL Server 2000 Standard Edition doesn't support clustering, so that is your
first problem. Now ignoring that, in an Active/Passive configuration you
need only license the maximum number of processors on any server in that
configuration. In your case that would mean 4. If you had a configuration
where the usually active system had 4 and the usually passive system had 8
then you'd need to license 8.
Hal Berenson, President
PredictableIT, LLC
http://www.predictableit.com
"Alex Anderson" <AAnderson@.Murrieta.org> wrote in message
news:usdeZCoJGHA.668@.TK2MSFTNGP11.phx.gbl...
> Hello Everyone,
> Our company is currently under the Enterprise agreement with Microsoft
> and I was wondering when it came to clustering, how many processors do we
> have to licenses if both boxes has four processors in each box? The way
> we're running the cluster is Active/Passive. We are using SQL 2000
> Standard edition along with Enterprise edition of Microsoft Windows 2003
> Server. If someone could give me some insight I would highly appreciate
> it.
> Thank you
> Alex Anderson
>
>
|||Alex Anderson wrote:

> Hello Everyone,
> Our company is currently under the Enterprise agreement with Microsoft
> and I was wondering when it came to clustering, how many processors do we
> have to licenses if both boxes has four processors in each box? The way
> we're running the cluster is Active/Passive. We are using SQL 2000 Standard
> edition along with Enterprise edition of Microsoft Windows 2003 Server. If
> someone could give me some insight I would highly appreciate it.
> Thank you
> Alex Anderson
SQL Server 2000 Standard Edition doesn't support failover clustering.
Your options are to upgrade to Enterprise Edition or to SQL Server 2005
Standard Edition, which do both support clustering.
"Under each of these editions, keeping a passive server for failover
purposes does not require a license as long as the passive server has
the same or fewer processors than the active server (under the per
processor scenario)."
http://www.microsoft.com/sql/howtobuy/faq.mspx
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
|||Thank you both. Understood!
Alex Anderson
"Alex Anderson" <AAnderson@.Murrieta.org> wrote in message
news:usdeZCoJGHA.668@.TK2MSFTNGP11.phx.gbl...
> Hello Everyone,
> Our company is currently under the Enterprise agreement with Microsoft
> and I was wondering when it came to clustering, how many processors do we
> have to licenses if both boxes has four processors in each box? The way
> we're running the cluster is Active/Passive. We are using SQL 2000
> Standard edition along with Enterprise edition of Microsoft Windows 2003
> Server. If someone could give me some insight I would highly appreciate
> it.
> Thank you
> Alex Anderson
>
>

Process Info (SQL Server Enterprise - Management - Current Activity)

Dear All
I have problem with my database server which running SQL server 2000.
The server running very slow. The worst case, to save a record required
more than 20-30 seconds.
Since this problem, I usually monitoring Process Info from Enterprise
Manager (Management - Current Activity), and I found a misterious
process as follow :
1. User: System
AccessTo: Master
Status: Background
Common: Task Manager
Waiting: >438 Million
2. User: System
AccessTo: Master
Status: Background
Common: Task Manager
Physical IO: > 51000
3. User: Administrator (Join domain)
Database: MSDB
Status: Sleeping
Common: Awaiting Command
App: SQL Agent Alert Engine
CPU Usage: > 16 Million
Anybody know about these condition? Does it normal?
Thanks
Michael
Mike
What is amount of memory?
Run SQL Server Profiler to see what is going on. (Blocking ,locks)
EXEC sp_who2 , see blkby column (If I remember well).
"Michael" <yapmichael2000@.gmail.com> wrote in message
news:1115718206.985119.318980@.o13g2000cwo.googlegr oups.com...
> Dear All
> I have problem with my database server which running SQL server 2000.
> The server running very slow. The worst case, to save a record required
> more than 20-30 seconds.
> Since this problem, I usually monitoring Process Info from Enterprise
> Manager (Management - Current Activity), and I found a misterious
> process as follow :
> 1. User : System
> AccessTo : Master
> Status : Background
> Common : Task Manager
> Waiting : >438 Million
> 2. User : System
> AccessTo : Master
> Status : Background
> Common : Task Manager
> Physical IO : > 51000
> 3. User : Administrator (Join domain)
> Database : MSDB
> Status : Sleeping
> Common : Awaiting Command
> App : SQL Agent Alert Engine
> CPU Usage : > 16 Million
> Anybody know about these condition? Does it normal?
> Thanks
> Michael
>
|||Thanks for your answer,
Amount of memory that be used by SQL Server is 1 GB.
I've check using sp_who, and on nothing on column blkby.
I think that not caused by Locks.
Note : After I restart the server, everything run well for a while. In
the worst case, the problem will be occured in 1 day, but usually
system running well within 3,4 days.

Process Info (SQL Server Enterprise - Management - Current Activity)

Dear All

I have problem with my database server which running SQL server 2000.
The server running very slow. The worst case, to save a record required
more than 20-30 seconds.
Since this problem, I usually monitoring Process Info from Enterprise
Manager (Management - Current Activity), and I found a misterious
process as follow :

1. User: System
AccessTo: Master
Status: Background
Common: Task Manager
Waiting: >438 Million

2. User: System
AccessTo: Master
Status: Background
Common: Task Manager
Physical IO: > 51000

3. User: Administrator (Join domain)
Database: MSDB
Status: Sleeping
Common: Awaiting Command
App: SQL Agent Alert Engine
CPU Usage: > 16 Million

Anybody know about these condition? Does it normal?

Thanks

MichaelMichael (yapmichael2000@.gmail.com) writes:
> I have problem with my database server which running SQL server 2000.
> The server running very slow. The worst case, to save a record required
> more than 20-30 seconds.
> Since this problem, I usually monitoring Process Info from Enterprise
> Manager (Management - Current Activity), and I found a misterious
> process as follow :
> 1. User : System
> AccessTo : Master
> Status : Background
> Common : Task Manager
> Waiting : >438 Million
> 2. User : System
> AccessTo : Master
> Status : Background
> Common : Task Manager
> Physical IO : > 51000
> 3. User : Administrator (Join domain)
> Database : MSDB
> Status : Sleeping
> Common : Awaiting Command
> App : SQL Agent Alert Engine
> CPU Usage : > 16 Million
> Anybody know about these condition? Does it normal?

These are system processes, and they be normal, particularly if SQL Server
has been up for a long time. I checked a production box, and while it
had lower numbers than yours, they were still big.

The most likely reason when a server appears to be slow is poor indexing,
poorly written code and fragmentation. For instance, when saving a row and
there is a poorly written trigger, this could make the INSERT statement
to take a long time. Blocking could also be an issue, and blocking can
also easily occur, if there are slow queries.

You don't say whether this is an application, you have control over
or a third-party app. But in any, case you need to analyse exactly
which queries that are slow. One way to do this is use the SQL Profiler,
and filter for operations with a long duration. Note though that from
duration alone, you cannot tell whether it was due to blocking or bad
performance. The CPU, Reads and Writes columns can give some hints about
this. (If they are low and duration is high, there was blocking.) You
can also use sp_who to see if you have any blocking, by looking for
non-zero values in the Blk column.

Once you have found the queries that are long-running, you can look
into improving indexes, and if possible also rewrite them.

You can also try running DBCC DBREINDEX on tables where you experience
problem. If you have fragmentation, you can get improvements.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||Thanks for your answer.

I've problem, as I wrote down, sometime to save a record required much
time.
When this happen, usually I restart the server, and then the problem
solved for a while. The problem will happen again within 10 day.
When the problem occured, on the Task Manager, Process Tab, SQLServ.exe
using more than 1 Gigabyte memory. And after restart the server,
SQLServ.exe only use about 450 to 500 Megabyte.

While the problem occured, there were difficulty to make connection to
the server (using Enterprise manager, Query Analyser, Application).
Usually an error message : Timeout expired.

About the application, I use visual basic to develop application.
And there were a few trigger, some of there were use cursor.
At this momenth, I have disable many trigger that used cursor, but
there a bit trigger which used cursor still active.

Would you like to give any suggestion?

Thanks very much

Michael|||Michael (yapmichael2000@.gmail.com) writes:
> I've problem, as I wrote down, sometime to save a record required much
> time.
> When this happen, usually I restart the server, and then the problem
> solved for a while. The problem will happen again within 10 day.
> When the problem occured, on the Task Manager, Process Tab, SQLServ.exe
> using more than 1 Gigabyte memory. And after restart the server,
> SQLServ.exe only use about 450 to 500 Megabyte.

That's perfectly normal. SQL Server grabs as much memory it needs and
can get. This memory is used for cache. So if SQL Server are kept running,
and there is no other activity on the machine, SQL Server should by
time have grown to use about all memory on the machine that the OS
does not need. (If there are other apps asking for memory, SQL Server
will yield memory.) Thus, a high memory consumption is no sign of
problem.

> While the problem occured, there were difficulty to make connection to
> the server (using Enterprise manager, Query Analyser, Application).
> Usually an error message : Timeout expired.

This one on the other hand obviously is a token of that something is wacko.
Do you get these problems also when you try to connect from the machine on
which SQL Server is running? If this works fine, one could suspect network
problems.

If not, it sounds like something is bogging down SQL Server very heavily.
This could be a poorly written query, but it also be an anomaly in the
server. Check what is in the SQL Server log at these occassions; there
might be some interesting messages. Particularly, I have one about UMS
Scheduler in mind. (A message that was added in SP3, but you are running
SP3 aren't you? By the way, SP4 is out.)

It could also be an idea to keep a Profiler trace running so you can see
what commands that are submitted and then try to correlate these commands
with the conditions where there server is not very reposnive.

Another check to make, just to rule out the more silly stuff, is that
you don't have any compressed database files.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

Process Info (SQL Server Enterprise - Management - Current Activity)

Dear All
I have problem with my database server which running SQL server 2000.
The server running very slow. The worst case, to save a record required
more than 20-30 seconds.
Since this problem, I usually monitoring Process Info from Enterprise
Manager (Management - Current Activity), and I found a misterious
process as follow :
1. User : System
AccessTo : Master
Status : Background
Common : Task Manager
Waiting : >438 Million
2. User : System
AccessTo : Master
Status : Background
Common : Task Manager
Physical IO : > 51000
3. User : Administrator (Join domain)
Database : MSDB
Status : Sleeping
Common : Awaiting Command
App : SQL Agent Alert Engine
CPU Usage : > 16 Million
Anybody know about these condition? Does it normal?
Thanks
MichaelMike
What is amount of memory?
Run SQL Server Profiler to see what is going on. (Blocking ,locks)
EXEC sp_who2 , see blkby column (If I remember well).
"Michael" <yapmichael2000@.gmail.com> wrote in message
news:1115718206.985119.318980@.o13g2000cwo.googlegroups.com...
> Dear All
> I have problem with my database server which running SQL server 2000.
> The server running very slow. The worst case, to save a record required
> more than 20-30 seconds.
> Since this problem, I usually monitoring Process Info from Enterprise
> Manager (Management - Current Activity), and I found a misterious
> process as follow :
> 1. User : System
> AccessTo : Master
> Status : Background
> Common : Task Manager
> Waiting : >438 Million
> 2. User : System
> AccessTo : Master
> Status : Background
> Common : Task Manager
> Physical IO : > 51000
> 3. User : Administrator (Join domain)
> Database : MSDB
> Status : Sleeping
> Common : Awaiting Command
> App : SQL Agent Alert Engine
> CPU Usage : > 16 Million
> Anybody know about these condition? Does it normal?
> Thanks
> Michael
>|||Hi Michael,
I agree with Uri, something is a bit iffy with your server and you should
run the profiler.
If you don't have any jobs running I would sugest you stop then restart the
service that way when it re-starts it will start with a 'clean plate' then
your can put on your monitoring stuff. NB if you to have jobs running then
you run the risk of losing data.
However when it does re-start it should be a lot faster.
Peter
"Michael" wrote:
> Dear All
> I have problem with my database server which running SQL server 2000.
> The server running very slow. The worst case, to save a record required
> more than 20-30 seconds.
> Since this problem, I usually monitoring Process Info from Enterprise
> Manager (Management - Current Activity), and I found a misterious
> process as follow :
> 1. User : System
> AccessTo : Master
> Status : Background
> Common : Task Manager
> Waiting : >438 Million
> 2. User : System
> AccessTo : Master
> Status : Background
> Common : Task Manager
> Physical IO : > 51000
> 3. User : Administrator (Join domain)
> Database : MSDB
> Status : Sleeping
> Common : Awaiting Command
> App : SQL Agent Alert Engine
> CPU Usage : > 16 Million
> Anybody know about these condition? Does it normal?
> Thanks
> Michael
>|||Thanks for your answer,
Amount of memory that be used by SQL Server is 1 GB.
I've check using sp_who, and on nothing on column blkby.
I think that not caused by Locks.
Note : After I restart the server, everything run well for a while. In
the worst case, the problem will be occured in 1 day, but usually
system running well within 3,4 days.

Process Info (SQL Server Enterprise - Management - Current Activity)

Dear All
I have problem with my database server which running SQL server 2000.
The server running very slow. The worst case, to save a record required
more than 20-30 seconds.
Since this problem, I usually monitoring Process Info from Enterprise
Manager (Management - Current Activity), and I found a misterious
process as follow :
1. User : System
AccessTo : Master
Status : Background
Common : Task Manager
Waiting : >438 Million
2. User : System
AccessTo : Master
Status : Background
Common : Task Manager
Physical IO : > 51000
3. User : Administrator (Join domain)
Database : MSDB
Status : Sleeping
Common : Awaiting Command
App : SQL Agent Alert Engine
CPU Usage : > 16 Million
Anybody know about these condition? Does it normal?
Thanks
MichaelMike
What is amount of memory?
Run SQL Server Profiler to see what is going on. (Blocking ,locks)
EXEC sp_who2 , see blkby column (If I remember well).
"Michael" <yapmichael2000@.gmail.com> wrote in message
news:1115718206.985119.318980@.o13g2000cwo.googlegroups.com...
> Dear All
> I have problem with my database server which running SQL server 2000.
> The server running very slow. The worst case, to save a record required
> more than 20-30 seconds.
> Since this problem, I usually monitoring Process Info from Enterprise
> Manager (Management - Current Activity), and I found a misterious
> process as follow :
> 1. User : System
> AccessTo : Master
> Status : Background
> Common : Task Manager
> Waiting : >438 Million
> 2. User : System
> AccessTo : Master
> Status : Background
> Common : Task Manager
> Physical IO : > 51000
> 3. User : Administrator (Join domain)
> Database : MSDB
> Status : Sleeping
> Common : Awaiting Command
> App : SQL Agent Alert Engine
> CPU Usage : > 16 Million
> Anybody know about these condition? Does it normal?
> Thanks
> Michael
>|||Thanks for your answer,
Amount of memory that be used by SQL Server is 1 GB.
I've check using sp_who, and on nothing on column blkby.
I think that not caused by Locks.
Note : After I restart the server, everything run well for a while. In
the worst case, the problem will be occured in 1 day, but usually
system running well within 3,4 days.