Here's a few of the new posts today on the forums. To see more, visit the forums.
|
SQL Server 2017 - Administration |
What component of I/O subsystem caused database corruption - As per Error 824 that has occured in my SQL error Log, I have found that the I/O subsystem is the cause of the database corruption. https://learn.microsoft.com/en-us/sql/relational-databases/errors-events/mssqlserver-824-database-engine-error?view=sql-server-ver16 However, I want to dig further and understand which specific component of the I/O subsystem caused the corruption. Is there a methodology to identify this? How can I […] |
SQL Server 2016 - Administration |
Extended events issue - I have this extended event set up: CREATE EVENT SESSION [Performance monitoring] ON SERVER ADD EVENT sqlserver.sql_statement_completed(SET collect_statement=(1) ACTION(sqlserver.client_hostname,sqlserver.database_name,sqlserver.nt_username,sqlserver.plan_handle) WHERE ([package0].[greater_than_int64]([duration],(30000)) AND [package0].[not_equal_unicode_string]([sqlserver].[session_nt_user],N'NT SERVICE\SQLTELEMETRY'))) ADD TARGET package0.event_file(SET FILENAME=N'...',max_file_size=(5)) WITH (MAX_MEMORY=4096 KB,EVENT_RETENTION_MODE=ALLOW_SINGLE_EVENT_LOSS,MAX_DISPATCH_LATENCY=30 SECONDS,MAX_EVENT_SIZE=0 KB,MEMORY_PARTITION_MODE=NONE,TRACK_CAUSALITY=OFF,STARTUP_STATE=OFF) GO The issue I'm having is that it's not excluding results for the SQLTelemetry account as shown in the example below: Does […] |
SQL Server 2016 - Development and T-SQL |
the workaround for procs truncating varchar and nvarchar max output fields - Hi , assuming the answer at https://stackoverflow.com/questions/50474892/return-strings-from-sql-server-stored-procedures-being-truncated is correct and my peer's version of sql is Microsoft SQL Server 2016 (SP3) (KB5003279) - 13.0.6300.2 (X64) Aug 7 2021 01:20:37 Copyright (c) Microsoft Corporation Enterprise Edition: Core-based Licensing (64-bit) on Windows Server 2016 Datacenter 10.0 (Build 14393: ) (Hypervisor) , and assuming he can set […] |
Order By on a single table raises Ambiguous column name error - How in the world can the below query for a singular table produce the error msg "Ambiguous column name hMy"? The error goes away if I A) Alias th3 table and prefix the hMy column with that alias B) change SELECT so it's either just hMy or just * I understand how the ambiguous error […] |
SQL Server 2019 - Administration |
AlwaysON AG - Hello guys, I have a WSFC cluster with AlwaysON AG two replicas(syncro) in one DC1 and the third replica (asynchronous)in other DC2.The connection between DC's are quite slow. Management want to start an disaster scenario : Failover to DC2 and shutdown completely one week DC1 and come back to DC1. My question is how I […] |
SQL Server 2019 - Development |
Database Project or SSMS - Hi Do you write your code in a database project in visual studio or directly on SSMS? Just weighing up the benefits of starting to use the database projects exclusively. Thanks in advance |
email recipients in agent notifications - as you can see at https://www.sqlservercentral.com/forums/topic/notifications-in-sql-agent we have a couple of folks being emailed hopefully upon completion of tha job. how can i add my name/email to that list? do i have to script the job 's definition and rerun the script? |
notifications in sql agent - Hi, i went to look at notifications for my sql agent job and came away confused. I changed the email notification to "on completion" but when i scripted it, it appeared to be focused on failure. i didnt write the script, i just asked sql to script what it had while i was in notifications. […] |
SQL Azure - Administration |
Failover Group Error - Hi Experts, I have about 15 Azure databases in one region and the replica of the same in another . THe configuration is such that the RG is different in both region and are in separate SQL Pool. THe issue is that when I tried to add a new database to failover group after creating […] |
Reporting Services |
SSRS Migrate / Upgrade -- Dead End in Microsoft Instructions - I'm planning to migrate an SSRS 2016 server (with scale-out deployment) to a new set of hardware in order to upgrade the OS from Win 2012 to a modern OS. I would like to upgrade from SQL/SSRS 2016 to 2019 in the process. I've found and read all of the Microsoft documentation on migrating SSRS. […] |
Integration Services |
Looping Through Excel Files for Correct Year/Period - Please look at my Variables and the code used for establishing periods/year. Currently i am in P01 Year 2025 according to the calendar below in pics. I am picking up already data for P02 Year 2025 which is wrong. |
SQL Server 2022 - Administration |
Error: 18456 + SQL Server 2022 New Install - We are seeing the below error after the SQL Server 2022 install. Not sure what is the purpose of this account “'DOMAIN\XX-RPT-P-DB$”. Looks like this was created/used automatically as part of the installation and is used by some background process. We haven’t seen this issue in older versions. I see this domain account, but […] |
SELECT PERMISSION DENIED ON Scalar function - I have given examples of two ways of getting results from scalar function - one works the other doesn't --GRANT EXECUTE ON WDM_TSE.fnRule_JobNumber_Validation_multiple_jobcodes TO [\] DECLARE @result INT; SET @result = WDM_TSE.fnRule_JobNumber_Validation_multiple_jobcodes(N''); SELECT @result; --GRANT SELECT ON WDM_TSE.fnRule_JobNumber_Validation_multiple_jobcodes TO [\] SELECT WDM_TSE.fnRule_JobNumber_Validation_multiple_jobcodes(N''); For a user with permissions, the first works, the second doesn't work including […] |
SQL Server 2022 - Development |
Calendar & Fiscal Year Table - I have a Calendar table that need to be displaying Fiscal Start and End Date as in below: The Calendar is currently have data for years 2023 - 2028: -- Calculate the number of days per year in the IMETA_Calendar table SELECT YEAR([Date]) AS [Year], COUNT(*) AS [NumberOfDays] FROM [Prod].[IMETA_Calendar] GROUP BY YEAR([Date]) ORDER BY […] |
SSRS report Query Optimization - How to optimize below Query, Could you Please guide me. SELECT selected_sfs.sfName AS 'service_form_name' ,c.agingDays AS 'age' ,documents.document_id ,selected_sfs.contactor ,selected_sfs.lob ,doc_event_orig_actor.creator_full_name ,selected_sfs.originator_full_name ,qic.queue_name ,qic.work_item_status ,CASE WHEN --selected_sfs.sft_definition_id IN (@category1_sftDefID) selected_sfs.sft_definition_id IN (54,85,90,136,142,146,155,156,175,177,188,202,210,212,217,227,229,256,258,274,288,327,330,332,336,339,343,356,387) OR b.cat3 = 1 OR (selected_sfs.sfName='Contact Center SF' AND SV.SubjectText IN ('dispute')) OR (selected_sfs.sfName='Contact […] |