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
  • This behaviour is not normal at all. Are there any errors in the windows event log when starting or shutting down the system? What you try to do may solve you problem in some way but you may have ohter problems with sql or ohter software as well. In any way it would be better to find out why this happens and fix the error if possible. Commented Oct 23, 2014 at 18:07
  • It showing some errors there, but i am unable to understand them :(
    – Srinivas
    Commented Oct 24, 2014 at 1:46
  • Please visit eventid.net and type in the error code and source. There are many helpfull comments on different errors. You may open a new question for the errors. Commented Oct 24, 2014 at 7:05

3 Answers 3

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.

3
  • This really helped me in fixing that issue. but now it is taking 3 min to start the Sql Server service after i logged in. Is there any way to change it's priority?
    – Srinivas
    Commented Oct 24, 2014 at 2:27
  • @Srinivas it's one or the other I'm afraid. I guess you could always throw in a logon script to start the service, as other people have outlined below. Commented Oct 24, 2014 at 2:41
  • that means you are about to say we are not able to change the priorities by changing any settings and we will need to run the scripts..right?
    – Srinivas
    Commented Oct 24, 2014 at 4:12
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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .