470,836 Members | 1,897 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,836 developers. It's quick & easy.

Cannot create new SQL database.....

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?
Jul 1 '06 #1
7 3750
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.

--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

"wally" <wa***@mart.comwrote in message
news:7P*****************@bignews2.bellsouth.net...
>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?

Jul 2 '06 #2
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.
"Roger Wolter[MSFT]" <rw*****@online.microsoft.comwrote in message
news:uH**************@TK2MSFTNGP05.phx.gbl...
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.

>
--
This posting is provided "AS IS" with no warranties, and confers no
rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

"wally" <wa***@mart.comwrote in message
news:7P*****************@bignews2.bellsouth.net...
>>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?


Jul 2 '06 #3
@!#@#!@$!@.......The 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" <wa***@mart.comwrote in message
news:eF*******************@bignews6.bellsouth.net. ..
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.
"Roger Wolter[MSFT]" <rw*****@online.microsoft.comwrote in message
news:uH**************@TK2MSFTNGP05.phx.gbl...
>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.


>>
--
This posting is provided "AS IS" with no warranties, and confers no
rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

"wally" <wa***@mart.comwrote in message
news:7P*****************@bignews2.bellsouth.net.. .
>>>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?



Jul 2 '06 #4
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

"wally" <wa***@mart.comschreef in bericht
news:eF*******************@bignews6.bellsouth.net. ..
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.
"Roger Wolter[MSFT]" <rw*****@online.microsoft.comwrote in message
news:uH**************@TK2MSFTNGP05.phx.gbl...
>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.


>>
--
This posting is provided "AS IS" with no warranties, and confers no
rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

"wally" <wa***@mart.comwrote in message
news:7P*****************@bignews2.bellsouth.net.. .
>>>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?



Jul 2 '06 #5
Thanks for the help Cor, but the name thing was the issue.
"Cor Ligthert [MVP]" <no************@planet.nlwrote in message
news:uA**************@TK2MSFTNGP03.phx.gbl...
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

"wally" <wa***@mart.comschreef in bericht
news:eF*******************@bignews6.bellsouth.net. ..
>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.
"Roger Wolter[MSFT]" <rw*****@online.microsoft.comwrote in message
news:uH**************@TK2MSFTNGP05.phx.gbl...
>>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.


>>>
--
This posting is provided "AS IS" with no warranties, and confers no
rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

"wally" <wa***@mart.comwrote in message
news:7P*****************@bignews2.bellsouth.net. ..
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?



Jul 2 '06 #6
Wally,

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

Cor

"wally" <wa***@mart.comschreef in bericht
news:uY*******************@bignews6.bellsouth.net. ..
Thanks for the help Cor, but the name thing was the issue.
"Cor Ligthert [MVP]" <no************@planet.nlwrote in message
news:uA**************@TK2MSFTNGP03.phx.gbl...
>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

"wally" <wa***@mart.comschreef in bericht
news:eF*******************@bignews6.bellsouth.net ...
>>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.
"Roger Wolter[MSFT]" <rw*****@online.microsoft.comwrote in message
news:uH**************@TK2MSFTNGP05.phx.gbl...
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.


--
This posting is provided "AS IS" with no warranties, and confers no
rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

"wally" <wa***@mart.comwrote in message
news:7P*****************@bignews2.bellsouth.net ...
>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?
>




Jul 2 '06 #7
On Sun, 2 Jul 2006 01:12:26 -0400, "wally" <wa***@mart.comwrote:
>@!#@#!@$!@.......The 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
Jul 2 '06 #8

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Sangbae | last post: by
10 posts views Thread by ibm_97 | last post: by
3 posts views Thread by fyi85 | last post: by
2 posts views Thread by Bjørn Johansen | last post: by
1 post views Thread by Sue | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.