Here's a few of the new posts today on the forums. To see more, visit the forums. |
SQL Server 2017 - Administration |
Replication and always on - Previously we used to use transactional replication and that would allow reporting database to be different name. However, with always on AG the database name on secondary cannot be different has to match the source db name and i tested this to ensure. Do you agree the db name cannot be different for secondary replica? |
Failover, Patching and Hallengren Backups - I am using a replication tools that has been having issues the last couple of patch cycles. I am doing some troubleshooting and I see a few issues. When patching the AG servers a failover occurred. To patch AG servers, should we reboot the secondary first and then the primary? We never thought of […] |
SQL Server 2017 - Development |
JOIN Causing Duplicate Values - Dear Group: I am missing something and not sure what. Below, is the output and query when I do a simple select statement and these numbers are correct. SELECT A.ReportDate, A.Site, FORMAT(A.ReportDate, 'yyy') + '-' + FORMAT(A.ReportDate, 'MM') AS Report_Slicer, A.Pfolio, A.C_Type, SUM(A.Calls) AS Calls, SUM(A.HSec) AS HSec, SUM(A.Accept) AS Accept, SUM(A.Reject) AS Reject, SUM(A.ASec) […] |
Incorrect syntax near the keyword 'unique'. - Hi All I am trying to create new table on sql server 2014 enterprise edition with constraint and unique non-cluster index and getting "Incorrect syntax near the keyword 'unique'." msg. It runs ok on sql 2017 server.I tried to look into books online but link takes to 2019.here is my script EGIN TRAN BEGIN try […] |
SQL Server 2016 - Administration |
Finding when SQL login switched to disabled status - Hello experts, I just fixed an issue for a client where I discovered the SQL login in question was disabled. I forgot (my fault) to check the login data before re-enabling the login, so I think I lost the previous change date for the login. I did try to go back and restore backups of […] |
Administration - SQL Server 2014 |
Strategies for better SQL server Management and Cost Saving - Our company has nearly 50 SQL server engines (more than 2/3 are version 2014 or newer) and 250 database instances running, the business applications data in the databases vary greatly in their subjects. Due to lack of expertise and good management strategies, we do not have good knowledge about our SQL server environments, from licensing, […] |
error while setting up linked error - Hi I get the error Client and Server cannot communicate...they do not posses a common algorithm how to resolve this Regards |
Development - SQL Server 2014 |
SQL Server Trigger to prevent insertion of duplicate data in Table - Hello, I have a company table for some reason I can't create a constraint on table level. I am trying to use the following Trigger on my table to avoid duplicate records. when I try to insert the record I am getting following error. Please advise how to avoid duplicate record insert / Update using […] |
SQL 2012 - General |
How to write dynamic statement with way do it run quickly? - I work on SQL server 2012 I face Issue I implement dynamic SQL it very slow so I need to enhance statement below to work quickly . DECLARE @SQL NVARCHAR(MAX) select @SQL =CONCAT(' SELECT * Into #NewTable FROM #SplitNumberAndUnitsFinal PIVOT(max(Value) FOR DKFeatureName IN ('+@Columns+')) AS PVTTable ', N' Select ''Variant ID'' as ''[Variant ID]'',''PART_ID'' as […] |
Can't start SQL Server Agent - I'm having enormous trouble starting SQL Server Agent. I have one server that is running two instances of SQL Server - one the agent works fine on the other no luck with multiple things I've tried. I simply see the line "SQL Server Agent (Agent XPs disabled) - any clues would be most appreciated! |
SQL Server 2012 - T-SQL |
? on Non-Clustered Indexes - Hi Recently we moved to replication of a DB we receive. I noticed it was slow, long story short, the non-clustered indexes were missing, added them back in and queries ran quickly again. My question is , how do I know when and what fields to add a non-clustered index? Any info/links would be appreciated […] |
SQL Server 2019 - Development |
Build a string based on values from other fields - I have 10 fields that have either a 1 for true and 0 for false I have an 11th field that I want to create a list in based on which attribute fields have a 1 or true in it I need to read each record and each of the 10 fields in that record. […] |
What is the difference between statement and sql_text? - Hi All, I was asked to map all ojects that a specific group of users access in our DBs. I've created an extended Events session and captured all of their batch completed and rpc_starting. When I started to analyze the data, I was surprised to see that rpc_started event gave me sql text and […] |
SQL Azure - Administration |
List of all users for all databases - I need to run a query that will return all of the users for all of the databases on a SQL query. I am able to get all of the users for a single database, but I really need all of the users for all databases in a single output result. I thought this would […] |
COVID-19 Pandemic |
Daily Coping 30 Jun 2020 - Today’s Tip is to create a list of favorite memories you feel grateful for. http://voiceofthedba.com/2020/06/30/daily-coping-30-jun-2020/ |