Questions tagged [sql-server-2019]

Use this tag for questions specific to the 2019 version of Microsoft's SQL Server.

New Features Of SQL Server 2019

  1. Intelligent Query Processing Enhancements enter image description here
  2. Accelerated Database Recovery (ADR) enter image description here
  3. AlwaysEncrypted With Secure Enclaves enter image description here
  4. Memory-Optimized Tempdb Metadata
  5. Query Store Custom Capture Policies
  6. Verbose Truncation Warnings
  7. Resumable Index Build
  8. Data Virtualization With Polybase enter image description here
  9. Last Actual Execution Plan DMF
  10. Multiple Internal Performance Improvements

Reference : What's new in SQL Server 2019 (15.x)

977 questions
1
vote
2 answers

How do I find rows that contain two words "First" + "Second" regardless sequence?

#360Search #SearchAll #SearchContain #SearchEverything #SQL #SELECT How do I find rows that contain two words "First" + "Second" regardless of in sequence or not? looking for a single where condition to cover this case. Here is…
Haseeb
  • 746
  • 7
  • 22
1
vote
1 answer

Stored procedure to enter Results into a table

I am attempting to create a stored procedure take the data from a C# program and then input the data into a table called dbo.Results gathering the UserID from the dbo.People table. create Procedure InsertResults @ForName nvarchar(50), …
Cameron
  • 21
  • 4
1
vote
1 answer

SSIS Package gets corrupted after importing from local machine

I have upgraded from SQL Server 2016 to SQL Server 2019 recently. Before that, I have used Visual Studio 2015 & SSDT on my local machine to create SSIS Packages and deployed them with SSMS 2016 onto the SSIS Server (File System). After the server…
1
vote
2 answers

Trimming a nvarchar param in SQL Server 2019

I have a stored procedure that sends a string to one of my parameters @deliveryName [nvarchar](255) Sometimes the delivery name can be "Delivery example 1" and sometimes it can be "Delivery method - Delivery example 1", it could also be "something…
Gaz Smith
  • 1,100
  • 1
  • 16
  • 30
1
vote
1 answer

INNER JOIN involving RAND(...NEWID()) returns unexpected number of rows

I want to generate some sample data with random values. I have a mini table with 5 rows, ids from 1 to 5 with some text for every row. Then I want to generate 65536 rows - first column has value 1 for every row, second column is random number…
ondrap
  • 21
  • 2
1
vote
2 answers

SQL query to feed second query

I'm trying to work out if it's possible to combine two (or more) queries together into one, where the second one requires a table name and "where" value from the first. This is the first query which returns the "where" value and table name for the…
jztilly
  • 51
  • 6
1
vote
1 answer

Create external table using Polybase on-premise error

I'm trying to create an external table in SQL Server 2019 on premise ( Polybase has been installed and all services are up and running [Instance and 2 services for polybase] , Hadoop configuration = 7). I want to feed the external table with…
Samayoa
  • 185
  • 1
  • 2
  • 12
1
vote
1 answer

How to fix this error please - TypeError: Object of type bytes is not JSON serializable

In my case the JSON file which I need to insert into database is already stored in variable named "data" i.e data = res.read(). I need to insert that "data" into the database directly where my database name called Rest and table called bms. It is…
Treesa George
  • 23
  • 1
  • 4
1
vote
1 answer

Does the delete operation block any insert into the same table?

I have table A and a stored procedure that deletes all data from that table periodically. All queries in the stored procedure are packed into 1 transaction. But sometimes the stored procedure execution takes up to 5 minutes. Could it be that…
1
vote
0 answers

suspect database due to in-memory tables and resource governor(?)

Last night, both nodes on our Alwayson AG cluster went down at the same time. After a restart, only databases containing in-memory tables were marked as suspect. In the errorlog I see this message: (fragment) 2022-02-03 02:20:12.480 Resource…
1
vote
1 answer

Cannot import long text from Excel to SQL Server using SSIS

Environment: Microsoft® Excel® for Microsoft 365 MSO (Version 2112 Build 16.0.14729.20254) 64-bit Microsoft SQL Server 2019 (RTM-CU14) (KB5007182) - 15.0.4188.2 (X64) Microsoft Visual Studio…
Virgil_R
  • 71
  • 1
  • 2
  • 5
1
vote
0 answers

SQL Server - Login failed for user (Android Studio)

I have written code using JDBC to create registration page in Android Studio. I create database in SQL Server 2019. In addition I tried to connect from the code to MSSQL database and insert values, but while I run the app I'm getting the…
1
vote
1 answer

SQL update query with multiple subqueries from one table with conditions from the original table

I have the following query to get the latest GPS record for multiple devices from my Records table: DECLARE @Result TABLE (DeviceID int, RecordID int, DeviceTime datetime, Own bit, New bit, ...); --insert a few device IDs into @Result and set New =…
SMMB
  • 107
  • 6
1
vote
1 answer

compare value with 2 different columns using the IN operator

I have a situation where I need to compare the value of a column with 2 columns from my settings table. Currently I have this query which works declare @t int = 3 select 1 where @t = (select s.RelationGDGMID from dbo.tblSettings s ) or …
GuidoG
  • 11,359
  • 6
  • 44
  • 79
1
vote
0 answers

Any alternative for FORMATMESSAGE() in SQL Server?

Is there any alternative for the FORMATMESSAGE() function in SQL? Here is my scenario. I have a variable of VARCHAR(2000) which takes a string and which is getting formatted by FORMATMESSAGE(). Now the length of the variable is changed to…
Naveen Kumar
  • 582
  • 2
  • 8
  • 25