sql-server-data-tools

Visual Studio SQL Server design and inline editing features missing

左心房为你撑大大i 提交于 2019-12-10 13:50:56
问题 In Visual Studio 2012 I have two database connections configured in the Server Explorer. One is for a SQL Server 2008 R2 database, the other is for a SQL Server 2012 database. I've always been able to make quick inline edits to the data with SQL 2008 databases by right clicking on the table and selecting "Show Table Data". I could then pop open the SQL pane and query the data, put a cursor directly in the field and edit the data in the result set. I relied on this method heavily when making

SQL 71501 has an unresolved assembly reference

十年热恋 提交于 2019-12-10 13:49:35
问题 We are using SSDT tools with Visual Studio 2015 and Target Platform set to SQL Server 2008. We are stuck with this function which is throwing an error and need assistance on what we can do to fix it. SQL71501: Function: [dbo].[GetFormattedAddress] has an unresolved reference to Assembly [AddressFormatting] CREATE FUNCTION [dbo].[GetFormattedAddress] (@AddressID INT, @CompleteAddress BIT) RETURNS NVARCHAR (4000) AS EXTERNAL NAME [AddressFormatting].[AddressFormatting.UserDefinedFunctions].

CLR Stored Procedures: how to set the schema/owner?

痴心易碎 提交于 2019-12-10 12:43:18
问题 I am working on a Linq based CLR Stored Procedure for some complex filtering and manipulation, which would otherwise require a lot of messy and poorly performant T-SQL code, if implemented in a more "traditional" Stored Procedure. This is working great, but I can't find how to set the schema of this Stored Procedure in phase of deployment, for a better organization and separation of the database objects in modules. Any ideas? Many thanks in advance. 回答1: When you create the procedure

Comparing schemas ignoring the schema name

末鹿安然 提交于 2019-12-10 12:09:34
问题 I'm using the SQL Server Data Tools to compare the tables two schemas. The schemas are similar and should be adapted to be the same. Now my problem is, that those two schemas are differently named. Example: [sourceDB] [FOO].[table1] [FOO].[table2] [targetDB] [BAR].[table1] [BAR].[table2] When I run the compare, it wants to remove both tables in schema BAR and recreate them with schema FOO . What I want is to just compare both tables regardless of the schema name and get a script that alters

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

怎甘沉沦 提交于 2019-12-10 10:12:35
问题 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:

How do I publish a SSDT Database from code

不问归期 提交于 2019-12-10 08:28:39
问题 We have SQLServer01.Publish.xml when I double click this file and publish, it publishes a database to sqlServer01. I wanted to ask can we publish this profile from code somehow ? 回答1: SSDT seems to like DacPac for this kind of thing. There is a DacServices utility class in Microsoft.SqlServer.Dac . I think this will require SSDT to be installed on the machine you plan on running this code. public class DacPacUtility { public void DeployDacPac( string connString, string dacpacPath, string

How to include custom data migrations and static/reference data in an SSDT project?

我们两清 提交于 2019-12-10 02:56:40
问题 We have a moderately-sized SSDT project (~100 tables) that's deployed to dozens of different database instances. As part of our build process we generate a .dacpac file and then when we're ready to upgrade a database we generate a publish script and run it against the database. Some db instances are upgraded at different times so it's important that we have a structured process for these upgrades and versioning. Most of the generated migration script is dropping and (re)creating procs,

Error when installing SSDT (SQL Server Data Tools)

落花浮王杯 提交于 2019-12-10 02:09:39
问题 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

SQL Data Compare - Some tables missing

我们两清 提交于 2019-12-10 01:21:22
问题 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

how to use msbuild properties in sqlproj (SQL Server 2012) script

随声附和 提交于 2019-12-09 11:24:45
问题 I just upgraded my existing SQL Server 2008 r2 .dbproj to a SQL Server 2012 .sqlproj (using SQL Server Data Tools). Previously, I was able to define a SQLCMD variable in my project, and then define the value by editing the project file to use msbuild values by adding the following element: <ItemGroup> <SqlCommandVariableOverride Include="ProjectDirectory=$(MSBuildProjectDirectory)" /> </ItemGroup> Which I could then use in my PostDeployment script like this: SELECT * INTO dbo.MyTable FROM dbo