Peristiwa
31 Mac, 11 PTG - 2 Apr, 11 PTG
Acara pembelajaran SQL, Fabric dan Power BI terbesar. 31 Mac - 2 April. Gunakan kod FABINSIDER untuk menjimatkan $400.
Daftar hari iniPelayar ini tidak lagi disokong.
Naik taraf kepada Microsoft Edge untuk memanfaatkan ciri, kemas kini keselamatan dan sokongan teknikal yang terkini.
Applies to:
SQL Server
Immediately stops SQL Server.
Transact-SQL syntax conventions
SHUTDOWN [ WITH NOWAIT ]
Optional. Shuts down SQL Server without performing checkpoints in every database. SQL Server exits after attempting to terminate all user processes. When the server restarts, a rollback operation occurs for incomplete transactions.
Unless the WITH NOWAIT
option is used, SHUTDOWN
shuts down SQL Server by:
Disabling logins (except for members of the sysadmin and serveradmin fixed server roles).
Nota
To display a list of all current users, run sp_who
.
Waiting for currently running Transact-SQL statements or stored procedures to finish. To display a list of all active processes and locks, run sp_who
and sp_lock
, respectively.
Inserting a checkpoint in every database.
Using the SHUTDOWN
statement minimizes the amount of automatic recovery work needed when members of the sysadmin fixed server role restart SQL Server.
Other tools and methods can also be used to stop SQL Server. Each of these issues a checkpoint in all databases. You can flush committed data from the data cache and stop the server:
By using SQL Server Configuration Manager.
By running net stop mssqlserver
from a command prompt for a default instance, or by running net stop mssql$<instancename>
from a command prompt for a named instance.
By using Services in Control Panel.
If sqlservr.exe
was started from the command prompt, pressing Ctrl+C shuts down SQL Server. However, pressing Ctrl+C doesn't insert a checkpoint.
Nota
Using any of these methods to stop SQL Server sends the SERVICE_CONTROL_STOP
message to SQL Server.
SHUTDOWN
permissions are assigned to members of the sysadmin and serveradmin fixed server roles, and they aren't transferable.
Peristiwa
31 Mac, 11 PTG - 2 Apr, 11 PTG
Acara pembelajaran SQL, Fabric dan Power BI terbesar. 31 Mac - 2 April. Gunakan kod FABINSIDER untuk menjimatkan $400.
Daftar hari ini