Forum Widgets
Latest Discussions
Possible GENERATE_SERIES memory leak?
Hey all, We've been experimenting with SQL Server 2022 features and stumbled upon what looks like a memory leak on every execution of the GENERATE_SERIES() function. A script that demonstrates it: SELECT * FROM sys.dm_os_memory_clerks WHERE [type] = 'MEMORYCLERK_SOSNODE' DECLARE @i INT = 1 WHILE @i <= 100000 BEGIN IF (SELECT COUNT(*) FROM GENERATE_SERIES(1, 1, 1)) != 1 BREAK SET @i += 1 END -- ~9ΜΒ leaked, ~96 bytes per iteration, on SOS_Node 0 SELECT * FROM sys.dm_os_memory_clerks WHERE [type] = 'MEMORYCLERK_SOSNODE' It can be reproduced on fresh SQL Server installations, in an empty database with default settings, on: Windows Linux (Ubuntu/docker) SQL Managed Instance on Azure It does NOT reproduce on Azure SQL. Using docker, we've tried every build from RTM up to CU12 that was just released, the behavior is exactly the same. The memory does not seem to ever be released. With enough iterations, SQL Server reaches a point where it cannot execute anything anymore. (when testing, lower the max memory setting to get there faster). Also captured a trace (with Tracking page allocations / freed for MEMORYCLERK_SOSNODE) and using SQLCallStackResolver this call stack appears thousands of times: 00 SqlDK!GenericEvent::PublishAndCallAction 01 SqlDK!XeSosPkg::page_allocated::Publish 02 SqlDK!MemoryClerkInternal::AllocatePagesWithFailureMode 03 SqlDK!MemoryClerkInternal::AllocatePages 04 SqlDK!CMemThread<CMemObj>::PbGetNewPages 05 SqlDK!TVarPageMgr<0>::PbAllocate 06 SqlDK!CMemObj::Alloc 07 SqlDK!CMemThread<CMemObj>::Alloc 08 SqlDK!operator new 09 sqllang!CTVFInfoGenSeries::PtiUserArgumentType 0a sqllang!CSTVFGenSeries::Init 0b sqlmin!CQScanTVFStreamNew::Open 0c sqlmin!CQScanNew::OpenHelper 0d sqlmin!CQScanStreamAggregateNew::Open 0e sqlmin!CQueryScan::UncacheQuery 0f sqllang!CXStmtQuery::SetupQueryScanAndExpression 10 sqllang!CXStmtQuery::InitForExecute 11 sqllang!CXStmtQuery::ErsqExecuteQuery 12 sqllang!CXStmtCondWithQuery::XretExecute 13 sqllang!CExecStmtLoopVars::ExecuteXStmtAndSetXretReturn 14 sqllang!CMsqlExecContext::ExecuteStmts<1,1> 15 sqllang!CMsqlExecContext::FExecute 16 sqllang!CSQLSource::Execute 17 sqllang!process_request 18 sqllang!process_commands_internal 19 sqllang!process_messages 1a SqlDK!SOS_Task::Param::Execute 1b SqlDK!SOS_Scheduler::RunTask 1c SqlDK!SOS_Scheduler::ProcessTasks 1d SqlDK!Worker::EntryPoint Note the CSTVFGenSeries::Init call. There's no corresponding free operation logged. Anyone else seeing this?iotsakpJun 18, 2025Copper Contributor397Views1like1CommentSQL connector for Azure Key Vault on Linux
Hi everybody, after having successfully configured EKM (to access Azure Key Vault) and encrypted a database with a asymmetric key on a SQL running on a windows VM, i am trying to replicate the same configuration in SQL (2022, CU19) running in a linux container. I cannot find the CRYPTOGRAPHIC PROVIDER (from the documentation it should be built-in), nor create it from file (tried in many ways using the windows dll, i get an error 33027 without additional informations). The guide bellow (see last link) suggest to skip step 3 and 4, and proceed with step 5. But the next steps (create credential, create asymmetric key) requires to refer the cryptographic provider. Can someone supply more information for this step? Thks in adv. Stefano Links: https://learn.microsoft.com/en-us/sql/relational-databases/security/encryption/setup-steps-for-extensible-key-management-using-the-azure-key-vault?view=sql-server-ver16&tabs=portal) https://techcommunity.microsoft.com/blog/sqlserver/enabling-azure-key-vault-for-sql-server-on-linux/4091248pearos73Jun 17, 2025Copper Contributor5Views0likes0CommentsUnable to drop a user on SSISDB
Hi, I am unable to drop the user from the SSISDB, I am getting the below error, has anyone experienced the same issue? "The database principal has granted or denied permissions to catalog objects in the database and cannot be dropped. The transaction ended in the trigger. The batch has been aborted. (Framework Microsoft SqlClient Data Provider)" Regards, NomaNoma_PutumoJun 16, 2025Copper Contributor27Views0likes1Commentproblem restoring a backup
I have a backup file (xxxx.bak) in my c:\trmp directory. When I launch SSMS signed on as "sa" and try to restore this database, i get this window: I am not able to enter anything for "Database" and the dropdown is empty. Then if I switch it to "Device" I get this window: Now, under "Destination" I am able to enter a database name, i.e. the name I want the database to be referred to after I restore it. However, note the message at the top of the window: No backupset selected to be restored. How do I resolve this issue? MurrayMurraySobol985Jun 13, 2025Copper Contributor57Views0likes5CommentsTransaction was deadlocked on lock resources with another process ??
Hi, We have a cognos datastage job that updates a table. It fails with an error that the table is locked., see below ini_PerformanceManagement_tblEmployees,0: ODBC function "SQLExecute" reported: SQLSTATE = 40001: Native Error Code = 1,205: Msg = [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 67) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. (CC_OdbcDBStatement::executeUpdate, file CC_OdbcDBStatement.cpp, line 1,058) Anyone any ideas about how to resolve this? Thanks for your time, OllieOllieJun 12, 2025Copper Contributor34Views0likes1CommentSSMS - Display time query was executed
Would you like to see the time that you started a query in SSMS? I do because I normally run multiple queries and need to know when I started the first query, and second, etc. Please upvote my suggestion to display the query start time in SSMS. It's under consideration given the community's demand. Thanks!deirdrebclark481605Jun 11, 2025Copper Contributor37Views0likes2CommentsSQL Server Manager Studio V21 failed to install Configuration Manager
I installed SQL Server Management Studio V21 specifically: Step 2 - Determine which version of SQL Server Management Studio to install Decide which version of SSMS to install. The most common options are: The latest release of SQL Server Management Studio 21 that is hosted on Microsoft servers. To install this version, select the following link. The installer downloads a small bootstrapper to your Downloads folder. It downloaded a file: vs_SSMS.exe which I clicked on and "run as Administrator". FYI: It used the Visual Studio installer which I do NOT like since I was not able to follow the progress of the installation. After the installation completed I tried to connect as "sa" with my password and got this message: See SQL Server V21 error.png SQL Server is installed locally on my laptop, not on a network. I want to change to use TCPIP protocol for my connections. Also, when I looked at "Services" I did NOT find a service for Microsoft SQL Server. Any assistance would be appreciated. Thanks MurrayMurraySobol985Jun 10, 2025Copper Contributor76Views1like3CommentsSSMS Edit rows hangs if open for long time
If you have Edit rows open for a long time (~1h) and submit a change, SSMS (v20.2) sometimes hangs. There's no errors or anything visible and the application becomes unresponsive (sometimes there's a "SSMS is busy"-notification and has to be killed. Feels like the value submission is missing refresh token and/or error response handling. Update does not get processed, but always a bit scary if I had something else open that was. Not sure if there's a way to report such bugs.PragmattaJun 06, 2025Copper Contributor112Views1like4CommentsUnable to restore a backup
I have a backup named: xxxx.bak currently in my Temp directory. This backup was made from SSMS V20. I recently installed SSMS V21 and unable to restore this backup. Steps to reproduce: Open SSMS connected as "sa" Highlite "Database", right click to select "Restore Database" The window opens, I choose "General" under "Select a page", no "databases" are listed. I then switch to "device", again no "databases" are listed. I then look under "Destination, there are several database listed there but not the one I wish to restore. I'm not sure what step, if any, that I am missing. MurrayMurraySobol985Jun 05, 2025Copper Contributor9Views0likes0Comments
Resources
Tags
- Data Warehouse69 Topics
- Integration Services61 Topics
- sql server56 Topics
- sql44 Topics
- Reporting Services44 Topics
- Business Intelligence37 Topics
- Analysis Services33 Topics
- analytics23 Topics
- Business Apps22 Topics
- ssms15 Topics