sql-server-data-tools

SSDT creating a rollback deployment script?

孤人 提交于 2019-12-05 02:08:46
问题 we can create a SQLServer deployment script with TFS&SSDT, but is there a way to create a rollback script, so that we can roll back the deployment? Thank's 回答1: As SSDT (and similar products) all work by comparing the schema in the project against a live database to bring the database in sync with the model, there's not a direct way to create a rollback script. There are also considerations regarding data changed/added/removed through pre or post-deploy scripts. That being said, there are a

Do I need a database reference for a linked server in a SQL Server database project?

北战南征 提交于 2019-12-05 01:26:25
In my database project, I have added a reference to a linked server. When I use this linked server in a view and try to build my database project, SSDT reports errors because it cannot understand references to any of the schemas referenced on the linked server: [LinkedServer].[DB1].[dbo].[Table1] The above would returns an error that SSDT cannot decipher the reference to [DB1].[dbo].[Table1] . I tried to add a reference to this database, but SSDT required either a .dacpac file (produced by another database project) or a system database on the same server as the database in my project. How do I

Error when installing SSDT (SQL Server Data Tools)

久未见 提交于 2019-12-05 01:06:26
I have a problem during the installation of SQL Server Data Tools for Visual Studio 2017 I get the following error (translated): The requested meta file operation is not supported (0x800707D3) Screenshot: See here Log file available here: https://www.dropbox.com/s/e34kry9ycj76j7n/SSDT-Setup-ENU_20171219090643.log?dl=0 Here's the relevant section from the linked log file: [13C4:3020][2017-12-19T10:07:22]i000: MainViewModel.OnPackageActionProgress: Percent completed: 0, Overall progress: 27 [13C4:3020][2017-12-19T10:07:22]i000: MainViewModel.OnPackageActionProgress: Percent completed: 0, Overall

Visual Studio 2012 + Business Intelligence Templates

你。 提交于 2019-12-05 01:03:21
I got SQL Server 2012 installed on my machine and I have SSDT to create BI projects. Today i installed Visual Studio 2012; but i cannot create any of BI projects in Visual Studio 2012. Is there a way I can open BI (SSIS/SSAS/SSRS) projects in VS 2012 or should i have to always go back to SSDT to open them. Check out this blog post. Basically, there are two versions of SSDT (even though Microsoft doesn't ever explicitly state this), and depending on how you installed SSDT, you get one or the other version. As a further note, SSDT will only work with BIDS in SQL Server 2012, not 2008R2. SSRS

SQL Data Compare - Some tables missing

无人久伴 提交于 2019-12-05 01:01:47
When doing a Data Compare using SQL Server Data Tools through VS 2013 pro, I have a scenario where some tables appear to be getting missed out. What I mean by that is there is data in TableA on the source server but no data in the equivalent table on the destination server. However the results window doesn't even display a row for TableA . Also if I try to filter the results in the next step prior to pressing "Finish", TableA doesn't appear as an option to filter by. It's almost as if the table doesn't exist on the destination server. I've verified that is does by: Connecting through SSMS and

Visual Studio SSDT Data Compare how to compare two tables in a single database

不羁的心 提交于 2019-12-04 21:53:22
问题 Trying to do something simple Data Compare in SSDT but proving a bit hard. In one database, I have two tables I want to compare. These tables have the same schema, just different table names. And I just want to see if this tool will give me a nice way to compare the data in both. I.e. tblOutput tblOutput_210314 But this picking of two tables to compare against each other in a single database I can't see how to achieve. Seems like you can only pick a table name which exists in both source and

SSDT transactional publish?

蹲街弑〆低调 提交于 2019-12-04 17:04:00
Using msbuild with SSDT, I have tried IncludeTransactionalScripts, but it seems to only put each statement in an individual transaction. Is it possible to publish multiple database projects as a transaction? If not, can I at least make sure that each Project is published within a transaction? For anybody else who found this question, but didn't know where to look: There is a publish setting, "Include transactional scripts", that begins a transaction at the start of the publish script. It then wraps each schema change in the script in an error check. On errors, the transaction is rolled back

How to set Build Action for generated files from a T4?

馋奶兔 提交于 2019-12-04 16:49:42
The question is: is there a way to have a setting in the *.tt file so that the generated files are set to a specified Build Action? The thing is I am generating SQL script using a template. I use this script as pre-deploy script in Database project. Currently, I have to manually set the Build Action to Pre-Deploy every time a file being re-generated - I would like to automate it. Both files - template and SQL that it generates - are included into project. In Project (*.sqlproj) they are as next tags: <PreDeploy Include="Migration\PreDeployScript.sql"> <DependentUpon>Migration\PreDeployScript

DACPAC not including composite objects

白昼怎懂夜的黑 提交于 2019-12-04 16:16:33
I have a VS2012 database project which includes tables, stored procs, views etc. I then have a second database project which contains a database reference to the first project. I have ensured that the "Include composite objects" options is selected from the "Project Properties -> Debug -> Advanced" menu. When I build the second project and take the resulting DACPAC file and deploy it through SSMS2012 it doesn't create the firsts project's objects. Am I missing something? Why don't the composite objects get included in the DACPAC? SmudgerDan As Peter Schott said in the comments above, I needed

SSDT project builds much slower with MSBuild than in VS 2013

限于喜欢 提交于 2019-12-04 14:01:24
问题 I noticed that our SSDT projects were building much slower via TFS build definitions than via VS 2013 on my local dev box. On the build server itself, I can build our largest SSDT project via VS 2013 in about 2 minutes. The exact same project builds from the command line on the same server using MSBuild in about 16 minutes (i.e. building in the same way TFS build definitions build SSDT projects) I've gathered /verbosity:diagnostic output from both methods, but cannot for the life of me see