SQL Server LocalDB Management Tour

Source: Internet
Author: User
Tags microsoft sql server management studio sql server management sql server management studio

Ext.: http://www.csdn.net/article/2012-03-30/313753

With the release of SQL Server 2012, SQL Server LocalDB jumped into our eyes. SQL Server LocalDB is a lightweight, easy-to-use database.

SQL Server LOCALDB maximizes your database management effort so developers can focus on developing database applications.

Manage LocalDB using the SQLLOCALDB command line

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

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

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

    1. Cd%programfiles%\microsoft SQL Server\110\tools\binn
    2. SqlLocalDB.exe/?

Figure 1:sqllocaldb-?

Sqllocaldb use a space as a delimiter, so if the instance name contains spaces or other special characters, we need to quote them in quotation marks. For example:

    1. SQLLOCALDB create "My LocalDB Instance"

An administrator or developer can create an LOCALDB instance using the Create option, and the-s option will launch the instance after the instance is created. For example:

    1. SQLLOCALDB create "Mylocaldb" 11.0-s

You can view the status information for the MYLOCALDB instance using the following command:

    1. SQLLOCALDB Info "Mylocaldb"

The command returns the following information:

Figure two: Sqllocaldb info mylocaldb

To start and stop an LOCALDB instance:

    1. Sqllocaldb start "Mylocaldb"
    2. Sqllocaldb Stop "Mylocaldb"

To delete a LocalDB instance:

    1. SQLLOCALDB Delete "Mylocaldb"

The above is a brief summary of the use of the SqlLocalDB.exe command-line utility to manage LocalDB, and more features to be explored by the reader, remember to ask for help with the SqlLocalDB.exe/? command.

Use SQL Server Management Studio (SSMS) to manage LocalDB

Reading here, are you inspired to find a way to manage localdb with SQL Server Management Studio (SSMS)? Yes, just use "instance pipe name"!

First, let's take a closer look at the LocalDB instance information above, and note the "instance named pipe Name" item.

Then, in SQL Server Management Studio (SSMS), click "Connect" | DB instance, in Server name, enter the instance pipeline name:

Figure 3: Connecting to the server

Finally, select "Windows Authentication" and click "Connect":

Figure 4:sql Server Management Stdio

Wish your database a pleasant trip! If you have questions, please share them with me in the comments. (Computer/compile)

SQL Server LocalDB Management Tour (RPM)

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.