Here's a few of the new posts today on the forums. To see more, visit the forums.
|
SQL Server 2017 - Administration |
PLE is low most of time! - My prod server (physical) has Total physical memory around 375GB and "max memory" setup 300+ GB. But I see PLE low all the time as low as 50 sec.! When Tried to dig into using "sys.dm_os_buffer_descriptors" found one clustered index (PK) taking 50-60GB as Cached, other index low cached sizes, may be another 5-6GB combined. […] |
Query optimization - Hi all, I have one "heavy" query on my DB. It executes 2400 times per day and I don't know how to optimize it. Do you have any idea? Thanks. DECLARE @time datetime, @rowcount int 2400 select @time = dateadd(-HH, 24, GETUTCDATE()) WHILE (@rowcount=2400) BEGIN ;WITH CTE_1 AS (SELECT TOP 2400 * FROM dbo.Table1 WHERE […] |
SQL Server 2017 - Development |
Composite primary key tagged to identity - Is it possible to create a table with composite primary key(ID+Identity (1,1)) and identity will increment individually for each composite key value pair. Ex: ID IdentityCol 1 1 1 2 2 1 2 2 2 3 2 4 3 1 3 2 As more rows are […] |
SQL Server 2016 - Administration |
Query store - Single query hash values multiple query id - I am trying to understand how to pin plan , I see a single query hash value however I see multiple query_id for the same query hash value. Below is the sample SQL. It looks like sometimes it is able to use the plan and sometimes it is creating a new plan leading to possible […] |
SQL Server 2016 - Development and T-SQL |
verifying procedure with data entered - Hi clever people I've created the following procedure below that, when I enter a SA ID number (SSN in the west I imagine) it tells me whether the number entered is false or not. Below the procedure is a table creation where I enter a row that includes the Idnumber column whére I enter the […] |
Results different in Azure Data Studio vs SSMS - Any idea why this would be the case? I see the result in Azure Data Studio but some of the strings are truncated in SSMS. Also, if you notice, IIADR3 has a length of 1, but it’s not space or null. So, not sure what it is. Wondering if you guys came across this […] |
Procedure to validate an SA identity number - Hi Guys I am trying to create a procedure that will validate a South African ID Number (I think in the US this would equate to a SSN) based on the below reasons and I need help from you clever guys please as I am completely stuck. The procedure must evaluate to the id number […] |
Conversion Rounding - I'm finding that in 2016 the script included at the bottom will return 3.27 for the value 3.275 but I would expect it to be 3.28 because the 5 in the thousandths decimal place would round up. The other two values act as expected where a 4 rounds down and a 6 rounds up. Any […] |
Development - SQL Server 2014 |
Rewriting a query with union all - I have a table with the following test data: Period Item Size Qty Amount Budget Jeans S 10 100.00 Budget Jeans M 10 100.00 Budget Shirts S 10 150.00 Budget Shirts M 10 150.00 Last Jeans S 1 10.00 Last Jeans M 1 10.00 Last Shirts S 20 200.00 Last Shirts M 20 200.00 […] |
SQL 2012 - General |
Unusual behavior with LARGE query - I've got a query that recently started performing badly (long running) and at times it will run indefinitely, and other times it runs in 90s (which is still bad). It's basically a combination of 8 selects with UNION ALL...(the query pulls from tables, and a massive view). Indexes have been rebuilt, statistics updated, and there's […] |
SQL Server 2019 - Development |
Wrap your SQL into HTTP REST endpoints automagically ^_^ - Howdy guys, I'm looking for BETA testers for the following thing. It basically allows you to automatically generate HTTP REST endpoints, wrapping your database tables, and/or custom SQL statements. If you want to test it, I would be eternally grateful, and if you (God forbid) find a (severe) bug in it, I'll throw you a […] |
Why does SUM from one table rises if I do an INNER JOIN with another table? - I can't figure this out... If I write this query... SELECT SUM(d.Quantity) FROM Invoice i INNER JOIN InvDet d ON i.InvoiceId = d.InvoiceId I get the SUM that I want, but if I do an inner join with another table I get much larger sum. SELECT SUM(d.Quantity) FROM Invoice i INNER JOIN InvDet d ON […] |
Unable to figure out the correct query - Hello, I need help in answering this query. I just cannot get it right. I have attached the tables for reference. A record company requests the names of all recording artists, as well as the number of rock songs each artist sings. Note that some artists may not sing any rock songs but should still […] |
Reporting Services |
RS only answer IPV6 requests - Hello Friends, My environment SQL Server 2014 Enterprise Edition. Running Reporting Services in Native Mode using RSWindowsNTLM as unique authentication method. Directly in the server console Report Server works ok, open everything, when I try to do the same thing from a workstation, the report server keeps asking authentication and goes blank, when I enable […] |
Disaster Recovery |
HELP!!! - I have an older Windows 2003 Server running SQL Server 2008, I need to move this to a Windows 2019 Server running SQL server 2016 and I'm at a loss on how to do it. I was hoping I could just back up every database and including master, model and msdb and restore them I've […] |