Recent Discussions
Best Practice to migrate data via SFTP
Hi, I am currently working on a project that will be migrating part of an on-premise solution to the cloud (AWS). As a result, we are breaking the link of our reporting tool that feeds directly to the on-premise database (soon to be cloud based database). The database is a microsoft sql server and let's assume it is on a supported version (currently waiting for exact version). For this project, the only approved integration pattern for data transfer between on-premise and cloud is via SFTP. This is the integration pattern approved by architecture governance. We won't be able to connect our reporting tool to the now cloud to be DB (no direct-link, no vpn, etc). Understanding that SFTP may not be the most elegant solution, what would be the best way using Microsoft SQL Server features to produce file(s) that can be sent on-premise via sftp and use these to: 1.- Load directly to the reporting tool. or 2.- Use to populate a replica of the cloud DB on-premise. We would be interested in changes only (not dumping the entire DB every time). Given my limited knowledge on the technology, I can think of a differential backup, send it via sftp, restore on-premise. Have the backup scheduled for every x min? The deltas won't be gigabytes and they will actually be small (at least that is the expectation). Thanks2.9KViews0likes5CommentsTemporal Table - Change the ValidFrom Time
Sql Server 2022 - We needed a new 'Bonus' value to be active from 11/01/2025 06:00:00. I created a one time SQL job to update the temporal table for the Bonus value (going from 2.175 to 2.00) to run at 11/01/25 06:00:00. In the temporal table, the valid from is (converted to the local time) 2025-11-02 06:00:00.5656752 -06:00. If I pass FOR SYSTEM_TIME FROM '2025-11-02 06:00:00' TO '2999-01-01 23:59:59.999', I will get the previous since the job was just over a 1/2 second late. I've read articles talking about turn off versioning, then updating the History and current tables, then turning versioning back on. Seems like thats not possible with a generate always ValidFrom. I tried to create a temporal table where Validfrom as GENERATED BY DEFAULT but that didn't work. Is there a way I can get my validFrom to exactly 11/01/2025 06:00:00? Is there a better way in the future to get things set to exactly a desired time?47Views0likes2CommentsSQL Server 2025 – Native JSON Size Limit?
Hi Guys, I am exploring SQL Server 2025 to store JSON documents using the native JSON data type. I have gone through several Microsoft SQL technical documents but couldn’t find the maximum size of the native JSON data type. I believe it hasn’t been officially published yet. Does anyone have any insights? Thanks, Tushar60Views0likes1CommentSQL Server - Always On High Availability Group Setup
We have an Always On High Availability Group setup with three database servers — two on the same subnet and one on a different subnet. The application server interacts with these database servers through the AG listener. Currently, this setup is running with application version X, and we have received a new application version Y for upgrade/migration (which includes database changes). To perform the application update, please clarify the recommended approach: Should I remove the database from the Availability Group and point to the primary replica to continue with the application update? or Can I proceed with the application update while the Always On configuration remains active, pointing to the AG listener?38Views0likes1CommentQuery on sys.dm_db_index_usage_stats slow
Hi, we discovered that queries on sys.dm_db_index_usage_stats are getting very slowly when the sql server is running for a longer time without restart. The execution time is up to 30 seconds for the following query: SELECT object_name(object_id) objectName, last_user_update FROM sys.dm_db_index_usage_stats WHERE database_id=db_id() We get the following query plan: The Actual Rows in LOGINDEXSTATS are about 2 million. We found 2 similiar cases by searching the internet: https://stackoverflow.com/questions/52165370/query-against-sys-tables-sys-dm-db-index-usage-stats-slow https://www.linkedin.com/pulse/sql-server-2014-object-dependencies-dmvdmf-slow-andrea-bruschetta We tested the workaround (UPDATE STATISTICS sys.*** WITH FULLSCAN;) without success. How can we increase performance without restarting the database? Regards Dominik34Views0likes0Comments"ALTER DATABASE CURRENT SET ALLOW_SNAPSHOT_ISOLATION ON" does not finish for several hours
I have tried enabling snapshot isolation on several SQL Server instances (2017 and 2022 developer editions) in single user mode with the same huge DB (4 TB) but the command does not finish even after 6 hours... ALTER DATABASE CURRENT SET ALLOW_SNAPSHOT_ISOLATION ON Session is waiting on "ENABLE_VERSIONING" and I don't see any noticeable I/O activity on the Windows disk itself.23Views0likes0CommentsWhy is SQL Server only storing 4000 characters in an NVARCHAR(MAX) column?
Hi Guys, I'm trying to insert a string with 10,000 plain characters (just repeated 'A's) into a column defined as NVARCHAR(MAX) in SQL Server. But LEN(Content) always returns 4000, not 10,000. I’ve verified that the column is NVARCHAR(MAX) and used the N prefix for Unicode. Still, the data seems to be truncated. What could be causing this? Is there something I'm missing in how SQL Server handles large strings? Tried this: CREATE TABLE LargeTextExample ( Id INT PRIMARY KEY IDENTITY(1,1), Content NVARCHAR(MAX) ); DECLARE @LongText NVARCHAR(MAX); SET @LongText = REPLICATE(N'A', 10000); INSERT INTO LargeTextExample (Content) VALUES (@LongText); SELECT LEN(Content) AS CharacterCount FROM LargeTextExample; Thanks, TusharSolved102Views0likes2CommentsSSMS Dialog Box issue
Using SSMS 21.5.14, but I know this issue has existed in previous versions of SSMS. When opening a View in Design mode in SSMS, if the View contains a UNION, SSMS pops up a dialog box like the one below. The dialog box immediately hides behind the active SSMS window and sometimes you are not even aware that it has appeared. If I do notice it immediately, I am not able to click the OK button to clear it. This dialog box sits happily in the background and I can still move around the SSMS interface, however it does some odd things like ignoring certain keypresses when editing stored procedures or trying to make changes in a Query window. The only option is to exit SSMS completely and start again. When I do exit SSMS, I get the following message: Has anyone else experienced this and is there a way to prevent it happening? TIA!62Views0likes2CommentsHow Can a Company Receive Support from Microsoft for SQL Server Enterprise with Software Assurance?
Hello, I’m currently managing SQL Server under the following licensing agreement: SQL Server Enterprise Core Single Language License & Software Assurance Open Value | 2 Licenses | No Level | 1 Year | Acquired Year 1 | AP I’ve been informed that Software Assurance (SA) no longer includes technical support for SQL Server. Could you please confirm if this is correct? If our organization needs technical support from Microsoft for SQL Server, I would like to clarify the following: Is it mandatory to have a Unified Support contract or to purchase incidents via the Microsoft Services Hub in order to receive support? Regarding Services Hub, I’ve heard that support incidents must be purchased using a personal Microsoft account (MSA). If this is true, can this method be used to receive support for corporate environments? Thank you in advance.25Views0likes0CommentsSSMS 21/22 Error Upload BACPAC file to Azure Storage
Hello All In my SSMS 20, I can use "Export Data-tier Application" to export an BACPAC file of Azure SQL database and upload to Azure storage in the same machine, the SSMS 21 gives error message when doing the same export, it created the BACPAC files but failed on the last step, "Uploading BACPAC file to Microsoft Azure Storage", The error message is "Could not load file or assembly 'System.IO.Hashing, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified. (Azure.Storage.Blobs)" I tried the fresh installation of SSMS 21 in a brand-new machine (Windows 11), same issue, Can anyone advice? Thanks79Views0likes2CommentsDo input tag values keep updating after SP execution begins?
In my facility we use PLC's to trigger SQL Stored Procedures through a Kepware server. Most of these SP's are for data collection. If I set the execute bit to true, but then one of my data collection points changes value before the execution finishes, does the SP see that data change? Or is it just using the value as it was at time of execution start? Thanks for your help in advance67Views0likes2CommentsREPL55012 error
hello. i tryin make db replication(publisher - mssqlserver2019standard, subscriber - mssqlserver 2019 express). at step when "magic should make things" i got error: Get help: https://help/MSSQL_REPL55012 it so strange" in sql forums MS forbidden post exact error message. any directions where to dig? thanks. ps. i tryin reinnstall latest ole db drivers but no luck.103Views0likes4CommentsReading REST Data from SQL Server
Hi All, First question is this. A while ago I tested https://github.com/geral2/SQL-APIConsumer to add into SQL Server 2019 SE to be able to easily do rest calls. We are ready to move forward with what we did but I was wondering if this functionality has been included in SQL Server 2022 SE? If so we would use the standard product. Does anyone know if this functionality was rolled into SQL Server 2022 SE and if so a blog post we can go and read? Thanks. My second question is this. Is this the best place to ask SQK Server questions now? We have used MSDN and Answers in the past. So I am just wondering where we should post our questions for SQL server now. Thank you in advance for any assistance you can offer us. Best Regards Peter Jones.1.4KViews0likes4CommentsSolved : Uneven CPU usage
Greetings and salutations, I'm asking for your help with a situation that I'm not sure is a real problem, but it definitely caught my attention. We bought new hypervisor servers with two AMD EPYC 9174F processors (16 cores, 4.1 GHz, so 32 cores in total ). We are using Hyper-V. The hypervisor hosts only a single VM assigned 16 virtual cores. The VM is running Windows Server 2022 Standard and SQL Server 2019 Standard CU27. The VM was moved to this AMD hypervisor from another hypervisor, which was equipped with two Intel Xeon Gold 6346 processors (16 cores, 3.1 GHz, 32 cores in total). When monitoring the resource usage of a VM that is now running on the new AMD hypervisor, I see very uneven CPU usage that was not the case on the previous Intel hypervisor. As you can see in the images from Task Manager and Perfmon, the first 8 cores are significantly more loaded against the other 8. While the core for example core 0 and 1 are on average loaded at 66%, cores 14 and 15 are loaded at 2-4%. The SQL Server ERRORLOG clearly states that all 16 cores are in use, which is confirmed by querying the sys.dm_os_schedulers object. I'm partially hoping this is a Perfmon-level issue, but I certainly don't want to underestimate the situation. Perhaps I should direct my question to the Windows forum, but since it is database system, I'm creating a thread here. Does anyone have any idea how I should go about solving this situation please? Solution Almost by accident I managed to solve the problem and I'm ashamed that I didn't solve the problem sooner. The cause of the problem was an inappropriately set Widnows Server Power Plan. As you probably know, the default setting after installation is the Balanced mode, which, however, is extremely unsuitable for performance-intensive applications, which are database systems. Out of 16 virtual cores, 8 were in "Parked" mode. Changing the configuration to "High Performance" solved the problem immediately. It's already my routine to change this configuration when setting up each database server, and I'm almost certain I've done it on this system as well.984Views2likes4CommentsSQL Version Upgrade 2017 to 2019 in an unclustered read-scale availability group
We need to upgrade our production SQL servers from SQL 2017 to 2019 (both are Ent. Edition). We have ~70 servers hosted in our DC. Each SQL Server instance consists of 2 VMs in a 2 node FCI, failing over at the beginning of and mid-month. They constitute the primary in a read-scale AG, utilized for offloading read heavy reporting. The secondary in the AG is a single server Iaas VMs hosted in Azure, 1 per FCI. The AGs are set to manual failover, asynchronous commit. The primary and secondary are not together in a WSFC. Because they are not bound in a WSFC we believe we should be able to update the secondary to SQL 2019, then perform a rolling upgrade on the 2 node primary, without first removing the secondary from the AG and afterward having to reseed the DBs in the AG. Each server hosts ~50 client DBs and we'd like to avoid having to reseed some 3000+ DBs. Most of what I've found online deals with clustererd AGs so any experience, advise, comment is most welcome.51Views0likes1CommentBug: "Invalid column name" after sp_recompile for valid column in custom data type
Hello, I was hoping to find a workaround for an issue I am having. I believe this is a bug in SQL Server (we are using SQL Server 2022) I have written a utility stored procedure for solving the gaps and islands problem, utility.GetTimeIslands, which returns the longest contiguous islands from the time islands passed into it. This procedure utilizes a custom datatype, utility.TimeIslandList, which is defined as CREATE TYPE utility.TimeIslandList AS TABLE ( ISLAND_ID BIGINT NOT NULL, KEY_1 BIGINT NOT NULL, KEY_2 BIGINT NOT NULL, KEY_3 BIGINT NOT NULL, START_DATE DATE NOT NULL, END_DATE DATE NOT NULL, PRIMARY KEY (ISLAND_ID) ); The call to utility.GetTimeIslands in PRC.LoadDeals is DECLARE Til utility.TimeIslandList; INSERT INTO Til SELECT STG_DEAL_SCHEDULE_ID, DEAL_ID, PRICE_ACCOUNT_SET_ID, PRICE_ITEM_ID, START_DATE, END_DATE FROM #DealSchedulePrep; INSERT #LatestTimeIslands EXEC utility.GetTimeIslands Til; If PRC.LoadDeals is called after a server reboot, or after EXEC sp_recompile 'utility.GetTimeIslands'; Is called, it throws the error "Msg 207, Level 16, State 1, Procedure utility.GetTimeIslands, Line 60 [Batch Start Line 8] Invalid column name 'KEY_3'." Line 60 corresponds to the first statement in utility.GetTimeIslands where the custom data type is referenced WITH ChangePoints AS ( SELECT KEY_1, KEY_2, KEY_3, START_DATE as X_DATE FROM Til UNION SELECT KEY_1, KEY_2, KEY_3, DATEADD(DD, CASE END_DATE WHEN '9999-12-31' THEN 0 ELSE 1 END, END_DATE) FROM Til ) ... However, if DECLARE Til utility.TimeIslandList; EXEC utility.GetTimeIslands Til; Is called prior to calling PRC.LoadDeals, then PRC.LoadDeals does not throw the error. And PRC.LoadDeals will execute successfully until utility.GetTimeIslands is recompiled. Another interesting twist is that adding those lines to PRC.LoadDeals, prior to the actual call, does not help. It throws the same error on the empty call, if the empty call is made inside the stored procedure before the empty call is made outside the stored procedure. For that matter, once any call is made to utility.GetTimeIslands outside the stored procedure, calls made to it inside the stored procedure will work. Has anyone ever seen anything like this? If so, is there a solution outside of making the GetTimeIslands empty call after each server restart? Does anyone have a guess as to why the error message calls out KEY_3 specifically?107Views0likes1CommentSQL 2025 Jobs
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 (06:00 xxxxx). The last step to execute was step 0 (no steps ran)." Job steps: exec SP_01 GO EXEC SP_02 But if I run it manually, it runs without problems. Can anyone help me? Thank you186Views0likes4CommentsSQL SERVER EXPRESS EDITION 2022 NOT INSTALLING ON MY SNAPDRAGON X PROCESSOR
Every time i try to install sql server on my laptop ASUS ASUS Vivobook S16 (2025) with Office 2024 + M365 Basic*, Metal Body*, Qualcomm Snapdragon X - (16 GB/512 GB SSD/Windows 11 Home) S3607QA-SH075WS Thin and Light Laptop (16 inch, Cool Silver, 1.74 Kg, With MS Office) I get this error: Error installing SQL Server Database Engine Services Shared Features There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor. Error code: 1722 Log file: C:\Program Files\Microsoft SQL Server\160\Setup Bootstrap\Log\20250811_013441\sql_engine_core_shared_Cpu64_1.log Attaching the error ss Let me know what should I do271Views0likes7Comments
Events
Recent Blogs
- SQL Server Management Studio (SSMS) 22 Preview 5 was released this week and includes updates to GitHub Copilot in SSMS.Nov 06, 2025509Views0likes4Comments
- In two weeks, we will share the latest news and features for SQL, NoSQL, and open-source databases on Azure, Fabric, and SQL Server at Microsoft Ignite. Held November 18 – 21 in San Francisco and on...Nov 06, 2025219Views1like0Comments