Sql server

Hi,

My SQl Server and SQl server agent are not starting.When I execute sqlserver.exe from command prompt I am able to login to server.As soon as I close command prompt it throws error as given below.

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server
TecornoAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Audhi203Commented:
Check if you Servers service is running in Run -> Services.msc
0
TecornoAuthor Commented:
status of sql server and server agent are blank in services.msc
0
IT Pros Agree: AI and Machine Learning Key

We’d all like to think our company’s data is well protected, but when you ask IT professionals they admit the data probably is not as safe as it could be.

TecornoAuthor Commented:
I found this error in event viewer when i try to start services from sql server configuration manager.

initerrlog: Could not open error log file ''. Operating system error = 3(The system cannot find the path specified.).
0
Kevin CrossChief Technology OfficerCommented:
Did this ever work or is this a new installation? Have you installed anything and rebooted just recently? Maybe try backing out the recent change to the system. If this is a new install, you can try repairing or reinstalling SQL as something may have gotten corrupted / omitted on the first attempt.
0
TecornoAuthor Commented:
Hi,

This was installed long back and recently sql server is manually stopped in sql server configuration manager and from then on it never started again.As i said in my query it works fine after starting sqlserver.exe from command prompt but once I closr command prompt I loose the connection.

Thanks,
0
Kevin CrossChief Technology OfficerCommented:
How did you manually stop this -- in other words, did you change the services startup from automatic to disabled | manual. Check that you have the service starting with Network Service and and all is set correctly, then try to start from command line (you will find the service short name to use from command line in Services.msc when you go check on the properties specified earlier) with NET START {service short name}.
0
TecornoAuthor Commented:

Thanks for your quick response.
I manually stopped by right clicking on sql server in configuartion manager(i dont think i changed it from automatic to manual before stopping)

but now i changed both sql server and sql server agent to manual both are log on as nt authority\network service.

please find below error when i try to run from command line
Microsoft Windows [Version 5.2.3790]
(C) Copyright 1985-2003 Microsoft Corp.

C:\Documents and Settings\seethap1>net start mssqlserver
The SQL Server (MSSQLSERVER) service is starting..
The SQL Server (MSSQLSERVER) service could not be started.

A service specific error occurred: 17058.

More help is available by typing NET HELPMSG 3547.

0
Kevin CrossChief Technology OfficerCommented:
That is interesting and it has persisted even after rebooting the operating system. Must be something with the error -- hadn't experience it myself, but check this:

http://social.msdn.microsoft.com/Forums/en-US/sqldisasterrecovery/thread/383bc31d-5d87-4e07-b2fb-acbfbe5776a1

There was a possibility when stopping the services that the settings for the error log were changed OR this path has become unavailable to SQL either due to permissions changes or path deletion. In the past with NT there were occasional times when NTFS permissions would seemingly get out of whack and reapplying service pack would magically fix things ... haven't seen those kinds of gremlins as much in newer versions of Windows but it never hurts to reapply NTFS permissions even if they appear correct when you look at them in the GUI.
0
TecornoAuthor Commented:
Log files are existing in correct path and nt authority\network service.
has full access to that log file.Can you please let me know how to reapply NTFS permissions I have no clue how to apply them.

Thanks,
0
Kevin CrossChief Technology OfficerCommented:
Right click on folder or file and choose properties, then click on the Security tab and then you should be able to reapply the permissions on the file or if folder to all its children.
0
TecornoAuthor Commented:
I mean the logfile specified in sql server start up parameters is existing and has full access.
when i start sql server
using below command the error log file gets updated properly

C:\Documents and Settings\seethap1>"C:\Program Files\Microsoft SQL Server\MSSQL1
0.MSSQLSERVER\MSSQL\Binn\sqlservr.exe"
0
Kevin CrossChief Technology OfficerCommented:
But that is probably using your login credentials since you are running the file directly. The SQL service is starting with Network Service therefore you have to ensure that the local accounts like Local System and Network Service have access to read/write/modify in the specified folder in the SQL configuration ... please see the discussion on the error message you were getting at the link provided -- it may make it more clear. At this point you are in normal Windows troubleshooting mode using event viewer message so I would keep tracking this down by the exact content of your event viewer log that appears whenever the startup of service fails.
0
TecornoAuthor Commented:

Hi,

I have given full rights to Network service and system and restarted sql server from configuration manager and below is the error details from Event viewer



initerrlog: Could not open error log file ''. Operating system error = 3(The system cannot find the path specified.).

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.


0000: 000042a2 00000010 0000000b 00450044
0010: 00500056 00500041 0044004d 00330043
0020: 00000000 0000
0
TecornoAuthor Commented:
I am able to start the service after changing log on as local system from Network service.
I could not make this change in sql server configuration manager (as I am getting WMI error).
I went to administrativetools\services and changed on sql server and sql server agent properties.

But now the services are running under local system.Do you see any issue here?
I tried to revert back to nt authority\network service but it is asking for password which i don thave.

Thanks for all your help.Appreciated.
0
Kevin CrossChief Technology OfficerCommented:
Double-check that there is not a NTFS permission above the level of the errorlog folder that is blocking access. Maybe the rights are set appropriately at that folder, but Network Server | System aren't allowed at top level drive; therefore, they can't traverse down to that folder. I would set all the permissions and restart Windows and not just SQL.

Everything I am reading on the error is due to lack of permissions or incorrect path like with a cluster where the directory | resource isn't available to both servers necessarily so typically is fixed by setting the service to manual so that it only tries to load this when the cluster has failed over and so log directory is available.
0
Kevin CrossChief Technology OfficerCommented:
Local System is fine if not needing to access network resources.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
TecornoAuthor Commented:
did not get correct solution
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2008

From novice to tech pro — start learning today.