Cannot create new SQL database.....

W

wally

I have Visual Studio 2005 Pro. I installed SQL Express 2005 and rebooted.
But, when I right click on "Data Connections" in the Server Explorer and
choose "Create New SQL Server Database..." and attempt to create a new
database on the local PC, I get the following error "An error has occurred
while establishing a connection to the server. When connecting to SQL
Server 2005, this failure may be caused by the fact that under default
settings SQL Server does not allow remote connections. (provider:
NamedPipes Provider, error:40 - Could not open a connection to SQL Server)".

Any idea what this is?
 
R

Roger Wolter[MSFT]

You might get some information by looking in the latest error log in the
c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG directory. It looks
like your connection is trying to use named pipes to connect and named pipes
are disabled by default in SQL Express so you might try enabling named pipes
with the SQL Server Configuration Manager.(network configuration/protocols)
You may also have to allow SQL Server to open connections through the XP
firewall but that's usually not necessary.
 
W

wally

Thanks for the pointers......but no luck.

To make sure that my installation of SQL Express was good, I uninstalled SE
and deleted the directory it leaves behind.

I restarted the dev box, downloaded SE Basic from
http://msdn.microsoft.com/vstudio/express/sql/download/ and reinstalled it
with the client tools selected.

I tried again.....same error.

I enabled both TCP/IP and Named Pipes, restarted the dev box and got the
same error.

I disabled the Windows firewall and tried again.....same error.

At this point, I am at a loss as to what the problem could be.
 
W

wally

@!#@#!@[email protected] answer is that you CANNOT connect to SQL Express using
the machine name (nevermind that is what is shown in the drop down for the
connection and SQL Express is running as a service that could be queried).
You must manually add "\SQLExpress" (i.e. "machineName\SQLExpress") to be
able to connect to it.

Now just why didn't those brilliant Microsoft minds code that OR AT LEAST
LET US KNOW ABOUT IT?
 
C

Cor Ligthert [MVP]

Wally,

Have you installed in past some Beta SQL server products, than you have to
look in the mydocuments folders, it is possible that there are than some
orphaned files. Set those temportaly an other place and try to install
SQLExpress again.

Cor
 
C

Cor Ligthert [MVP]

Wally,

Sorry I did not look well to your follow up. AFAIK does a dot this as well.

Cor
 
A

Andrew Watt [MVP]

@!#@#!@[email protected] answer is that you CANNOT connect to SQL Express using
the machine name (nevermind that is what is shown in the drop down for the
connection and SQL Express is running as a service that could be queried).
You must manually add "\SQLExpress" (i.e. "machineName\SQLExpress") to be
able to connect to it.

Now just why didn't those brilliant Microsoft minds code that OR AT LEAST
LET US KNOW ABOUT IT?

Wally,

The machineName\instanceName thing is well documented in assorted
places. But there is just so much information around that it may not
be easy to find, particularly if you don't know that you need to look
for it.

Andrew Watt MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top