« first day (2123 days earlier)      last day (2732 days later) » 

12:06 AM
Hey, is the handout pdf here a good tutorial for learning sql?
 
12:20 AM
@AaronHall Seems good, if you plan to attend a SQLAlchemy seminar
and you want to have a basic understanding of SQL, fast.
 
12:43 AM
ok...
What I really want is a basic understanding of generic sql, and then learn the idioms of say, postgres or mysql.
 
@AaronHall ok then. But to learn something, you have to get your hand on to it.
Try out things, write code, see where it fails, etc.
SQL has some differences with other programming languages
 
 
3 hours later…
3:42 AM
I feel like this needs to be shared lol
Holy schnikies what did I get myself into tonight? https://t.co/bU1kwuwrEH
 
 
3 hours later…
6:15 AM
@TomV How big was the XML file?
 
7:05 AM
@JamesLupolt I don't have it anymore, probably yuuuge
 
big league execution plans
 
You've kept the first question, but you've also asked it at Stack Overflow. Did you make a mistake or was it indeed your intention to address that question to both communities? Please be aware that cross-posting is not allowed. — Andriy M 1 min ago
 
7:31 AM
@JamesLupolt We're going to make execution plans great again, Believe me
 
Did anyone figure out who @TrumpDBA is?
Ozar insists it's not him
It's probably Ozar
 
7:51 AM
I blame @ConcernedOfTunbridgeWells
 
8:03 AM
@AaronHall Postgres, please, please!
 
@AndriyM they are both deleted now!
 
MySQL has some weird stuff that is bad for your health
2
 
Only just noticed that the author of Postgres BDR is on here dba.stackexchange.com/users/7788/craig-ringer - didn't occur to me he was the author of it. Awesome :-0
 
@JamesAnderson I'm stuck on 2008r2 for another month :)
 
8:17 AM
@ypercubeᵀᴹ Indeed. I did notice that the DBA question was gone very soon after my comment. It appears the other one followed not too long afterwards either.
 
@Philᵀᴹ Nice, just a month? Think it's going to be a while before I see the back of our 2008r2 instances.
 
Upgrade planned, thankfully
 
8:33 AM
@JamesAnderson Hm. The usual level of KB details I see.
And the usual level of download speed from the hotfix server.
 
@PaulWhite Yeah the last 3 are especially brief. I've generally pushed the idea here that we should be on the latest CUs but every time something like this happens the wry smiles and I told you sos come out in force. I'm starting to consider staying a CU behind.
 
Yeah nah that happens with SPs as well, and if everyone stayed an update back...
But OTOH yeah.
(estimated 2 hours remaining on the download)
By the time it is ready I'll be an update behind :)
 
@JamesAnderson That's our approach, install to CUlatest -1
 
@PaulWhite That's all right, you are several hours ahead of most of us anyway.
 
Twoo.
 
8:49 AM
@TomV Yeah I think I'll be doing the same.
 
@Philᵀᴹ I'm just a markov chain.
 
Postgres gets more love than any other: data.stackexchange.com/dba/query/edit/284591
 
9:16 AM
@ypercubeᵀᴹ I'm curious about the workaround in dba.stackexchange.com/a/153461/10361
Why/how does it work?
 
@Philᵀᴹ or the Postgres people are more pedantic than others
 
This is a bit of a link only answer but I think there are too many details to include in the answer dba.stackexchange.com/questions/153457/…
 
@ypercubeᵀᴹ buffled?
 
@PaulWhite isn't that a word?
Oh, I meant baffled
 
9:32 AM
Just checking. I'll edit it.
 
Question spread is quite interesting data.stackexchange.com/dba/query/edit/565081#graph
(Couldn't be arsed to do sub-tags - each question should, if we're editing correctly, have a main RDBMS tag if there is a more specific RDBMS tag)
MySQL is (not surprisingly) more popular on SO: data.stackexchange.com/stackoverflow/query/edit/565129#graph
 
@PaulWhite I liked buffled better! Mental image of a confused cow-like animal.
 
9:58 AM
@Colin'tHart It's weird. When I have time, I'll try to reproduce some plans for the various queries
It seems that the execute_test cte is not even executed/matreialized.
 
@Colin'tHart Ha ha yes the visual image was superior.
 
But still, becuse it references test, test is executed
 
Maybe that's in the Standard somewhere?
 
No, that's non-standard behaviour.
Or nowhere-in-the-standard.
It was a decision - to always materialize all CTEs and just an optimization for that exception (that CTEs not referenced are not materialized)
Craig Rigner (in the post I linked) has expressed his opinion that he doesn't like it very much (all CTEs materialized) and he would like to have a feature to make choice.
 
@ypercubeᵀᴹ Ah. I haven't found time to read that yet. I will.
Can't you open your 5 MB file in SSMS? — Andriy M 9 hours ago
@AndriyM It's 5GB not MB.
 
10:08 AM
@TomV Have you worked with Digitierre on any Dynamics projects?
 
@PaulWhite Thanks. No idea how I managed to lose track of that.
 
@AndriyM What's a factor of 1024 between friends?
 
Right :)
 
@PaulWhite 2^10
 
@JamesLupolt Nope, never heard of them, they seem more financials oriented than Dynamics from what I can find on Google
 
10:16 AM
I think they do work with Dynamics CRM, not AX
 
Ooo my download has finished!
 
@JamesLupolt It's all going to be Dynamics 365 from now on anyway
> Dynamics 365 unifies CRM and ERP capabilities into applications that work seamlessly together across sales, customer service, field service, operations, financials, marketing, and project service automation.
 
Microsoft SQL Server 2016 (RTM-CU2-OD) (KB3195813) - 13.0.2169.0 (X64)   Oct  5 2016 18:57:40   Copyright (c) Microsoft Corporation  Developer Edition (64-bit) on Windows 10 Pro 6.3 <X64> (Build 14393: )
Success.
 
CU2-OD?
 
On Demand Hotfix
2 hours ago, by James Anderson
These look nasty. Anyone on 2016 CU2? https://support.microsoft.com/en-us/kb/3195813?sd=rss&spid=1044
 
10:23 AM
Yes
Are these problems they introduced in CU2?
 
@JamesLupolt Yep. Well 8501125 at least. Not sure about the others. Probably, to justify a hotfix.
 
19
Q: How do I move SQL Server database files?

user2645263I have a database and want to move the .mdf and .ldf files to another location. But I do not want to stop the MSSQLSERVER service, and I do not want to export to another server. How can I do this?

@PaulWhite this was popped up by community - was it you in disguise?
 
@dezso No, Community owns approved suggested edits by anonymous users.
 
@PaulWhite I see
@TomV sounds legit
 
10:44 AM
@dezso All with cortana integration
FML
 
@Colin'tHart Apparently, it doesn't!
The implementation details of CTE are more complicated than I thought and don't always work as I expected. I guess that's why i can't find any mention in the documentation about this specific behaviour.
 
11:51 AM
@ypercubeᵀᴹ Would it work with LIMIT 0? Of course the result set will not be eliminated with it, only made empty, but that might still be slightly better than 1 row.
 
@AndriyM No
I tested, doesn't work
 
And you probably can't use variables outside PLpgSQL, can you?
Oh, hm, but that is PLpgSQL
Or is it
 
@AndriyM Is it? They have LANGUAGE "sql"
 
That means SQL proper, right? I guess it does.
 
It's a simple update, it doesn't need plpgsql
@AndriyM I guess not. I don't know, I get dizzy with plpgsql.
Once i had to write some functions in it, I spent a day and a half reading the docs.
I should say deezzy, to keep up with the "buffled" ;)
LANGUAGE "buffled English by a deezzy Greek"
:33158102 The whole CTE implementation and these details about what is materialized and what not, is quite complicated. Seems like if a cte is not referenced, it is not. But when it's referenced by another cte that is not referenced by the parent query, it gets ugly.
WITH test AS
    (SELECT * FROM __post_users_id_coin(100, 1)),
  execute_test AS
    (SELECT 1/0 FROM test)
SELECT
  1 ;
runs fine, no errors, no rows updated
WITH test AS
    (SELECT 1/0 FROM __post_users_id_coin(100, 1)),
  execute_test AS
    (SELECT 1 FROM test)
SELECT
  1 ;
Division by zero error
@dezso do you have an explanation for this?
 
12:34 PM
Where's the original question for this? This is all fun
 
ERP

Acronym for enterprise resource planning. A class of software designed to integrate every aspect of a company's operations, from customer service to warehouse management. Frequently, use of these products requires a business to "reengineer" its business processes, which in turn often leads to the need to placate angry customers who are receiving multiple bills for items they didn't order. This helps drive purchases of CRM software.
7
 
@ConcernedOfTunbridgeWells that was a beautiful description of an ERP
 
12:50 PM
@Lamak I can't claim it as original, though. insearchofstupidity.com/glossary.htm
 
@ConcernedOfTunbridgeWells nice
 
@ypercubeᵀᴹ no
currenlty I am not in a position to dive into it, but it definitely looks interesting
 
1:14 PM
I need to stop answering so many MySQL questions. People might get the wrong idea!
 
i am trying to use a full copy only backup of a database and create a new database using that backup on another server. i have a guy wanting to write some queries against it. the thing is, i dont want him in the production db (of course) and i dont want him in the secondary of the log shipping config that the db is in
so, if i just create a new blank db on another server and restore with this copy only full backup.. i should be good right?
i just get freaked out about things like "'Overwrite the existing database (WITH REPLACE)'. Check it.
Remember to select target files in 'Files' page."
i want to triple check i am not overwriting my original prod db that i took the backup from.
 
I find that restoring to a completely different server gives me piece of mind :-)
 
so....i shouldnt be worrying
is what youre saying
?
 
@TomV seems like this could interest you:
 
1:32 PM
@JzInqXc9Dg If you run the restore command in a separate server, then, yeah, don't worry.
 
Hey, got a quick question about sql antipatterns I was hoping someone could help me with. I thought it was called the "one table to rule them all" antipattern, but the only references I can find is it being called a flavor of the inner-platform effect. I'm referring to the antipattern where you have a table with keys and values and another to describe what kind of data the value is. Is there a more common name for this antipattern?
 
@JzInqXc9Dg In order to make sure you are not overwriting the original DB, you need to make sure you are not connected to the server hosting it (or to the server hosting the secondary). If the server instance you are restoring it to is on a different host altogether, you cannot overwrite the original (because it's highly unlikely that you'd be able to restore to a network path).
 
@Won't EAV
Entity-Attribute-Value
 
@ypercubeᵀᴹ thanks!
Oh that is totally what I'm looking for. We're having issues with some EAV tables and needing to "pivot" out certain data for reporting. I'm guessing it's very common for this kind of mess. Having the actual term will help describe the problem and identify potential solutions. Appreciate.
 
@Won't There are cases where it has its uses. See Aaron's post for example: What is so bad about EAV, anyway?
And various ways to implement it, with different levels of keeping (some) integrity constraints.
 
1:44 PM
Someone said PIVOT!!
 
hi @bluefeet
 
o/
 
what happened to the other arm?
 
\o
 
I see
how is SE treating you?
 
1:55 PM
It's good. Getting ready for the annual meetup next week.
 
sounds fun
is it fun?
 
It is fun. It's a long week though. The days are packed with meetings and then events at night
 
good luck with that
 
thanks
how are things with you?
 
it's been fine, thanks. I am starting to look for another job though, I'm starting to get bored
 
2:01 PM
Being bored at a job isn't fun. Good luck on your search.
 
yup, being bored isn't fun :-)
maybe a data scientist at SE ;-)
 
@bluefeet Are they called extended events?
3
 
@Lamak sure why not!
@AndriyM lol
 
The column is CHAR(32). How would AUTO_INCREMENT help? — ypercubeᵀᴹ 5 mins ago
2
@Phil another mysql q for you ;)
Replication, myisam, 5.1. The latest technology
 
2:17 PM
@ypercubeᵀᴹ I'll leave the ones for you ...
 
Your second example does not have a group by in the subquery - if I read right through the awesome formatting — ypercubeᵀᴹ 27 mins ago
Ha.
 
@PaulWhite I had "terrible" (and replaced with "awesome")
 
@ypercubeᵀᴹ Much funnier with "awesome".
Bit of a disaster of a question, that one.
 
At least they found a solution
 
"awesome".
 
2:32 PM
@PaulWhite O for awesome?
 
@ConcernedOfTunbridgeWells Absolutely.
 
@ConcernedOfTunbridgeWells haha yeah. Didin't realize it at first!
@PaulWhite Did you check the awesome query? It's somewhere in the revision history of the q
 
Gods and small fishes. That was nearly 25 years ago.
 
2:37 PM
@ypercubeᵀᴹ I did not get that far yet.
 
I wonder if you can still buy the t-shirts.
 
O for Awesome question
P for Paparazzi answer
 
I can't see any on google shopping or ebay.
Pity.
 
@ConcernedOfTunbridgeWells It was certainly available at Mr Vintage last year, but I can't find it now.
 
2:43 PM
@ypercubeᵀᴹ Biggest they have is XL.
Bummer.
They've got this one too.
And this one ...
 
So many fine T-shirts gone from Mr Vintage. Sad. Plenty of stupid laser-kiwi flag shirts.
 
2:58 PM
I am actually (marginally) old enough to have seen the 1974 commonwealth games in person (which I did), but I'm not sure I really want a NZZN t-shirt. Sadly the earthquake trashed QE2 park.
 
@ypercubeᵀᴹ Ha ha ha I see what you did there. Is that an answer?
 
only as good as the question ;)
 
Tada!
 
Nearly hometime, and nearly Friday. A win-win situation!
 
Well, there's a spot of @Philᵀᴹosophy for you.
 
3:06 PM
@Philᵀᴹ Similar answers on SO.
Well there were a few seconds ago :)
 
heh
Looks like a useful product, though. hadn't seen it before
 
Golly I used to live just a few blocks from Mr. Vintage.
 
3:29 PM
@ConcernedOfTunbridgeWells You could have saved $5 on delivery!
 
3:59 PM
My daughter seems to be "in the zone". She has been drawing since morning.
 
4:10 PM
What would be the best way to deal with this one?
0
Q: MySQL can't import a custom library for udf

Julien FertéI am working on Linux Mint 17 Qiana with MySQL Ver 14.14 Distrib 5.5.53, for debian-linux-gnu (x86_64). Following the instructions found here: http://dev.mysql.com/doc/refman/5.7/en/adding-udf.html and subsequent pages, I have created a library file for my own user-defined function. But MySQL ...

Phil's suggestion and OP's response seem to suggest to me the problem wasn't a database one, but maybe I'm missing something.
If it wasn't, the question might need to be migrated to SO, but is it also too trivial, perhaps? I've no idea myself.
 
 
1 hour later…
5:17 PM
@PaulWhite Did you find any new bugs added in KB3195813 yet?
 
 
1 hour later…
6:33 PM
@AndriyM Looks like a db issue to me. Not exactly a common one but still.
 
6:43 PM
Is this on topic? (powershell)
0
Q: Powershell Function Restrict Data Type

MrTCSTrying to create a function like the following Function Get-SqlErrorLogPrevious24 { [CmdletBinding()] Param ([Parameter(Mandatory=$True,Position=1)][Microsoft.SqlServer.Management.Smo.Server]$Server ) ($Server.ReadErrorLog()).where{$_.logdate -ge ((Get-Date).AddHours(-24))} } What I've noti...

 
No, it isn't
While I would like to help, I think we need to be explicit in what we offer to help on. Pretty sure I know the answer to this one.
 
@jcolebrand I wasn't sure as I have no idea what SMOs are.
You can answer and we can migrate to SO ;)
 
@ypercubeᵀᴹ All right. It was the nature of the resolution that principally made me underestimate the question's relevance here.
 
@AndriyM I'm not 100% on that one, to be honest.
It's an issue in compiling C, so it wouldn't be off topic at SO I think.
 
@ypercubeᵀᴹ I'm on both sites ;-)
SMO: Server Management Objects
That's the only use case I know of, especially in that namespace
 
6:49 PM
Yeah, I should have read the q properly
> ... a server SMO object ...
 
I also write a lot of powershell so ...
NBD to me
 
The question is unclear, but using Power Shell to administer SQL Server is certainly topical. Also beware people blocked from asking on SO asking on other sites.
 
This is more about why is the parameter allowed to be a string
 
(on phone)
 
Instead of forcing it to be a SMO object
What I've noticed though is that I can pass in just a string and not a Server object. Is there a way to enforce that only a server SMO object can be passed in?
 
6:52 PM
Yeah the literal current question is. Unclear what the actual real question is
 
I could be reading that wrong, but that sounds like purely a powershell question
Oh, yeah, that I totally agree with Paul
Time to go give a training ...
 
Have fun!
 
yeah!!
 
@jcolebrand is Powershell object oriented?
 
@ypercubeᵀᴹ It can be, but it's not required to be. Lots of loose typing stuff available.
He just wants to enforce strong typing in this case
 
7:01 PM
thnx
 

« first day (2123 days earlier)      last day (2732 days later) »