sql-server-data-tools

Database Reference in SSDT project with UDFs and Views

北城以北 提交于 2019-12-02 04:09:05
Running into a weird issue. Assuming there are two database projects in one empty solution, Bart and Homer. Bart has been added as a Database Reference to Homer. Bart project defines a function: CREATE FUNCTION [dbo].[Message]() RETURNS NVARCHAR(255) AS BEGIN RETURN 'I am a value returned from another database' END Then the Homer project defines a table: CREATE TABLE [dbo].[Messages] ( [Id] INT NOT NULL PRIMARY KEY ) and a view: CREATE VIEW [dbo].[MessagesV] AS SELECT Id, Bart.dbo.Message() AS [Message] FROM dbo.Messages When trying to build, I am getting these errors: Error 2 SQL71501:

Workaround for exporting data to Excel with more than 255 columns

耗尽温柔 提交于 2019-12-02 02:34:17
SSMS and SSRS to Excel enable for more than 255 columns when copy-pasting. SSIS does not allow for more than 255 columns to be exported to Excel 2007. Is there a way to override this? Problem There are a lot of Limitations when exporting to an Excel Files using Sql server data tools Workarounds You can do some workaround to achieve this: Create a dataflowtask that export your data into a FlatFile ( csv ) Store your Destination FileName in a Variable Create another Dataflowtask that convert your csv file to an Excel File using a script task with a similar Function Note: you have to add

load multiple data from excel to sql SSIS

南笙酒味 提交于 2019-12-02 01:54:48
I am working with SSIS and I need to load multiple files with the following (Yellos) format to SQL using SSIS The problem as you can see is that the files has an horrible format only process / consume records if the column A is populated (e.g: ignoring rows# 14 - X ) and I need to insert the value in D1 into the Date column. any suggestion? Regards! Lets divide this problem into 3 Sub problems: Get the date value from D1 Start Reading from Row number 4 Ignore all Rows where Column1 is NULL Solution 1. Get the date value from D1 Create 2 SSIS variables, @[User::FilePath] (of type string) that

Workaround for exporting data to Excel with more than 255 columns

狂风中的少年 提交于 2019-12-02 01:45:43
问题 SSMS and SSRS to Excel enable for more than 255 columns when copy-pasting. SSIS does not allow for more than 255 columns to be exported to Excel 2007. Is there a way to override this? 回答1: Problem There are a lot of Limitations when exporting to an Excel Files using Sql server data tools Workarounds You can do some workaround to achieve this: Create a dataflowtask that export your data into a FlatFile ( csv ) Store your Destination FileName in a Variable Create another Dataflowtask that

How to build SSRS reports (rptproj) with TeamCity and Visual Studio 2015

落花浮王杯 提交于 2019-12-02 00:21:55
问题 We have a build step to build a solution with about 70 projects using the Visual Studio (sln) as the runner type. We are able to successfully build other projects that are not supported by MSBuild, such as a vdproj file and office plug-ins by doing this. However, it apparently does not work for SSDT/SSRS projects. I have made sure the latest version of SSDT is installed to Visual Studio, and Visual Studio 2015 is directly on the build server. rptproj is not supported by MSBuild and cannot be

How to build SSRS reports (rptproj) with TeamCity and Visual Studio 2015

喜你入骨 提交于 2019-12-01 21:55:28
We have a build step to build a solution with about 70 projects using the Visual Studio (sln) as the runner type. We are able to successfully build other projects that are not supported by MSBuild, such as a vdproj file and office plug-ins by doing this. However, it apparently does not work for SSDT/SSRS projects. I have made sure the latest version of SSDT is installed to Visual Studio, and Visual Studio 2015 is directly on the build server. rptproj is not supported by MSBuild and cannot be built Is there any thing else I need to do to get these to build correctly? I have read about some

Why does the SqlPublish target fail for a SQL Server 2014 database project?

喜你入骨 提交于 2019-12-01 21:44:52
问题 My machine has the current (March 2014) version of SSDT, Visual Studio 2012 Professional, and SQL Server 2014 Developer. I have a SQL Server project (let's call it MyProject.sqlproj ) that targets SQL Server 2014. I attempted the following: MsBuild.exe MyProject.sqlproj /t:SqlPublish /p:SqlPublishProfilePath=Somewhere.publish.xml This fails with the following error: Deploy error Deploy 72002: Internal Error. The database platform service with type Microsoft.Data.Tools.Schema.Sql

Usage of wrong compiler during SQL Server Database Project building

与世无争的帅哥 提交于 2019-12-01 21:28:17
I have an issue with compilation of SSDT SQL Server Database Project by using Visual Studio 2015. I want to use C# 6 features inside my database project, but it seems like it is unsupported. For example, I have added the next class in my db project: namespace Database1 { class ClassFile1 { public string Str { get; } = string.Empty; } } I have tried to compile this, but I got the error: CS1519: Invalid token '=' in class, struct, or interface member declaration I have found out that the reason of this error is wrong version of compiler that used by VS 2015. The next compilation line is

VS 2015 Native compiler return value -1073741511 on .rdlc files when building project

烂漫一生 提交于 2019-12-01 17:32:01
I got this error: rsUnexpectedCompilerError: An unexpected error occurred while compiling expressions. Native compiler return value: ‘-1073741511’ ,when compiling rdlc 's on a new box on Visual Studio 2015 on a Windows 8.1 box for an existing project This happens on every existing r d lc file in the project that has an expression . I checked that. I have the latest sql server data tools (ssdt) installed. I also created a brand new console application with empty report with no expressions and it compiles fine. When I add an expression to that empty report, like in the example below, it refuses

Visual Studio 2013 Publish Database to Azure

自作多情 提交于 2019-12-01 15:04:39
I have created a new "Database" project in Visual Studio 2013. I have set the Target platform to "Windows Azure SQL Database". The project is nearly empty, with the exception of one .sql file to create a Schema. When I try to publish the project, it takes several minutes and ends with: Creating publish preview... Failed to import target model [database_name]. Detailed message Unable to reconnect to database: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. I have tested the connection string, and it works. What do I need to do to