Recent Discussions
Feature Proposal: Ability to Exclude a column/subset of Columns in Select.
Summary I would like to propose a new T-SQL feature that allows developers to select all columns from a table while explicitly excluding a small subset of columns. Currently, when a table contains many columns and only one or two need to be omitted, developers are forced to mention every remaining column manually in the "Select" SQL. This leads to verbose queries, reduced maintainability, and a higher chance of mistakes when the schema evolves. Motivation Consider a table with 20 or more columns. Current approach, SELECT EmployeeId, FirstName, LastName, Department, Designation, Email, PhoneNumber, DateOfBirth, Address, City, State, Country, PostalCode, ManagerId, JoiningDate, LastModifiedDate, Status, IsActive, CreatedDate FROM Employees; If the intention is simply to exclude a single sensitive column such as Salary, the query becomes unnecessarily long. A more concise alternative could be: SELECT * FROM Employees EXCLUDE (Salary); The engine would expand * internally and remove the specified columns before execution. Benefits 1. Reduces boilerplate code. 2. Improves readability for wide tables. 3. Makes queries easier to maintain as schemas evolve. 4. Reduces the likelihood of accidentally omitting newly added columns. 5. Makes it simpler to exclude sensitive or internal-use columns from result sets. Expected Behavior Single column exclusion SELECT * FROM Employees EXCLUDE (Salary); Returns all columns except Salary. Multiple column exclusion SELECT * FROM Employees EXCLUDE (Salary, PasswordHash); Returns all columns except Salary and PasswordHash. Suggested Validation Rules 1. Every excluded column must exist in the projected result set. If an excluded column does not exist, compilation should fail with an appropriate error. 2. Duplicate column names in the exclusion list should either: be ignored, or produce a validation error. 3. If the exclusion list removes every projected column, the statement should fail. Example: SELECT * FROM Employees EXCLUDE (Employee, Name, Salary); If these are the only columns in the table, an error could be raised such as: The EXCLUDE clause cannot eliminate all columns from the SELECT list. Returning a zero-column result set would likely be confusing and less useful. Additional Considerations This syntax could also be valuable when selecting from joins, views, or derived tables, where developers frequently want "everything except a few fields." Closing Thoughts I believe this would be a practical quality-of-life enhancement for T-SQL that addresses a common developer pain point while remaining simple to understand and implement. It would reduce repetitive code and improve maintainability without affecting existing queries.8Views0likes0CommentsSSRS reports not working
Hi Microsoft team, We are looking for tech support on an issue with SSRS reports that are used in one of our applications. The details of the issue are as foll: When Trying to access an SSRS ReportServer instance (either through the SOAP Service, or directly from the browser) does not work. There are Errors observed in the log files as well as the user interface . The error message is An error occurred within the report server database. This may be due to a connection failure, timeout or low disk condition within the database. The user interface fails to load Report as a result Attached are the SSRS log files from the last month from one of the servers. The last time reports were successfully accessed was on Friday, June 15th. Starting this Monday all functionality stopped working. This environment has 4 SSRS servers under an High Availability AGL. RSManagement log files indicate that the ReportServer schemas may be in an inconsistent state |FATAL|8|Database upgrade failed!! The database may now be in an inconsistent state. Further research indicates that this may be corrected by the following procedure… Stop SSRS services Backup and delete ReportServer and ReportServerTempDB databases Start the SSRS services Use the wizard to create a new ReportServer set of databases Stop the SSRS services Delete the new (empty ReportServer) database Restore the backup of the ReportServer (from step 2 - do not restore the temp database) Fix schema of ReportServer.dbo.Catalog.PropertyField and ReportServer.dbo.Segment.Content (change columns from ntext to nvarchar(max)) Start the SSRS services (Monitor the RSManagement log file) Verify Backout if fail: (Stop Services, Restore the databases, Restart Services) This may also include refreshing of encryption keys and removing servers from the AGL prior to this procedure Can you please help identify what could be a possible root cause for this issue, confirm if the steps listed below present a plausible solution, and advise on any additional triaging steps or corrective procedures? Thanks in Advance9Views0likes0CommentsSQL Server 2022 Database Engine Crash During Startup on Intel Core Ultra 5 / Windows 11 25H2
SQL Server Database Engine crashes during startup on HP OmniBook X Flip 14-fm0xxx (Intel Core Ultra 5 226V, Windows 11 25H2 Build 26200.8655). Reproduced on SQL Server 2019 RTM, SQL Server 2022 RTM, and SQL Server 2022 CU25 (16.0.4255.1). Installation completes successfully, but MSSQLSERVER fails to start with Error 1067 and "Wait on the Database Engine recovery handle failed." Event Viewer shows sqlservr.exe crashing in ntdll.dll (0xc0000005). Crash occurs after master database and CLR initialization.20Views0likes0CommentsSQL Server FCI CSV storage flips multiple times into Online (No Access) state and eventually fails
Dear Team, I'm encountering an issue with our SQL Server multi‑instance failover cluster after applying the OS security patches and restarting the second node. Once the second node comes back online, the Cluster Shared Volume (CSV) briefly flips multiple times into Online (No Access) state and eventually fails.(we can make it online manually, but again flips and failed after sometime). To make the SQL cluster available, we either need to shut down the VM or revert the patch. Before the patching, all cluster roles and SQL instances were moved off the node, and the cluster appeared healthy. The issue only occurs after the reboot of the second node. (first node patched and restarted and everything working fine) OS : Windows Server 2025 Standard Patch tried: KB5075899 (February,2026 ) KB5078740 (March,2026) KB5082063 (April 2026 ) KB5087539 (May 2026) Could you please advise if there are any specific checks or steps we should follow during OS patching to prevent CSV access loss? Is it an issue with the patch or something else? Any insights or recommended actions would be really helpful to perform the security OS patch in the server Thanks you!43Views0likes0CommentsWindows server 2025 SQL patching cluster problem.
Dear Team, I have a problem when I am patching upgrade windows server 2025 with KB5091157. After patching is the clustering is not able to join back; it shows the error with credentials. The log error is "Cannot connect sqlxxxxxxx." you do not have administrative privileges on the cluster. Contact your network administrator to request access. Note: The server is not in a different VLAN network.70Views0likes0CommentsSQL Server 2025 Log Shipping Fails with Missing Assembly (sqllogship.exe) on Split-Drive Install
Hello, I am testing SQL Server 2025 in a lab environment and have encountered an issue with log shipping that appears to be related to assembly resolution. Environment: SQL Server 2025 (fresh install, both unattended and manual tested) Windows Server 2022 and Windows Server 2025 (issue occurs on both) SQL binaries installed on E:\ Default system drive is C:\ Issue: When log shipping runs (via SQL Agent job or manually invoking sqllogship.exe), it fails with the following error: Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.SqlServer.ConnectionInfo, Version=17.100.0.0... Observed Behavior: sqllogship.exe is located at:E:\Program Files\Microsoft SQL Server\170\Tools\Binn\ The required assemblies (e.g., Microsoft.SqlServer.ConnectionInfo.dll) are installed at:C:\Program Files\Microsoft SQL Server\170\Shared\MDS5xSMO\ The sqllogship.exe.config file in SQL Server 2025 includes explicit codeBase entries using relative paths:..\..\Shared\MDS5xSMO\Microsoft.SqlServer.ConnectionInfo.dll Because of this, the application attempts to resolve assemblies at:E:\Program Files\Microsoft SQL Server\170\Shared\MDS5xSMO\which does not exist by default. Workaround: Manually copying the shared SMO directory from C: to E: resolves the issue: C:\Program Files\Microsoft SQL Server\170\Shared\MDS5xSMO → E:\Program Files\Microsoft SQL Server\170\Shared\MDS5xSMO After doing this, log shipping works as expected. Comparison with SQL Server 2022: SQL Server 2022 sqllogship.exe.config is empty It does not rely on explicit codeBase paths Log shipping works without requiring any manual file copies Question: Is this expected behavior in SQL Server 2025, or a potential issue with how sqllogship.exe resolves shared assemblies when SQL is installed on a non-system drive? Specifically: Should Shared\MDS5xSMO also be installed on the same drive as the SQL binaries? Or should sqllogship.exe.config be updated to use absolute paths instead of relative ones? Would appreciate any confirmation or guidance from others who may have encountered this. Thanks!171Views1like1CommentSQL Server 2025 Express - service starts with delay of some hours after restart of computer
Dear Community, we started using SQL Server 2025 Express but experienced problems with the start of service at startup. When the computer is restarted, the service is not started. I observed this on nearly all installations and in one case it took kinda exactly 2 hours to start the service (or it was somehow delayed but without any trace in settings or windows logs). When we start the service manually or by batch script it is starting properly at startup ... What exactly causes this? We only have this issue with 2025 Express and i have not yet found similar cases in the internet. Thank you, kind regardsSolved93Views1like3CommentsDocumentation contradictory
Hi, ALL, Page https://learn.microsoft.com/en-us/sql/t-sql/statements/create-database-transact-sql?view=sql-server-ver17&tabs=sqlpool states [quote] SIZE, MAXSIZE, and FILEGROWTH parameters can be set when a UNC path is specified for the file. [/quote] However later on that same page it states [quote] SIZE can't be specified when the os_file_name is specified as a UNC path. [/quote] I think those 2 sentences contradicts each other.....79Views0likes1CommentFailure to run SSMS
Hi, ALL, For sometime I had both MSVC 2010 and 2017 installed on my laptop. Recently I needed space and decided to remove the old version. Unfortunately I thin I killed one of the SSMS libraries, because while it successfully starts, trying to go to the "New Query" window, Im getting the error "Library not registered". The server itself operates just fine as I can connect to it. Is there anyway to make it work again? Than you.88Views0likes1CommentExtended Event with app_name doesn't work properly
Hello, When I create an extended event to capture all the SELECT on the instance, it works : CREATE EVENT SESSION [YourSession] ON SERVER ADD EVENT sqlserver.sql_statement_completed( ACTION(sqlserver.client_hostname,sqlserver.database_name,sqlserver.nt_username,sqlserver.session_id,sqlserver.session_nt_username,sqlserver.sql_text,sqlserver.username) WHERE ([sqlserver].[like_i_sql_unicode_string]([sqlserver].[sql_text],N'%SELECT%'))) ADD TARGET package0.event_file(SET filename=N'S:\Program Files\Microsoft SQL Server\MSSQL16.FORMATIONMSSQL\MSSQL\Backup\YourSession_Target.xel',max_file_size=(2),max_rollover_files=(2)) WITH (MAX_MEMORY=2048 KB,EVENT_RETENTION_MODE=ALLOW_MULTIPLE_EVENT_LOSS,MAX_DISPATCH_LATENCY=3 SECONDS,MAX_EVENT_SIZE=0 KB,MEMORY_PARTITION_MODE=NONE,TRACK_CAUSALITY=OFF,STARTUP_STATE=OFF) GO I can see all the SELECT that I execute on SSMS, but, when I use the app_name ACTION, it doesn't work anymore : CREATE EVENT SESSION [YourSession] ON SERVER ADD EVENT sqlserver.sql_statement_completed( ACTION(SQLSatellite.AppName,sqlserver.client_hostname,sqlserver.database_name,sqlserver.nt_username,sqlserver.session_id,sqlserver.session_nt_username,sqlserver.sql_text,sqlserver.username) WHERE ([sqlserver].[like_i_sql_unicode_string]([sqlserver].[sql_text],N'%SELECT%'))) ADD TARGET package0.event_file(SET filename=N'S:\Program Files\Microsoft SQL Server\MSSQL16.FORMATIONMSSQL\MSSQL\Backup\YourSession_Target.xel',max_file_size=(2),max_rollover_files=(2)) WITH (MAX_MEMORY=2048 KB,EVENT_RETENTION_MODE=ALLOW_MULTIPLE_EVENT_LOSS,MAX_DISPATCH_LATENCY=3 SECONDS,MAX_EVENT_SIZE=0 KB,MEMORY_PARTITION_MODE=NONE,TRACK_CAUSALITY=OFF,STARTUP_STATE=OFF) GO Do you have any clue about why the extended event doesn't capture the SELECT when the action AppName is selected ? It is a bug ? It is because like I select the AppName field, if my session doesn't have any "app name" it doesn't capture it ? Regards, Alktor457Views0likes3CommentsMS ODBC and OLE DB failed
Hello, In SQL Server 2022 (16.0.4250.1) showed two fails and can´t continue (see screenshot) On system are installed those versions of ODBC and OLE DB System was previously working (not stopped on this window for fail). We did repair of both installation and restart pc, but not helpful. Whta and how to repair it, please? Thank you.87Views0likes1CommentA bizarre situation - SQL query finds no records when record is present.
I am trying to troubleshoot a bizarre situation, and looking for either an explanation of the cause, or assistance in determining the cause. The situation is esoteric (to say the least), so I'll need to paint a picture. I am using SQL 2019 Enterprise for testing. Our database has Allow Snapshot Isolation set to true, and the Is Read Committed Snapshot On is also true. We have a table called T_App_View, with essentially these important fields (plus some audit fields not shown): CREATE TABLE T_App_View ( C_Id int not null, C_Type varchar( 20 ) not null, C_Entity varchar( 250 ) not null, C_Specialisation varchar( 250 ) null, CONSTRAINT APPVIEW_PKC PRIMARY KEY NONCLUSTERED( C_Id ) ) We have an index on (Type, Entity, Specialisation): create unique index APPVIEW_I01 on T_App_View( C_Type, C_Entity, C_Specialisation ) And from a historical hangover we have a view against the table that is used for queries: CREATE VIEW dbo.VS_App_View AS SELECT * FROM dbo.T_App_View WITH CHECK OPTION The table is used to define "UI views" for our application, and contains about 1000 records. As part of commissioning a new database, we use a tool to load data into this table, and then the data basically sits there unchanged. Each time the tool is run it deletes any old data in the table, before populating the new data. The tool deletes the old data row-by-row rather than using a truncate table statement or similar. When our web tier is asked to provide the "definition" of a view, it performs a query on VS_App_View using the three compound key components of Type, Entity, and Specialisation. A dynamic cursor is used (a historical hangover from many years ago). A typical query would look similar to this: SELECT appview.C_Id, appview.C_Entity_Id, appview.C_Specialisation, appview.C_View_Type FROM dbo.VS_App_View appview WHERE appview.C_View_Type = 'DETAIL' AND appview.C_Entity_Id = 'a' AND appview.C_Specialisation = 'Finance' We are using the standard isolation level of Read Committed (which means Read Committed Snapshot in reality). Notice the select statement is not using an option of READCOMMITTED in the query. The fun part Sometimes when we do a lookup in SQL Server, the above query finds no matching records. This bug is very evasive, we cannot reproduce it, and it appears maybe once or twice a month, and other months not at all. It is not limited to specific key values, it just appears to happen randomly (or the pattern is obscure enough that we cannot yet see it). Our QA team experienced the find failure the other day and one of our developers jumped into SSMS and ran the query manually and sure enough it came back with no records found. And now the bizarre bit: The developer ran the query directly against the T_App_View table, and the record appeared. He then re-ran the query against the View, and the record appeared. We have the Query Store enabled for this database and I can see two plans matching the above query (one for a null specialisation, and one for a non-null specialisation). The query plans look odd (due to the dynamic cursor presumably) because even though the index guarantees a maximum of one matching record, the query plan still shows a temporary table being constructed along with a clustered index for that table. I feel like I am reasonably proficient in SQL Server but this one has me stumped. ChatGpt suggested it is a query plan issue, but I'm skeptical as I've never heard of a query plan not finding a record. I've only experienced query plan issues in terms of performance impacts. Has anyone ever come across such a situation? Is Snapshot Isolation part of the problem here, or database statistics, or the fact we are deleting an entire table of records individually and then repopulating them (resulting in bad statistics)? Should we have used WITH( READCOMMITTEDLOCK ) for this query perhaps? Any suggestions on how to troubleshoot effectively, as in what to look at and for? Thanks in advance for any help.157Views0likes3CommentsKerberos double hop delegation on SQL Linked Server fails on AG listener after RC4 disablement
Environment 3 Node- SQL Server 2022 with Availability Group Windows Server 2022 - Linked Server configured with Kerberos delegation (double-hop scenario) - RC4 encryption recently disabled via GPO The Problem After disabling RC4 in the domain (not sure of this root cause), Kerberos delegation through a Linked Server stopped working — but only when connecting via the **AG listener name**. Connecting via the **node name** works fine. I try to migrate my service account to gMSA and I've recreate all SPN and all delegation for the new account, but the issue is the same: Authentication works if the linked server us the node name, if it use the Listener AG name the connection fail with ------------------------------ Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'. (Microsoft SQL Server, Error: 18456) Connection Id 6d654295-0538-4837-b900-ff65c9e86ee9 at 2026-04-29 11:59:25Z I Confirmed via Kerberos event logging (Event ID 4769 on DC)** On a healthy request (node name), ticket encryption type is `0x12` (AES256). - Confirmed SPN registration with `setspn -L` - Verified Kerberos events on the DC (4768/4769) - Confirmed forwardable flag (`0x40000000`) is present in ticket options — delegation is active - Confirmed pre-auth and session encryption are both `0x12` (AES256) for the working path set `msDS-SupportedEncryptionTypes = AES128+AES256` on the SQL service account and resetting its password rotete kdc key Are there any additional steps needed on the Linked Server or constrained delegation configuration side after the service account change? Any guidance appreciated. Thanks.126Views0likes0CommentsIs there a way to check for ODBC driver UNICODE support
Hi, ALL, I'm writing a C++ code to talk to a different DBMSes and wonder if there is a way to check programmatically for the UNICODE support. I know its a year 2026 and 99.9999% of the programs are using UNICODE, but many drivers are still being shipped as ANSI counterparts as well. Thank you for any pointers.78Views0likes2CommentsAccess to SQL Jobs
Hi, I have several jobs in SQL Server Agent. In the department there are 3 people who need administration access to the jobs. What kind of security access must they have? They already have SQL Agent Operator, SQL Agent Reader and SQL Agent User. As far as I know you can only edit jobs where you are the Owner. But, all 3 people must be able to edit all jobs. How to solve that issue?206Views0likes3CommentsSQL Migration from SQL2017 to SQL2022
AG1: Win OS 2016, SQL 2017 AG2: Win OS 2019, SQL 2022 We are trying to migrate database from AG1 to AG2 via distributed AG. As the database is on different version, the status of the db on AG2 will be in Synchronized/In Recovery mode which is not readable. Are there any ways to verify the data integrity of the database as its not readable?82Views0likes3CommentsSQL logshipping
Hi Everyone, has any experience an issue whereby you setup log shopping from SQL 2014 to SQL 2022 , when you choose the paths for data and logs to be stored on destination server it defaults to store both files on the Data drive instead of it being seperate drives like you specified? The initial log setup completes with no errors. Would appreciate any help i can get. Thanks R90Views0likes3CommentsHow does GitHub Copilot in SSMS 22 handle database context collection before generating a response?
Hello, I am trying to better understand the internal workflow of GitHub Copilot in SSMS 22, especially for database-specific questions. From the product descriptions, it seems that Copilot can use the context of the currently connected database, such as schema, tables, columns, and possibly other metadata, when answering questions or generating T-SQL. However, I could not find clear official documentation about the actual sequence of operations. My main questions are: Before generating a response, does Copilot first collect database context/metadata from the active connection and then send that context to the LLM as grounding information? Or does it first use the LLM to interpret the user’s request, decide what information is needed, and then retrieve database metadata before generating the final answer? In some explanations, I have seen the phrase "Core SQL Copilot Infrastructure", but I cannot find any official documentation for that term. Is this an official component name? If so, what does it specifically refer to in the SSMS Copilot architecture? When Copilot answers schema-related or data-related questions, what information is retrieved automatically from the connected database, and is any SQL executed as part of that process? Is there any official architectural documentation that explains: context collection, prompt grounding, LLM invocation order, and whether query execution can occur before the final response is generated? I am asking because I want to understand the feature from both an architecture and data governance/security perspective. Any clarification from the product team or documentation links would be greatly appreciated. Thank you.53Views1like0CommentsUnable to install SQL Server 2022 Express (installer glitch + SSMS error)
Hi, I recently purchased a new Lenovo laptop, and I am trying to install Microsoft SQL Server 2022 Express along with SSMS. SSMS installed successfully, but SQL Server installation fails, and sometimes the installer UI glitches or does not load properly. Because of this, I am getting connection errors in SSMS like "server not found" and "error 40". I am not very familiar with technical troubleshooting. Can someone guide me step-by-step in a simple way to install SQL Server correctly? Thank you.141Views0likes0CommentsMigrate SQL 2016 to SQL 2022 - Detail Work Breadown Structre (WBS)
Hi, We’ve started a project to migrate from SQL Server 2016 to SQL Server 2022, and I’m currently preparing a detailed Work Breakdown Structure (WBS). Has anyone in this community gone through a similar migration and been willing to share their project WBS, either in .mpp or Excel format? Regards, Subhasish Roy51Views0likes0Comments
Events
Recent Blogs
- The 6th cumulative update release for SQL Server 2025 RTM is now available for download at the Microsoft Downloads site. Please note that registration is no longer required to download Cumulative upd...Jun 17, 2026192Views1like0Comments
- 3 MIN READWe just shipped mssql-python 1.9.0, the official Microsoft SQL driver for Python. This release focuses on day-to-day ergonomics for data loading, a long-standing correctness gap around NULL parameter...Jun 12, 2026228Views0likes0Comments