sql-server-data-tools

SSIS: Flat File default length

廉价感情. 提交于 2019-12-06 05:07:52
问题 I have to import about 50 different types of files every day. Some of them with a few columns, some inculde up to 250 columns. The Flat File connection always defaults all columns to 50 chars. Some columns can be way longer than 50 chars, and will of course end up in errors. Currently i am doing a stupid search&replace with notepad++ - Opening all SISS packages, replacing: DTS:MaximumWidth="50" by DTS:MaximumWidth="500" This is an annoying workaround. Is there any possibility to set a default

How to disable predeployment and postdeployment scripts in DacServices.Deploy()

馋奶兔 提交于 2019-12-06 04:57:59
We have some automated dacpac deployment code which correctly handles both a CreateNewDatabase and straightforward Update database scenarios in C# using Microsoft.SqlServer.Dac Now in the CreateNewDatabase case we want to be able to run the DacServices.Deploy() with both the Pre and Post Deployment scripts disabled. I.e. they should not be executed in this scenario. I have tried to find a suitable place in the DacDeployOptions and DacServices objects but cannot find anything that will do this.Ideally Question 1 : I would like something like DacDeployOptions.IgnorePreDeploymentScript = true Is

SSDT unresolved reference ERROR SQL71561

亡梦爱人 提交于 2019-12-06 03:41:30
问题 I've imported a database into a database project and straight from the bat I'm getting 200+ errors about unresolved references. Now i've read several posts and sites like this one (http://blogs.msdn.com/b/bahill/archive/2009/08/26/using-self-referencing-or-local-3-part-names.aspx) that the cause would be the 3 part names. The solution would be to right-click the database project > refactor > rename server/database references. However my window differs from that of the earlier mentioned

How can I conditionally include large scripts in my ssdt post deployment script?

て烟熏妆下的殇ゞ 提交于 2019-12-06 03:37:48
In our SSDT project we have a script that is huge and contains a lot of INSERT statements for importing data from an old system. Using sqlcmd variables, I'd like to be able to conditionally include the file into the post deployment script. We're currently using the :r syntax which includes the script inline: IF '$(ImportData)' = 'true' BEGIN :r .\Import\OldSystem.sql END This is a problem because the script is being included inline regardless of whether $(ImportData) is true or false and the file is so big that it's slowing the build down by about 15 minutes. Is there another way to

What is the syntax for adding multiple arguments onto the “Variables” parameter in sqlpackage.exe?

半世苍凉 提交于 2019-12-06 02:38:59
问题 I am using SqlPackage.exe for my deployment. I have read the documentation here for the usage of SqlPackage.exe . The documentation only states the synax for one variable: Specifies a name value pair for an action specific variable; {VariableName}={Value}. The DACPAC file contains the list of valid SQLCMD variables. An error will result if a value is not provided for every variable. My problem is that the documentation does not say how to pass multiple arguments into the Variables parameter.

Visual Studio Database project target platform in publish profile

邮差的信 提交于 2019-12-05 23:26:06
Is it possible for me to specify the Target Platform (SQL Server 2014, SQL Server 2016, Azure, etc) in a publish profile? I have a database project that I sometimes deploy to a local SQL Server 2016 instance, and other times deploy to an Azure SQL database. I would like to just specify 2 different publish profiles and have the target platform be changed on the fly at that time. Is this possible? Azure, MSSQL 2014, MSSQL 2016 have different limitations and requirements to Database Project. Let's imagine: You are using FILESTREAM in MSSQL 2014 and will use in MSSQL 2016. And your FILESTREAM is

SQL Agent Job failes when trying to execute SSIS package due to some permission issues

微笑、不失礼 提交于 2019-12-05 23:06:49
I deployed ssis package on sql server 2012. Thereafter scheduled a sql job to run this ssis package weekly. When I started a job for the first time, it failed with following error. The job failed. The Job was invoked by User MyDomain\MyUserName. The last step to run was step 1 (scheduling ssis package). Executed as user: NT Service\SQLSERVERAGENT. Microsoft (R) SQL Server Execute Package Utility Version 11.0.5058.0 for 64-bit Copyright (C) Microsoft Corporation. All rights reserved. Started: 2:17:12 PM Package execution on IS Server failed. Execution ID: 6, Execution Status:4. To view the

Sql Schema Compare will not update after CLR object installed 'Source schema drift detected'

夙愿已清 提交于 2019-12-05 16:49:07
问题 After installing a custom CLR object Sql Server Developer Tools (SSDT) VS2012 will not allow an update. The error is "Source schema drift detected. Press Compare to refresh. After refresh same thing happens. Tried In settings, I set the object to just Stored Procedures. Settings ->General -> Block on possible data loss -> tried both on and off. 回答1: This sort of loop can also be caused by a referenced SSDT project failing to build. The referenced project may be missing, unloaded, or have an

Why does select source for a SQL Schema Comparison cause VS2012 to crash?

给你一囗甜甜゛ 提交于 2019-12-05 16:44:45
问题 For seemingly no reason, choosing SQL > Schema Compare > New Schema Comparison and then attempting to "select source" causes Visual Studio 2012 to crash. (It has been working as expected for months). Are there any possible fixes besides trying to re-install? Note: trying to debug the crash in another instance of Visual Studio shows an exception in Application: devenv.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System

Missing Enumerator in Foreach Loop Editor

喜你入骨 提交于 2019-12-05 15:35:22
I'm on a new laptop, working in Visual Studio 2015 on a SQL Server Integration Services package. In previous versions of Visual Studio there are several options in the Enumerator configuration section, like this... In VS 2015, that section is blank and I cannot populate it with a data set. I have updated SSDT and rebooted. The problem was with the Target Server Version in the Project Properties. The new installation of Visual Studio 2015 had it defaulting to vNext. Switching it to SQL Server 2012 caused the configuration to show up. You have a problem is your visual studio. (below a screenshot