How to use LocalDB

Source: Internet
Author: User
Tags access database management studio sql server management sql server management studio sql server express

Silent Installation LocalDB

1. Overview

The company's database is divided into SQL Server's network version and MySQL standalone version. To simplify the version of the product, unify the database for easy administration. You are now ready to replace the MySQL database with SQL Server database.

Because MySQL data was originally used because it can be installed green and easy to manage. Therefore, the MySQL database replacement products should also meet these advantages.

After a preliminary screening, Microsoft's SQL Server Express LocalDB was found to be able to replace the MySQL database.

LocalDB is created specifically for developers, it's very easy to install, almost no management, compatible with the T-SQL language, programming interfaces with SQL Server Express indistinguishable.

2. Installation

Installation environment: Win7 and above operating system. (64-bit versions were tested on Win7 and WIN10, and 32 were not tested)

Installed version: 32/64 bits.

Silent Installation Parameters:

-msiexec/i "Path\sqllocaldb.msi"

/qn Iacceptsqllocaldblicenseterms=yes

3. Use

After the software has been installed, the LOCALDB service exists as a separate process and is used only as an Access database to attach the data file to the LocalDB service.

A. Database connection parameters:

Data source= (localdb) \v11.0; LocalDB2012 Default Shared instance

Integrated security=true; Integrated validation with Windows authentication

Initial catalog= test; Database name

Attachfilename=d:\test.mdf; Database file Address

B. Creating a mingshi example: http://www.cnblogs.com/wallis0922/p/3702424.html

for ease of management, LOCALDB provides a command-line-based database management tool, SqlLocalDB.exe. Here is the path to the SqlLocalDB.exe:

%ProgramFiles%\Microsoft SQL Server\110\tools\binn

We can run SqlLocalDB.exe on the cmd command line of the Windows operating system:

->CD%programfiles%\microsoft SQL Server\110\tools\binn

->sqllocaldb.exe/?

Common command parameters for SqlLocalDB.exe:

Create an instance: Sqllocaldb create "Mylocaldb"

Delete instance: sqllocaldb Delete "Mylocaldb"

Launch instance: SqlLocalDB.exe start "Mylocaldb"

Stop instance: sqllocaldb Stop "MYLOCALDB"

View instance information: SqlLocalDB.exe info "Mylocaldb"

Use SQL Server Management Studio (SSMS) to manage LocalDB

See http://www.cnblogs.com/wallis0922/p/3702424.html

4. Unresolved issues

Restore of the database backup file in LocalDB.

Silent uninstallation of the localdb.

5. References

In the process of learning fragmented find a lot of information, accidentally found the code Nong Notes have collated resources, and has been updated. It's hard!

Eg: the first time to write a blog, if there is a mistake to correct, thank you! This article has not solved the problem, I do not know whether we have a solution?

How to use LocalDB

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.