« first day (4972 days earlier)      last day (30 days later) » 

12:00 AM
that's too meta for me
and there's no BeatsDB
1/10 do not recommend
12:14 AM
Only trusted users (20,000 rep) can vote to delete an answer. The answer must have a negative score. Accepted answers can be deleted this way. The owner of the answer can't delete the accepted answer.
12:40 AM
Very unsuccessful summoning going on here
@PaulWhite With this new post, I added a script to reproduce the issue. Sorry, it took me a few days to put the script together. — ToC 3 hours ago
1:14 AM
@Charlieface not just taken down, but excluded from the wayback machine!
must've been ✨spicy✨
Jul 20 at 13:34, by Zikato
Failure to read the transcript detected
did-i-do-that.gif
@mustaccio Flip it around - MySQL is a high-end professional database that can do everything you currently do with a spreadsheet.
"you" referring to the average office-wonk generally.
Can anyone spare a cigarette
1:49 AM
Flip it around, won't you
2:30 AM
don't suck the burning end - it doesn't go so well
 
2 hours later…
4:46 AM
Wordle 1,153 4/6*

🟨🟨⬛🟨⬛
⬛🟨🟩🟩⬛
⬛⬛🟩🟩🟩
🟩🟩🟩🟩🟩
🚭
5:32 AM
Wordle 1,153 2/6*

🟨🟨⬛🟨⬛
🟩🟩🟩🟩🟩
That's going 2 b tough 2 beat
Even with BeatsDB
@ErikDarling Fixed, tyvm
I lucked out using a rare opening word
 
6 hours later…
11:51 AM
Wordle 1,153 4/6*

⬜⬜🟨⬜⬜
⬜🟨⬜🟨🟨
🟩⬜🟩🟩⬜
🟩🟩🟩🟩🟩
12:28 PM
Does anyone here actually use change tracking?
 
1 hour later…
1:44 PM
@HannahVernon I've never bonded with that expression. "Lucked out" is too close to "out of luck", with the opposite meaning. I'd usually say, "got lucky".
2:21 PM
@SeanGallardy IIRC @Z & @F have a tiny bit of legacy CT noodling around unless they've managed to clean it up in my absence
I'm not aware of it
i could be misremembering
i thought there was a couple tech-debt-y things of uncertain usage from awhile back but i could be misremembering
@SeanGallardy i know many unhappy people using it
chicken or egg?
@ErikDarling This seems to be the consensus
2:31 PM
@SeanGallardy We use Temporal Tables, if you're asking in a general sense. But no, not the feature Change Tracking itself.
Dang, thanks JD
Np
I've had to use it before. Long time ago. Don't recall it being awful
Was trying to find someone that used CT + AG
I do feel sorry for anyone forced to use AGs
2:34 PM
Ah, I'm TT + RPL 😁
that's temporal tables and replication for anyone playing along at home
Temporal tables are dead to me
@ErikDarling GJ
@ErikDarling I forgot to congratulate you on your improvements in my email. Very good.
I curse you for making me debug dynamic SQL though.
But you're still ahead.
you can add a hazard pay multiplier to the invoice for that
2:43 PM
m8s r8s still apply
american gr8uity r8s may also take effect locally 😂
Nesting OPENQUERY inside EXEC AT is a nifty soltuon.
Given one can't call an inline function remotely.
And no one wants to build VALUES statements.
yeah the 1000 row limit was enough to dissuade me
nevermind all the formatting/data type detection you mentioned
38
A: The number of row value expressions in the INSERT statement exceeds the maximum allowed number of 1000 row values

Paul WhiteNo. This hard-coded restriction exists for good reasons related to possible excessive query plan compilation time. You can workaround it by listing the VALUES clauses in a CTE, then INSERTing from the CTE, but I do not recommend it. Break the INSERT statement up into VALUES clauses of <= 1,000 li...

obligatory
but yeah, best avoided
@ErikDarling You'd better hope DTC is available though, even without an explicit transaction. It's still needed.
i think it's only available for managed instance, not sqldb
is this whole thing borked without it
2:54 PM
I haven't checked in detail
It might only be needed for the creative INSERT
@J.D. You have my deepest sympathies
@SeanGallardy It's really not too bad 😁. TT is like the RPL of the CT world, IMO.
@ErikDarling Just the INSERT. The simple remote UPDATE and DELETE are fine. Shame.
Replication is gr8 for job security, if you can tolerate working with code you can't change written by interns
If you like code written by interns...
@PaulWhite What would you say is objectively the most janky feature of SQL Server that you personally actually enjoy using?
3:01 PM
@PaulWhite is there a way around that the way things are set up? would it even work if i changed from push to pull for that?
@ErikDarling Likely, yes.
Reading is fine. It's generally when you go remote from I/U/D.
@ErikDarling Oh, if you mean running the INSERT remotely and reading from local, you'll run into the problem I mentioned with remote inline TVFs not being supported.
@ErikDarling Wrapping it in a view works, but then the parameters have to be hard coded in the view. Workable, but ugly.
INSERT...EXEC requires DTC.
I mean, you could dynamically create a view each time 🤢
3:16 PM
go on
A view with the required values for @from_lsn and @to_lsn embdedded in it
Let me see if a multi-statement TVF will work
> Msg 4122, Level 16, State 1, Line 34
Remote table-valued function calls are not allowed.
No go
oh god am i going to have to nest a procedure
@ErikDarling Nest a procedure? What do you have in mind?
8 mins ago, by Paul White
INSERT...EXEC requires DTC.
I suppose you could create or extend an existing table to hold the @from_lsn and @to_lsn.
Then the view could be static and just look up the values from the table.
well the requirement is that identity insert needs to be set with EXEC at, but if a stored procedure got called within that block that pushed the insert rather than using INSERT/EXEC and then turned identity insert back off after the procedure call, it might drop the dtc requirement
extra words in there but okay
I see
@ErikDarling No go. The SET IDENTITY_INSERT is per session.
3:34 PM
A chairde - Morning all!
Wordle 1,153 3/6*

⬛⬛🟨🟩⬛
🟩⬛🟩🟩🟩
🟩🟩🟩🟩🟩
Lucky second guess!
@PaulWhite how does anyone get anything done
was your setup like: EXEC('SET IDENTITY_INSERT dbo.t ON; EXEC db.dbo.InsertProcedure; SET IDENTITY_INSERT dbo.t OFF;') AT srv;?
Yes, exactly.
The InsertProcedure ends up using a different session to do the insert
that's not cool
Well, my InsertProcedure was a four-part call of course.
of course
3:37 PM
I see this in your future:
CREATE VIEW <sch>.get_net_changes_<capture_instance>
AS
SELECT <insert_list>
FROM cdc.fn_cdc_get_net_changes_<capture_instance>
(
    (SELECT from_lsn FROM ...),
    (SELECT to_lsn FROM ...),
    'all'
);
@ErikDarling Did I mention how this stuff always ends up being labo(u)r-intensive?
i had no lesser expectation than labo(u)r intensiveness
that's why i chose the best labo(u)rer
I suppose you could try JSON?
xml isn't allowed over remote
could nvarchar(max) it and convert both sides, I guess
like make a json blob from a select from cdc_net and then pass it over and parse it for an insert?
yep, just thinking aloud here
i didn't think json parsing was much more str84ward than xml parsing.
i suppose i could generate the parse based on the select too
3:43 PM
Can you imagine the dynamic SQL tho
i think i'd hate myself less generating temporary dynamic view definitions with current lsn literals
The JSON/xml parsing would require typing anyway
@ErikDarling That was my first instinct too. It's not really that horrible.
IDENTITY was a mistake
so then i don't need my fancy insert at all
just create a temporary view on the local server and select from it remotely with exec at with the identity shenanigans
and then drop the view i suppose
it being temporary and all
man, i was really looking forward to that openquery thing working
it's not often i think of anything that interesting
It was an excellent thought
The JSON isn't too bad, aside from getting the types e.g. integer, varchar(50)
It's much more work. The primary advantage is speed because you're only making one remote call rather than a to-and-fro
i think i'd be concerned about someone else having to maintain that code in the long term
3:56 PM
Oh yeah that would suck
Apr 19 at 15:23, by Paul White
Darling Inc interns, perhaps
Though maybe not too bad if you factor it out into an obviously-named function
I don't know that the to-and-fro modified view is that intuitive
it is probably more intuitive than json
but you never know with developers
What could be more intuitive than JSON?!
xml ofc
4:12 PM
:o
It's a big advantage if you're used to xml's foibles. JSON syntax, escaping, and querying is different enough
4:27 PM
Why do computers make everything so literal and hard work
Also, I found a bug with UTF8_SC collations today
big bug, little bug?
-- Run in a database with collation Latin1_General_100_CI_AS_SC_UTF8

-- two-byte character followed by a four-byte character
DECLARE @y nvarchar(max) = N'X😎';
-- Bug: split character converting to four bytes of storage
SELECT CONVERT(nvarchar(2), @y);
-- RIGHT(...,1) has a LEN of 2
SELECT LEN(RIGHT(CONVERT(nvarchar(2), @y), 1));
-- Works: returns 'X'
SELECT CONVERT(nvarchar(2), CONVERT(nvarchar(4000), @y, 2));
@ErikDarling Pretty serious, yeah. Split characters and nonsense results
Mitigation: only affects conversion to nvarchar from a LOB (not varchar) and no one uses nvarchar or LOBs, right?
I wonder if I can exploit this to take over the Azure Cloud
Maybe I'll implement DTC for them
4:49 PM
i'm sure all you need is a little windbg here and a little windbg there
It's a really inconvenient bug for anyone looking to print long strings in chunks btw
@PaulWhite Created by programmers, known for being overly literal :P
@JoshDarnell Fuck them all
v. fair
I do try 2 b even-handed
Moderate, even
4:53 PM
Moderating Moderate Moderators, Paul's TED-X Talk
voted and posted
5:20 PM
mp
5:31 PM
@PaulWhite you know, I agree, "got lucky" is much better.
now put your commas in the right place
🤣
@SeanGallardy we use CDC + dAG
@PaulWhite nevaaaar
Somone just asked me to look at a wiki that has "AI" features enabled and now I'm really annoyed.
Commas in the wrong place are slightly annoying, perhaps, but rainbow underlines on every third word can do one, as they say.
5:59 PM
those rainbow underlines are a little eager, but i to my own shame i like the feature in principle
@HannahVernon What do you hate the most about it or what would you liked to see changed?
might benefit from only highlighting the first instance of the word on the page, but i reckon there was a whole UI debate about making it clear you can tooltip any instance of the keyword rather than just the first
6:15 PM
what on earth does a rainbow underline mean?
Jira and some other Atlassian products auto-create a glossary based on context of an otherwise unannotated text
those multi-color underlines are the visual cue that there's an AI context provided if you don't know what "DBA" means
idk how "new" it is to the Atlassian offerings generally, but it's new to me
well new "ish"
> Paul has left the chat
The AI revolution is unwelcome on the bottom part of the globe i guess
7:00 PM
Will upvote in 2 billion years if you are correct :-) — TripeHound 2 days ago
set a timer
i saw an animation of what geologists think the earth will look like in 250 million years and i was quite glad that none of it would be my problem
7:14 PM
it's amazing how many people will engage with voteable items and not vote on them
i have a bunch of twitter and linkedin engagement for the bug report, but it remains at one upvote (mine)
paul didn't even vote for his own issue
what a wacky guy
last night i had dreams about cleaning out excessive ear wax and one of my answers getting 100 upvotes
> ✅ I have utterly no idea what you're talking about. Please, God, don't ask for my input.
voted
yw
7:46 PM
Voted!
8:04 PM
Even though I haven't yet wrapped my head around what the problem is.
@PeterVandivier thank you
@JoshDarnell A string has two characters, the first takes two bytes, the second takes four bytes. Converting that to an nvarchar(2) is impossible, so truncation must occur. The destination type is four bytes, not two characters. The first two byte character will fit, but the second four byte character will not -
because only two bytes of space remain. The documented behaviour is to convert only the characters that fit. Splitting the four byte 😎 character down the middle and stuffing two bytes of it is the bug
Documented on the CAST and CONVERT page if memory serves. On phone
@ErikDarling Ha! I will fix that later
 
2 hours later…
10:15 PM
@PaulWhite thank you!
10:36 PM
lmk if I explained the wrong part
The situation with bytes and characters and string functions is just generally weird in SQL Server
Strings were a mistake, yes
11:02 PM
And they keep adding more of them
Computing for most verbose syntax
Or impenetrable syntax in the case of regex
@SeanGallardy we'd like to have the consumer be able to run sp_repldone, etc, on the non-primary node and have SQL Server mark log records on the primary as having been consumed. As it stands, sp_repldone can run against the secondary but the primary is unaware the log rows have been consumed.
11:17 PM
You and your crazy schemes
hah.
@SeanGallardy see this
The answer is never too run sp_repldone
Just get very big drives for unlimited log files
Is that proc supported these days?
Never used to be
Something has to be used to mark the log records as consumed; I'm not 100% certain the third-party software uses it, but its using something, and we'd like to point it at the secondary
I know, local factors
11:26 PM
The true answer is to literally kill yourself if you consider using replication
As far as I can tell, replication isn't in use
Yes, it's a custom application using CDC to keep track of changes without using the change tables themselves. Seeing that sp_repldone doesn't work on the secondary (which I confirmed before posting this question), and just fails silently, I posted this on Azure Feedback. Hoping to get some visibility, but I don't have high hopes at all. — Hannah Vernon ♦ May 9 at 13:46
Who wrote this custom application?
Someone with a patent on a better wheel design?
11:48 PM
Grog make wheel then Grug make wheeler wheel. Grog sue Grug for all berries.
It's an old story but so so true

« first day (4972 days earlier)      last day (30 days later) »