« first day (4532 days earlier)      last day (347 days later) » 

12:00 AM
Uh I have like 500 answers on here that prove otherwise
 
 
2 hours later…
2:00 AM
lol
 
Wordle 712 4/6

⬛⬛⬛⬛⬛
⬛⬛⬛⬛🟩
⬛🟩⬛⬛🟩
🟩🟩🟩🟩🟩
Tricky tricky
Great Scrabble word though.
 
@ErikDarling aren't you just... always having a mental breakdown?
 
2:16 AM
@PeterVandivier my mental breakdown was complete in the early 90s. I’ve just been coasting since then.
 
 
4 hours later…
6:37 AM
Morning
Wordle 713 4/6*

⬛⬛⬛⬛⬛
⬛🟩🟨⬛⬛
⬛🟩⬛🟩⬛
🟩🟩🟩🟩🟩

Smaller father and son playing ball
 
 
2 hours later…
8:11 AM
Wordle 713 5/6*

⬛⬛⬛⬛⬛
⬛🟨🟨⬛⬛
🟨🟨⬛🟨⬛
⬛⬛🟨🟩🟩
🟩🟩🟩🟩🟩
 
 
3 hours later…
11:00 AM
Wordle 713 4/6*

⬛⬛⬛⬛⬛
⬛🟩🟨⬛⬛
⬛🟩⬛🟩🟩
🟩🟩🟩🟩🟩
 
11:48 AM
lol
 
 
1 hour later…
1:11 PM
Wordle 713 4/6

⬜⬜⬜⬜⬜
⬜🟨⬜🟨⬜
🟨⬜🟨⬜⬜
🟩🟩🟩🟩🟩
 
ducks on the water
 
a fire in the sky
 
wrong
 
1:45 PM
@Zikato hahah
 
Mario coins
Does anyone here use power automate?
worthwhile?
 
i've never heard of it
i avoid things with power in the name
as a rule
man, the resource governor dmvs have really cool information in them
 
@SeanGallardy I've used it....it has its use
the desktop or the cloud one?
 
2:01 PM
Desktop, was thinking it might be helpful but seems overly complicated?
 
just like everything with power in the name
 
LOL yeah you're probably right
 
2:25 PM
@ErikDarling PowerPoint though...
@SeanGallardy We use it a little bit here, but I haven't had any hands on with it yet, so can't really comment on its usefulness to complexity ratio.
I think one use case we had for it was to integrate a form into our database, but it was pretty limited on how to input the source data and output the results, so we just found it easier to code our own website instead lol.
 
@SeanGallardy yea, but i don't feel good about it
only the cloud version though
feels like the managed version of automating the finance department with excel macros on the fileshare
 
2:54 PM
@J.D. This seems to be what I'm pretty much finding
Cool, so I am having the same-ish experience
 
I think the industry these days is trying to come up with low-code / no-code solutions for companies, but then they end up being very limited technologies in what they can actually accomplish, unfortunately.
Kind of like AI, but with less hype.
 
just tell ChatGPT to do it for you
 
heh
 
@HannahVernon It'd end up killing people
 
I believe that you'll find it only kills people who disagree with it
 
2:58 PM
Wait for the upgrade
> Kill All Humans
 
I can't wait till we get the Boston Dynamics version of ChatGPT
 
ChatGPT removed your message
 
fixed
 
@J.D. HAHAHA I saw that this morning
but don't worry, taking all the jobs
 
@H Did your nested dynamic SQL work?
 
@SeanGallardy Quite a time to be alive.
 
3:33 PM
> This robot causes harm.
 
3:49 PM
Anyone know a reliable way to check if a trigger being fired was the result of a DML action from another specific trigger. Any chance the EVENTDATA() function stores anything related to the call stack?
 
4:10 PM
good question
I'd upvote that
 
same
 
probably extended events module start and collect tsql callstack
 
@SeanGallardy True, I'll post it lol. Was feeling it was too wishy-washy because I don't even know what the thing I'm looking for would be called.
@mustaccio oOo
 
"Oct 16 2006 - ...This would definitly be a useful feature and we are considering implementing it in the next version of SQL Server"
👀
 
Yeah
 
4:32 PM
> June 5, 2023
 
Time is a problem
 
spacetime is a bigger problem
 
@J.D. Sounds like a very fragile arrangement. I suppose one could set and reset a SESSION_CONTEXT() entry in the calling trigger.
 
Are the present DBA.SE mods going to participate in the strike?
 
4:39 PM
Haven't had time to really think about it
It only really matters what the majority of SO mods decide to do anyway
I don't feel especially strongly about the issue at the moment.
It's not like this isn't par for the course behaviour from the company in recent years.
Can you make changes to the first trigger? e.g. to use SESSION_CONTEXT/CONTEXT_INFO? — Martin Smith 5 mins ago
LOL
People and their comments. Just answer the damned question why not.
 
@JoshDarnell I for one welcome our new AI overlords.
 
3666
Q: Temporary policy: ChatGPT is banned

Makyen Moderator Note: This question being featured is still the best tool we have to announce this policy sitewide. However, people have been using this for protracted debate and discussion. As such, this question is now locked. If you want to discuss this policy further, or suggest other related chan...

That's a lot of meta votes
 
Wait, what? ChatGPT posts are banned, and so are moderators from removing them if they are posted? How does that work exactly?
 
@mustaccio Things change over time
Hence the word "temporary"
I linked it for the vote count
 
yeah but that policy post is not closed, which implies the policy is still in effect, no?
 
4:54 PM
That's part of the problem
 
Perhaps ChatGPT took over the SE headquarters
 
> Specifically, moderators are no longer allowed to remove AI-generated answers on the basis of being AI-generated, outside of exceedingly narrow circumstances. This results in effectively permitting nearly all AI-generated answers to be freely posted, regardless of established community consensus on such content.
The SO meta post is local policy
 
Now they can generate any policy in no time
- Can I post a ChatGPT question?
- No.
- Can I remove a ChatGPT question?
- Can you shut up?
- No
- No.
 
-222
A: What is the network policy regarding AI Generated content?

PhilippeWe recently performed a set of analyses on the current approach to AI-generated content moderation. The conclusions of these analyses strongly indicate to us that AI-generated content is not being properly identified across the network, and that the potential for false-positives is very high. Thr...

89
Q: Please follow your own policies on making new policies

Chris - Regenerate ResponseYour policy on making policies is crystal-clear: Stack Exchange, Inc. agrees that it will: [...] Post previews for review of all new official policies in the Moderators Teams instance with the policy tag, marked with links to their public version once published, and maintain a listing of all off...

 
Those responsible for sacking the people who have just been sacked, have been sacked.
 
5:12 PM
one can only hope
somewhat interesting timeline of events, even if it is a bit out of date.
 
@PaulWhite Interesting, I'm not familiar with this function, so will look into. Thanks!
 
@PaulWhite Thanks for sharing your thoughts 😁 That's for sure, this is basically standard procedure at this point.
@HannahVernon Neat!
 
5:39 PM
So SESSION_CONTEXT() is akin to session storage in a website?...it's essentially just a key / value store?
 
I remember Joe doing something in this area, related to getting "call stacks" like this.
 
@J.D. Yes
 
Before SESSION_CONTEXT, we used an application lock, or even the existence of a named temporary table to check the caller
Or TRIGGER_NESTLEVEL
That's a pretty obscure function, but probably the most direct way. Handles dynamic SQL too.
 
6:00 PM
Neato, you learn something new everyday.
What would be a legitimate, not terrible, use case for SESSION_CONTEXT()? Just curious.
@PaulWhite I contemplated this, but I care about a specific trigger as the source, and there could be other parent triggers in the call stack I want to ignore.
 
@J.D. You can specify the trigger to look for in a parameter
@J.D. I believe it was added to make Row Level Security easier to implement
But people use it for all sorts of things
3
A: Is there a reliable way to check if a trigger being fired was the result of a DML action from another *specific* trigger?

CharliefaceYou can use TRIGGER_NESTLEVEL with an objectid parameter IF TRIGGER_NESTLEVEL(OBJECT_ID(N'dbo.OtherTrigger', 'TR')) > 0 BEGIN -- do stuff END; The EVENTDATA() function is only relevant for DDL triggers anyway.

You probably don't want over use SESSION_CONTEXT where a better solution is available. There were problems with using it in parallel plans. "The total size of the session context is limited to 1 MB. If you set a value that causes this limit to be exceeded, the statement fails."
 
@PaulWhite oOo even more interesting to me then. So it's a newerish feature.
Curious how that would come into play for RLS.
@PaulWhite Sweet, did not realize this. Thanks for the answer! I'll look into it further.
 
> This example shows how a middle-tier application can implement connection filtering, where application users (or tenants) share the same SQL Server user (the application). The application sets the current application user ID in SESSION_CONTEXT (Transact-SQL) after connecting to the database, and then security policies transparently filter rows that shouldn't be visible to this ID, and also block the user from inserting rows for the wrong user ID. No other app changes are necessary.
 
Huh interesting. 🤔 Seems like a workaround to implementing proper authentication from the application.
Though I suppose I could see there being edge use cases where different users have access to execute an application process that is ran from an elevated account, but still needs some sort of additional RLS applied for each user who runs said process.
 
6:19 PM
It's apparently very common to connect as a common user
But anyway, session context is just a much more powerful CONTEXT_INFO
People can use it how they like
Persisting the value of a variable across batches, for example
idk there must be thousands of things
 
@J.D. I'm curious what you mean by "proper authentication from the application" here.
 
Presumably, using separate SQL Server logins per user?
 
@JoshDarnell Maybe not best terminology, but yea IMO, most applications should connect to the database as the actual executing user, unless it's a particular service.
 
@PaulWhite I thought that might be it.
@J.D. In my experience (which is mostly with web apps), that's neither common nor recommended.
 
6:38 PM
@JoshDarnell Interesting...why would it not be recommended? Do you normally use a dedicated account in the database connection of a web app?
 
6:53 PM
One issue is the user could use that login to access the server outside the application
 
@PaulWhite You're saying by using a dedicated account, ay?...because my view is one shouldn't have to hard-code the account to the connection string. I prefer using a trusted connection that passes off the calling user's Windows identity, and connects to the database as the actual calling user.
 
@J.D. I think the discussion is more around multi-tier apps e.g. the web apps @Josh mentioned
 
Otherwise, if you mean the user themselves can connect to the server outside of the application, yes I agree - but that's a good thing, I believe. Typically a user has the same rights to the data regardless of where they're establishing a connection from, whether it be DesktopApp1, WebApp2, or SSRSReport3, etc. I believe proper security at the database level should control that for the user, regardless of where they make the connection - not the application itself that should be the gatekeeper.
 
Updating and deleting data outside the business logic encapsulated in the application? Doesn't sound gr8, m8
 
Depends on where you encapsulate your business logic.
But fair.
 
7:09 PM
10
A: Purpose of SQL Server Application Roles

Dan GuzmanApplication roles do not eliminate the need to supply initial connection credentials. One must first successfully authenticate to the server/database using a login (SQL or Windows account/group), or contained database user) before an application role can be activated. Application roles mostly d...

 
@J.D. I'm not talking about putting credentials in a connection string. The web app connects to the database using integrated security, but the web app does not practice "impersonation" of the end user. So the web app connects to the database as whatever user runs the web app process.
In the case of apps running in IIS, this is whatever the application pool user is - whether that's a service account, or a computer, managed service account, etc.
Impersonating the end user only really works if the end user's identity corresponds to a Windows identity, which isn't always, or even usually, the case.
 
@JoshDarnell Gotcha. And what's your typical process to secure actions or data access per the calling user?
@JoshDarnell Most of my experiences the users always have had a Windows identity. But most of my experiences have been for internal applications for an organization that is primarily on a Windows domain.
 
@J.D. That's done in the application.
 
@JoshDarnell How do you know who the user is?...the application asks for user credentials?
 
@J.D. Ah, okay. I'm often working in external facing and multi-tenant cloud environments. So users could be on various domains, etc, compared to where the actual web app and DB sit.
 
7:22 PM
@JoshDarnell Yup, that makes more sense. I worked for a SAAS company when I worked at the FinTech company, so the primary apps they created were external, probably similar idea.
 
@J.D. There are lot of ways application authenticate users. One way I've used quite a bit is deferring that to a third party (e.g., OAuth or SAML "single sign on" workflows).
 
Gotcha gotcha.
So if you had a use for Row-Level Security, based on the calling user, would you use something like SESSION_CONTEXT() or how would you shake that out?
 
So a user might enter their email address (jdarnell@companyname.com), and based on their email address they would get sent to their Azure AD endpoint to sign in with their domain credentials. Azure AD then posts data to our system confirming the user is who they say they are.
@J.D. Yeah, we would have to use SESSION_CONTEXT or something along those lines.
 
@JoshDarnell Yup, makes sense. We were trying to implement OAuth at one point, but never got there.
@JoshDarnell Word. Just smells janky to me, to use for RLS, but I get it.
 
@J.D. Yeah, that doesn't sound fun. Especially with EF.
 
7:25 PM
Hah yea, not even thinking about EF at that point.
My mindset around security is probably dated. When I first did web, it was ASP.NET Forms, and impersonation was natively supported with setting the right properties in web.config. Nowadays, it does seem rather difficult to initially setup impersonation in .NET Core, especially across an API layer. But I don't do much application development anymore, I'm mostly in the database layer these days, so not my problem lol.
 
it's 2:30pm on a Friday who's into doing a code push?
 
Does updating STAGING count? Because that's what I'm currently up to.
 
I'm only doing UAT, but it sounds important, amiright
 
Our STAGING = Our UAT too, so I'm with ya. :)
 
7:56 PM
I just wrote a trigger that modifies another trigger on the same table
 
careful, you'll open a gateway to another universe if you do that too often
 
yesterday, by Hannah Vernon
also, how many levels of nested dynamic SQL is too many. Asking for a friend.
...but triggers.
 
@PaulWhite 😱
@J.D. Yeah, I think that was extremely common with internal web forms tools for a long time. I did a lot of that too.
 
wOrd
 
Almost all of my 300+ answers on Stack Overflow are about ASP.NET Web Forms 😁
 
8:10 PM
heh I probably used one of those back in the day before I knew who you were.
 
8:31 PM
Haha that would be neat.
The strike has reached 90 signatures.
I didn't realize how many mods SO has.
 
@JoshDarnell I needed to use dynamic SQL on the trigger pseudo tables
 
speaking of triggers
i hope @@procid works correctly inside them
 
Modifying a trigger of the same type configured to run last seemed like a good option
We'll see how it goes
 
you're a stud
 
@ErikDarling It does
 
8:47 PM
well
it doesn't work how i want
so there's that
ANYWAY
 
8:59 PM
@JoshDarnell all but one elected
seems sus
v sus
 
btw thanks @Charlieface and @PaulWhite for this suggestion. Worked swimingly.
 
@PeterVandivier EXTREMELY
 
@ErikDarling That's a new one to me. The docs make it sound like it shouldn't actually return anything if ran adhoc, but it appears to.
 
9:29 PM
It returns the batch text hash
@ErikDarling What do you want it to return?
 
@J.D. I don’t think it returns anything that resolves to a module name though
@PaulWhite I was hoping to have an alternative answer for Jim Dangle
 
9:59 PM
@ErikDarling lol took me way to long to realize you're referring to me. I'm burnt, it's 6pm on Friday. I'm out. Have a good weekend y'all.
 
Think about how fewer burnt you’d be if you hired an experienced database practitioner
 
Heh, 🤞
 
10:19 PM
@PaulWhite is there any way to figure out which stored procedure made a trigger fire?
 

« first day (4532 days earlier)      last day (347 days later) »