sql-server-2017

Report Manager Expression-based Connection Strings Missing

百般思念 提交于 2019-12-24 18:24:02
问题 I'm using an expression for a report connection string but when I upload the report to the report manager (2017 June) and save the credentials in the data source setting the text box that contains the expression gets cleared out. The same report works fine in SSRS 2014. I've tried using IE, Chrome and Edge and get the same behaviour. before save after save 回答1: I had a similar issue in ReportServer 2017; however, if you click the button 'Revert to Default' (a button displayed in the same

What SQL Server 2017 features are not supported in Entity Framework Core code first?

走远了吗. 提交于 2019-12-24 11:12:39
问题 Our team is thinking of utilizing Entity Framework Core code-first to help model the database. We can have both DB projects and EF models, as per article here Database Projects vs. Entity Framework Database Migrations utilizing schema compares, just trying to figure out what will be the source of truth? Does Entity Framework support all features in SQL Server SSDT Database Projects? What features does EF Core 2 not support? (eg, does it not support any of following: triggers, views, functions

Cannot add a stored procedure to database due to encryption message

☆樱花仙子☆ 提交于 2019-12-22 12:43:46
问题 I set up a local database (SQL Server 2017 Express). Everything works fine, but I'm getting errors when creating even a simple stored procedure in SSMS. For example, this CREATE PROCEDURE [dbo].[EMS_Operations_SyncAssetTableByID2] @Table_Name VARCHAR(255), @Ids_For_Update VARCHAR(255), @Is_Test BIT = 0 AS BEGIN DECLARE @DB_String varchar(55) ='Redesign' END Will not run, and I get the error message: Msg 156, Level 15, State 1, Line 1 Incorrect syntax near the keyword 'PROCEDURE'. Msg 156,

Cannot add a stored procedure to database due to encryption message

这一生的挚爱 提交于 2019-12-22 12:43:05
问题 I set up a local database (SQL Server 2017 Express). Everything works fine, but I'm getting errors when creating even a simple stored procedure in SSMS. For example, this CREATE PROCEDURE [dbo].[EMS_Operations_SyncAssetTableByID2] @Table_Name VARCHAR(255), @Ids_For_Update VARCHAR(255), @Is_Test BIT = 0 AS BEGIN DECLARE @DB_String varchar(55) ='Redesign' END Will not run, and I get the error message: Msg 156, Level 15, State 1, Line 1 Incorrect syntax near the keyword 'PROCEDURE'. Msg 156,

SQL Convert Milliseconds to Days, Hours, Minutes

北战南征 提交于 2019-12-21 12:38:38
问题 I need convert a millisecond value, 85605304.3587 to a value like 0d 18h 21m. No idea on how to start that, is there something similar to a TimeSpan in SQL like there is in C#? 回答1: You can do the calculation explicitly. I think it is: select floor(msvalue / (1000 * 60 * 60 * 24)) as days, floor(msvalue / (1000 * 60 * 60)) % 24 as hours, floor(msvalue / (1000 * 60)) % 60 as minutes Note: Some databases use mod instead of % . 回答2: In MS SQL SERVER you can use next code: with cte as ( select

Parameterization(Always Encrypted)- Inside stored proc

大兔子大兔子 提交于 2019-12-20 03:19:09
问题 I have a scenario where i need to have literals(hard coded strings) inside proc used against "Always Encrypted" columns, Since this fails with the following error, Operand type clash: varchar is incompatible with nvarchar(20) encrypted with (encryption_type = 'DETERMINISTIC', encryption_algorithm_name = 'AEAD_AES_256_CBC_HMAC_SHA_256', column_encryption_key_name = 'CEK_Auto4', column_encryption_key_database_name = 'DBName') I am trying to do Parameterization for Always Encrypted within the

SQL Server 2014 installation stuck (hung up) or taking very long time to finish

半腔热情 提交于 2019-12-18 19:23:07
问题 I'm trying to install SQL Server 2014 but it stays in the same spot (Install_VCRuntime_Cpu32_Action) for hours. It's already the third time I'm trying to install so I don't know what else to do. SQL Server 2014 Installation 回答1: I observed this very same issue in one of my colleague's windows 10 box with SQL Server 2014 Enterprise installer as well. As mentioned in this MS connect bug you can try either of the below mentioned options: As mentioned by KevinMS in comments tab : I used task

SQL Server 2014 installation stuck (hung up) or taking very long time to finish

為{幸葍}努か 提交于 2019-12-18 19:22:20
问题 I'm trying to install SQL Server 2014 but it stays in the same spot (Install_VCRuntime_Cpu32_Action) for hours. It's already the third time I'm trying to install so I don't know what else to do. SQL Server 2014 Installation 回答1: I observed this very same issue in one of my colleague's windows 10 box with SQL Server 2014 Enterprise installer as well. As mentioned in this MS connect bug you can try either of the below mentioned options: As mentioned by KevinMS in comments tab : I used task

How to update Table 1 from Table 2 when they have nothing in common?

独自空忆成欢 提交于 2019-12-14 03:03:01
问题 I have 2 tables - each has a single row only. I want to update o1 and o2 columns on Table1 with the corresponding columns in Table2. create table Table1(c1 int, c2 int, o1 int, o2 int) create table Table2(o1 int, o2 int) I have the following, which is horrible (but works). update Table1 set o1 = (select o1 from Table2), o2 = (select o2 from Table2) Is there a better way? 回答1: You can use: update table1 set o1 = t2.o1, o2 = t2.o2 from table2 t2; 回答2: By this way, you can do as expected, even

How can SQL Server client get information on TLS certificate being used?

霸气de小男生 提交于 2019-12-13 04:26:20
问题 If a client connects to SQL Server, and a certificate is used to power TLS encryption, how can i get information about that certificate? Ideally i want all the details, but i'd be happy with Issuer Issued to SHA1 fingerprint Obviously i can't just look at the configuration on the server; as i'm trying to verify no MitM. Also, i want to verify the correct certificate is being used (especially when no certificate is selected for use in the SQL Server Configuration Manager). Either way: i want