« first day (5153 days earlier)      last day (11 days later) » 

00:17
this must be some new kind of curse
 
5 hours later…
 
2 hours later…
07:07
voting ring activated
07:26
ty
 
1 hour later…
08:41
Wordle 1,334 4/6*

⬛⬛🟨⬛⬛
🟨⬛⬛⬛⬛
⬛🟨🟨🟨⬛
🟩🟩🟩🟩🟩
09:24
Wordle 1,334 3/6*

⬛⬛⬛🟨🟨
⬛🟨🟨🟩🟩
🟩🟩🟩🟩🟩
29
Q: Join us for our first community-wide AMA (Ask Me Anything) with Stack Overflow’s CEO (and a few others) on February 26, 2025

SashaOn February 26, 2025, from 3:00 to 4:30 PM EST (20:00 to 21:30 UTC), Stack Overflow CEO Prashanth Chandrasekar will be holding an AMA (Ask Me Anything) session for members of the Stack Overflow and Stack Exchange communities. We would appreciate it if you would join for this session, which will b...

 
3 hours later…
12:27
64 upvotes / 34 downvotes
 
1 hour later…
13:43
Wordle 1,334 4/6*

⬛⬛🟨⬛🟨
⬛🟨🟨🟩⬛
🟩🟩🟨🟩⬛
🟩🟩🟩🟩🟩
 
1 hour later…
14:51
it's surprisingly annoying to come up with a query that has a decent chunk of compile time that also doesn't take forever to run
15:24
@ErikReasonableRatesDarling How much compile time do you want? And how long is too long to run?
15:39
Wordle 1,334 4/6*

⬜🟩⬜⬜⬜
⬜🟩⬜🟨⬜
⬜🟩🟩🟩🟩
🟩🟩🟩🟩🟩
15:54
@PaulWhite i think a second or two of compile time would qualify. maybe 5-10 seconds of runtime?
i can deal with longer. most of the crap that i came up with dragged on for several minutes.
DECLARE @SQL nvarchar(max) =
    N'
    DECLARE @T AS table (c1 integer NOT NULL);

    WITH CTE (c1) AS
    (
        SELECT V.v
        FROM
        (
            VALUES
                !list!
        ) AS V(v)
    )
    INSERT @T (c1)
    SELECT c1
    FROM CTE;
    ';

SET @SQL =
    REPLACE
    (
        @SQL,
        N'!list!',
        (
            SELECT
                STRING_AGG
                (
                    CONVERT
                    (
                        nvarchar(max),
                        CONCAT(N'(', GS.[value], N')')
2s compile; 50ms execute
16:10
now i just have to parameterize it
17:09
interestingly, does not get a replay script
but this doesn't look like the right thing anyway
something else is stifling the parameters
Paul makes custom ordered sammies and queries
17:34
He's very faithful to his (.net) core loves
 
1 hour later…
18:44
@Erik - looks like official docs were put up. possibly warrants an update to this post
how much more of an update did you want?
well
a frog emoji would have been nice
19:12
sorry, i was trying to track down the GH issue that got nuked. clearly wasn't paying attention to the post proper
Hey all. Hate to make this a formal question, since its more of a "confirm what I googled is correct", but I have a client that needs to be able to look back and see when values have changed in his SQL database (he currently uses a 3rd-party tool, but we've moved to Azure)
First we tried SQL auditing, and while that captured the SQL statement, it didn't show the parameter values (UPDATE mytable SET name=@newname WHERE id=@rowid)
Then I looked into CDC, and that seems promising, but doesn't actually capture the user (or even the timestamp) who makes the change?!?
Change Tracking seems utterly unrelated
So it looks like either Auditing + CDC + trying to correlate those logs
or lots of custom triggers?
Am I wrong? Have I missed something?
there are many related questions on dbe.se, but some are very old and I don't know if there have been changes to any of these features
20:01
but no, neither change tracking nor cdc capture the full ask
you can tweak change tracking queries to do it, but it's a pain. you can also do something similar with temporal tables, but then you're using temporal tables.
triggers might be the only thing that could do it all, including capturing the query that fired them. but you would have a lot to think about as far as concurrency and race conditions go.
20:27
Thanks, @ErikReasonableRatesDarling, I'll take a look. Seems odd that each built-in feature does parts of this but none give you the entire "who changed what when" picture.
@ErikReasonableRatesDarling not sure what you mean here about concurrency issues with triggers: just that if two conflicting updates are fired near-simultaneously, I won't necessarily know which was committed last?
Not sure I care; just log them both and let the admin decipher it later if they need to
20:47
@BradC if you're not sure what i mean, you may not want to use triggers 😃
@ErikReasonableRatesDarling lol fair
21:24
@ErikReasonableRatesDarling just watched your YouTube video, saw you are retrieving the query using sys.dm_exec_input_buffer
Can't you do the same directly using EVENTDATA().value('(/EVENT_INSTANCE/TSQLCommand/CommandText)[1]','nvarchar(max)')
or does that not give the same thing?
21:45
> EVENTDATA returns data only when referenced directly inside of a DDL or logon trigger
ah, not DML triggers. Got it.
23:26
> Friendly SQL
New Oracle in the making
Once you go Duck, you can't go back

« first day (5153 days earlier)      last day (11 days later) »