Click here to Skip to main content
15,893,668 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
In one desktop SQL Server(MYSQL) service is in automatic start mode but when i shutdown that computer,service is stops automatically and when i start the computer that service is not starting automatically....why it happens? Is there any solutions.Please suggest me.
Thank You.
Posted

 
Share this answer
 
Comments
Anusha Shetty 13-Apr-13 1:12am    
Actually that service is in automatic start up type,then also am doing manually start when computer starts.
Information about "Windows Services" follows:

01. Open "Computer Management" console.
02. In the treeview find "Services"
03. Tab "Standard", sort by "Name"
04. Highlight anything in the window, keyboard press "S"
05. See (all) the "SQL Server (your instancename here)"
06. Right click select "Properties"
07. On "General" tab see "Startup type:"
08. Using that dropdown box, select "Automatic"
09. [optional] Hit "Start"
10. Hit "Ok" to close dialog.
11. [optional contingent upon 09] Restart computer

One solution to a non-running SQL Server instance at computer start. There might be a few more things that prevent it from starting.

[edit]

The stoproc enabling TSQL will look something like this
DECLARE @ProcName [nvarchar](146)
SET @ProcName = '[master].[dbo].[your sp_name here]'
DECLARE @OptionName [nvarchar](599)
SET @OptionName 'startup'
DECLARE @OptionValue [varchar](61)
SET @OptionValue = 'TRUE'

EXEC sp_procoption @ProcName, @OptionName, @OptionValue

The stoproc you create could be anything that doesn't raise an error in the CREATE stage. As you'd expect, automation is about what's inside the thing that's already running.
[end edit]
 
Share this answer
 
v3
Comments
Anusha Shetty 13-Apr-13 1:07am    
It is already Automatic start up type. I want the service start automatically when i start the computer.
RedDk 14-Apr-13 14:12pm    
see my [edit] for further details
Anusha Shetty 15-Apr-13 0:26am    
actually i didnt get that, for why u give this code.(where i hav to use this???)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900