Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.




438 posts

Ultimate Geek


Topic # 138929 21-Jan-2014 23:48 Send private message

Hi there Geekzone and thank you for reading this post.

Im developing my own website and have done this using Microsoft Expression Web 4, but know that i would like to be able to use SQL Server Management Studio 2012 I have been unsuccessful due to "error message that cant connect to server"

this is the what the error displays:

Cannot connect to localhost
Additional information:
   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) SQL server error 53

     The network path was not found.

Error picture http://images.geekzone.co.nz/imagessubs/0e6ce6bb43ffb527ac1c151cf0edd0a9.jpg 



if you know how i could fix this i will be very thankful to you,



thank you,



Andrew

Create new topic
17 posts

Geek
+1 received by user: 4


  Reply # 972010 22-Jan-2014 00:07 Send private message

Hi there

Might pay to check in the SQL Server Configuration Manager application, (Start Menu > All Programs > Microsoft SQL Server 2012 > Configuration tools and make sure that Named pipes is enabled in the protocol, don't think it is by default.





438 posts

Ultimate Geek


  Reply # 972020 22-Jan-2014 00:35 Send private message

hi and thank you for reply,


I tried to check that connection protocol and it is enabled.

here is the picture http://images.geekzone.co.nz/imagessubs/10442f11d21f40926df32d60f987a513.jpg 

also has a Alias part that is empty that saids parameters however i dont know if i need to setup that and dont know how.

http://images.geekzone.co.nz/imagessubs/5eab4a433344d238480e336b23b1143c.jpg


thanks again for your help,



Andrew

17 posts

Geek
+1 received by user: 4


  Reply # 972039 22-Jan-2014 07:35 Send private message

Hi Andrew

Another couple of things to try.

Check that named pipes is on in the SQL Server Network Configuration tree of the same app, the tree just above your screenshot.  Named pipes is in multiple places

Also check that the firewall is allowing SQL through, I've had issues with SQL even when my app is on the same machine as SQL Server.  

Regards

Craig

834 posts

Ultimate Geek
+1 received by user: 64


  Reply # 972063 22-Jan-2014 09:14 Send private message

A named pipes provider error 40 means there is no SQL server listening on the connection you are trying to use. Basically it is likely that you are trying to connect using a TCP connection string from your web application and SQL server is only configured for named pipes.

If this is the case, then the fix is to open SQL Serer Configuration Manager and from the bottom up on the left panel, ensure that TCP/IP is enabled (So under SQL Native Client 11 and server network configuration) - you don't need to change any settings, just enable TCP/IP.

Also, I tend to set my connection strings to use TCP/IP only by adding 'Network Library=dbmssocn" to the end of the connection string - but you don't need to do this (Visual Studio has a good connection string wizard that I use).




TwoSeven

gzt

4595 posts

Uber Geek
+1 received by user: 244

Subscriber

  Reply # 972064 22-Jan-2014 09:14 Send private message

I looked at the screenshot. The error message says "cannot connect to localhos.sql".

That looks like a typo.



834 posts

Ultimate Geek
+1 received by user: 64


  Reply # 972218 22-Jan-2014 13:18 Send private message

gzt: I looked at the screenshot. The error message says "cannot connect to localhos.sql".

That looks like a typo.




Just looked at the screen as well. Generally the logon should be in the form of host name  or hostname\instance name  if you are using named instances or SQL express.   Using a hostname of localhost is not such a good idea, it is preferable to use the host name (in sql manager and in the connection string).   Not sure why it is localhos.sql though - is this a typo.




TwoSeven



438 posts

Ultimate Geek


  Reply # 972512 22-Jan-2014 22:46 Send private message

I have checked that those settings are enabled and they are in the sql server configuration manager.

about the typo. it may be a typo as it is not clear what the password is for login into to the server.
i cant find anywhere what password im suppost to use or how i setup a new one as when i tried it saids i have to be connected to search for server.
I also disabled firewall and still cant connect

before this software i managed to instal and setup mysql free version no problem but expression web 4 would not allow me to use mysql as it saids it has to be like version 8 and i had the latest version.
I thought this will be easy to setup but its not.

http://images.geekzone.co.nz/imagessubs/b533fa4be1e82fe94669930a8a013b1e.jpg 

Kind regards to you guys for your help I hope i can sort this out so i can play around with it and make my website connect to it.




Andrew

655 posts

Ultimate Geek
+1 received by user: 36


  Reply # 972591 23-Jan-2014 08:07 Send private message

Um are you using SQL Server Express? The default instance name for express is not MSSQLSERVER so you have to specify the instance name eg PC-NAME\SQLEXPRESS

Might pay to read this;

http://stackoverflow.com/questions/360141/how-to-connect-to-local-instance-of-sql-server-2008-express

834 posts

Ultimate Geek
+1 received by user: 64


  Reply # 972624 23-Jan-2014 09:16 Send private message

As above, what version of SQL Server are you using - full version or express version. As pointed out, for the former, the default instance name is MSSQLSERVER, SQL Express by default takes the form of HostName\Instance name and they give you a default of HostName\SQLExpress.

Also, during the install did you choose Windows authentication or mixed mode. Typically on a development rig I use mixed mode and set the SA password to something that can be remembered.

Also, when you get to the add user sections of the install, did you make a note of what user was added - this is the account that you need to log in as initially - unless you set up additional SQL users. Typically, the default windows account is the one you were logged in as during the install.

Named pipes error means that it cannot find the server or the wrong protocol is running. Since you have confirmed that TCP/IP is enabled, then the next thing to look at is that host name.

You can check a couple of other things. Run services.msc and scroll down to the SQL server services. There are three that I usually ensure are running - SQL Server, Agent and Browser (this one is often disabled). The bit in brackets is your instance name (MSSQLServer or Hots\Instance).

Using the instance name given in the service, fire up the management console and set it to 'server type: Database engine', Server name: yourhostname, Authentication: windows. It should connect if you are logged in using the same user account you installed it as (you will see the user name grayed out). If you did use mixed mode, then change it to SQL Server authentication - you will be prompted for the SA username and password.

Note: For server name - its a bit quirky. If you are running the default instance (MSSQLServer) you type in the host name of your machine here. If you are running a named instance (such as sql express) it will be Host\Instance name so Host\SQLExpress by default.

Don't worry about getting the connection string working yet, that is easy once you have verified your SQL instance is set up correctly.




TwoSeven



438 posts

Ultimate Geek


  Reply # 973007 23-Jan-2014 16:56 Send private message

thanks for reply you guys are awesome with your help,
Im  arriving from work and will try those ideas.

so far i checked version check link picture please:

http://images.geekzone.co.nz/imagessubs/b169b7fca601c505b40ab8085e46acac.jpg




also checked the Services for sql and only have one as per link:
http://images.geekzone.co.nz/imagessubs/af48f38e5f035fce32e36a25290c8bc8.jpg 



furthermore when i install it this software i did not get a setup password prompt or anything. and 


thanks you so much for your help 


Andrew

834 posts

Ultimate Geek
+1 received by user: 64


  Reply # 973062 23-Jan-2014 18:11 Send private message

If there are no SQL services on that machine, then SQL server is not installed on it, so localhost will not work since that points to the local machine.  If SQL Server is on another machine, you will need to configure the firewall appropriately (and I suggest enabling the SQL Browser service).





TwoSeven



438 posts

Ultimate Geek


  Reply # 973150 23-Jan-2014 20:21 Send private message

thanks TwoSeven, I thought by installing MS SQL Server Management Studio i was installing the server. Im such a noobie so how do i install the server? i will have to google it now.


thanks


Andrew

Create new topic




Twitter »
Follow us to receive Twitter updates when new discussions are posted in our forums:



Follow us to receive Twitter updates when news items and blogs are posted in our frontpage:



Follow us to receive Twitter updates when tech item prices are listed in our price comparison site:





Trending now »

Hot discussions in our forums right now:

Snap have failed our company!
Created by dafman, last reply by toejam316 on 21-Oct-2014 16:38 (22 replies)
Pages... 2


Spark Socialiser
Created by freitasm, last reply by code15 on 21-Oct-2014 17:10 (19 replies)
Pages... 2


American legal jurisdiction in New Zealand
Created by ajobbins, last reply by gzt on 21-Oct-2014 14:58 (30 replies)
Pages... 2


Another Trade Me competitor: SellShed
Created by freitasm, last reply by gzt on 21-Oct-2014 15:21 (27 replies)
Pages... 2


Why would Suresignal calls be worse quality than non-Suresignal calls from the same location?
Created by Geektastic, last reply by froob on 21-Oct-2014 08:21 (41 replies)
Pages... 2 3


Picture resizing on the forum
Created by Jase2985, last reply by freitasm on 18-Oct-2014 13:32 (13 replies)

Internet question...
Created by Geektastic, last reply by Geektastic on 17-Oct-2014 22:59 (40 replies)
Pages... 2 3


Overcharged by Slingshot for months - warning to existing customers
Created by dusty42, last reply by dusty42 on 21-Oct-2014 18:23 (23 replies)
Pages... 2



Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.

Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.

Alternatively, you can receive a daily email with Geekzone updates.