Discussione:
Script Stoppare Sql e ...
(troppo vecchio per rispondere)
MG
2004-06-24 10:49:10 UTC
Permalink
Mi servirebbe uno script da schedulare per poter stoppare
e riavviare subito dopo Mssql server e SqlServerAgent in
quanto una procedura notturna mi alloca e non mi rilascia
piu' tantissima memoria.
Grazie 1000 a tutti anticipatamente
MG
Luca Bianchi
2004-06-24 11:34:50 UTC
Permalink
Post by MG
Mi servirebbe uno script da schedulare per poter stoppare
e riavviare subito dopo Mssql server e SqlServerAgent in
quanto una procedura notturna mi alloca e non mi rilascia
piu' tantissima memoria.
Per stoppare un servizio (qualunque servizio) puoi utilizzare il comando

NET STOP nomeservizio

e riavviarlo con

NET START nomeservizio

Per quanto riguarda il modo in cui SQL Server utilizza la memoria (che
talvolta può sembrare che "non la rilasci") dai un'occhiata a questo thread

http://www.google.it/groups?hl=it&lr=&ie=UTF-8&selm=TAapa.57180%24iy5.1719398%40twister2.libero.it

e ad altri similari che puoi trovare facendo una ricerca con Google
Post by MG
Grazie 1000 a tutti anticipatamente
MG
Bye
--
Luca Bianchi
Microsoft MVP - SQL Server
http://mvp.support.microsoft.com
http://italy.mvps.org
a***@discussions.microsoft.com
2004-06-24 11:47:40 UTC
Permalink
Grazie 1000
MG
-----Messaggio originale---
Post by MG
Mi servirebbe uno script da schedulare per poter
stoppare
Post by MG
e riavviare subito dopo Mssql server e SqlServerAgent in
quanto una procedura notturna mi alloca e non mi
rilascia
Post by MG
piu' tantissima memoria.
Per stoppare un servizio (qualunque servizio) puoi
utilizzare il comando
NET STOP nomeservizio
e riavviarlo con
NET START nomeservizio
Per quanto riguarda il modo in cui SQL Server utilizza la
memoria (che
talvolta può sembrare che "non la rilasci") dai
un'occhiata a questo thread
http://www.google.it/groups?hl=it&lr=&ie=UTF-
8&selm=TAapa.57180%24iy5.1719398%40twister2.libero.it
e ad altri similari che puoi trovare facendo una ricerca
con Google
Post by MG
Grazie 1000 a tutti anticipatamente
MG
Bye
--
Luca Bianchi
Microsoft MVP - SQL Server
http://mvp.support.microsoft.com
http://italy.mvps.org
.
Walter Gola
2004-06-24 16:53:39 UTC
Permalink
ciao,
scusate l'intromissione!!

come faccio ad evitare che net start mi chieda conferma
ma che vada avanti in automatico?

Ciao e grazie
Walter
-----Messaggio originale---
Post by MG
Mi servirebbe uno script da schedulare per poter
stoppare
Post by MG
e riavviare subito dopo Mssql server e SqlServerAgent
in
Post by MG
quanto una procedura notturna mi alloca e non mi
rilascia
Post by MG
piu' tantissima memoria.
Per stoppare un servizio (qualunque servizio) puoi
utilizzare il comando
NET STOP nomeservizio
e riavviarlo con
NET START nomeservizio
Per quanto riguarda il modo in cui SQL Server utilizza
la memoria (che
talvolta può sembrare che "non la rilasci") dai
un'occhiata a questo thread
http://www.google.it/groups?hl=it&lr=&ie=UTF-
8&selm=TAapa.57180%24iy5.1719398%40twister2.libero.it
e ad altri similari che puoi trovare facendo una ricerca
con Google
Post by MG
Grazie 1000 a tutti anticipatamente
MG
Bye
--
Luca Bianchi
Microsoft MVP - SQL Server
http://mvp.support.microsoft.com
http://italy.mvps.org
.
Lorenzo Benaglia
2004-06-24 19:37:37 UTC
Permalink
Post by Walter Gola
come faccio ad evitare che net start mi chieda conferma
ma che vada avanti in automatico?
Ciao Walter,

a quale conferma ti riferisci?
Utilizzo SQL Server 2000 Developer Edition SP3a su Windows XP Professional
SP1 e sono connesso con un account con diritti di amministratore locale
della macchina.
Ho aperto una shell DOS ed ho eseguito i seguenti comandi:

C:\>NET STOP MSSQLServer
The MSSQLSERVER service is stopping.
The MSSQLSERVER service was stopped successfully.


C:\>NET START MSSQLServer
The MSSQLSERVER service is starting.
The MSSQLSERVER service was started successfully.


C:\>

In entrambi i casi non ho dovuto confermare niente.
Potresti fornirci ulteriori dettagli?
Post by Walter Gola
Ciao e grazie
Prego.

Ciao!
--
Lorenzo Benaglia
Microsoft MVP - SQL Server
http://mvp.support.microsoft.com
http://italy.mvps.org
Walter Gola
2004-06-25 06:55:57 UTC
Permalink
ciao ,

io uso sql 2000 standard eng sp3 su win 2000 eng server
sp4.

quando lancio net stop MSSQLSERVER ecco cosa mi appare:

The following services are dependent on the MSSQLSERVER
service.

Stopping the MSSQLSERVER service will also stop these
services.


SQLSERVERAGENT

Do you want to continue this operation? (Y/N) [N]: y
e qui mi chiede conferma e lo script si blocca!!!


The SQLSERVERAGENT service is stopping..
The SQLSERVERAGENT service was stopped successfully.


The MSSQLSERVER service is stopping..
The MSSQLSERVER service was stopped successfully.

ciao
Walter
-----Messaggio originale---
Post by Walter Gola
come faccio ad evitare che net start mi chieda conferma
ma che vada avanti in automatico?
Ciao Walter,
a quale conferma ti riferisci?
Utilizzo SQL Server 2000 Developer Edition SP3a su
Windows XP Professional
SP1 e sono connesso con un account con diritti di
amministratore locale
della macchina.
Ho aperto una shell DOS ed ho eseguito i seguenti
C:\>NET STOP MSSQLServer
The MSSQLSERVER service is stopping.
The MSSQLSERVER service was stopped successfully.
C:\>NET START MSSQLServer
The MSSQLSERVER service is starting.
The MSSQLSERVER service was started successfully.
C:\>
In entrambi i casi non ho dovuto confermare niente.
Potresti fornirci ulteriori dettagli?
Post by Walter Gola
Ciao e grazie
Prego.
Ciao!
--
Lorenzo Benaglia
Microsoft MVP - SQL Server
http://mvp.support.microsoft.com
http://italy.mvps.org
.
Lorenzo Benaglia
2004-06-25 07:20:45 UTC
Permalink
Post by Walter Gola
The following services are dependent on the MSSQLSERVER
service.
Stopping the MSSQLSERVER service will also stop these
services.
SQLSERVERAGENT
Do you want to continue this operation? (Y/N) [N]: y
e qui mi chiede conferma e lo script si blocca!!!
The SQLSERVERAGENT service is stopping..
The SQLSERVERAGENT service was stopped successfully.
The MSSQLSERVER service is stopping..
The MSSQLSERVER service was stopped successfully.
Ciao Walter,

beh, la soluzione più semplice che mi viene in mente è quella di fermare il
SQL Server Agent prima del servizio MSSQLServer:

C:\>NET STOP SQLServerAgent
The SQLServerAgent service is stopping.
The SQLServerAgent service was stopped successfully.


C:\>NET STOP MSSQLServer
The MSSQLServer service is stopping..
The MSSQLServer service was stopped successfully.


C:\>

In questo modo non ti verrà proposta nessuna domanda.

Ciao!
--
Lorenzo Benaglia
Microsoft MVP - SQL Server
http://mvp.support.microsoft.com
http://italy.mvps.org
a***@discussions.microsoft.com
2004-06-25 09:48:11 UTC
Permalink
Grazie mille,

a volte la soluzione è sotto gli occhi e non la si vede!!!

Ciao
Walter
-----Messaggio originale---
Post by Walter Gola
The following services are dependent on the MSSQLSERVER
service.
Stopping the MSSQLSERVER service will also stop these
services.
SQLSERVERAGENT
Do you want to continue this operation? (Y/N) [N]: y
e qui mi chiede conferma e lo script si blocca!!!
The SQLSERVERAGENT service is stopping..
The SQLSERVERAGENT service was stopped successfully.
The MSSQLSERVER service is stopping..
The MSSQLSERVER service was stopped successfully.
Ciao Walter,
beh, la soluzione più semplice che mi viene in mente è
quella di fermare il
C:\>NET STOP SQLServerAgent
The SQLServerAgent service is stopping.
The SQLServerAgent service was stopped successfully.
C:\>NET STOP MSSQLServer
The MSSQLServer service is stopping..
The MSSQLServer service was stopped successfully.
C:\>
In questo modo non ti verrà proposta nessuna domanda.
Ciao!
--
Lorenzo Benaglia
Microsoft MVP - SQL Server
http://mvp.support.microsoft.com
http://italy.mvps.org
.
Loading...