Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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.