distal-attribute
distal-attribute
distal-attribute
distal-attribute

Cannot connect to MsSQL created from SqlLocalDB.exe

User, date Message
Written by NaturalBornCamper
10 months ago
Category: General
6 posts since Mon, 10 Jun 13
Hello, I have been on this for 5 hours now and I almost lost a full day of work with nothing accomplished yet, any help would be appreciated on how to connect to a MsSQL server.

I Installed MsSQL with SqlLocalDB.msi from their website, followed their tutorial and successfully create a database and started the instance but I cannot connect to it at all. I'm new to MsSQL and this is very frustrating, before coding anything with php, I want to connect with Heidi but even that simple step I cannot do.

I tried all these hostnames/IP:
(localdb)\v11.0
[COMPUTER_NAME](localdb)\v11.0

np:\\.\pipe\LOCALDB#AF54E762\tsql\query
[COMPUTER_NAME]\np:\\.\pipe\LOCALDB#AF54E762\tsql\query

.\pipe\LOCALDB#AF54E762\tsql\query
[COMPUTER_NAME]\.\pipe\LOCALDB#AF54E762\tsql\query

(localdb)\[DB_NAME]
[COMPUTER_NAME]\(localdb)\[DB_NAME]

And for each one of them, ticking the box "Use Windows authentification", putting just my windows username, with and without password, blank fields and the "Prompt for credentials" box.

Marco
Written by jfalchMoney, Euro
10 months ago
349 posts since Sat, 17 Oct 09
the data to enter into heidiql sesion´s hostname/ip used to be

hostname\instancename

where hostname is the name of the machine that the server is running on (eg localhost or 127.0.0.1 if you installed it locally on your machine).

instancename in earlier version used to be SQLEXPRESS ; some pointers how to find it out are here (second post, "In a simple way").

dbname or anything with \pipe is never part of this.

I have no real idea what authentication data to use; in earlier version, server installation used to create a single user named "sa" (enter without the quotes), and asked for a password to be specified for sa during installation.
since you said "followed their tutorial and successfully create a database" it sounda as if you have been able to connect to MSSQL server somehow at least (MS client?); did you enter a username and password there ?
Written by NaturalBornCamper
10 months ago
6 posts since Mon, 10 Jun 13
Hay!

Nope, the tutorial stopped after having created a db and getting its info with the command "sqlLocalDB info". I did not find anything else after this, I tried to look for how to connect on google, finding other tutorials but got nothing. Did not even try with php as I have no idea what is the username/password/server, MS gives me nothing, no feedback except the name pipe.
Written by jfalchMoney, Euro
10 months ago
349 posts since Sat, 17 Oct 09
to create a db, you must have been connected to the server. how did you do this ?
Written by jfalchMoney, Euro
10 months ago
349 posts since Sat, 17 Oct 09
ie what program did you use to create the db ?
Written by jfalchMoney, Euro
10 months ago
349 posts since Sat, 17 Oct 09
this here has more info. if you used sqllocaldb create, what instance name did you specify ? this would be the instance name to use with heidisql.

if you dont have sa, use sqllocaldb.exe info then sqlcmd as specified in the linked docs to create a db user.
Written by NaturalBornCamper
10 months ago
6 posts since Mon, 10 Jun 13
Hahaha german documentation? My german is a little rusty!

I installed SqlLocalDB.msi

Then in console:
"SqlLocalDB create testdb"
"SqlLocalDB start testdb"
"sqllocaldb info testdb"

That's how I got the pipe name. I don't have sqlcmd, I think it is part of the whole 1GB MS sql server express. That's why I'm confused as how it's supposed to be working standalone with no configuration whatsoever
Written by jfalchMoney, Euro
10 months ago
349 posts since Sat, 17 Oct 09
hahaha ? never heard of google translate ? anyway, here it is again in en-US.

when you used "SqlLocalDB create testdb" then your instance name is testdb .

sqlcmd can also be had by installing the much smaller MS sql native client.
Written by NaturalBornCamper
10 months ago
6 posts since Mon, 10 Jun 13
Ok I will try to install this thanks. And I should have told you, no need to repost the link, I already read that.

I tried installing Microsoft sql management studio and it cannot connect either Arrrg!! I hate microsoft, why is it always so complicated?!!
Written by jfalchMoney, Euro
10 months ago
349 posts since Sat, 17 Oct 09
"why is it always so complicated": that is intentional. MS has spawned a thriving industry of training and certification for its products; it is usually very difficult to use their products without paying for this.
Written by ansgar
10 months ago
4784 posts since Fri, 07 Apr 06
Hehe.. yes, also what I feel when using MS products, e.g. MSSL integration in HeidiSQL. In the end these complications break MS products at some point, similar to their unhappy Internet Explorer history.
Written by NaturalBornCamper
10 months ago
6 posts since Mon, 10 Jun 13
Hum, I just noticed that "SQL Server Native Client" is for SQL server 2008 and I installed SQL server express 2012
Written by NaturalBornCamper
10 months ago
6 posts since Mon, 10 Jun 13
Ok, noticed SQL Management studio was 2005, so I had to connect with the name pipe, but then it was too old and not compatible. So I had to download the whole 600MB 2012 version of management studio that include a ton of other microsoft crap.

Now I can connect to the db with 2012. Still not working with HeidiSQL, but it doesn't matter now as it's already too late for my system, microsoft has it now. You guys can still save yourselves!

Thanks for your help though
 

Please login to leave a reply, or register at first.