Saturday, January 21, 2012

Working with the new SQLLocalDB From Microsoft

SQLLocalDB  is a new, lightweight database engine from Microsoft.  You can get it from here.  I have downloaded it and installed the 64 bit version on my Windows 7 laptop.  However, after installation there are no shortcuts created so no gui to manage this "instance".

To start the database engine, open a command line window and type the following:
1.
cd "c:\Program Files\Microsoft SQL Server\110\Tools\Binn"
Substitute for your installation directory.
2. Type:
"SqlLocalDB create "SQL11Local" 11.0 -s"
This will create an sql server instance called "SQL11Local" and start it.
3. Type:
"SQLLocalDB info SQL11Local"
Note the Instance pipe name in the info window.  We will use that to connect to this instance from SQL Server Management Studio

Now start SQL management Studio and in the Server name textbox copy and paste the Instance pipe name from the info command results.  You should connect to the database instance and you can do all the usual things like create , delete and attach databases.

No comments:

Post a Comment