Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I've been working on this for the better part of the morning, and looked at various answers and such, but haven't found anything.

I am trying to run aspnet_regsql from the command line (as part of a script), using -A all -C "Data Source=.\SQLEXPRESS;Database=master;User Id=sa;Password=password"

I continuously get the error Login failed for user 'sa'.

I have enabled mixed mode in the Server properties.

I have gone to security->logins->sa->properties and have enabled permission to connect to the database and enabled login.

I should mention this script runs on at least 2 other computers right now without any issues. I have a fresh SQL installation on my laptop.

Is there anything else that could prevent the 'sa' user from logging in?

P.S. If I'm missing any information, or you would like more details please don't hesitate to ask!!!

share|improve this question

1 Answer 1

TITLE: Connect to Server

Cannot connect to PURUSH-PC.


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) (Microsoft SQL Server, Error: 53)

For help, click:



share|improve this answer
How does this answer the question? – vonbrand Mar 16 '13 at 19:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.