1

I am facing an issue on my laptop which is installed with windows 8.1

When ever i turn ON my Windows 8.1 laptop, I can instantly login with my password, as I would expect.

However, if I use my PIN instead, the system mostly freezes for about one minute: The input box disappears, the "back"-Button becomes unresponsive. After one minute, the login is executed as expected.

This is all because SQL server. When i stop the services of SQL server and restart the laptop it works fine as when i turns on laptop.

As i understood, SQL server service is effecting. So i am thinking to stop the service like when we turn off the laptop and start the same process after restart like when we turn on laptop.

Is it possible to do that? If so please tell me how to do that

3 Answers3

0

I think there are different ways to acive your goal.

First solution that comes in my mind is to set the service to start manually. Then you need to create two command line files. Open the notepad eitor and type "net stop sqlbrowser" on the first line and on the next line "shutdown -s -t 20". Save the file as "shutdown.bat" or "shutdown.cmd" on your desktop.

If you want to turn off your computer just click this file.

The second file you need to create should have the content "net start sqlbrowser". Save that file as well to an name e.g. "pcStart.bat" or .cmd. Because the service is set up not to start automaticly you need to put this file to the folder "Startup" in you windows start menu. When you start your computer this file should be started after you logged in to your user. ( startupfolder http://lifehacker.com/5829375/how-to-start-a-program-automatically-when-your-computer-boots)

Service names may be different but with the right names it should work fine.

There are for sure other solutions.

0

Try to use Local Group Policy to automate stopping of SQL service while log off and use "Task Scheduler" to start the SQL service with some delay. So that it did not disturbs your login process. This can be automated using the below steps.

Write two simple batch file to include command and save it in the local machine.

Stop.bat

sc stop "Name of SQL Service"
sc config "Name of SQL Service" start= disabled

Start.bat

sc config "Name of SQL Service" start= auto
sc start "Name of SQL Service"

Open the Local Group Policy console (Run > gpedit.msc) > Computer Management > Windows Settings > Scripts (Startup/Shutdown). Now double click on the "Shutdown" and add the SQL stop batch file. So that, this shutdown batch file stops the SQL service and disables to SQL service. For a immediate effect, go to command prompt and run "gpupdate /force"

Open the "Task Scheduler" and follow the steps: Create Task > Name the task > Trigger tab > New > "Begin the task" drop down > choose "At log on" > in the same window use "Advance Settings" to delay the process by 1 minute.

Go to "Action tab" > New > Start a Program > Browse the batch file to run at log on.

Hope this helps.

BDRSuite
  • 6,378
0

It strikes me that the simplest thing to do is to just set the startup type of the SQL Service to "Automatic (Delayed)".

This should give you time to log in. It seems that logging out/restarting is irrelevant to your issue, only that you have used this to demonstrate your issue.