Asked  7 Months ago    Answers:  5   Viewed   127 times

I am very intrigued by this new version of SQL Server Express.

It's not clear (to me) what a setup program should do to deploy an application that use a LocalDB.

Is it required to install SQL Server Express on the client PC and then attach the MDF file?

Or it's only required to run the LocalDB.msi and it works as a standalone file like SQL Server Compact?

 Answers

63

You don't need to install SQL Server Express to use LocalDB, as LocalDB is SQL Server Express, just easier to install.

Once LocalDB is installed you can use AttachDbFileName property of the connection string to "open" an MDF file. Keep in mind that the same file can only be opened by a single LocalDB instance (single Windows login) at any given time, so this is not a data-sharing feature.

Update: If your application is using .NET, make sure to install .NET 4.0.2 or newer, as mentioned here. The original .NET 4 doesn't understand LocalDB connection strings, as it shipped long before LocalDB.

Tuesday, June 1, 2021
 
lewiguez
answered 7 Months ago
26

OK, answering to my own question.

Steps to connect LocalDB to Visual Studio Server Explorer

  1. Open command prompt
  2. Run SqlLocalDB.exe start v11.0
  3. Run SqlLocalDB.exe info v11.0
  4. Copy the Instance pipe name that starts with np:...
  5. In Visual Studio select TOOLS > Connect to Database...
  6. For Server Name enter (localdb)v11.0. If it didn't work, use the Instance pipe name that you copied earlier. You can also use this to connect with SQL Management Studio.
  7. Select the database on next dropdown list
  8. Click OK

enter image description here

Tuesday, June 1, 2021
 
employeegts
answered 7 Months ago
44

I found this nuget package that wraps up working with SQLLocalDB Has the following command

SqlLocalDbApi.IsLocalDBInstalled()
Wednesday, July 28, 2021
 
aWebDeveloper
answered 5 Months ago
41

Got it working... The issue was that I had it set up as Web Project rather than a Java EE Utility Project in Oracle Enterprise Edition for Eclipse.

As a web project, it was putting .class files inside WEB-INF/classes instead of APP-INF.

Also, needed to put error.properties inside my actual domain.

C:OracleMiddlewareuser_projectsdomainsMyDomain

In regards to my own question:

Is there a default directory or just simple configuration area that WebLogic loads properties files which are accessible to any application that runs in WebLogic?

If -Dweblogic.ext.dirs is not set, it defaults to $DOMAIN/lib;$WL_HOME/common/lib/ext;$WL_HOME/server/lib/ext

So if you store error.properties in $DOMAIN/lib it will be on the CLASSPATH and you should be able to load it using getResourceAsStream("error.properties")

Thursday, September 2, 2021
 
Corbin March
answered 4 Months ago
82

Just copy the war file into the $TOMCAT_HOME/webapps/ directory. Tomcat will deploy the war file by automatically exploding it. FYI - If you want you can make updates directly to the exploded directory, which is useful for development.

Sunday, September 5, 2021
 
Kiran Dash
answered 3 Months ago
Only authorized users can answer the question. Please sign in first, or register a free account.
Not the answer you're looking for? Browse other questions tagged :  
Share