Deborah's Developer MindScape






         Tips and Techniques for Web and .NET developers.

October 21, 2012

SQL Server Object Explorer in VS 2012

If you use Visual Studio AND SQL Server Management Studio, you’ll be glad to hear that the SQL Server Management Studio tools, called SQL Server Data Tools (SSDT), are now a part of Visual Studio 2012. You can create, edit, and delete SQL Server tables and stored procedures, you can write and execute queries, you can view and edit database data, and so on, all from within Visual Studio.

NOTE: You can also get SSDT for Visual Studio 2010 SP1. See this link for more information.

SSDT includes database project types, the SQL Server Object Explorer toolbox, and tools to work with analysis services, reporting services and business intelligence.  This post focuses on just the SQL Server Object Explorer.

Select View | SQL Server Object Explorer from the Visual Studio menu to display the toolbox.

image

If your SQL Server does not appear on the list, click on the Add SQL Server button in the toolbar or  right-click on the SQL Server node and select Add SQL Server. Enter the information to connect to one of your SQL Server databases and your SQL Server should then appear on the list.

NOTE: You can connect to any running SQL instance, including SQL Azure.

Once your instance of SQL Server appears on the list, you can drill down to see the databases and their details. You can list the tables, views, and stored procedures under each database.

For example, here are the tables and stored procedures in one of my databases:

image

Follow these links to see some of the things you can do with the SQL Server Object Explorer:

Use the SQL Server Object Explorer to work with your SQL Server databases in Visual Studio 2012.

Enjoy!

3 Comments

  1.   Jeppe — November 16, 2012 @ 2:56 am    Reply

    Is it possible to restore a database from this the SSDT ? I cant find that option anywhere. would be great

  2.   Ivan — November 28, 2012 @ 12:04 pm    Reply

    SQL can execute qrueies against a database, retrieve,update,insert data from a database and empty refer to an empty result of no rows and NULL refer to a table with one row holding a NULL value.

  3.   DeborahK — July 30, 2013 @ 10:25 am    Reply

    Jeppe –

    “Is it possible to restore a database from this the SSDT ? I cant find that option anywhere. would be great”

    I have not seen an option to restore a database from the SQL Server Object Explorer. That is still one that you need to go to the Management Studio for. Same for a backup.

RSS feed for comments on this post. TrackBack URI

Leave a comment

© 2021 Deborah's Developer MindScape   Provided by WPMU DEV -The WordPress Experts   Hosted by Microsoft MVPs