Visual Studio 2015 - Sql Server Project Database Diagram - sql-server-2008-r2

Is there as way to create database diagram in Visual Studio as a Sql Server Project?
I know it is possible to do it in sql server management studio, but I am also wondering if it is possible to do in Visual studio.

As per MSDN (https://msdn.microsoft.com/en-us/library/y5a4ezk9.aspx) the Visual Database Designer was deprecated in Visual Studio 2013.
If you're using an older version of Visual Studio, note that support for the design tool within Visual Studio stops at SQL Server 2008 R2. (See "Important" box on top of page at https://msdn.microsoft.com/en-us/library/ms171976.aspx )
The short answer: no.

Actually there are two ways that i know In Visual Studio.
Add to project ADO.NET Entity Data model. It creates for you a .edmx file which contains a tables with relation.
More info MSDN. It also install Entity framework.
Open Server explorer > Connection to Database. Select Microsoft SQL Server, Server name=.; (or your PC name) and then choose your database schema.
You can check this video.
I hope it helps you.

Related

Create database project for PostgreSQL in Visual Studio 2015

I need to create a database project in Visual Studio 2015 for PostgreSQL databases. Then we can maintain version control of each database object in the form of SQL script file. So, is there any such provision (may be in the form of plug-in) in Visual Studio 2015?
EDITED:
We're already using Team Foundation System (TFS) as our version control system for all of our projects. So, we would like to use the same for Postgres scripts also. Our projects are developed in .Net on Windows OS, even the Postgres is now running on Windows Server. What we want is to use Visual Studio only for creating a database project for Postgres (similar .sqlproj for Microsoft SQL Server) so that we can maintain version history of table schemas in the form of SQL files, build the project and deploy whatever server we need. Hope I have provided enough information now.

Show Data Table missing on Visual Studio 2013 + SQL Server 2012 Express

A similar topic as this has been discussed, but my problem lies with a different version of Visual Studio; I am using Microsoft Visual Studio 2013 Professional and Microsoft SQL Server 2012 Express.
I am following this tutorial and I have progressed to the "Accessing Your Model's Data from a Controller" section.
It says to open Server Explorer, expand Tables and right-click the Movies table and select Show Table Data. This option is missing (along with Add New Table, Add New Trigger, New Query and Open Table Definition). I only have Copy, Refresh and Properties.
Other posts talk about SQL Server Data Tools. On the page to download it there is a link to download "Download Visual Studio 2013 with SQL Server Tooling", which goes to a page to download a trial copy of Visual Studio 2013.
It makes little sense to me. Am I suppose to have the option in 2013 Professional or not? I have also installed Visual Studio 2013 Update 2.
I had the same problem. I tried to install SSDT for Visual Studio. Make sure that the Visual studio version matches.
The reason for me to have this problem: Because I reinstalled SQL server management, and this overwrote the "old" one (which is match VS).

Running SQL Server CE 4 Queries with Visual Studio 2012 and SQL Server Management Studio 2012

I have recently upgraded to Visual Studio 2012 and SQL Server Management Studio 2012, however I cannot seem to see how to execute SQL scripts (created by Entity framework) on a SQL Server CE 4.0 database. With VS2010 + SSMS 2008 the Transact-SQL editor would ask for a connection and you could browse to the object, however this option is not available in SSMS 2012.
I have tried to execute the script via the Server Explorer -> New Query window, but I get parse errors. Any clues?
Microsoft got rid of that for SSMS 2012, and suggested to use the integrated tools in WebMatrix instead (from memory, can't find a link for that sorry).
As suggested in that Microsoft Answers post, however, you could use the SQL Server Compact Toolbox, it's pretty effective.
Try using the SQL Server Object Explorer instead of the Server Explorer. That should allow you to do what you wish.

How to connect to SqlExpress for Entity Framework using Visual Studio 2010 Express?

I'm trying to use the Visual Studio 2010 Express editions to set up an ASP.NET MVC 2 Web Application using SqlExpress + Entity Framework as the data access. I have both the "C# Edition" and "Web Developer Edition" installed.
If I try to add a data source using the "C# edition", I'm missing the "Microsoft SQL Server" data source type.
Visual Studio 2010 Express Screenshot http://dl.dropbox.com/u/4163528/images/StackOverflow/2010Express.png
but Visual Studio 2008 Professional has it.
Visual Studio 2008 Professional Screenshot http://dl.dropbox.com/u/4163528/images/StackOverflow/2008Professional.png
as noted by another StackOverflow question, the "Web Developer Edition" has this. However, the Web Developer Edition doesn't support the Entity Framework items:
EntityFramework http://dl.dropbox.com/u/4163528/images/StackOverflow/2010EF.png.
I'd want to stick with only the Express Editions. Is my use case one that Microsoft forgot about? What can I do here to use SqlExpress + MVC 2 + Entity Framework?
Thanks!
-Mike
You should be able to select SQL Server Database File, then change the connection string to connect to SqlExpress.
I just ran into this same problem. Visual Studio C# Express 2010 SP1 only offers me Microsoft SQL Server Compact 3.5 and Microsoft SQL Server Database File when creating or updating ADO.NET Entity Data Model (*.edmx) files.
However my copy of Microsoft Visual Web Developer 2010 Express SP1 is allowing me to add and update ADO.NET Entity Data Model (*.edmx) files in existing solutions and is allowing me to choose the Microsoft SQL Server option when building connection strings.
So the workaround for me is to simply switch between C# & Web Developer when messing with connection strings. Not sure if that's out-of-the-box for everybody or whether I've installed something else that switched the Microsoft SQL Server option on in Web Developer.

SQL Anywhere 11 (Sybase) with Entity Framework in Visual Studio SP1?

Well, the question is pretty much in the title. I've just installed Visual Studio SP1, and now when I want to import a Entity Model from a database, it doesn't display the SQL Anywhere provider anymore.
Does anyone know if there is a patch or some way to make it work with SP1?
Thanks.
There is a post on the ASP.NET Team blog that it will be available in Q3-Q4 of 2008. So I guess SP1 does need a new version of SQL Anywhere component.
Did you try to reinstall the integration component just in case?
try to install lastest build of SA. And you need to install it after SP1.
I had the same issue and did the following:
Control Panel -> Uninstall a program
Selected SQL Anywhere 12 - Client an clicked Repair. This made me unable to connect to any database from Sybase Central with an error message about JDBC.
Selected SQL Anywhere 12 and clicked Repair.
After that the provider showed up in Visual Studio and I was able to create a new connection to create an Entity Framework model.