147 questions with SQL Server Transact-SQL tags

Sort by: Updated
0 answers

SQL Server xp_copy_files security thoughts and able to specify files older than only?

Hello noticed somewhat of a new recent feature xp_copy_files (for SQL Server2019 & higher) which we have SQL Server 2022 (believe most things similarly were done previously via xp_cmdshell which had security concerns). Is it correct to say…

SQL Server Transact-SQL
SQL Server Transact-SQL
SQL Server: A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.Transact-SQL: A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
147 questions
asked 2025-03-08T22:37:16.5733333+00:00
techresearch7777777 1,921 Reputation points
1 answer

Potential Issues with Deploying to SQL Server 2016 Using sqlcmd from Linux in GitHub Pipeline

We are deploying to SQL Server 2016, where our developers use sqlcmd on Windows machines for development. However, our GitHub pipeline is using a Linux runner with sqlcmd on Linux for deployment. Could this setup cause any compatibility or operational…

SQL Server Transact-SQL
SQL Server Transact-SQL
SQL Server: A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.Transact-SQL: A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
147 questions
asked 2025-03-08T00:47:35.3733333+00:00
James, Ashwin (BC Pension) 0 Reputation points
answered 2025-03-08T07:59:55.44+00:00
Erland Sommarskog 118.9K Reputation points MVP
1 answer

Select permission 2

Hello! Please excuse me for almost the same question as "Select permission" but there's one thing I'd like to be cleared up: I see that I can't query a user database (at least the databases for which the Guest account is disabled) until the…

SQL Server Transact-SQL
SQL Server Transact-SQL
SQL Server: A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.Transact-SQL: A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
147 questions
asked 2025-03-04T08:40:36.6933333+00:00
Hram Admin 80 Reputation points
commented 2025-03-07T19:29:11.78+00:00
Erland Sommarskog 118.9K Reputation points MVP
0 answers

summary.txt after rebuild the system database.

I ran the following command to rebuild the system database X:\Backups\2019>setup /QUIET /ACTION=REBUILDDATABASE /INSTANCENAME=MSSQLSERVER /SQLSYSADMINACCOUNTS=domain\myusername Microsoft (R) SQL Server 2019 15.00.2000.05 Copyright (c) 2019 Microsoft. …

SQL Server Transact-SQL
SQL Server Transact-SQL
SQL Server: A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.Transact-SQL: A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
147 questions
asked 2025-03-05T23:49:04.68+00:00
bestrongself 1 Reputation point
edited the question 2025-03-07T04:58:12.67+00:00
Pradeep M 6,325 Reputation points Microsoft External Staff
0 answers

sql server 2019 developer edition cumulative update The patch installer has failed to update the shared features.

sql server 2019 developer edition cumulative update The patch installer has failed to update the shared features. Overall summary: Final result: The patch installer has failed to update the shared features. To determine the reason for…

SQL Server Transact-SQL
SQL Server Transact-SQL
SQL Server: A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.Transact-SQL: A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
147 questions
asked 2025-03-06T06:32:36.74+00:00
Mohan Kumar NATARAJAN 0 Reputation points
edited the question 2025-03-07T04:56:17.8966667+00:00
Pradeep M 6,325 Reputation points Microsoft External Staff
1 answer

TLS 1.2 issues SQL 2022. What do these error messages mean.

I have SQL Server 2022 Developer edition running with enforced encryption (TLS 1.2). For some reason I have frequent disconnects, from the logs it states that TLS is successfully activated and also the certificates are loaded. More often I get the first…

SQL Server Transact-SQL
SQL Server Transact-SQL
SQL Server: A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.Transact-SQL: A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
147 questions
asked 2025-03-04T06:34:05.3366667+00:00
Freddy Vorstenbosch 0 Reputation points
edited the question 2025-03-06T21:59:42.8633333+00:00
Erland Sommarskog 118.9K Reputation points MVP
2 answers

SQL Server T-SQL Debugging API

Hi, Where can I find the API to create a T-SQL debugger user interface? With regards, Martijn Tonies

SQL Server Transact-SQL
SQL Server Transact-SQL
SQL Server: A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.Transact-SQL: A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
147 questions
asked 2025-03-05T09:47:01.74+00:00
Martijn Tonies 0 Reputation points
answered 2025-03-06T01:34:45.1233333+00:00
LiHongMSFT-4306 30,996 Reputation points
2 answers

How to truncate logs with log shipping enabled

Hello, I have a SQL Server 2016 server with multiple SQL Server instances acting as primary server in a log shipping configuration. I have configured log shipping as per…

SQL Server Transact-SQL
SQL Server Transact-SQL
SQL Server: A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.Transact-SQL: A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
147 questions
asked 2025-02-28T09:32:57.27+00:00
Stefanos Evangelou 116 Reputation points
commented 2025-03-05T22:11:54.2666667+00:00
Erland Sommarskog 118.9K Reputation points MVP
1 answer One of the answers was accepted by the question author.

Git Automation with SQL Tools and Visual Studio Code

So here's my situation: We have a database application created and maintained by a third party We have access to the application to debug/extend that application to meet our needs The third party software developer regularly modifies the application…

SQL Server Transact-SQL
SQL Server Transact-SQL
SQL Server: A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.Transact-SQL: A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
147 questions
asked 2025-03-04T00:15:41.4833333+00:00
Jason Price 20 Reputation points
edited a comment 2025-03-05T18:45:05.82+00:00
Bruce (SqlWork.com) 72,026 Reputation points
1 answer One of the answers was accepted by the question author.

Splitting record data dependent on other table data

Hi, Hoping for some assistance. I have a table which holds how much consumer owe in two different buckets and there is another table where the transactions are held. I need to split the transactions based on how much consumer is owe in those buckets but…

SQL Server Transact-SQL
SQL Server Transact-SQL
SQL Server: A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.Transact-SQL: A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
147 questions
asked 2025-03-05T02:53:32.4733333+00:00
Eshwar 216 Reputation points
accepted 2025-03-05T13:39:38.2233333+00:00
Eshwar 216 Reputation points
3 answers One of the answers was accepted by the question author.

EXCEPTION_ACCESS_VIOLATION reading address 0000000000000006 at 0x00007FFB4711429B

I am getting the below exception while executing insert query on hash table Exception: spid 124 Exception 0xc0000005 EXCEPTION_ACCESS_VIOLATION reading address 0000000000000006 at 0x00007FFB4711429B No values returned from the SQL Query. Please verify…

SQL Server Transact-SQL
SQL Server Transact-SQL
SQL Server: A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.Transact-SQL: A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
147 questions
asked 2025-02-28T14:04:05.7333333+00:00
Madhusudhan M Kammar 30 Reputation points
accepted 2025-03-05T08:47:02.9333333+00:00
Madhusudhan M Kammar 30 Reputation points
3 answers

SQL Server Fails to Start After Reboot Due to Permission Issues

  Hi, I had the local IT support install the SQL Server database on my laptop for development purposes. The installation was successful, and the SQL Server started properly. However, after I restarted my laptop, the SQL Server service failed to start. I…

SQL Server Transact-SQL
SQL Server Transact-SQL
SQL Server: A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.Transact-SQL: A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
147 questions
asked 2025-03-04T15:15:12.7733333+00:00
Pongthorn Sangkaphet (TH) 0 Reputation points
commented 2025-03-05T07:43:19.29+00:00
Pongthorn Sangkaphet (TH) 0 Reputation points
1 answer

SSMS option for lower case GUIDs

Visual Studio distinguishes between upper and lower case guids. By default, VS saves them in lower case. Because SQL prints them in upper case, frequently, it is too easy to have duplicate guids in Visual Studio coding because of case. For example: …

SQL Server Transact-SQL
SQL Server Transact-SQL
SQL Server: A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.Transact-SQL: A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
147 questions
asked 2025-03-04T13:24:58.7766667+00:00
Longstreet, James [USA] 1 Reputation point
answered 2025-03-05T02:40:57.8933333+00:00
LiHongMSFT-4306 30,996 Reputation points
2 answers

Performance counters

Hello , We are seeing the slow performance of the queries and wanted to know which performance counetsr we should focus on to get more info avout the the issues Thanks HImanshu

SQL Server Transact-SQL
SQL Server Transact-SQL
SQL Server: A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.Transact-SQL: A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
147 questions
asked 2025-03-03T20:29:36.13+00:00
Himanshu Sinha 11 Reputation points
commented 2025-03-04T22:12:28.2133333+00:00
Erland Sommarskog 118.9K Reputation points MVP
2 answers

removestaledbentries: cleanup of stale db entries skipped beacuse master db is not memory optimized

removestaledbentries: cleanup of stale db entries skipped beacuse master db is not memory optimized The above message is occurring frequently and persistently. How can I resolve this issue?" sql-server 2022

SQL Server Transact-SQL
SQL Server Transact-SQL
SQL Server: A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.Transact-SQL: A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
147 questions
asked 2025-02-26T05:37:46.5733333+00:00
T Lee 0 Reputation points
commented 2025-03-04T08:09:19.4233333+00:00
T Lee 0 Reputation points
2 answers One of the answers was accepted by the question author.

Select permissions

Hello! While creating reports using bcp utility - *bcp "select Name, physical_name, state_desc, (size)8/1024, ... from msdb.sys.database_files ORDER BY Name" queryout C:\REPORTS\SQ\LUSERDB.txt -c -T ... *bcp "select Name, physical_name,…

SQL Server Transact-SQL
SQL Server Transact-SQL
SQL Server: A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.Transact-SQL: A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
147 questions
asked 2025-02-28T13:47:07.2233333+00:00
Hram Admin 80 Reputation points
commented 2025-03-04T07:25:32.6233333+00:00
Hram Admin 80 Reputation points
0 answers

while installing new sql instance getting error code: is not a valid installation folder

Hi Team we have an existing setup for sql server 2016 and package is available in c drive. Now we are creating new named instance at the time getting error "is not a valid installation folder" how to fix this issue. we tried copy the files to…

SQL Server Transact-SQL
SQL Server Transact-SQL
SQL Server: A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.Transact-SQL: A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
147 questions
asked 2025-03-03T07:26:43.46+00:00
Ramakrishna M 0 Reputation points
commented 2025-03-04T01:45:25.4966667+00:00
LiHongMSFT-4306 30,996 Reputation points
2 answers One of the answers was accepted by the question author.

Should I use SSMS or 'Sentry Plan Explorer' in my scenario ?

Hello, I'm quite new in this area ... hence, apologize for the 'silly question'. I am using SSMS v18.12.1 My goal is to analyze slow performance in web-based application connected to MS SQL server. I tried to run 'slow' query in SSMS and then look into…

SQL Server Transact-SQL
SQL Server Transact-SQL
SQL Server: A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.Transact-SQL: A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
147 questions
asked 2025-03-02T15:25:41.4833333+00:00
Voldman, Eliya 80 Reputation points
commented 2025-03-03T22:55:24.8633333+00:00
Erland Sommarskog 118.9K Reputation points MVP
0 answers

Azure Data Sync Issue Records Does Not Update

Data records was not getting sync from Member to Hub

SQL Server Transact-SQL
SQL Server Transact-SQL
SQL Server: A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.Transact-SQL: A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
147 questions
asked 2025-03-03T06:37:47.5433333+00:00
ZTS 20 Reputation points
commented 2025-03-03T16:25:50.6066667+00:00
Balmukund 86 Reputation points Microsoft Employee
1 answer

Enclave-enabled like not working for Deterministic

We are using Azure SQL on cloud with the Enclave-enabled. A table created by: CREATE TABLE [dbo].[both] ( [id] INT IDENTITY(1,1) PRIMARY KEY, [ran] [varchar](100) COLLATE Latin1_General_BIN2 ENCRYPTED WITH (COLUMN_ENCRYPTION_KEY = [CEK1],…

SQL Server Transact-SQL
SQL Server Transact-SQL
SQL Server: A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.Transact-SQL: A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
147 questions
asked 2025-03-01T16:16:51.48+00:00
John Woo 20 Reputation points
commented 2025-03-02T21:36:09.0633333+00:00
John Woo 20 Reputation points