Freigeben über


Announcing SQL Server 2012 Express LocalDB RC0

Installation

You can download LocalDB from this page. Just pick your CPU architecture (32-bit or 64-bit) and select LocalDB from the drop-down list. Just double-click the SqlLocalDB.msi file is downloaded that will be downloaded. We kept LocalDB simple so there is not a single configuration option in the entire installer. All you need to do is to accept the EULA and click Next a couple times. The installation of LocalDB requires administrative privileges, so if your machine has UAC enabled you will also need to agree to elevate the installation process.

Silent and Embedded Installation

As any decent installer, LocalDB supports silent installation. Here is an example a command that installs LocalDB silently:

msiexec /i SqlLocalDB.msi /qn IACCEPTSQLLOCALDBLICENSETERMS=YES

As you can see these are all standard Windows Installer options, except for the IACCEPTSQLLOCALDBLICENSETERMS variable. Setting it to YES is telling us that the user read and accepted LocalDB EULA. As expected the installer will not continue unless this variable is set to YES.

If you are considering distributing LocalDB with your application, be sure to put 32-bit and 64-bit versions into separate folders. LocalDB doesn't support installing 32-bit version on 64-bit Windows, so you will need to distribute both versions of LocalDB with your application and they both have the same file name (SqlLocalDB.msi). Renaming LocalDB packages is not an option, as Windows Installer requires that MSI file names don't change (see Rule 14 in this post for the explanation).

Multiple Versions of LocalDB and Upgrades

To keep the LocalDB installation simple we decided that major versions of LocalDB will be installed side-by-side. This way an application using LocalDB version 11 will never be broken by some other application upgrading LocalDB to version 12. Both applications will be able to install the versions of LocalDB they need without interfering with each other.

Service Packs for LocalDB will also work in the simplest possible way. In each Service Pack we will release new MSI packages containing all the LocalDB binaries. The updated MSI package can be used to either apply the Service Pack to an existing LocalDB installation or to install a fresh LocalDB installation. In both cases the command line for the silent installation will be the same.

Try It Now!

As you can tell we are fairly satisfied with the final shape of LocalDB, at least for SQL Server 2012. But the final call belongs to you! Please give it a try and share your feedback with us.

You may also want to see other posts and materials about LocalDB:

- Krzysztof Kozielczyk

Share Your Feedback

Please share your feedback with us! Just start a thread on SQL Express Forum, hit the "Email Author" button on this post or file a Connect item!

Comments

  • Anonymous
    November 30, 2011
    Does the LocalDB installer install LocalDB for the current user, or for all users of the machine?

  • Anonymous
    December 01, 2011
    @pokr:  The LocalDB is installed for all users - that's why the installation requires administrative rights. Of course after it is installed all users can use their LocalDB instances without any need for administrator rights. -Krzysztof

  • Anonymous
    December 04, 2011
    Do you plan to include Native Client to the LocalDB installer?

  • Anonymous
    December 16, 2011
    The comment has been removed

  • Anonymous
    January 04, 2012
    Looks amazing, i love the 30 MB size and the 30 seconds installation. I'd love to use it instead of SQLite, however - it doesn't support Windows XP, which is an essential need. Bad luck..

  • Anonymous
    March 10, 2012
    Hey guys, I am using SSMS 2012 with LocalDB and I find it very unstable. For example, just changing data types or even adding new field to a table causes all kind of error dialogs to pop up. Is this know issue?  

  • Anonymous
    March 10, 2012
    @Dee Can you please share with us the specific problems you are seeing, on the SQL Express forum (link above). Most features of SSMS work with LocalDB.

  • Anonymous
    September 01, 2012
    Summary: Thank you MS for your free tools. Can I still use .InstanceName somehow especially as its the only insance on the machine Details: Again thanks for your hard work on these free tools. LocalDb looked promising.  Unfortunately after investigation there is one major problem.  We have a suite of utilities all with a hard coded .InstanceName if we move from Express to LocalDb we have to re-write lots of our software suite. (yes yes maybe it should all be in the registry) but what of Customers who also have . paths in their .exe.config files. Surely it would have been easier [to use] to have LocalDb interfaces automatically sense that a .InstanceName is of type LocalDb and start it. Why the (LocalDb)InstanceName? I find this and other stuff from MS is not very well thought out as a real world solution (if academically correct) I mean its purist but not backwards compatible, forging ahead without thought for us poor ISVs who have existing code,running systems that need upgrading and customers. Its frustrating that compact does not have stored procedures; one reason we can't use it. I understand why (kind of) though its bad design to encode SQL. Thanks for reading.

  • Anonymous
    November 04, 2012
    Documentation that discusses deploying applications that use LocalDb would be extremely useful.  

  • Anonymous
    March 01, 2014
    It looks like there is a chocolatey package to deploy LocalDB. Check it out at chocolatey.org/.../SqlServerLocalDb

  • Anonymous
    June 27, 2014
    Has anyone got this working yet on a pc that has nothing of sql server installed ? I just installed several times, but (localdb)v11.0 just does not show up in the list of servers in the ado window. Do I really need to install a complete sql server express just to get the localdb working or is there another way to do this ?

  • Anonymous
    June 27, 2014
    Finally got it working. After reading many documentations on how to get started with localdb and finding lots of people with the same problem, I found that each of these documenations forget to mention one critical item. First you have to install localdb using sqllocaldb.msi, that is mentioned in most (not all) docs But that will not get you started, you cannot connect to it or even see it in ado. To do that, you have to install sqlincli.msi, which installs sql server native client. After that you finally are ready to use localdb I find it very frustrating that this essential installation is not mentioned anywhere, leaving many people giving up on localdb because they cannot figure out how to get it working. Its a real shame.