Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection to LocalDB fails #4957

Closed
wixbot opened this issue Nov 12, 2015 · 11 comments
Closed

Connection to LocalDB fails #4957

wixbot opened this issue Nov 12, 2015 · 11 comments

Comments

@wixbot
Copy link

wixbot commented Nov 12, 2015

I can connect to a SQL express database with the servername (local)\SQLEXPRESS. However if the machine where the install is to be done, has localDB, the usual (LocalDB)\V11.0 does not work.

It appears from the site below that Microsoft expert believes WIX uses the wrong version of OLEDB.
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/b5c9a1fa-75fc-41f2-a5d3-4b2b6ed4ebde/localdb-problem-unable-to-connection-via-localdbv110-but-can-via-named-paipes

I could not find searching in Wix release notes that this has been fixed in 3.8 or 3.9.

Originally opened by jws

@wixbot
Copy link
Author

wixbot commented Nov 14, 2015

New work needed to support new LocalDB-compatible libraries.

Release changed from v3.8 to v3.x
Type changed from Bug to Feature

@wixbot wixbot added this to the v3.x milestone Dec 20, 2015
@chrpai
Copy link

chrpai commented Feb 24, 2019

I'm doing a project right know for a customer that wants a light weight demo edition of their project and experiencing the same thing. (local)\instance works but (localdb)\instance fails to create the database.

What's the level of effort for this? It'd be a shame for me to have to roll my own SQL custom actions if it's a simple update to the SQL extension.

@BMurri
Copy link

BMurri commented Feb 24, 2019

The information in this blog post would be relevant. In essence, the version of the library we are using is either the end of support or is no longer supported, and newer libraries will break compatibility with older versions of db software (that maybe we might not need to support anymore).

The fact that resolving this will break compatibility with older dbs is not something we take lightly, but if those older versions are all out-of-support, it might actually be appropriate.

https://blogs.msdn.microsoft.com/sqlreleaseservices/snac-lifecycle-explained/

@robmen
Copy link
Member

robmen commented Feb 24, 2019

There was an update in v3.14 to a later DB provider. Not sure if that is enough to support LocalDB, but it would be cool if it were so we could close this issue in v3.14 as well.

@BMurri
Copy link

BMurri commented Feb 24, 2019

As near as I can tell, this build ((v3.14.0.1703 on Thursday, May 03 2018) contains the version requested in this bug. @chrpai could you please verify?

@chrpai
Copy link

chrpai commented Feb 24, 2019

I was already testing. :) 3.14 and FG-WIX 3.11 both work. WiX 3.11 public does not.

@chrpai
Copy link

chrpai commented Feb 25, 2019

After further review I'm afraid I must amend my test results. On a clean win 7 sp1 x86 VM it only works if I install the SQL client components (via SSMS ).

@chrpai
Copy link

chrpai commented Feb 25, 2019

Confirmed on win 10 x64 also. This time I did a direct download of the 11.0 native client and it resolved the issue.

@chrpai
Copy link

chrpai commented Feb 25, 2019

I went and tested one more thing just to make sure there wasn't a regression. I don't need the SQL client components to connect to a normal SQL server. That still works just fine.

@JohnnyPittsburgh
Copy link

I have experience with LocalDB through a work project that has spanned about 1.5 years. LocalDB is a bit quirky and runs a good parallel to a real SQL Service.

I have moved the publishing of the database from the installer to application to keep the installer simple. Our installers only put the necessary tools in place. And the Application upon startup looks for a database in a known directory. If it's not created, we create it. Moving the DB publishing to the application consolidates the SQL logic and allows the application to apply DB updates between versions.

In my original design, we are using SQLCMD and the SQL ODBC Driver for publishing MS's bastard T-SQL scripts. I was not able to find a .NET SQL implementation that can run the DB Scripts created from Visual Studio, we had to use SSMS or SQLCMD. The use of the "GO" command and variables is a Microsoft thing and not standard T-SQL. And in our new version, we are handling the variable substitution and breaking the GO's into individual scripts so we can run with a .NET SQL package.

And my final note is a LocalDB database is really local (it's in its name). Databases that have been created are really for the current PC user. I have been able to get the same DB to work for other users, but you have to have the DB in the "public" folder. And you have to shut the DB between users.

@robmen robmen modified the milestones: v3.x, v3.14 Feb 25, 2019
@robmen
Copy link
Member

robmen commented Feb 25, 2019

(As much as it can be) Fixed wixtoolset/wix3#465

@robmen robmen closed this as completed Feb 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants