Forum Replies Created

Viewing 15 posts - 1 through 15 (of 163 total)

  • Reply To: Renaming a Database

    In the praxis you want to rename the files / folder too, since it is usually very inconsistent to have a database ArchiveSales with OldSales.mdf / ldf

    Therefore for a clean...

  • Reply To: How Do You Patch 100 Database Servers?

    Most servers have autopatching enabled and assigned to different groups that defines on which weekday at which hour they are allowed to restart.

    Some servers (as our SQL Servers) are patched...

  • Reply To: Comparing Images

    when I cast the values as VARBINARY(MAX) it works too.

    TRUNCATE TABLE dbo.Image_Staging; TRUNCATE TABLE dbo.Images
    INSERT INTO dbo.Images (imageid, imagestatus, imagemodified, imagebinary) VALUES (1, 1, GETDATE(), HASHBYTES('SHA2_512',...

    • This reply was modified 1 month, 2 weeks ago by  Thomas Franz.
  • Reply To: Using Outer Joins

    Bad style of the query (I know, it is intended here, but you should never write it this way in real code).

    Instead of

    SELECT 
    c.CustomerName, COUNT(oh.OrderID)
    ...
  • Reply To: Converting Old Running Total Code to Window Functions

    Nice solution.

    Instead of combining LAG() and SUM() OVER you could have used just LAG - at least when it are just a fixed number of the last 4 entries. For...

    • This reply was modified 2 months, 3 weeks ago by  Thomas Franz.
  • Reply To: etaoin shrdlu

    Producing a Year-2100-problem by setting 31.12.2099 as default valid_to date. Ensures the job for my great-grandkids or their AI.

  • Reply To: How to Delete Large Amounts of Data

    Sorry, but this script isn't really good in my opionion.

    • why are you counting the numbers of rows to delete, this is a unneccessary big read
    • you could write a...
  • Reply To: How to Delete Large Amounts of Data

    David.Poole wrote:

    At a previous employer we used partition switching to do massive deletes.

    when you already have partitions, you could simply do a

    TRUNCATE TABLE dbo.big_stuff WITH (PARTITION(1 TO...
  • Reply To: Planes, Trains, and Automobiles

    I  just wonder how this even could happen. Did all the companies not install the patches on the testing / dev environment before? And do they not have a cluster...

  • Reply To: Meet the new Google AI Assistant Gemini

    the problem is, that DATETIME is not an exact datatype (similar to float vs. decimal). DATETIME suppots only about 0.003 accuracy, so a DATETIME2 = '20240708 23:59:59.998' would be converted...

  • Reply To: Meet the new Google AI Assistant Gemini

    The two statements in the chapter More details of JOINs are equal.

    And both are wrong, since you need to put the SUM(o.Amount) > 1000 into the HAVING and not the...

  • Reply To: An Upgrade Slog

    Can't you use Redgate SQL Backup to do restores that are no longer possible with native SQL backups? I think, I did this some years ago with SQL 2005 to...

  • Reply To: How Often Do You Update SSMS?

    Still using SSMS 18.x since my second most important Addon (besides Redgate SQL Prompt) with the name SSMSBoost seems to be deprecated and there is no version that works with...

  • Reply To: Rounding Numerics

    With

    SET ARITHABORT OFF; -- or ON, it doesn't matter 
    SET NUMERIC_ROUNDABORT OFF;

    I will not get a warning (contrary to the explanation). But with NUMERIC_ROUNDABORT ON I will...

  • Reply To: An In-Depth Look at MIXED_PAGE_ALLOCATION and Changes in Page Allocation

    Parthprajapati wrote:

    Appreciate the feedback! While MIXED extents have limitations, they can still offer performance & storage benefits in specific cases like TEMPDB management. I'm open to further discussion & exploring...

    • This reply was modified 11 months, 2 weeks ago by  Thomas Franz.

Viewing 15 posts - 1 through 15 (of 163 total)