MS SQL Basics Tutorial: Starting and shutting down a server

Source: Internet
Author: User
Tags continue

There are several ways to start a server:

1. Start with Enterprise Manager

When you right-click the server you want to start in SQL Server Group for Enterprise Manager, or after right-clicking on the server you want to start, you can start by selecting the Start item from the shortcut menu.

2. Start with SQL Server Service Manager

The startup method is as follows:

(1) Select the Service Manager option from the menu and start the Services Manager. After the service Manager starts, as shown in Figure 5-2 (a);

(2) Select the Server and Services (Service) option to start in service Manager;

(3) Click on the button in service Manager, that is, the start/continue option to start the server. After the start of the screen as shown in Figure 5-2 B.

3, automatically start the server

You can start the server when the operating system starts, and you can select the Automatic startup option in service Manager. As shown in Figure 5-2. You can also set up automatic startup in the scheduled task of the operating system, or specify in the Server property configuration (see 5.5 Configure the server).

4, using the operating system Control Panel service management program to start

The startup method is as follows:

(1) in Win2000 Server and Windows NT, you can choose the Services shortcut under Administrative Tools admin-istrative tools from Control Panel (Win2000 Professional operating system is " Server Management Services option), the page appears as shown in Figure 5-3 (a);

(2) Right-click the name of the service you want to start, select the "Start" option from the shortcut menu, and start the MSSQLServer, as shown in Figure 5-3 (b).

5, with the command to start

You can start the server by using command net start SQL Server or sqlservr. Where the net start SQL Server command has no parameters, the corresponding command also pauses the server command net pause, continues service Command net continue, stops the server command net stop, and so on. The sqlservr command is more complex and can be added with many parameters. The syntax looks like the following:

sqlservr [-c] [-dmaster_path] [F] [-eerror_log_path] [-lmaster_log_path] [-m] [-n] [-pprecision_level] [-sregistry_key ] [-ttrace#] [-v] [-X]

The parameter description is as follows:

-C

Indicates that SQL Server starts using this parameter independently of NT service management control to shorten startup SQL Server

Of time. However, after using it, you cannot pause with SQL Server Service Manager or Net series commands

or stop SQL Server, and you must shut down SQL Server before exiting the operating system.

-dmaster_path

Indicates the full path of the master database. There are no spaces between-D and Master_path.

-F

Start the server with the lowest configuration.

-eerror_log_path

Indicates the full path of the error log file. There are no spaces between-E and Error_log_path.

-lmaster_log_path

Indicates the full path of the transaction log file for the master database. There is no between-L and Master_log_path

Space.

-M

Indicates that SQL Server is started in Single-user mode.

-N

Indicates that you are not using the Windows NT Program log to register SQL Server events. If this parameter is used,

It is best to use the-e parameter at the same time, otherwise the SQL Server event will not be logged.

-pprecision_level

Indicates the highest precision of the decimal and numeric data types. There are no spaces between-p and Precision_level.

Precision_level values range from 1 to 38. When this parameter is not used, the system defaults to 28, using this parameter without indicating

Specific precision, the system is considered to be 38.

-sregistry_key

Indicates that you want to start SQL Server based on the parameter options under Registry_key in the registry.

-ttrace#

Indicates that a specified trace flag trace# is started with SQL Server. Note that-T is uppercase.

-V

Displays the version number of SQL Server at startup.

-X

Do not use CPU information statistics.

These parameters can also be set in Enterprise Manager, which is specifically described in the Configuration Server section of this chapter.

The method of shutting down the server is similar to starting the server, but the opposite is the case, but using the net STOP or shutdown command to shut down the server with the command.

See the full set of "MS SQL Basics Tutorials"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.