C# code to start SQL Server (MySQLSERVER) Automatically
please help me I created a program via C# and connect to SQL Server on the desktop/laptop when I turn off the desktop/laptop and run again the SQL Server (MYSQLSERVER) not running automatically, I want C# code to run it automatically, I appreciate someone helps me to give me C# code.
Jignesh KumarPosted Sep 25, 2020, 10:55 AM
Laxmidhar SahooPosted Sep 25, 2020, 9:14 AM
Lava NoorPosted Sep 25, 2020, 3:44 AM
Gowtham RamarPosted Oct 11, 2019, 2:28 AM
For starting your services automatically, SQL Server needs an account with rights to start services during operating system start up.
To solve this issue you need to go Administrative Tools > Services > SQL Server(MSSQLSERVER or the name of your instances) > Right Click > Properties > Move to Log On > Set the Log On option using a Local System Account
If you have chosen this option, hit on Browse Button and find the Local Service Account or Network service Account there > Click in Apply.
Restart your computer and you will able to start your SQL Server.