|
|
|
|
|
|
|
Question of the Day |
Today's question (by Steve Jones - SSC Editor): | |
Change Tracking Default Retention | |
I run this command on my SQL Server 2022 database:
ALTER DATABASE AdventureWorks2017 SET CHANGE_TRACKING = ON;What is the default data retention period? | |
Think you know the answer? Click here, and find out if you are right. |
Yesterday's Question of the Day (by Steve Jones - SSC Editor) |
Which MAXDOP? I have a SQL Server 2022 instance with this setting: EXECUTE sp_configure 'max degree of parallelism', 4; GO I then run this: SELECT ProductID, OrderQty, SUM(LineTotal) AS Total FROM Sales.SalesOrderDetail WHERE UnitPrice < $5.00 GROUP BY ProductID, OrderQty ORDER BY ProductID, OrderQty OPTION (MAXDOP 2); GO What is the maxdop for my query? Answer: 2 Explanation: The query hint overrides the server setting. This is from the Docs: "ou can override the max degree of parallelism server configuration value: At the query level, using the |
Featured Script |
Fetch fields like email address from multiple records into single cell Saravanan Venkatesan from SQLServerCentral COALESCE smartly helps to concatenating the multiple rows value into one cell.
|
Database Pros Who Need Your Help |
Here's a few of the new posts today on the forums. To see more, visit the forums. |
SQL Server 2016 - Administration |
Object owner question - Hello, Currently all of our tables e.t.c are owned by dbo. In one of our databases I need to move the tables to a different owner to prevent an ownership chain. What I'm a bit unsure about is the best type of account to use for the table owner. I think 'user without login' is […] |
SQL Server 2016 - Development and T-SQL |
Encryption or Certificate - Trying to NOT put hardcoded password in Proc - We have a few stored procs where we need to a dos command "net use" EXEC master..xp_cmdshell 'NET USE \\\ /USER:<domain\username> /PERSISTENT:yes' I am trying to figure out a way to retrieve a password stored somewhere that is obfuscated from nefarious people, via encryption or any other way really, So that […] |
SQL Server 2019 - Development |
Next dates - CREATE TABLE ADMITS ( ID_NUM INT varchar(15) null ,provider_id varchar(15) null ,provider_name varchar(36) null ,ADMIT_DATE DATE NULL ,DISCHARGE_DATE DATE NULL ,swpa_description varchar(max) null ,date_dispensed DATE NULL ,drug_name varchar(max) null ,discharge_to_dispensed int ) INSERT INTO ADMITS (ID_NUM,provider_id,provider_name, ADMIT_DATE, DISCHARGE_DATE,swpa_description,date_dispensed,discharge_to_dispensed) VALUES ('008012773','006467','WHITE DEER RUN LLC', '2024-02-06', '2024-02-11','Residential Detox, Rehab, HWH (non hosp)','2024-02-22','GABAPENTIN, 300 MG ORAL CAPSULE',11) ,('008012773','006467','WHITE […] |
Amazon AWS and other cloud vendors |
Moving a database from AWS RDS Custom to RDS Standard - Having real fun with this. It isn't possible to set the option group, to enable the AWS SQL backup routines, because you can't execute the CloudShell command to assign an options group (aws rds modify-db-instance), in RDS Custom. I can't restore an RDS Custom snapshot, because that will just create another RDS Custom, and I […] |
Reporting Services |
2 table designs within one section to keep data for one section value within one - My requirement is to display data for a number of routes within 2 tables and keep everything in one page where each value for the route generates a new page. I have created a group for route calling it 'sectie1' and set proper behavior for this sectie (page break, having headers on each page etc). […] |
Editorials |
Ghostworkers - Comments posted to this topic are about the item Ghostworkers |
T-SQL |
Backup information incorrect after AAG toggle - Good morning all, I have the attached T-SQL query that has been working well for sometime. This past Saturday during patching, the AAG toggled from primary on server1 to primary on server2. Now the query does not report differentials from the current primary server. Any pointer/suggestions on what I fail to see is greatly appreciated. […] |
Backup information incorrect after AAG toggle - Good morning all, I have the attached T-SQL query that has been working well for sometime. This past Saturday during patching, the AAG toggled from primary on server1 to primary on server2. Now the query does not report differentials from the current primary server. Any pointer/suggestions on what I fail to see is greatly appreciated. […] |
Article Discussions by Author |
Fetch fields like email address from multiple records into single cell - Comments posted to this topic are about the item Fetch fields like email address from multiple records into single cell |
Enables Change Data Capture (CDC) on all user databases - Comments posted to this topic are about the item Enables Change Data Capture (CDC) on all user databases |
Free T-SQL Script: Database Schema Documentation Generator for Generative AI Services Integration - Comments posted to this topic are about the item Free T-SQL Script: Database Schema Documentation Generator for Generative AI Services Integration |
Fetch fields like email address from multiple records into single cell - Comments posted to this topic are about the item Fetch fields like email address from multiple records into single cell |
Using psycopg2 to Connect Python to PostgreSQL - Comments posted to this topic are about the item Using psycopg2 to Connect Python to PostgreSQL |
SQL Server 2022 - Development |
Trying Different CTAs in Car Insurance Ads, Any Tips - Hey everyone, I’ve been experimenting a bit with digital ads for car insurance, and one thing that keeps confusing me is how small changes in call-to-action buttons can really affect clicks. I figured I’d share what I’ve noticed so far and maybe get your thoughts too. Pain Point So here’s the deal. I was running […] |
ssms aborting in object explorer details - Hi i just set up a new pc after my touch pad went bad. our tech guy installed a version of ssms that says its this SQL Server Management Studio 21.4.12+5.36408.4. its not the version i used before. I'm not 100% certain what image he uses to set up a new pc. I'm getting the […] |
| |
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved. webmaster@sqlservercentral.com |