Start and Stop IIS and SqlServer

Source: Internet
Author: User

Although the memory is cheap now, I still think that my M memory is too small. There is no way. There are too many things running in the background, and many of them are useful and cannot be closed. IIS and SQLServer are both large memory users, so they are only turned on when they are used and disabled at any time when they are not used, it is very troublesome and slow to start and close IIS and SQLServer every time you use the console. Now you can write two batch files and use the "command line" method to start and close IIS and SQLServer.
A batch file start. bat is started:

Net start mssqlserver
Net start w3svc

One is to stop. bat:

Net stop mssqlserver
Net stop iisadmin/y

You can also use the iisreset command to add parameters to control IIS through the nameline:

C: \ Documents and Settings \ Administrator> iisreset /?

IISRESET. EXE (c) Microsoft Corp. 1998-1999

Usage:
Iisreset [computername]

/RESTART stop and RESTART all Internet services.
/START all Internet services.
/STOP: STOP all Internet services.
/REBOOT restarts the computer.
/REBOOTonERROR if an error occurs when you start, stop, or reSTART Internet services, restart the computer.
/NOFORCE do not forcibly terminate Internet services if an attempt to stop a service fails.
/TIMEOUT: val specifies the TIMEOUT value (in seconds) to wait for the successful termination of Internet services.
If the REBOOTonERROR parameter has been specified, You can restart the computer after timeout.
The default value is 20 seconds to restart, 60 seconds to stop, and 0 seconds to restart.
/STATUS: displays the STATUS of all Internet services.
/ENABLE Internet service restart on the local system.
/DISABLE Internet service restart on the local system.

C: \ Documents ents and Settings \ Administrator>

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.