Friday, March 30, 2012

Scheduling SQL Server start/stop

I have an instance of SQLServer which I would like to restart automatically
once a day due to memory leak issues. How can I best achieve this?
Thanks in advance for your help.rmuram wrote:
> I have an instance of SQLServer which I would like to restart
> automatically once a day due to memory leak issues. How can I best
> achieve this?
> Thanks in advance for your help.
I think before you go this route, we should discuss the memory issues. I
have not seen any reported memory leak issues with SQL Server. Some may
exist, but I have not seen them. What is often reported as a memory leak
issue is generally not a problem, but a SQL Server design. If what you're
seeing is that SQL Server gradually consumes more and more memory on the
server without returning that memory to the server, this is by design. If
you are finding that you require additional memory for other services on the
server, then you should set an upper memory limit for the server to prevent
it from consuming too much. If OTOH you are seeing a memory leak issue,
please let us know in more detail what you are seeing.
To start stop the server manually, you can look at "Starting SQL Server
Manually" and "Stopping SQL Server" in BOL.
David Gugick
Quest Software|||Hi,

>From SQL Server it is imposssible to schedule a restart of SQL
Server.But can create a BATCH file.
HTH
from
Killer
rmuram wrote:
> I have an instance of SQLServer which I would like to restart automaticall
y
> once a day due to memory leak issues. How can I best achieve this?
> Thanks in advance for your help.|||Thanks David for the reply.
My use of the descrition 'memory leak' was not not entirely correct and wh
at
I am seeing is as described you described below.

> If what you're seeing is that SQL Server gradually consumes more and more
> memory on the server without returning that memory to the server, this is
by
> design.
What happens if I set the upperlimit to the memory usage? Will it free up
memory to serve additional requests etc?
I would still like to know if there are ways to automate startup/shutdown if
anybody has any experience.
Thanks.
"David Gugick" wrote:

> rmuram wrote:
> I think before you go this route, we should discuss the memory issues. I
> have not seen any reported memory leak issues with SQL Server. Some may
> exist, but I have not seen them. What is often reported as a memory leak
> issue is generally not a problem, but a SQL Server design. If what you're
> seeing is that SQL Server gradually consumes more and more memory on the
> server without returning that memory to the server, this is by design. If
> you are finding that you require additional memory for other services on t
he
> server, then you should set an upper memory limit for the server to preven
t
> it from consuming too much. If OTOH you are seeing a memory leak issue,
> please let us know in more detail what you are seeing.
> To start stop the server manually, you can look at "Starting SQL Server
> Manually" and "Stopping SQL Server" in BOL.
>
> --
> David Gugick
> Quest Software
>
>|||Thanks for the reply.
Do you have a sample I can work from?
"doller" wrote:

> Hi,
>
> Server.But can create a BATCH file.
> HTH
> from
> Killer
> rmuram wrote:
>|||Hi rmura,
If u want to create a backfile to start and stop of sql server the u
have to follow these steps
open command prompt
write net stop mssqlsever
if will ask u to stop sql agent y/n : press y
then it will ask u to stop sql server y/n : press y
so u can create a backfile
like this
cd \
net stop mssqlserver
y
to start sql sever
add the code
net start mssqlserver
now u need to start sql agent
add these code
net start sqlserveragent
HTH
from
Killer|||Here's some info on SQL Server's memory usage:
INF: SQL Server Memory Usage
http://support.microsoft.com/defaul...b;en-us;q321363
http://www.mssqlserver.com/faq/trou...-memoryleak.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"rmuram" <rmuram@.discussions.microsoft.com> wrote in message
news:CCC09FAF-9647-4210-9C2A-779AF6FB760C@.microsoft.com...
>I have an instance of SQLServer which I would like to restart automatically
> once a day due to memory leak issues. How can I best achieve this?
> Thanks in advance for your help.

No comments:

Post a Comment