VS SQL Server Object Explorer takes forever to load nodes - visual-studio-2013

VS 2013 SQL Server object Explorer connected to a SQL Azure database, trying to open table/column/key info takes 30seconds-2min. I can open it in SSMS in ~2 seconds. It's not a large database (just starting, 30 or so tables so far).
Any idea why this is so slow in the SQL Server Object Explorer in VS?
(I'm actually not sure if this Object Explorer is part of SSDT or not - if it matters, SSDT version is 12.0.50318.0)

SSDT loads all SQL objects when you open start the SQL Server Object Explorer in VS. Once you have loaded it, loading any additional nodes under the same tree shouldn't take that long.
That said, Microsoft is looking at performance improvements in the near future for the Object Explorer in SSDT.

Related

visual studio 2013 cannot retrieve database objects

Firstly, Visual Studio 2013 connects to database and retreive tables normaly.
I added more table to database and edit relationship. After that I update data source in Project Explorer tree but it's failed. Even I tested the connection It's ok. But VS 2013 cannot retreive data objects - Message Box shows "Retreiving database object..." in very long time without reason. Can you show me how to fix it?
I found the way to fix this error. Just only find and kill all of process are using database

Why do I have Sql Express installed with Visual Studio when I already have Microsoft Sql Server Developer?

What benefit do I derive from installing Sql Express with Visual Studio (2010) when I already have Microsoft Sql Server Developer (2008)?
The only benefit I can imagine is that I can develop for either platform without having to be concerned with which one(s) I have installed. Is there an actual negative detriment to removing Sql Server Express (specifically the SqlExpress instance) from my development machine?
The only advantages I can think of to having Express as well are:
if you want to develop applications that specifically target Express, using Express can help prevent you from using features that work in Developer but won't work on your targets (e.g. compression, partitioning).
if you already have applications that use the Express instance, they will obviously stop working until you move those databases to the other instance and update the apps to point at the other instance.
If neither of those situations are relevant, I can't think of a single downside to removing the Express instance. To be safe you may want to start by stopping and disabling the Express service for a week, just to be sure nothing you have is relying on it.
Note that uninstalling Express from Programs and Features will remove the engine but it will leave any of your user databases intact. So there is no fear of data loss, provided you stop the SQL Server service gracefully before you uninstall it.
To remove SQL Server Express, you would right-click whichever of these items appears in Add/Remove Programs / Programs and Features:
Microsoft SQL Server 2008
Microsoft SQL Server 2008 (64-bit)
(There should only be one of those unless you've got a really messed up set of instances on an x64 machine.)
When you right-click, select "Uninstall/Change"
You'll get a dialog box adding if you want to add, repair or remove; select remove
Next you'll see a "Setup Support Rules" dialog - if OK is available, click it, otherwise you will probably need to restart your computer before proceeding
Then you'll be on the "Select Instance" screen. There is a dropdown called "Instance to remove features from:" - select SQLEXPRESS and click Next
Then you'll have a screen called "Select Features" - here you'll want to select "Database Engine Services" only (I don't think you want to remove any of the shared features). Click Next
Should be smooth sailing the rest of the way, but as mentioned you will have to clean up the folder, which is probably:
C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\
Should be safe to delete everything there unless you want to save any of the user databases. You might also search for .mdf files you want to expunge or save that may have been copied to various parts of your system due to use within an application or during development.
SQL Server Developer edition doesn't include User Instances feature (aka RANU) that is only available in SQL Server Express edition. Visual Studio 2010 and earlier is using User Instances to open MDF files embedded in your projects. With Developer edition, but without Express edition you would see an error if you tried to open these files.
Now, Visual Studio 2012 includes LocalDB version of SQL Server 2012 Express for this purpose.

Visual Studio - How can I automatically close server data connections on build?

Is there a way to automatically close the open server connections in the Server Explorer panel in Visual Studio 2010?
I'm using EF and a contextInitializer which always drops the database when building (testing stuff).
70% of the time I forget to manually close the connection which gives me a "cant delete the DB because its being used" error.
Its a small thing, i know, but its making me mad!
Thanx in advance!
Alex!

Is it possible to use Windows Authentication to connect to a SQL Express db?

I've been looking around to find an answer to this question, and seeing lots of different answers, some of which don't look right to me. Here's my problem.
I've created a SQL Server 2008 Express database, and populated it with tables from 2 regular SQL Server databases (it's to receive data from the 2 databases). I've done this using Windows Authentication.
Now I want to test deploying an app, as a ClickOnce application, so I've written a bare-bones console app in VS 2010. Next I tried to add a new data source to the SQL Express 2008 database. But when I try to do that I get a message saying, "This file is in use. Enter a new name of close the file that's open in another program." (I'm running VS 2010 as an administrator on my Windows 7 Ultimate box, which was one of the answers someone gave to fix this problem, but isn't working for me.) I don't have the SQL Express db open in SSMS or anything else. One solution I've read is to get into SSMS and detach the .mdf, but then how would I do maintenance, like create new SP's, views, etc? Is it a maintenance nightmare of attaching in SSMS while not in VS 2010, do DBA work, then detach the DB, get into VS 2010 do work, etc?
The database is meant to run on the user's machine; not a network share.

Database Diagramming Tools for SQL Server CE 4

Although there are GUI tools in VS2010 for entering data, writing queries etc against a SQL CE4 db, there doesn't appear to be a way to visualise the database in a digram.
So my Questions are
A) Have i missed something in VS2010 tools for sql Server CE4
b) Can i use SMSS to Diagram SQL CE4 databases. I've tried it but it wouldn't allow open the db. Is there a plugin available?
Thank you.
Microsoft does not supply a diagramming tool for SQL Server Compact 4, you could try my VS 2010 add-in http://sqlcetoolbox.codeplex.com (Create Database Graph) or the Data Port Console from http://www.primeworks-mobile.com
Actually, there IS a diagramming tool for SQL CE right into VS, but it's hard to find.
I only tried this in VS 2012 Preview, but it might work in older versions - please speak up in the comments.
Here's how to get to it:
In 'server explorer' create a normal connection to the SQL CE database. (No diagramming options are visible...)
Then right-click a table -> "Show table data"... Wait for it...
Hit Ctrl-1.
TA-DA!!
Alternatively, Right-click in the window with the tabular data and choose "Pane" from the context menu. (I know, 'Pane' !?)
Finally, from the 'Pane' submenu click the obvious choice - "Diagram".
There you have it.
SDF Viewer is now able to create database diagrams for SQLCE databases

Resources