sql-server-2016

Table-Valued Parameter without using a stored procedure

时光毁灭记忆、已成空白 提交于 2019-12-07 11:07:22
问题 It seems all I can find online are examples of table-valued parameters that require using a stored procedure. I recall doing this in the past without the stored procedure. Is that possible? This code keeps throwing an error about the type not being specified. SqlCommand cmd = new SqlCommand(@" UPDATE t1 SET t1.ScheduledStartUTC = t2.ScheduledStartUTC FROM ScheduleTickets AS t1 INNER JOIN @SetScheduledStart AS t2 ON t1.ScheduleId = t2.ScheduleId AND t1.PatchSessionId = t2.PatchSessionId ", c);

Where does one place the Always Encrypted Certificate on an IIS 7.5 web server?

爱⌒轻易说出口 提交于 2019-12-07 03:58:44
问题 We have a SQL Server 2016 database that employs Always Encrypted. Our recently published ASP.net web site attempts to pull data from this database, and when it does we get this error: Error: Failed to decrypt column 'EnSSd'. Failed to decrypt a column encryption key using key store provider: 'MSSQL_CERTIFICATE_STORE'. The last 10 bytes of the encrypted column encryption key are: 'B8-48-B3-62-90-0B-1D-A6-7D-80'. Certificate with thumbprint '97B0D3A64CADBE86FE23559AEE2783317655FD0F' not found

Deploy of a report with SSDT 2016 generates error

隐身守侯 提交于 2019-12-06 20:12:49
问题 I use VS2015 with SQL Server Data Tools; I have some Reporting Services (RDL) reports. I want to deploy them to a Reporting Server with SQL Server 2014 installed. In my report project I set the TargetServerVersion to "SQL Server 2008R2, 2012 or 2014" , but the deploment process fails with an error similar to: Report Definition invalid, because namespace .../2016/... invalid. 回答1: It is solved. You "MUST" recompile your report project and immediately afterwards you can deploy your reports

SQL Server 2016 JSON: Select array of strings instead of array of objects

对着背影说爱祢 提交于 2019-12-06 18:16:42
问题 I am new to JSON in SQL Server and can't figure out how to return a simple array of strings: DECLARE @T TABLE ([value] NVARCHAR(MAX)) INSERT INTO @T ([value]) VALUES ('foo') INSERT INTO @T ([value]) VALUES ('bar') INSERT INTO @T ([value]) VALUES ('test') INSERT INTO @T ([value]) VALUES ('ok') SELECT [value] FROM @T FOR JSON PATH This returns an array of objects: [{"value":"foo"},{"value":"bar"},{"value":"test"},{"value":"ok"}] I would like it to return: ["foo","bar","test","ok"] Can this even

System.OutOfMemoryException occurs frequently after Upgrading SQL Server 2016 to version 13.0.15700.28

回眸只為那壹抹淺笑 提交于 2019-12-06 17:25:42
问题 I am running Windows 10 Pro 64 bit on a dev box that has multiple monitors, 16 gigs DDR4 RAM, 4 Ghz I7, GTX 970. I run SQL Management Studio with SQL Server 2016 Developer Edition along with VS 2015 Enterprise Update 3. Yesterday I upgraded Sql Management Studio 2016 to 13.0.15700.28 and it was like a poison pill for my machine. Now after an hour or two it will throw an out of memory except: An error occurred while executing batch. Error message is: Exception of type 'System

Using SQLBulkCopy - Significantly larger tables in SQL Server 2016 than in SQL Server 2014

☆樱花仙子☆ 提交于 2019-12-06 09:18:34
I have an application that uses SqlBulkCopy to move data into a set of tables. It has transpired recently that users that are using SQL2016 are reporting problems with their harddrives being filled with very large databases (that should not be that large). This problem does not occur in SQL2014. Upon inspection it appears that running TableDataSizes.sql (script attached) showed large amounts of space in UnusedSpaceKB. I would like to know if a) There is some bug in SQLServer 2016 or if our use of SQLBulkCopy has "clashed" with a new feature. I note that there has been some changes to Page

How can I delete the columns in DataFlow Task in SSIS?

北战南征 提交于 2019-12-06 07:15:34
问题 I use SQL Server 2016 and I have a very busy DataFlow task . In my DataFlow task , I use Multicast component for some reason. After creating a new Flow in my DataFlow , I need to delete some of the columns in the new flow because they are useless. Just for more information, I need to do that because I have more than 200 columns in my flow and I need less than 10 of those columns. How can I delete the columns in DataFlow Task in SSIS? 回答1: You can add an extra component of some sort. However,

Error when inserting into temporal table using Entity Framework Core 2.1

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-06 04:13:21
I'm getting the below error when trying to insert into a temporal table using Entity Framework Core 2.1. Cannot insert an explicit value into a GENERATED ALWAYS column in table 'db_test.dbo.Department'. Use INSERT with a column list to exclude the GENERATED ALWAYS column, or insert a DEFAULT into GENERATED ALWAYS column. Below is my table schema CREATE TABLE Department ( DeptID int NOT NULL PRIMARY KEY CLUSTERED, DeptName varchar(50) NOT NULL, ManagerID INT NULL, ParentDeptID int NULL, SysStartTime datetime2 GENERATED ALWAYS AS ROW START NOT NULL, SysEndTime datetime2 GENERATED ALWAYS AS ROW

SQL won't connect after deploying

▼魔方 西西 提交于 2019-12-06 03:52:37
问题 I recently deployed my website on IIS (LocalDB). But whenever I try to run the website, the SQL fails to connect. I've been through hundreds of posts/articles now but I am unable to resolve it. Error A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 50

SQL 2016 with R - Error HRESULT 0x80004004

别说谁变了你拦得住时间么 提交于 2019-12-06 01:18:54
I am working through a number of tutorials on using SQL and R. But when I am trying to Run the R Script to obtain the 'ggplot' library I am getting the following error Msg 39004, Level 16, State 20, Line 1 A 'R' script error occurred during execution of 'sp_execute_external_script' with HRESULT 0x80004004. Msg 39019, Level 16, State 1, Line 1 An external script error occurred: Error in library("ggplot2") : there is no package called 'ggplot2' Calls: source -> withVisible -> eval -> eval -> library Error in ScaleR. Check the output for more information. Error in eval(expr, envir, enclos) :