Here's a few of the new posts today on the forums. To see more, visit the forums. |
SQL Server 2017 - Administration |
Measure Latency for Readonly Replica in AOAG - I've SQL 2017 Read Scale availability group setup in our test environment(AOAG configured on two stand alone instances with Readonly routing in Synchronous Commit). Our app uses Read replica for reports and read queries. I've setup performance counters to measure the maximum latency for data loss(Transaction Delay and Mirrored write transactions/sec). But I need to […] |
Deadlock - What to do next? - Hi, I have a job that keeps getting a deadlock victim error and fails. I created a trace in profiler that captured the deadlock. I'll attach a pic of the graph. It looks to me that it is having an issue with the clustered index on the claim table (which is huge). How do I […] |
Development - SQL Server 2014 |
Select "New Customer" - Hi , Has anyone tried to do this...I'm trying to select only "new customers" revenue, by defining a new customer based on no transaction before the last 6 month. I've looked at using Top 1 and Max , etc. on the ship_date , but could use some help here thanks. |
XML Openrowset column Issue - Morning , I'm having an issue returning any records from an xml file, using an Openrowset query. My purpose is to insert the data from the xml file into a table. When I run the openrowset select portion of the query, I can get the xml data to return in xml format, so I know […] |
Transaction was deadlocked on lock resources with another process - I have table in SQL Server 2014. Please find the structure below: CREATE TABLE [dbo].[ProductIMEISerialNoes]( [ID] [int] IDENTITY(1,1) NOT NULL, [IMEI1] [nvarchar](max) NULL, [IMEI2] [nvarchar](max) NULL, [SerialNo] [nvarchar](max) NULL, [ProductModel_ProductID] [int] NULL, [ProcessDate] [datetime] NOT NULL DEFAULT ('1900-01-01T00:00:00.000'), [BoxName] [nvarchar](max) NULL, [BoxNo] [nvarchar](max) NULL DEFAULT ('0'), [Order_OrderID] [int] NULL, [Color] [nvarchar](max) NULL, [BoxSize] [int] NULL […] |
SQL Server 2019 - Administration |
Staging or UAT Environment - Hi Experts, Currently, we are using the enterprise edition of SQL Server 2014 in our Pre-Prod environment, planning to move it to SQL Server 2019 Developer edition. Will this create any issue in the future wrt to Licensing or issue resolutions. We will be using the same exact upgrade plan of Pre-Prod to upgrade production […] |
The media family on device incorrectly formed for read only file group restore - Yes the databases (source and destination) are the same version. I have checked 3 times. Both are "Microsoft SQL Server 2019 (RTM-CU8-GDR) (KB4583459) - 15.0.4083.2 (X64)" The database itself restores ok without error. Only when I try the read-only file group restore does it give the error. I have redone the back up and attempted […] |
SQL Server 2019 - Development |
Group By and JOIN within SQL Server (when dealing with multiple columns) - I have 2 tables, df1, and df2. I would like to join the two tables and then perform a GROUP BY aggregation. I am unsure if I am performing the groupby correctly because my values are not adding up correctly as desired. DATA: df1 host purpose verge name date 123 sub hello hello1 1/1/2021 123 […] |
Conditional Column calculation - Hello All, I have the following SQL Query, what I need is to have a column let's Say Shortages. since I arrange or Sort the Query by Item, so If Item No_ = Previous Item No i.e Item No_ of the previous record, the Shortages will Sill shortages - [remaining Qty_] else Shortages will be […] |
SQL Server 2008 - General |
XML Vs Non-XML - I am using SQL Server 2008 R2. While using XML data type and XQuery slow (50 Times slow) compare to Non-xml Method(Relational Database Model) even after adding XML Index. So is it ok if we move from XML to Non-XML option? |
T-SQL (SS2K8) |
Get local server's alias in T-SQL - Hello, I'm trying to get the server name programmatically. Even after I do this: exec dbo.sp_dropserver 'FQDN\InstanceName' GO exec dbo.sp_addserver 'MURPHY', 'local' GO But @@Servername and SERVERPROPERT('ServerName') both still return FQDN\InstanceName In our code, we do stuff like IF = "FQDN\InstanceName" .... I want to be able to do IF = […] |
Get local server's alias in T-SQL - Hello, I'm trying to determine if there's a way to get a server's alias programmatically? Scenario: Using SQL Configuration Manager, I've created an alias for the server FQDN\InstanceName as "Murphy". All well and good. Now, let's say I'm connected to Murphy. When I select @@SERVERNAME and SERVERPROPERTY('ServerName'), I get FQDN\InstanceName I tried exec sp_dropserver " […] |
Azure Data Factory |
Azure Data Factory Copy Data UpSert with Delete - Hi, I'm having some problems with several Data Factory Copy Data jobs using stored procedures performing an upsert. I am using the method described on this page by Taygan https://www.taygan.co/blog/2018/04/20/upsert-to-azure-sql-db-with-azure-data-factory I am using this technique to copy data from tables in Azure SQL Server to our On-Prem SQL Server. When I add the delete clause […] |
Analysis Services |
Issues with multiple SSAS tabular instances on same server - I have created a second instance of a tabular server on the same server but I am having issues processing the data using "process full" from SSMS. I can turn on both instances at the same time, however the first instance that gets turned on is the only one that can be processed. The second […] |
Integration Services |
XML Load Error - Hello everyone, I'm attempting to connect to an xml file so I can later load it to a SQL DB, but haven't really been able to get beyond just connecting to it with the XML Source. So, here's a test xml file I'm currently working with that I got from a client: 418492</Shipper […] |