Cannot create new SQL database.....

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • wally

    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?


  • Roger Wolter[MSFT]

    #2
    Re: Cannot create new SQL database.....

    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.(networ k 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
    Use these online forms to report copyright and trademark infringement to Microsoft Legal. Infringement notices must comply with the Digital Millennium Copyright Act.


    "wally" <wally@mart.com wrote in message
    news:7PDpg.1698 7$7K2.406@bigne ws2.bellsouth.n et...
    >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?
    >

    Comment

    • wally

      #3
      Re: Cannot create new SQL database.....

      Thanks for the pointers......b ut 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.comw rote in message
      news:uHhVVQXnGH A.4452@TK2MSFTN GP05.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.(networ k
      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
      Use these online forms to report copyright and trademark infringement to Microsoft Legal. Infringement notices must comply with the Digital Millennium Copyright Act.

      >
      "wally" <wally@mart.com wrote in message
      news:7PDpg.1698 7$7K2.406@bigne ws2.bellsouth.n et...
      >>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?
      >>
      >
      >

      Comment

      • wally

        #4
        Re: Cannot create new SQL database.....

        @!#@#!@$!@..... ..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 "\SQLExpres s" (i.e. "machineName\SQ LExpress") 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.8137 3$qd2.64435@big news6.bellsouth .net...
        Thanks for the pointers......b ut 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.comw rote in message
        news:uHhVVQXnGH A.4452@TK2MSFTN GP05.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.(networ k
        >configuratio n/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.169 87$7K2.406@bign ews2.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?
        >>>
        >>
        >>
        >
        >

        Comment

        • Cor Ligthert [MVP]

          #5
          Re: Cannot create new SQL database.....

          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.8137 3$qd2.64435@big news6.bellsouth .net...
          Thanks for the pointers......b ut 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.comw rote in message
          news:uHhVVQXnGH A.4452@TK2MSFTN GP05.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.(networ k
          >configuratio n/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.169 87$7K2.406@bign ews2.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?
          >>>
          >>
          >>
          >
          >

          Comment

          • wally

            #6
            Re: Cannot create new SQL database.....

            Thanks for the help Cor, but the name thing was the issue.


            "Cor Ligthert [MVP]" <notmyfirstname @planet.nlwrote in message
            news:uAUuyfZnGH A.4172@TK2MSFTN GP03.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.8137 3$qd2.64435@big news6.bellsouth .net...
            >Thanks for the pointers......b ut 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.comw rote in message
            >news:uHhVVQXnG HA.4452@TK2MSFT NGP05.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.(networ k
            >>configurati on/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.16 987$7K2.406@big news2.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
            >>>>connectin g 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
            >>>>connectio n to SQL Server)".
            >>>>
            >>>Any idea what this is?
            >>>>
            >>>
            >>>
            >>
            >>
            >
            >

            Comment

            • Cor Ligthert [MVP]

              #7
              Re: Cannot create new SQL database.....

              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.8137 8$qd2.31318@big news6.bellsouth .net...
              Thanks for the help Cor, but the name thing was the issue.
              >
              >
              "Cor Ligthert [MVP]" <notmyfirstname @planet.nlwrote in message
              news:uAUuyfZnGH A.4172@TK2MSFTN GP03.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.813 73$qd2.64435@bi gnews6.bellsout h.net...
              >>Thanks for the pointers......b ut 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.comw rote in message
              >>news:uHhVVQXn GHA.4452@TK2MSF TNGP05.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.(networ k
              >>>configuratio n/protocols) You may also have to allow SQL Server to open
              >>>connection s 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.1 6987$7K2.406@bi gnews2.bellsout h.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
              >>>>>connecti ng to SQL Server 2005, this failure may be caused by the fact
              >>>>>that under default settings SQL Server does not allow remote
              >>>>>connection s. (provider: NamedPipes Provider, error:40 - Could not open
              >>>>>a connection to SQL Server)".
              >>>>>
              >>>>Any idea what this is?
              >>>>>
              >>>>
              >>>>
              >>>
              >>>
              >>
              >>
              >
              >

              Comment

              • Andrew Watt [MVP]

                #8
                Re: Cannot create new SQL database.....

                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 "\SQLExpres s" (i.e. "machineName\SQ LExpress") 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\ins tanceName 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

                Comment

                Working...