Publishing a SQL Server Database project - visual-studio-2010

I've created a SQL Server database project that correctly deploys a database on my machine. However, I need this project to create databases on QA's machine. They do not know how to create a database from a script.
Is there a way a database project in Visual Studio 2010 can be published so all a non-technical user has to do is click an executable and the database will automatically install?

What you are looking for is this MSDN article: Deploying a Database by Using the Database Publishing Wizard.

Related

Unable to publish DB project on Azure SQL Data Warehouse

With Visual Studio 2019 (already updated to the latest version), I have created a new SQL Server Database Project connected to an Azure SQL Datawarehouse Database.
I imported all the object already present on the database (tables, stored procedure and schema), I carried out the schema compare which does not detect any difference.
On the project properties I changed the Target platform setting it up on Miscrosoft Azure SQL Data Warehouse, I switched the Compatibility level setting it on SQL Server 2017 (140)
The build of solution is successful, but when I tried to publish the solution I have the following message error
Creating publish preview...
Errors occurred while modeling the target database. Deployment can not continue.
I can generate the publish script only if I check the box Always re-create database, but I don't want drop and re-create the database every time
I did a lot of research but none of them solved my problem.
Anyone knows if there are any known limitations concerning the publish of SQL Server Database Project on Azure SQL Datawarehouse Database or does anyone know how to solve the problem?
Thank you
Deploying database projects to Azure SQL Data Warehouse is in public preview since August if you use Visual Studio 2019 SQL Server Data Tools (SSDT) as documented here. At the bottom of the page Microsoft gives you instructions on how you can provide feedback directly to the SSDT team.
Database projects were not supported on Azure SQL Data Warehouse as you can read here and here.
Check your database tables in the "System Tables." If you have dbo.sysdiagrams,
that won't allow you to deploy the db.
So, if you delete dbo.sysdiagrams table on your database, that will hopefully allow you to deploy the database.
They get created when you click on the database diagrams.

Advice on creating a local instance of Azure Website

I have, I admit, done things the wrong way round and created an Umbraco installation on Azure, developed multiple websites on that installation and only just decided I want a local instance for further development purposes.
Given that that's where I am, does anyone have any advice for how to go about achieving this? I have tried installing Visual Studio Community 2017 and MS SQL Server 2017 Developer and while I can connect to Azure with Visual Studio I don't seem to be able to work out how to view the installation, much less copy it down to my PC (something which I my searches seem to suggest isn't possible with Visual Studio).
I think you will need to copy down the site via FTP and the database using SQL Server Management Tools (assuming you are using SQL Server and not SQL CE).
You can get the FTP connection information from the Azure portal. The web root is in /site/wwwroot. Copy it down locally and you will be able to open it in Visual Studio as a Web Site. For the database, you can connect to the Azure SQL database with SQL Server Management Tools (you should have the connection info from when you created the database) and then right click on the database, select "Tasks" > "Export Data-tier application..." which will allow you to save a 'bacpac' file your local machine. You can then connect to your local SQL Server instance, and then right click on the "Databases" node in the Object Explorer and select "Import Data-tier application..." Once the database is imported, you may need to create/update a SQL Server user and grant it access to the database you just imported. For local development I just set the user to be owner of the the db. Back in Visual Studio, you should update the "umbracoDbDSN" connection string to use the new local database. At this point you should be able to run the website locally.

DataBase project in Visual Studio

I have two database projects in Visual Studio which is purpose to deploy databases separately. First database project deploy DBFirst and second database project deploy DBSecond. DBFirst database is created successfully but I am struggling with second.
DBSecond contains stored procedures and views. Some of them referenced to DBFirst and DB project failed during the build process. Example I have following view in DBSecond:
CREATE VIEW [dbo].[DBFirst_CLM_Details]
AS
SELECT *
FROM [DBFirst].[dbo].[CLM_Details]
GO
That project failed during the build because it cannot resolve reference DBFirst. If I change "Build Action" property from Build to None project will build but it will skip that file.
How can I deploy that view and similar objects which have references to another database? I am using VS 2013 and target platform is MS Azure SQL Database
Thanks
Cross-database references are not supported by Azure SQL Database. If you need it you should go and vote for it to help prioritise its delivery. If you need the capability today you will need to invest time in querying and combining the data elsewhere in your application outside of Azure SQL Database.

How can I manage SQL Server jobs using a Database project

Does Visual Studio 2010 support managing SQL Server jobs in the Database Project?
I am working with a database project in Visual Studio 2010. I would like to manage my database scheduler job in my database project. It seems that I could not create any server object in the database project.
What we do at my company is:
Script out your jobs to be re-runnable (either drop/create or skip if exists)
Place the scripts in your Post-Deployment folder (and include the reference in your Script.PostDeployment.sql file as necessary)
No, you won't be able to do that. If you want to use Visual Studio to manage database projects you can use the database and server projects (what used to be called Data Dude).
You might also want to take a look at Red Gate SQL Connect. It works with databases and source control through Visual Studio.

What is the difference between a "Database Project" and a "Server Project" in Visual Studio Database Edition?

When creating a new database project with Visual Studio 2008 Team Suite, Database Edition, you can choose to create either a Database Project or a Server Project.
What is the difference between the two?
The resulting projects seem to be pretty much identical. The server project still seems to target a single database.
A Database Project is meant to manage changes to user database, while a Server Project is used to manage server settings and objects and changes to master database.

Resources