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.
Related
I am working with Visual Studio 2019. And I am using VS 2019 Database project for generating the "Dacpac" file for db deployment.
My problem is that when I am deploying the .dacpac file after making changes in any object it's deploying/updating the database. But when I am deploying the .dacpac file after adding some description as a comment for any object it's not deploying or updating the database (particular object).
So is there any way by which comments can also be deploy for any database objects by .dacpac file.
FYI, I am using MS SQL 2016 as a database.
I've read numerous articles and posts here about getting Entity Framework to work with DB2 but all of them reference prior versions of Visual Studio. When I repeat the steps outlined (too many to remember at this point), I still do not have DB2 in the data providers list.
Has anyone gotten this to work in VS17 and, if so, can you walk me through what you did?
For registering IBM Database Add-Ins for Visual Studio 17, Visual Studio 2015 or earlier supported versions needs to be installed on the machine.
Steps:
Download and install IBM Data Server Driver Package
Download and install IBM Database Add-Ins for Visual Studio.
After successful installation of IBM Database Add-Ins, choose Start -> IBM Database Add-Ins for Visual Studio ->Register IBM Database Add-Ins.
This link has listed the steps needed for the add-in installation
https://www.ibm.com/developerworks/community/blogs/96960515-2ea1-4391-8170-b0515d08e4da/entry/VSAIFORVS2017?lang=en
Note: Make sure to download same version and fix pack of DS Driver and VS IBM Database Add-In. I downloaded v11.1.3fp3 version for both installations and it's working for me.
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.
I have been looking for solutions to providing source control for my SQL Server 2012 instance. I have looked at Red-Gate's solution but it is outside my price range. Since I already make use of Visual Studio Online (VSO) source control for my .NET projects I was wondering if it was able to provide source control for SQL Server?
I have seen articles (listed below) that discuss using Team Foundation Server (TFS) for source control however I do not have a dedicated TFS server, just VSO.
Use Team Foundation Server (TFS) as your Source Control in SSMS
Using the TFS as a source control repository for SSMS projects
Has anyone made use of VSO to handle source control for their SQL Server database?
I would definitely recommend using Visual Studio Online or Team Foundation Server to hold your database scheme in version control. There is a fairly recent article in Visual Studio Magazine that discusses using the SQL Server Data Tools (SSDT) to be able to make that easier for you: Simplifying Development with Visual Studio Database Projects. SSDT is available for any version of Visual Studio including the Community and Express editions.
Redgate was out of my price range too unfortunately...
The SSDT tools for VS are amazing, and i recently started using it for comparing DB versions - and then generating change scripts.
Here's a start point if you want to get into that...
Other Free Alternatives?
Liquibase
gitSQL
Liquibase - i couldn't get my head around but if you can get it working, it may be better for other databases, if you have the requirement to use other databases.
I use gitSQL - it's free up to 20 tables...
If you have more than 20 tables then it costs $40 - which is still so much cheaper than the redgate solution.
gitSQL are also setting up command line options in a future release, so potentially you could run it via a batch file, and set up continuous integration.
gitSQL are also talking about postgres, mysql editions in the future.
I have the situation below and can't figure out where everything is being saved.
I'm using a new installation of Visual Studio 2012 and didn't explicitly install any version of SQL. I created a Console project in VS and used NuGet to add references to the latest -Pre version of EF (6.0.1 at the time).
When I did the database operations I wanted (just some test stuff: create, add, query, migrations, etc.) everything worked. Shutdown the application, bring it back up and the data was persisted correctly. No problem so far.
When I went to look at the database I was surprised to find that I didn't have Management Studio installed. I also wasn't able to see any databases in the SQL Server Object Explorer in VS2012. I could see a "(localdb)\Projects" server but my database wasn't in it.
When I checked the generated connection string it was:
Data Source=.\SQLEXPRESS;Initial Catalog=TestProject.Context;Integrated Security=True;MultipleActiveResultSets=True
Using add server in the SQL Server Object Explorer I had to manually enter server names since none were found automatically. I tried localhost\SQLEXPRESS, (localdb)\SQLSERVER, .\SQLEXPRESS, and other similar variants, but those couldn't be found either.
Where is everything being saved?
Thanks.
If SqlExpress is not installed the default is (localdb)\v11.0 which is installed when you install VS2012 (or VS2013).