Exploring Microsoft SQL server database inside Visual Studio 2010

Asked By 120 points N/A Posted on -
qa-featured

I recently started to learn programming in .Net. I have visual studio installed. I have heard that you can connect and explore any database within Visual Studio. I am yet to find out how. I need to connect to a SQL Server database that is running on a different machine. I want to explore the available tables and if possible execute queries without having to install the SQL Server Management Studio. Can someone guide me please ?

SHARE
Best Answer by Electrica
Answered By 0 points N/A #89937

Exploring Microsoft SQL server database inside Visual Studio 2010

qa-featured

SQL Server Management Studio gives far better options than using Server Explorer function in Visual Studio. This is because SQL Server Management Studio is geared to all MS SQL Server database specific tasks. It is much faster, more reliable than using Visual Studio. I would recommend to use SQL Server Management Studio for database specific work.

Answered By 120 points N/A #89938

Exploring Microsoft SQL server database inside Visual Studio 2010

qa-featured

Thank you WizKid. I still want to use Visual Studio 2011. This is because I do not have access to the SQL Management Studio software. I need to connect to a remote SQL Server database. I just need to find out if Visual Studio is capable.

Best Answer
Best Answer
Answered By 0 points N/A #89939

Exploring Microsoft SQL server database inside Visual Studio 2010

qa-featured

Use the Server Explorer option in Visual Studio. Server Explorer allows you to collate all your database connections and browsing requirements in one screen. You can create multiple connections to different databases simultaneously. I use this to keep track of multiple databases, that I need to connect to on a routine basis.

Answered By 120 points N/A #89940

Exploring Microsoft SQL server database inside Visual Studio 2010

qa-featured

Sever Explorer is the solution! Thank you Electrica! I was able to create a connection to the database and browse the tables.  But there is one problem. It's so slow! When I type a query and run it, it takes AGES for the results to show up. Is there a way to speed up the process?

Answered By 0 points N/A #89941

Exploring Microsoft SQL server database inside Visual Studio 2010

qa-featured

Visual Studio attempts to make everything visually easy. Sometimes, this is at the cost of CPU resources and waiting time. When you run a query Visual Studio attempts to show the joins and the columns in a diagram as well as the grid apart from the results. This really slows down the process. Therefore running a query in Server Explorer is always slow. However, you can speed up the process by doing the following:

  • Turning off the Show Diagrams Pane
  • Turning off the Show Criteria Pane

Keep only the SQL Pane and the Results Pane. This will speed up the results.

Answered By 120 points N/A #89942

Exploring Microsoft SQL server database inside Visual Studio 2010

qa-featured

Thank you again Electrica. This may be a trivial question, but how exactly do you turn off this Diagram Pane and the Criteria Panel? This is the first time I am using the Server Explorer.  So, I need a bit of education.

Answered By 0 points N/A #89943

Exploring Microsoft SQL server database inside Visual Studio 2010

qa-featured

You can turn on/off the Diagram Pane and the Criteria Pane via the keyboard short cuts as specified below.

Diagram Pane : CTRL + 1

Criteria Pane   : CTRL + 2

You can also click the tool bar icons to turn on and off the respective panes. The below given screenshot of the toolbar icons will help you.

Answered By 120 points N/A #89944

Exploring Microsoft SQL server database inside Visual Studio 2010

qa-featured

Electrica,

I am speechless! Your advise worked! Now I can run queries in Visual Studio with decent speed and responsiveness. I am glad you helped me through this. I give you 10 out of 10 points. The screenshot helped me a lot. Thank you for your expert advise.

Answered By 0 points N/A #89945

Exploring Microsoft SQL server database inside Visual Studio 2010

qa-featured

I am glad that I was able to help you out. Keep in mind though, WizKid's advise is actually the best. If you can, I would still advise you to use SQL Server Management Studio Snap-In. But I believe your need is now fulfilled. Have a nice day!

Answered By 120 points N/A #89946

Exploring Microsoft SQL server database inside Visual Studio 2010

qa-featured

I will keep that in mind. Thank you again.

Related Questions