« first day (1448 days earlier)      last day (3429 days later) » 

11:48 AM
Ooo late entry, dark horse coming up on the inside rails...
1
A: Retrieving n rows per group

Rob FarleyLet's start with the basic scenario. If I want to get some number of rows out of a table, I have two main options: ranking functions; or TOP. First, let's consider the whole set from Production.TransactionHistory for a particular ProductID: SELECT h.TransactionID, h.ProductID, h.TransactionDat...

 
 
3 hours later…
2:53 PM
crickets
 
3:15 PM
@Lamak Hola
I guess everyone is on vacation this week.
 
guess so
and hello
 
I hate hats
 
haters gonna hate
 
true dat
 
3:45 PM
nice UI!!!
 
nothing says "successful" as getting a bright red message
 
no kidding
that UI puts the suck in success
 
heh
 
4:45 PM
how do I drop all table? Just drop the DB
-2
A: How to drop all tables from database with one SQL query?

overloadingYou can try dropping the db: DROP DATABASE database_name CREATE DATABASE database_name

 
5:00 PM
awesome. now please address the constraint/FK issue
 
@bluefeet The nuclear option is the only way to be sure!
 
@TimStone obviously
 
the obvious mistake in that answer is that they left out the line:

`ALTER DATABASE database_name SET SINGLE_USER WITH ROLLBACK IMMEDIATE;`
 
5:16 PM
So, we fly to the US tomorrow, any tips?
 
@Lamak What city are you going to?
 
@Lamak bring a pen on the plane so you can fill out the declaration card before you land
 
new york for christmas and miami for new year's
 
(It sucks asking nearby passengers for a pen when they're done, and the FAs won't have one.)
 
@AaronBertrand ah, right, good one
 
5:18 PM
@Lamak hide stuff in the shoes
 
@swasheck like.....food?
 
like water. and sulfur
 
Don't bring food
 
@swasheck we want @Lamak to be safe
 
Don't talk about bombs or hijacking or guns
 
5:19 PM
oh. right.
 
@AaronBertrand bummer, I had this whole joke planned
 
tell us how it goes
 
@AaronBertrand my wife wants to bring some cofee and I don't know, things like that....is it allowed?. I know that not food, but, sealed stuff like that?
 
Just pay for a checked bag, don't try to jam everything into a carry-on. The money you save isn't worth the hassle. If you don't have status you'll likely be boarding later meaning a big carry-on might not fit.
@Lamak sealed coffee beans should be ok. Put it in checked.
 
@AaronBertrand ok, thanks
 
5:21 PM
Definitely not fruits and vegetables
 
@AaronBertrand that's a given
 
You'd be amazed how many people try or forget
You won't go to jail or anything but delays are a pain in the ass
 
@AaronBertrand yeah, I've seen this in other trips (not the US, but still)
Also, I'm kind of nervous, this being our first trip over there
 
Don't wear clothes that might even have the remote chance of smelling like weed or anything stronger.
 
or gasoline
 
5:23 PM
@AaronBertrand Ah, lucky we don't smoke at all, and I only bathe in gasoline on fridays
 
I got strip searched once solely because I left a party and went straight to the airport. I was listed as a "potential smuggler" for about a year
 
oh, jeez
 
@AaronBertrand facebook pics or it didnt happen
 
Well, I go to work tomorrow, then home, then the airport, hopefully no partying
 
The dog made a beeline for me and I made a joke with the customs guy like "he must smell my Advil" - they don't like jokes
 
5:24 PM
And also I don't have a visa, so it's gonna be a test of the visa waiver program for me
 
Don't pet the dog either if it comes near you
 
@AaronBertrand so I've read
 
How long will you be in NYC? Which days?
 
@AaronBertrand from the 24th till 28th
then miami till january 2nd
 
Nice. You fly into JFK?
Staying in Manhattan?
 
5:26 PM
@AaronBertrand from santiago to dallas to new york IIRC. And yup, we'll be staying in manhattan
 
Long expensive cab ride, if you can try to workout the right train to take to get you to your hotel. Cab is easier but probably $50-60. (I forget if they have flat rate, depends on airport. At this time of year cabs will be slammed too.)
Subways in NYC are really good.
 
@AaronBertrand I believe it is flat rate to Manhattan
 
@bluefeet from all three airports? Last I did it was from Newark, and it was metered, but that was a few years ago now. Usually drive or train to NYC.
 
@AaronBertrand not sure about Newark. But I know for sure it is from JFK and I'd guess from Laguardia as well
 
@bluefeet would be smart for NYC to enforce that, so you're probably right. Still pretty pricey though I think.
 
5:30 PM
@AaronBertrand ok, thanks for the info
 
@AaronBertrand I think the last time I did it was about $50 flat rate from JFK to the city.
 
6:08 PM
the fact that this syntax might work in mysql is just sad
0
Q: So many ANDs mysql

TrevorI need a "super ultra multiple tables-fields select!" and i do this last day and works pretty fine for me, (in localhost 0.002sec) but . . . exist a better way to do this? i think theres so many ANDs SELECT name1.* ,name2.field1 ...

 
Oh my word
 
6:19 PM
@bluefeet is this a joke?
 
@Zane StackOverflow is no joke.
 
> StackOverflow is a joke.
(FTFY)
 
@MikeFal you killed the joke
3
Anyone else here work from home?
 
6:34 PM
I am at the moment.
 
heh, well i meant normally work from home
 
Oh. No I would hate that.
 
I mostly like it.
 
@mmarie I wish
 
I'm learning things about working from home as I get further into this job. Some things are just the random things i have to do as a virtual employee that is far away from our office or other employees. Like I had to take my I-9 form to UPS to get it verified since the lawyers say it must be done by an actual person and not over Lync.
This week
The thing appears to be that I need to have a chat with my parents
They think since I'm at home they can call me and talk to me when I'm trying to work. Because they are retired and bored. I can't ignore them because my dad has health problems and I want to answer the phone in an emergency. But I am not going to sit on the phone for 30 mins with my mom while she tells me what TV show she watched. I'm going to have to set work hours with them where they can expect me to be busy.
 
6:41 PM
@mmarie i'm permanent wfh
@mmarie i also had to go in person to an office to do that
@mmarie that's a pretty reasonable request
 
@Kermit Have you read any good blogs with tips for people who work from home? Or is there something you've figured out that you now can't live without?
 
@mmarie i don't read any blogs about wfh. i don't have constant work being a consultant
 
ok, just curious.
 
most of the time i just need to attend meetings and reply to e-mails at my leisure
 
6:47 PM
@AaronBertrand Thanks!
 
DoDevIoCtlOut() DeviceIoControl() : Operating system error 234(More data is available.) encountered.
thanks guys, thanks
 
@swasheck Hi
 
hi
 
@swasheck Nice error message
You guys are running SQLSentry with a fairly large number of instances, right?
For some value of 'large'
 
where large=25
 
6:52 PM
We're within an order of magnitude of that many
@swasheck Are you seeing any annoying Windows networking errors related to failed WMI connections or similar?
 
We have customers with 300+ monitored servers. WMI-related errors are unlikely to be correlated to deployment size but rather configuration. Did we help with your deployment? To what extent?
We definitely use WMI for some of our metrics either because (a) it has the lowest overhead among the methods possible or (b) it's the only method possible.
 
@AaronBertrand To some extent, but I wasn't around then. Scott and the sales VP guy (Nick?) came by for a day a months ago to look at it.
 
And they didn't solve the issue?
Or this is a new issue?
 
@AaronBertrand I don't think it was a problem then. They were quite helpful about other stuff, though.
@AaronBertrand It's a new issue, we get lots of failed WMI connections that only resolve with a reboot. I really doubt it's a problem with SQLSentry, more likely something in Windows.
 
I'm sure support would help look at it. While the problem is unlikely to be our fault, we aren't helping, because we are using those connections.
 
6:59 PM
I can actually see Windows complaining about the connections failing if I view a trace in Network Monitor, but I can't work out why they're failing.
 
Is it only on certain servers? Any information missing from the dashboard on those servers?
Two things I could think of are (a) WMI connections always fail on certain servers because of config, permissions, or firewall or (b) intermittent failures due to bottlenecks
 
@AaronBertrand Yep, I might send them a message once our commercial people pay our support bill. : )
 
Oh, yeah, being up on maintenance is a prerequisite. :-)
 
@AaronBertrand I'm pretty sure it's b) -- it fails across a seemingly random but large subset of server. And yep, we get missing metrics in the dashboard. I think (but could be wrong) that usually only the stuff collected via WMI is missing.
Usually the WMI connections are only failing part of the time
 
@James sorry. got pulled away. i, like @AaronBertrand dont believe this is an issue of scale. did you recently add new instances? did you change anything about the monitoring services? what about a DC change, of some sort?
 
7:04 PM
Anyhow, was mostly interested in whether @swasheck or anyone else here was running into the admittedly vague issue I described for now. I wondered if support.microsoft.com/kb/2897602/en-gb might be related, but the servers are running a newer verison of tcpip.sys.
It's good to know that some people are monitoring more servers than we are and not seeing this.
 
for me, all of my wmi errors have been perms from the monitoring service to the monitored instance
 
We have many customers in the 100-200+ range as well. This is not a common problem but it's usually either something simple or completely flaky network.
 
crapped out kerb creds
thanks Robert!!! you're so helpful!!!
@swasheck Did you look in the system event log? #sqlhelp
 
The simple is usually permissions or port, but those issues would be pervasive, not intermittent
 
FIRE
 
7:08 PM
@AaronBertrand good thing we are all room owners and can see it still
 
@swasheck well, did you?, uh???
 
that's where i found it, bobbie. HHHHHHHHHUUUUUUUURRRRRRRRRRRRRRRRRRR
 
It could still be permissions if your DC is unreliable, especially if you use Kerberos
 
@AaronBertrand that's what i'm thinking too. esp if it's solved with a bounce
 
Yeah it is weird that a reboot fixes it
That's kind of exactly the opposite of how networking is supposed to work.
 
7:12 PM
but kerb is sensitive to that sort of thing, right?
 
The weirder part (to me) is that the errors start happening on all 3 of the SQLSentry app servers at the same time, and only go away with a reboot.
 
Can you send me a sample of the exact error message? I can cross-reference support incidents in the past to narrow down things for you to check. Networking/Auth is not my area but we've obviously dealt with the full gamut as a company.
@swasheck kerb is more sensitive to all kinds of things. Don't sneeze within 20 yards of the server, that sort of thing.
 
bahahahahaha.
 
And definitely do not taunt happy fun kerberos
 
@AaronBertrand Sure. I'm actually just looking at the errors that pop up in the SQLSentry client. Are these persisted to a table or file somewhere?
 
7:19 PM
DROP DATABASE SQLSentry should get you what you need. GIVE IT A TRY!
make sure you back it up first ... i've gotten best performance with BACKUP DATABASE SQLSentry to DISK=N'NUL'
 
@swasheck That's actually a pretty good quick way to stress test a vendor's array
BACKUP MyBigDB TO DISK = 'NUL' WITH BUFFERCOUNT=500, MAXTRANSFERSIZE=4194304
 
yeah
seems i've exhausted robert's body of snark
 
@James I mean the ones you find in Windows - they will likely have better info.
 
@AaronBertrand Sure. I'll send you a screenshot. Thanks for offering to check.
A screenshot and the text of the errors, I mean.
 
@James you can't ctrl-f a screenshot
 
7:38 PM
You can e-mail me at abertrand @ sqlsentry.com
 
8:29 PM
eh?
> The trace flag –T1118 makes SQL Server allocate complete extents to each database object,
affecting all the databases in the instance. This trace flag will relieve the SGAM contention. The Trace
Flag can be set using the SQL Server Configuration Manager, as shown below.
This Trace Flag should be set only if tempdb is heavily used. SQL server must be restarted for the
flag to take effect, and the setting is more effective for TPC-H than for TPC-C. Also, the user
databases must be rebuilt.
 
8:40 PM
@swasheck Seems OK to me except the "This Trace Flag should be set only if tempdb is heavily used" part. No idea about TPC-C vs TPC-H, but happy to take someone's word for it
 
i'd never heard that you need to rebuild user databases
 
I guess the part about "must be rebuilt" is unclear
I think it means that they must be rebuilt if you want to get rid of the mixed extents
 
rebuild meaning "restore from backup?"
 
I thik like
rebuild index
But it's not written clearly I guess... someone might think anything
 
well that's a different thing ...
frickin fusion documentation
 
 
1 hour later…
9:48 PM
@bluefeet The question is a joke. But isn't the syntax valid ANSI SQL?
 
@ypercube the LEFT JOIN with all those tables just joined via a comma - maybe, but it's awful
 
it is
 
11:24 PM
f*** it I will redesign the hole database — user55477 11 hours ago
^LOL probably best
 

« first day (1448 days earlier)      last day (3429 days later) »