SQL Server LOCALDB database management Tour

Source: Internet
Author: User
Keywords nbsp; database management EXE
Tags administration applications based command line create database management developers developing

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 can maximize your database management effort so developers can focus on developing database applications.

Managing LocalDB using the SQLLOCALDB command line

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

%programfiles%\microsoft SQL Server\110\tools\binn

We can run SqlLocalDB.exe on the Windows operating system's CMD command line:

Cd%programfiles%\microsoft SQL server\110\tools\binn SqlLocalDB.exe/?

Figure 1:sqllocaldb-?

Sqllocaldb is delimited by a space, so if the instance name contains spaces or other special characters, we need to quote them. For example:

sqllocaldb Create "My LocalDB Instance"

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

sqllocaldb Create "mylocaldb" 11.0-s

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

sqllocaldb Info "mylocaldb"

The command returns the following information:

Figure II: SQLLOCALDB info mylocaldb

Start, stop LocalDB instance:

sqllocaldb Start "mylocaldb" Sqllocaldb Stop "mylocaldb"

Delete LocalDB instance:

sqllocaldb Delete "Mylocaldb"

The above use SqlLocalDB.exe command-line utility to manage the localdb of a brief summary, more features have to be found in the reader's own to dig, remember to use the SqlLocalDB.exe/command to ask for help.

Using SQL Server Management Studio (SSMS) Management LocalDB

Reading here, have you been inspired to find a way to manage localdb with SQL Server Management Studio (SSMS)? Yes, using the "Instance pipe name"!

First, we take a closer look at the LocalDB instance information above, and note "instance named pipe name".

Then, in SQL Server Management Studio (SSMS), tap Connect | Database instance, enter the instance pipe name in server name as shown in the figure:

Figure 3: Connecting to the server

Finally, select Windows Authentication and click Connect:

Figure 4:sql Server Management Stdio

Wish you a pleasant trip to the database! If you have any questions, please share them with me in the comments.

(Responsible editor: The good of the Legacy)

Related Article

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.