Monday, March 19, 2012

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?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" <wally@.mart.com> wrote in message
news:7PDpg.16987$7K2.406@.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?
>|||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]" <rwolter@.online.microsoft.com> wrote in message
news:uHhVVQXnGHA.4452@.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" <wally@.mart.com> wrote in message
> news:7PDpg.16987$7K2.406@.bignews2.bellsouth.net...
>|||@.!#@.#!@.$!@.......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" <wally@.mart.com> wrote in message
news:eFHpg.81373$qd2.64435@.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]" <rwolter@.online.microsoft.com> wrote in message
> news:uHhVVQXnGHA.4452@.TK2MSFTNGP05.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" <wally@.mart.com> schreef in bericht
news:eFHpg.81373$qd2.64435@.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]" <rwolter@.online.microsoft.com> wrote in message
> news:uHhVVQXnGHA.4452@.TK2MSFTNGP05.phx.gbl...
>
>
>
>|||Thanks for the help Cor, but the name thing was the issue.
"Cor Ligthert [MVP]" <notmyfirstname@.planet.nl> wrote in message
news:uAUuyfZnGHA.4172@.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" <wally@.mart.com> schreef in bericht
> news:eFHpg.81373$qd2.64435@.bignews6.bellsouth.net...
>|||Wally,
Sorry I did not look well to your follow up. AFAIK does a dot this as well.
Cor
"wally" <wally@.mart.com> schreef in bericht
news:uYIpg.81378$qd2.31318@.bignews6.bellsouth.net...
> Thanks for the help Cor, but the name thing was the issue.
>
> "Cor Ligthert [MVP]" <notmyfirstname@.planet.nl> wrote in message
> news:uAUuyfZnGHA.4172@.TK2MSFTNGP03.phx.gbl...
>|||On Sun, 2 Jul 2006 01:12:26 -0400, "wally" <wally@.mart.com> wrote:

>@.!#@.#!@.$!@.......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

No comments:

Post a Comment