SQL Server SQL Agent service usage tutorial Summary

Source: Internet
Author: User

1. start or stop the SQL Agent service in the query analyzer.
Start
Use master
Go
Xp_cmdshell 'net start sqlserveragent'
Stop
Use master
Go
Xp_cmdshell 'net stop sqlserveragent'
Change the service start mode from manual to automatic start Mode
Exec xp_cmdshell 'scm-Action 7-Service mssqlserver-SvcStartType 2'
You can also directly use the command line to execute the content in quotation marks.
2. Causes and handling of abnormal startup
On the surface, the SQL Server agent service is started normally, but the following error occurs when you view the job attributes and job history:
Error 14258: SQLServerAgent cannot be started. Please try again later.
Possible causes:
"Use Windows NT fiber" is selected. The specific cause is unknown.
Solution:
Enterprise Manager -- Right-click SQL instance -- properties -- Processor -- deselect "use Windows NT fiber"
Then restart the SQL service.
System Password modified
Solution:
A. My computer -- control panel -- Administrative Tools -- service -- Right-click MS SQLServer -- properties -- login identity -- select "Local SYSTEM account"
Or:
B. my computer -- control panel -- Administrative Tools -- services -- Right-click MS SQLServer -- properties -- login identity -- select "this account" -- select administrator, enter your administrator password in the password and Confirm Password.
Differences between the two:
Select the first method. The administrator password will be changed later. You do not need to adjust the password (but the system administrator is required to log on to the operating system)
An error occurred while the database was DOWN.
Solution:
Use the installation CD to reinstall the registry, select 'advanced option'-'rebuild registry ', and then proceed all the way ......
Related Article

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.