252 questions with SQL Server | SQL Server Transact-SQL tags
sql server
how can i get a sql certificate from microsoft what all things do I need to do and how please explain
SQL Server | SQL Server Transact-SQL
Using IsNull with different data types in SQL SERVER
Hi Team, I am working on on premises SQL Server. I have a requirement where I need to apply left outer join between 2 tables and use IsNull to show default data when columns are having null. Under ISNULL, if a column is null what shall i put for below…
SQL Server | SQL Server Transact-SQL
Assigning large text block to nvarchar(max) SOMETIMEs truncates at 4000 bytes
I have a really large dynamic sql query (19,000+ in length) that is assigned to @SQLText nvarchar(max). Everything was working. Made some minor changes and then @SQLText variable only contained 4000 characters, truncating the rest of the query text.…
SQL Server | SQL Server Transact-SQL
Recompile Command Performance Effect
We use .net core Ef .netcore version 8.0. We use an interseptor to manipulete each EF s sql commandS. This interceptor adds OPTION(RECOMPILE) to each sql query. Could you please tell me it is neccessary to use this command.
SQL Server | SQL Server Transact-SQL
SQL server 2022 job fails
Hello SQL Server 2022 16.0.4212.1 Installed in a windows server 2025 DC. SQLSERVERAGENT starts with NT Service\SQLSERVERAGENT I have some jobs that runs at the scheduled times. But one no. Failure: "Job failed. The job was invoked by Schedule 9…
SQL Server | SQL Server Transact-SQL
Sql 2025 T-SQL Job
SQL 2025 Std running in a Windows server 2022 Std A job with a T-SQL task (which calls a stored procedure) ran well weekly for almost a month, at a specific time of day For various reasons, I had to change it so that it would run at a different time of…
SQL Server | SQL Server Transact-SQL
Joins vs Functions and Performance
It is axiomatic that joining to another table from your primary table to retrieve data, using primary keys, provides better performance than using a function. At least that's what I know from the last time I cared about it years ago. It's time to care…
SQL Server | SQL Server Transact-SQL
Tools for SQL Query Tuning
Hi Expert, What is tool for tuning the SQL Query? I need to checking the query that take long time in running thanks for all valued information warm regards, Urbel
SQL Server | SQL Server Transact-SQL
Latest security update has caused SS debugger to fail... 2008 r2 windows 10 - Windows Firewall
Getting: The WIndows Firewall on this machine is currently blocking remote debugging. RD requires... TCP Port 135... UDP 4500/ 500 be unblocked. Can't Cancel, Unlock for local or Unlock for Computer. Trying to "Debug>Start Debugging".
SQL Server | SQL Server Transact-SQL
Raiserror doesn't output messages
Hi everybody, I have a strange problem. I have a long procedure which has 2 places that send notes for other procedure. This procedure outputs NULL by this line of code: DECLARE @message VARCHAR(200) = ' Notes is ' + ISNULL(@notes, 'NULL') RAISERROR…
SQL Server | SQL Server Transact-SQL
I created connections via mssql extension in vs code and now when I click on mssql, I don't see them.
I saved database connections in via mssql extension in vs code and now when I click on mssql, I don't see them. All I see when I click on the mssql icon is this.
SQL Server | SQL Server Transact-SQL
Verifiable bug in DateDiff
I found a verifiable bug in DateDiff while working to perfect an easy Age formula based on birthdate. The first three SQL return results as expect: · SELECT Convert(Int, DateDiff(Minute, '02/29/2000', '03/01/2096') / (60.0 * 24.0 * 365.25) ); · …
SQL Server | SQL Server Transact-SQL
Which T-SQL statement should be used to instruct a database management system to use an index instead of performing a full table scan?
Hello everyone, I am currently preparing for the DP-900: Microsoft Azure Data Fundamentals exam and would like to get an expert's clarification on a specific question. The question is as follows: Which T-SQL statement or clause should be used to…
SQL Server | SQL Server Transact-SQL
The audit for this user shows success, but when using SSMS, the error that is received is 18456 and he cannot sign in
We are using integrated security. All other users have no problem getting to this database. One user, gets and 18456 error. The user is part of the SQL Contributor Group. The activity logs for login shows successful login in SQL server through AD,…
SQL Server | SQL Server Transact-SQL
DBCC TRACEOFF 3604
Good afternoon SQL 2022 Standard I would like to better understand: DBCC TRACEOFF 3604 DBCC TRACEON 3604 How to use it? How to activate it? How and when should it normally be used? Thank you Urantia
SQL Server | SQL Server Transact-SQL
4K supported Disk is the new one. But still in the Windows 11 Pro with 4K disk doesn't support SQL 2022 or 2019 express edition. What is the solution for that?
It is limitation or any specific concern. I can not install 2019/2022 express in my laptop which disk is 4K -native. Whats should be the solution?
SQL Server | SQL Server Transact-SQL
How to find Missing non clustered Indexes
Is there way to find Missing non clustered Indexes on Particular Database? Thank you
SQL Server | SQL Server Transact-SQL
Identity Column jumps massively from 168712 to 9999993
I have table with identity column id. There was massive jump from id 168712 to 9999993. It has happened twice in different servers. Its not identity cache/transaction rollback/manual insert/ reseed. Why its happening. Please guide me on this.
SQL Server | SQL Server Transact-SQL
Why would this statement produce Primary Key violation error?
Hi everyone, Why would this code produce primary key violation error? DROP TABLE IF EXISTS #temp SELECT TOP (1000) indiv.npi, TRIM(lastname +', '+ firstname + ' ' + LEFT(middlename, 1)) AS fullname, firstname, lastname, LEFT(middlename, 1) AS…
SQL Server | SQL Server Transact-SQL
How to signing EKM providers for MsSQL Servers on Linux
getting error Failed to get verify Authenticode signature on DLL while creating cryptographic provider on SQL server on Linux need solution