|
|
|
|
|
|
|
|
Question of the Day |
Today's question (by Steve Jones - SSC Editor): | |
Adding and Updating | |
I run this code, but get an error: USE AdventureWorks GO ALTER TABLE Sales.CreditCard ADD defaultcard BIT UPDATE sales.CreditCard SET defaultcard = 0What's is the error? | |
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) |
Database Options and Numeric Roundabort I run this code: ALTER DATABASE sandbox SET NUMERIC_ROUNDABORT Off Then, in the sandbox database, I run this: DECLARE @a NUMERIC(5,3) = 1.24 DECLARE @b NUMERIC(5,3) = 1.465 DECLARE @c NUMERIC(5,1) SELECT @c = @a + @b SELECT @c What is the result in @c? Answer: 2.7 Explanation: When I set numeric_roundabort off, this just works, with the result (2.705) being rounded to 2.7. Ref: |
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 2017 - Administration |
Searching for the Assumed Full Backup - I have this maintenance plan with differential backup and maintenance clean-up task in it. The plan runs once daily, and the clean-up task is deleting backup files older than 1 week. There is no other full backup plan or subplan there in SSMS. I ran the following script day before yesterday, yesterday and today to […] |
SQL Server 2016 - Development and T-SQL |
Can you pass an undeclared variable to a Stored Procedure - If I have a SP that calls another/different SP can I pass to that second SP a variable that has not been declared within the 1st SP and which was not passed to the 1st SP like the below? I am walking through some code in a SP and found that it had a variable […] |
SQL Server 2019 - Administration |
Windows 11 & sudden SSMS sorting nuisance - When I was still in Windows 10, I'd open up SSMS (version 18) and go to Object Explorer Details, where I would see the folders System Databases and Database Snapshots up at top and all the individual database names listed in alphabetically order (unless I sorted otherwise). Now that I've upgraded to Windows 11, something […] |
HADR SYNC COMMIT / deadlock rebuild index - Hi, I have some interesting issue. Server1 2024-08-09 02:59:25- start session 234 with UPDATE STATISTICS on Table1 WA_sys_xxxx stat 2024-08-09 03:00:08 - start session 800 - with ALTER INDEX on Table1 with Index1 2024-08-09 03:00:25 - deadlock session 800 like victim and session 527, which is application with some MERGE 2024-08-09 03:04:22 - first record […] |
Ping a sqlinstance - How do I (ping/check if up and running) a sqlinstance from t-sql ? |
SQL Server 2019 - Development |
can my phone run ssms inside our firewall? - Hi my phone is now upgraded to allow teams , outlook etc using my work account. Its a portal more or less. Is there a way to leverage my new portal to run ssms from my phone so i can check on the status of a couple of jobs rather than carrying my pc around […] |
what have people done for ssrs params needing very precise start and end times - Hi we run 2019 standard. one of our mfg locations requires somewhat precise start and end param times along with the start and end dates controlling how an ssrs report is filtered. our main user doesnt like the idea of them typing hh.mm.ss.nnn next to the date showing when they pick a date from the […] |
Integration Services |
Destination Table - Condition Amount 0 - I need your assistance with an ETL process that runs every six months. Currently, we are in Calendar Year/FY 2025, which started in July 2024. The issue is with the "Condition Amount" for FY 2025. Data comes through correctly until the "Insert Data Into Task" step (please see the attached screenshot). However, it appears that […] |
Destination Table - Condition Amount 0 - I need your assistance with an ETL process that runs every six months. Currently, we are in Calendar Year/FY 2025, which started in July 2024. The issue is with the "Condition Amount" for FY 2025. Data comes through correctly until the "Insert Data Into Task" step (please see the attached screenshot). However, it appears that […] |
Destination Table - Condition Amount 0 - I need your assistance with an ETL process that runs every six months. Currently, we are in Calendar Year/FY 2025, which started in July 2024. The issue is with the "Condition Amount" for FY 2025. Data comes through correctly until the "Insert Data Into Task" step (please see the attached screenshot). However, it appears that […] |
Design Ideas and Questions |
Why is it a good idea to not restore a production database to test? - (I looked over all the forums here on SSC and this one seemed the best for my question. If you think I'm wrong, I'm sorry I posted my question here.) For years I've read here and elsewhere that it is not a good idea to restore a production database to its equivalent test database. I've […] |
SQL Server 2022 - Administration |
Collation Change - Any recommendations on changing the collation if DB ? There is dependent objects so simple alter won't work. Also DB to big to generate script with schema and dats |
In primary alwayson replica index maintenance plan need tobe prepare fordowntime - Dear all, I have a 3.5 tb primary always on database with 2 secondary replica one is sync and dr is async In primary always on replica index maintenance plan need to be prepare for downtime can any one mention the order for the plan and its steps to follow Do we need to suspend […] |
OLA's Maintenance scripts - should I be reorganizing? - Hi These are my current params for nightly maintenance: USE MASTER EXECUTE dbo.IndexOptimize @Databases = 'MY USER DB', @FragmentationLow = NULL, @FragmentationMedium = 'INDEX_REBUILD_ONLINE', @FragmentationHigh = 'INDEX_REBUILD_ONLINE', @FragmentationLevel1 = 25, @FragmentationLevel2 = 50, @SortInTempdb = 'Y', @MaxDOP = 2 I have removed 'REORGANIZE' as per Jeff's thread here: https://www.sqlservercentral.com/forums/topic/review-ola-hallengren-indexoptimize-parameters Am I correct in removing the […] |
SQL Server 2022 - Development |
Query timeout question - I am debugging (sort of) a problematic query, that gives a timeout error (30 seconds) in our company application. I've captured the query + parameters using Extended Events and when I run the exact same query with the same parameters in SSMS, it takes about 1 second. Anyone got any ideas what's happening here? |
| |
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved. webmaster@sqlservercentral.com |