Here's a few of the new posts today on the forums. To see more, visit the forums.
|
SQL Server 2017 - Administration |
Index combining question - I ran a report and execution plan suggested a 'missing index' with 4 index key columns and 4 included columns. I created the index and ran the report again it gave me 'missing index' suggestion again with now 2 key columns and 2 included columns which were part of the missing index of the first […] |
SQL Server 2016 - Administration |
Reading multiple audit files - Is it possible to read multiple audit files from multiple servers all placed under a single folder ? SELECT * FROM sys.fn_get_audit_file('E:\ABC\ServerAudit\*.sqlaudit', DEFAULT, DEFAULT) order by event_time desc I have 10 audit files from 10 different servers all under this folder - E:\ABC\ServerAudit\ Thanks |
replicate deleted records - hi guys, does any one know how to replicate "only deleted records" using transactional replication ? in other words deleted record needs to be moved to other database using transactional replication |
We added 4 files to tempdb, due to Pagelatch_up being major wait - Yet they do not appear to be used, and lots of Pagelatch_up: tempdb waits are still showing. all 4 new files show 98% of free/available space, while the original 8 files are being used, at 50 and more percent, showing 20 or 30 % only free in them. Why are the new files not being […] |
SQL Server 2016 - Development and T-SQL |
How to mark consequitive groups with non-unique group key - I have a sequence of records with ID and FLAG being a key to identify the group of records, but the FLAG here is a bit, so it is not unique declare @T table ( ID int , TS date , FLAG bit ); insert into @T(ID, TS, FLAG) values (1, '2020-01-01', 0 ) , […] |
Development - SQL Server 2014 |
Get double records returned from SELECT because I failed to save the PK. - I have two tables. A lookup table that has a PK and various columns. Looks something like this: tblOperator PK OperatorID, OperatorName, BadgeID My main table saves the BadgeID value from the tblOperator instead of the PK OperatorID. So when I do an INNER JOIN between tblMain and tblOperator, I get duplicate records returned. […] |
Trying to understand percent sign next to field name - I have a simple query where I needed to see if a qty had decimal places. I was instructed to use field_name%1 as shown below. It works. I'm just trying to understand the process so I can learn more. What is the %1 doing/calculating? SELECT m.item_id , l.qty_on_hand FROM inv_loc l INNER JOIN inv_mast m […] |
SQL Server 2019 - Administration |
hardening of SA account causes failed login found in error logs - Hi Guys, i am hardening the SA but disabling it and renaming it according to CIS hardening guide. But found multiple failed login errors in Error logs. Did a further trace using the sql profiler and discover: Login failed for user 'sa'. Reason:.... Always On Operations Dashboard i could not found any supporting technote from […] |
Updating Python packages in Machine Learning Services ( MLS ) on a MI - Hi When MLS is set up on an Azure SQL Server Managed Instance ( compatibility level 150 ) , there are are whole batch of python packages that are installed. I know I can add or remove packages via ADS , but these appear to be packages not part of the base install. Is it […] |
Always Encrypted and how to use them in queries. - Hello Everyone I've been testing Always encrypted on 2 test machines. I'm trying to get a feel on how easy they are to work with. My objective is to encrypt personal info of individual's but still be able to query that info. On server 1, I created Master Encryption Key, Column Encryption Key & Encryption […] |
SQL Server 2019 - Development |
SQL agent failed job report last 24 hours - Hi All, Posting it on development group, if anyone can provide query. Basically, I am seeing 100+ failed jobs daily and it is taking more time to check in agent history and 80% of auto success in 20% are failed. Is there any way can only get report of failed non success jobs. -- Failed […] |
MAXRECURSION 0 Option - Hi Everyone, I am trying to apply a Multi table function that uses a recursive CTE. When I apply it I get the error: The statement terminated. The maximum recursion 100 has been exhausted before statement completion. I've looked online about this error and apparently I need to add: Option ( MAXRECURSION 0 ) Apparently […] |
sql server keeps looking for my User Defined Scalar Function in the Master DB - I have a Visual Studio project web site that I have been using for years. The move to SQL server 2019, has apparently broken it. When I call the dataadapter.Fill function it tries to find my User Defined Scalar Function in the Master Database. System.Data.SqlClient.SqlException: 'Cannot find either column "master" or the user-defined function or […] |
outer apply alternative - My goal is to get the results below. Trying to get the nearest date and result from the #Data table where the resultdate<=ProcDate. An outer apply is taking 4 hours for a 400 row table. Another more efficient way of doing this? I have several more '#Data' tables (CTE's) to join to the #patient table […] |
Amazon AWS and other cloud vendors |
Cost effective VPN solution for AWS with MFA - Hi, I've recently setup VPN on our AWS account and had my AWS bill go up by $200. It appears that you pay for it even when nobody uses it. You can't stop it like EC2 instance. I found this article: https://medium.com/aws-factory/schedule-your-aws-client-vpn-endpoint-and-reduce-costs-f68d8729bade It says you can automate the removal of VPN configuration and re-creation it […] |