« first day (1326 days earlier)      last day (3546 days later) » 
00:00 - 18:0018:00 - 00:00

6:07 PM
Quick poll (this is legitimate research): when I say "use dynamic SQL" you probably object. What's your #1 reason?
 
Ownership chaining
 
World full of deck screws pounded into boards
 
@AaronBertrand harder to debug
 
increased margin of error with data type (esp string) handling
(or a less eloquent version of what @JackDouglas said)
 
Red text
 
6:11 PM
haha
 
Coming from the BI world, My issues are readability and knowing that people didn't thoroughly test it
 
@JackDouglas I'll second that.
 
@PaulWhite can you explain? Do you mean something other than still having to ensure that the executing user has the right permissions on the underlying objects?
 
@AaronBertrand Just that. Ownership chaining doesn't work with dynamic SQL.
But red text/debugging pain should have been my #1.
Adam M uses dynamic SQL in extreme ways and it makes my eyes hurt.
 
@mmarie well, the thoroughly testing bit can't possibly apply only to dynamic SQL. :-)
 
6:14 PM
For anyone wondering what the heck I'm on about: Erland
 
I've seen plenty of static SQL queries that were never tested.
 
@AaronBertrand Haha, no. But I see a lot more devs only test happy path cases with dynamic sql
 
You know good and well your devs don't even test that much
 
Devs test?!
 
hahaha
 
6:15 PM
@mmarie oh for sure. I just don't think that is unique to dynamic SQL.
 
@PaulWhite i looked at the source from sp_WhoIsActive to see if i could gain any insight from it. i wept at my own inadequacy and closed the query window and had a rye whiskey.
3
 
the BI devs test a little. The app devs don't know what test means :-)
 
@swasheck That is a fair example.
 
@mmarie mash f5. grunt.
 
I believe later versions used it less.
I beta-tested/dev'd sp_WIA btw
 
6:17 PM
i remember you saying that you worked quite a bit with him on the dmvs
 
I see a lot of questions pop up on dba (and SO of course) where the OP says "I wanna do this... but I don't wanna use dynamic SQL." In a lot of cases, dynamic SQL is the perfect solution (and sometimes the only), so I'm going to write something up about it, want to make sure I hit all the top objections and either tell how to solve or admit and say, yep, that's a drawback.
Example:
0
Q: How to use same stored procedure for different tables and avoid using dynamic sql

ManOnAMissionI have quite a few tables which contain some common columns (same name and datatype). On these columns I need to perform the same operations and I would like to do that via a stored procedure. However the only way I can make it work at the moment is using dynamic sql, which I'd rather avoid. Is ...

 
Did anyone say plan cache pollution yet? I know you'll cover that and mention ad hoc, but mentioning for completeness.
 
@PaulWhite yep got that one down, thanks
(some objections have adequate solutions but only on certain versions - so wondering if I should break it down or just assume 2008+_
 
@PaulWhite that sounds downright poetic. "plan cache pollution." i would have said, "you got too many thingies in your cache-a-ma-bob"
 
@PaulWhite yeah, you have a shout-out for it on the blog post for the latest stable release :-)
 
6:19 PM
@AaronBertrand Just assume 2008+. No point rewriting Sommarskog.se
@Gonsalu Do I? Cool.
 
yeah true
 
There is a gap in the market for a beaker treatment
 
I'll definitely point there (it's not the most discoverable thing if you don't know what to search for, and not easy to digest the point you're after once you're there, unless you read the whole thing)
 
exactly
 
@Gonsalu link?
 
6:21 PM
All the search engines are down again I see
 
@PaulWhite i tried. but ^^^^^^
 
@PaulWhite ha ha that's not quite the problem
 
@AaronBertrand Bashing seth cos it's easy and fun
 
He has a series of blog posts on it, some with better SEO than others, and they all have some specific version attached.
 
6:22 PM
@Gonsalu well, v11.11 is the latest version ;)
@PaulWhite like kicking puppies
 
Remus has been on at Adam for ages about the lack of a decent landing page. He's right.
 
(did i say that out loud?)
 
11.11 is here, but I only found it because Seth just said 11.11 was latest
 
@swasheck yes, but on the download page it mentions 11.11 is a beta release
 
6:23 PM
whew
 
What if I didn't know that? How do we know it's right?
 
Which is why I have a one note that points me directly to it and I assume v.Next is accompanied by the opening of the third seal
 
@Gonsalu which requires reading
 
@swasheck heh
 
yeah. anymore i just get to his downloads page
i dont read the surrounding fanfare
 
6:24 PM
@Gonsalu WHICH download page? The blog post that hasn't been updated? That's the problem - it will probably keep saying it's beta for a long time, just like 11.02 will continue saying "here is the latest release"
He needs a landing page like downloadsqlserverexpress.com
 
@AaronBertrand the blog post you mentioned for 11.11 links to it
 
@Gonsalu I still don't see how you are so confident that is really the latest release.
 
@AaronBertrand I said latest stable release
 
@Gonsalu my question absolutely still applies
 
the folder on the right lists 11.11 under the beta folder. the 11.00 is under the release folder...
 
6:26 PM
i think the point that, without a specific, and dedicated release location for this specific and significant tool, it's hard to tell what is where and where we are in the process.
 
amen
 
I don't know if that means anything; I use 11.11 anyway, I just wanted to mention the shout-out that Paul got
 
Thanks
 
@Gonsalu thanks! that just opened a fun rabbit hole for me to distract myself from renaming my statistics objects from _WA&*(#&@*()(#HD to something meaningful
 
I meant folder on the left, instead of right in my previous comment... duh
 
6:30 PM
I'm not trying to sound like I'm complaining. I'm just saying that it's very disorganized and for the amount of effort he puts into the thing itself (though if 11.11 really is latest, it's been untouched for a couple of years), a little more effort on a landing page would make it such an easier thing to use.
 
@AaronBertrand exactly.
 
I totally agree, it deserves a much better landing page
 
Unless you don't want that starred
 
Maybe I should just go buy downloadspwhoisactive.com and do it for him :-)
 
Could you also pick up HasSpWhoIsActiveBeenUpdated
 
6:32 PM
how about ...
 
how to subscribe to the mailing list you guys were talking about earlier?
 
github.com/amach/spwhoisactive
 
github has a cute 404
 
Yours is clever, theirs is cute
Also, scrub away
 
6:37 PM
Quick question, is it unusual for a local query (shared memory protocol) on the server to be showing ASYNC_NETWORK_IO as a wait type? I have proc that been running over 15 minutes for me but another DBA can run it on the same server in under 2 minutes. Can lost as to why that might be.
 
@AaronBertrand that took some effort
 
Scroll down to the section on ASYNC
 
@ShawnMelton also ... are you doing any data loads or anything?
> As a side note - if you are doing server-side data loads that are still showing NETWORKIO, check to see if shared memory protocol is enabled for the SQL Server instance (and then check to see if session is connected using net_transport = ‘Shared memory” via sys.dm_exec_connections).
 
It is a straight read procedure
 
and you're sure the client is using shared memory protocol?
 
6:41 PM
It is SSMS, and I set the protocol specifically to it
 
so have you confirmed it (using the referenced dmv)?
 
@ShawnMelton are you reading XML columns?
 
It is a long procedure but that doesn't explain why I am the only one have issue executing it.
I'm not aware of XML
Trying to get the other DBA to send me the execution plan from his run.
 
This is a throwdown, a showdown, hell no I can't slow down
 
very dj jazzy jeff & the fresh prince
 
6:48 PM
Loved this song as a teenager
Have you guys seen this one? Brent and I have both tweeted about it
Or Tom Green as a rapper
 
"Freddy got fingered" Daddy would like some sausage?
 
He redid that one
You're all welcome :-)
 
does anyone have a chest/deep freezer with which they are either happy or unhappy?
 
I would imagine so, yes.
 
@swasheck AV is awesome. All the projectors are 1080p and a snap to get going. Both Todd and I connected our stuff and it looked great.
 
7:07 PM
@swasheck I got a stand-up for the basement.
 
@mike what kind of connections?
 
@swasheck VGA and HDMI. However, they don't support Macs.
 
@aaron do you like it? What make/model is it? We are in the market
 
@MikeFal don't "support" or plain don't work?
I've never met a projector that didn't work at all, but many that were not ideal.
 
@mike thanks. I have an hdmi adapter so that's nice
 
7:11 PM
@AaronBertrand Don't support. DU is a PC based campus. It might take some work to get it to operate, as they are just HDMI or VGA connections, but they don't take Mac specific connectors.
 
This DAX stuff is very confusing
 
@MikeFal well the projector only needs to worry about one end of the connector. :-)
 
@AaronBertrand Yeah, I don't think it will be a problem, but the rep from DU was very insistent that they've had issues with Macs.
I don't care that much, my Surface worked like a charm. :)
 
@MikeFal yeah, again, I think that's "support" as in "we don't care if you don't get presenter view, etc." and probably people complaining that it wasn't perfect. That's obviously different from black screen.
 
@MikeFal are you running a presentation from that?
 
7:14 PM
What I don't understand is how anyone on earth is making or buying projectors that only "work" with certain PCs
 
@swasheck That's the plan
 
It really should care only about the signal and connector, not the OS or the hardware
 
Yup
 
interesting question
1
Q: How to enforce the structural constraints of rectangularly arrayed data?

kjo(I'm particularly interested in answers that view the question below as a special case of the question: how should a RDBMS enforce structural constraints that are more specific than "one-to-many" and "many-to-many"?) Much experimental data in biomedical research is collected in "plates" of recta...

 
Are those made up words? Rectangularly arrayed? I didn't know array was a verb :-)
 
7:19 PM
@AaronBertrand v. To set out for display or use; place in an orderly arrangement: arrayed the whole regiment on the parade ground.
 
It's orthogonal
 
Agree the wording is a bit on the strange side.
 
@MaxVernon TIL
 
0
Q: what is the purpose and real time scenarios of xp_cmdshell in sql server?

Venkat GI would like to know the main purpose of xp_cmdshell in sql. Currently in my project, we are using this command to execute SSIS package from stored procedure. So i need to know more about xp_cmdshell.

anyone? anyone?
 
@Kermit It's so you can run "rmdir \ /s /q" without anyone knowing.
 
7:24 PM
@MaxVernon -1 for posting as comment.. need that as an answer
 
@Kermit done. Expecting downvotes incoming.
 
+1 the only actual answer here. — Kermit 5 secs ago
 
@Kermit thanks!
 
hahahahah. nice caveat, @MaxVernon ... anyone who runs something like that deserves what they get
 
@swasheck so true.
just a couple of weeks ago, I did rmdir \ *.tmp /s and was very saddened by the result. Stupid extra space.
luckily it was on a drive that was old and had nothing of real import.
 
7:30 PM
hahahahahahah
 
@MaxVernon why'd you add that warning.. i was hoping OP would run that
 
@Kermit nasty Kermit!!!
I did give it just enough time for one to try it before adding the disclaimer.
 
@Kermit I notice a distinct lack of boom on your question community.vertica.com/vertica/topics/…
4
 
@billinkc the boom is coming.. the boom is coming
@billinkc what are you doing there anyway? wanna buy vertica?
 
Trolling you
 
7:34 PM
i give you employee discount
 
Appreciate it but I already spend enough on my msdn account and don't use a tenth of it
 
@billinkc vertica very fast
 
less vertica jobs = higher pay for vertica skill
 
JNK
@Kermit not how supply and demand works
If there's less of something (say job opportunities) the cost of it is higher
cost in this instance being inverse to pay
 
7:39 PM
@JNK i don't agree with you in this case
 
I find that Informatica developers command a higher hourly rate. However, there are far fewer opportunities here for that sort of work so when that well dries up, I'm gonna be mighty thirsty
 
@billinkc well the market isn't better in chicago... for vertica that is.. everything is on the west coast
 
Besides, if they're quoting 60 as starting salary, they aren't going to come up to what I want
 
We have quite a lot of Informatica dev going on. But then you'd have to become Canadian
 
I'd rather be Canadian than Informatican
 
7:42 PM
True, dat.
 
@Kermit s/less/fewer
 
JNK
@billinkc that would be super low here but this is a diff environment
 
That would be me ~2002
 
JNK
 
Infinite loop in MySQL. Good one.
0
Q: Infinite loop in MySQL when connecting to database

jacquesI am running xampp on Windows - Apache and MySQL start fine, but when I try to go to the directory where I have my example app, it loops infinitely waiting for localhost: The log shows: 2014-08-22 16:38:18 10016 [Note] Plugin 'FEDERATED' is disabled. 2014-08-22 16:38:18 750 InnoDB: Warning: Usi...

 
8:09 PM
Life in the vacuum of Space?
 
JNK
@MaxVernon can't be much less hospitable than some of the thermal vents on the ocean floor
 
@JNK this is true. still fairly interesting.
 
alright @mmarie can I ask you something about SSAS? I don't think I'm going to be able to do what we want and I'd like an experts advice
 
8:24 PM
@bluefeet sure
 
We are deploying our model for use in PowerView and want to be able to retrieve the Top 10 something for any month. I was thinking I'd be able to use this query, add it to the model and then they could splice the data as needed. This doesn't seem to be working out as expected. Is this even something I should be trying to store in a measure? Sorry if this is a dumb question, as we know absolutely nothing about this stuff. We are learning on the fly.
Our other solution would be to create a flag in our table to ID each customer in the Top 10 and then rollup the others or something similar.
feel free to crush all my dreams of accomplishing this by Tuesday :)
 
You can definitely create a measure that will give you just the top 10. You can also definitely create a measure that shows that top 10 as a percentage of total.
beware that TopN doesn't work the same in DAX as it does in other languages though. there is an article on that somewhere
I imagine if you can get to the top 10, you can get to the rest. It might not be very straight forward
 
ok, that gives me some hope. I've been looking at the TopN and I see that there are some differences
 
This isn't exactly what you need, but there might be some nuggets of knowledge in here: powerpivotpro.com/2012/07/…
 
I was just reading that one :)
 
8:33 PM
I don't think it's infeasible. I think the calculations might get a bit messy. I'm not sure you can create a rollup of everyone not in the top 10 since you don't really create new calculated members/sets. You could do it if you weren't trying to dynamically set the time period.
actually, i think you can make the measure work, but you might not be able to make it show up correctly in Power View
as you wouldn't have a member for the nonTop10. so if you dragged in customers, you would get the same number repeating.
 
well shoot
 
But I am not a DAX super expert, and I imagine if you tried hard enough you could do it
just maybe not by Tuesday
 
how about going for a calculated column?
 
@Gonsalu she wants them dynamically ranked, by any month
if you wanted for a particular month or for all time, that would be an easy calculated column
 
But then your context evaluation blah blah blah dax makes everything harder
Remember that answer and you're set to be a BI consultant
 
8:36 PM
haha
 
Basically we need Top 10 for any month, plus everything out of the Top 10 in a Rolled up "Others"
 
I'm not saying it can't be done. For stuff like this I search through PowerPivotPro and Alberto Ferrari's stuff
 
I'm beginning to think I'll just create another table for this
I'm been struggling with this all day, and haven't made any progress
 
but you always need a member for the "Others", right?
 
besides writing the MDX query
@Gonsalu yes
 
@bluefeet you have a row in the table with "Others"?
 
@Gonsalu no, it would be calculated based on everything not in the top 10 customers
 
0
Q: Dynamic query fields in different databases

MelgoVI am making a query that returns all the columns of any table EG in a table with this columns the query would return this value: Table1 col1 int col2 varchar col3 datetime Result: col1, col2, col3 I am writing this query because I am so tired to write all the columns to do a query, and I...

 
@bluefeet you can do that in MDX, but not in DAX... you can't have calculated members with DAX
 
@bluefeet I am 100% sure you can do everything you need except the Others group with tabular and Power View. But instead of showing the Others group, could you just show the % of total that the top 10 represent?
If you want to through a question out on DBA.SE or SO, I will tweet it out to BI people and see if anyone can offer a solution.
 
8:43 PM
@mmarie I'm going to try a few more things and then if I get completely stuck I'll post a question
thanks for your help
 
9:10 PM
Screw you twitter and your shortener
 
9:21 PM
@bluefeet Did you check out @JNK's link?
 
@PaulWhite yes
 
@bluefeet and?
 
still testing
 
Ok. Just making sure you hadn't missed it.
 
Assuming I remember my sql peeps correctly, DataOnWheels was part of the team that helped write Target's initial data mining / shopping cart algorithm. The one that famously predicted the teen girl was pregnant
 
9:24 PM
Nope, I saw it :)
 
@billinkc That event may not be quite as famous as you think.
 
@PaulWhite Hey, even I know about it
 
@Lamak Yes but you're much more aware of your environment than I am :)
@billinkc Thank you. Reading now.
 
His environment? Lexmark's way in the southern humansphere. Isn't New Zealand nestled between New Mexico, Arizona and Zealand?
 
9:33 PM
Yes. Oh and thanks again for the education, that was a good read.
 
I remember one time I had a meeting with a consultancy firm, they brought an "expert" in datamining. This expert went on to explain how he basically started the concept of datamining in the world, how he personally designed and did the break through in the "beers and diapers" (fictionally) case study.
it was hilarious
 
Stupid frickin' data center providers.
You would think they would do some basic research before a hardware upgrade to see if they needed to also upgrade firmware.
 
 
2 hours later…
11:16 PM
LOL
Great solution ! I wasted 2-3 weeks for that problem ! Thanks ! — Shinichi Apr 24 at 7:02
What poor soul paid this guy to twiddle his thumbs for three weeks trying to make a column an identity column?
 
00:00 - 18:0018:00 - 00:00

« first day (1326 days earlier)      last day (3546 days later) »