« first day (1365 days earlier)      last day (3489 days later) » 

12:00 AM
@AaronBertrand Yes, noticeable increase in the dross. It was ~2.5 years for me to hit 1000 close votes. The next 500 came in 5 months, during which I was much less active.
I think we're just about keeping on top of it though
 
 
9 hours later…
8:59 AM
Hi
how can i find a table name from a database (having some constraints regarding viewing tables directly under objects)
 
9:33 AM
@bluefeet: Why are you using both COALESCE() and ISNULL() and not just one of them?
1
A: How to create a view joining 2 tables?

bluefeetTo get the result that you want, it appears that you'll need to use a FULL JOIN. A FULL JOIN will join your 2 tables on the bln column but it will return data from both tables, even if the value of the column doesn't appear in both tables. The basic syntax of the query will be: select bln = ...

 
@ypercube Habit, depending on what I'm doing. :/
Added a note that you can use either.
I'm pretty sure that question will be closed. I tried to clean it up to make ti an understandable post.
The initial version was bad.
 
9:55 AM
@bluefeet Looks pretty reasonable now. You did a good job there. Voted to keep open, for what it's worth.
 
@PaulWhite I was tempted to close at first, but I at least understood what they asked. So I figured I'd at least try to improve it. :)
 
 
1 hour later…
11:26 AM
0
Q: How to view a table name when current privileges deny viewing them

user285oo6How can i access / view the table names present in a database.Currently I am restricted on privileges(Deny permissions on View Definition ) to view the tables. I have to refer to a table containing the column but unable to do without knowing the table name. (PLS:00201 'Identifier must be decl...

Would it be possible if the table name changed for the user as 'in_data' then can i reference it as
gps_timestamp in_data_from_gps_timestamp%type;
 
12:10 PM
boom
0
A: How to build Vertica slave?

KermitThere is no concept of a Master/Slave in Vertica. It seems that you are after a DR solution which would give you a standby instance if your primary goes down. The standard practice with Vertica is to use a dual load solution which streams data into your primary and DR instances. The option you'...

 
JNK
12:47 PM
morning all
 
morning
 
1:00 PM
boom
 
JNK
1:28 PM
holy cow I am hating Windows 8
 
wait for Windows 9
 
JNK
my work computer got updated against my wishes
this ui is turrible
 
@JNK i don't mind it.
 
JNK
I guess my issue is I REALLY hate having to keep thinking about how to do basic things
 
@JNK i know what you mean.. that's how i felt when i started using linux
 
JNK
1:30 PM
It removes the utility of a new UI if I have to stop for 10 seconds constantly to figure out how to get to whatever
And they went way too far in making it look "clean"
i.e. it's really OK to have a close button on a full-screen window that pops up
 
Win 8 was just a reason for me to reacquaint myself with keystrokes
 
Try using an RDP session inside a VM. Every time you move your mouse, one of the operating systems decides you must have been trying to do something.
 
Mostly Windows D but others were helpful
 
JNK
@AaronBertrand yeah gestures are frigging awful
 
As long as you aren't using the godawful, aborted spawn that is the Hyper-V manager. Yeesh, what a flaming pile of feces that is
 
JNK
1:33 PM
I put my mouse in a corner so I can read and a new menu pops up
 
someone really doesn't like the answers here
 
rjv
hi, I have a sql server database in my server and i need its copy of it in my local machine, updated daily. How can I do it in a bandwidth efficient way?
i mean, i need incremental backups
 
JNK
@bluefeet I'm guessing OP
 
Are you taking incremental backups?
 
rjv
I use sql server 2008
 
1:37 PM
@JNK can 35 rep down-vote?
 
rjv
you mean diff backups?
*differential
 
@AaronBertrand nope you need 125
 
@rjv Yes, incremental backups are also called differential backups, assuming your recovery model supports it
 
rjv
that appends the changes to an existing backup right?
 
JNK
thought it was lower if it was your own post
 
rjv
1:39 PM
sorry?
 
@rjv Have you glanced through the documentation? msdn.microsoft.com/en-us/library/ms186865.aspx
 
rjv
i have done all that
 
@rjv differential backups will only work if you haven't made any changes at all to the local copy of the database.
 
@bluefeet can you destroy this homework question
-4
Q: If the depth of a tree is 3 levels, then what is the size of the Tree?

vijendraIf the depth of a tree is 3 levels, then what is the size of the Tree? a. 2 b. 4 c. 6 d. 8 Can you also provide the explanation? Thanks.

 
rjv
i hope you get my requirement, I have bandwidth issues in bringing a database backup of almost 10 gb everyday from my remote server to local server
the so called backups create the backup file in the server itself
 
1:41 PM
Yes, we get your requirement, but if you are doing dev work on the local copy, it's not possible to use differential backups to update the local copy. Why do you need new production data every morning?
 
@rjv "all that" = done one search and opened a single result and didn't find your answer so you came on here?
 
@Kermit meh it's not something that I need to delete immediately :)
 
rjv
@Kermit I have been on this for the past few hours
 
@bluefeet okay.. in 2 minutes
@rjv telling us you've "done all that" isn't very helpful
 
e. check your textbook — Aaron Bertrand 38 secs ago
 
rjv
1:43 PM
@AaronBertrand i wish to keep my backup in my local machine
 
@Kermit declined: flags should only be used to make moderators aware of content that requires their intervention
 
@bluefeet i don't recall flagging the question
 
@rjv so you're going to restore the backup every morning? Ok, so you can use differential backups from the production server every morning, as long as you don't take any more full backups there.
 
@Kermit you flagged me though
 
@bluefeet you're not a flag, silly
 
1:45 PM
As soon as you've taken another full backup on the server, you will need that backup in order to restore any future diffs.
 
rjv
@AaronBertrand yeah, but i cannot copy the backup file as a whole
from prod to local
 
Copy differentials from prod to local. Restore to differential to Db1. Write sql/ssis packages to identify changes and apply to Db2 which is where I assume you're working and modifying data, fixing etc. Keeps the restore chain thing going and gives you current-ish data
 
@rjv I need to get to work but I lost my license and I think the bus is too expensive. Solve my problem.
 
rjv
@AaronBertrand :) I have been pondering over log shipping, does that ship the whole log file each time?
 
If you're pondering log shipping you need to go READ ABOUT IT. No, it does not ship the whole transaction log, it ships the log backups (.trn). However it is still unclear exactly what you are trying to accomplish. With log shipping you can't make any changes to the copy of the database, unless you stop log shipping - so what is the purpose of having it on your dev machine? Is this supposed to be disaster recovery? Because the approaches you seem to want do not allow you to do any dev.
 
rjv
1:49 PM
yeah, this is disaster recovery
 
I'd say try asking a formal question on the site but at the current level of inquiry, it'd be closed as unclear what you're asking
 
rjv
ok I will do that :)
having a hard time explaining :) thanks :)
 
@rjv you want disaster recovery to your local desktop over a network pipe that can't handle 10GB per night? Sorry to be blunt, but you're doing it wrong.
 
Arbys backup: We have the datas
yeesh
0
Q: SSIS: Make Excel Visible In Script Task During Job Run

SchwimmsI built a package in SSIS that uses a script task to open an Excel file, format, and refresh some data in Excel. I would like to have Excel visible when the script task is running to see if Excel gets hung up which occurs all the time. Is this possible? I am converting a process that is calling E...

 
2:11 PM
it was a bit of a reach, but I have a rickroll in my answer
 
2:30 PM
@billinkc be strokin'
 
I wonder if I could work that into an answer
 
> i stroke it to the north
i stroke it to the south
i stroke it everywhere
i even stroke it with my ... whoo
 
ummm....
 
Clarence Carter, Clarence Carter, Clarence Carter...
 
relevant:
> STARKE, Fla. — A female passenger in a semi-truck was naked when it slammed into a school bus Monday afternoon, according to the Florida Highway Patrol. Seven students were taken to the hospital after the crash in Bradford County.
people are stupid
2
 
2:38 PM
@swasheck Lot lizard
 
@billinkc had to google that
 
@swasheck you didn't know that?
 
I only know the term because I've been in a variety of truck stops and saw window stickers saying "no lot lizards"
 
@bluefeet should i have?
 
@swasheck yes, you see SO daily, right?
:O
 
2:41 PM
i'm not making the connection
 
@swasheck that people are stupid?
 
@Kermit aren't you a Vertica slave?
 
@Lamak techncially
 
@swasheck Bluefeet was commenting on "people are stupid" not "had to google that"
 
@AaronBertrand I guess I wasn't clear.
 
2:43 PM
@bluefeet you replied correctly - if you mouse over you see that
 
Or making the allegation that many of the questioners on SO are so desperate, they'd perform perverse acts just to get by
 
but yeah sorting out threads in here is not 100% intuitive.
 
It's official this years NFL is a total crapshoot.
 
@AaronBertrand ohhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
@bluefeet yeah. you did. you completely did. i just fell apart at the brain
 
@Zane In one of my fantasy leagues yesterday I lost 96-23
I was stacked on Patriots and they stunk up the joint
I also had two players that were "probable" - one got 8 yards the other rode the pine
 
2:48 PM
I bailed on my pats players but still sucked.
 
I went with Brees in the other league, thankfully, but still lost there. In the 96-23 loss my backup is Russell Wilson (bye)
This is so true too
 
@AaronBertrand Brees hasn't done much all year. The only player I have who's having a good year is Jordy Nelson.
 
Late hit on Brady (no call), offside led to a sack and fumble (and touchdown? I forget, what a miserable game) (no call), pray (penalty)
Yet players can sign a cross and point to heaven and all that, and that's ok (neither Jesus nor Allah helped you score that touchdown)
Love CNN's stellar caption too "Husain Abdullah intercepted a pass from an opponent"
 
@AaronBertrand i've read conflicting reports ... one is where abdullah acknowledge that he got the penalty for sliding into the endzone. if he got a penalty for the prayer then that's a bad call and shouldnt have been called. if he gets fined then it's worse
 
@swasheck the announcers definitely said it was unsportsmanlike conduct because he went to his knees and bowed. Sliding? Really? People do all kinds of crazy crap when they score a touchdown, dollars to donuts if he didn't do the praying thing he wouldn't have had a penalty.
Of course we'll never know, now, because officials will start calling every single player who even thinks about touching the ground to make this call look better.
 
2:55 PM
@AaronBertrand i didnt see the game so i dont know exactly how it went down but based on what i've read, it shouldnt have been a flag.
@AaronBertrand they're just going to start enforcing the no celebration rule more stringently. "see, this is why you can't celebrate. there's too much room for misinterpretation and hurt feelings."
 
@swasheck agree 100%, it was silly. Like Goodell, the officials are focusing on unimportant things and turning a blind eye to things that matter (like the offside and the late hit)
@swasheck yeah the slam dunk on the uprights too, WTF? Next you'll get a penalty for smiling after a touchdown because it will come off as gloating
 
@AaronBertrand wagging the dog. but hey - it's been bad all year. we had a 1st down against seattle taken away because their dt was in the backfield before the snap. that was a momentum-killer on that drive. the nfl is becoming more and more a farce.
@AaronBertrand gotta have the dark visor
 
@AaronBertrand Only if they look at the opponent's side and smile
 
3:18 PM
Crazy, just heard Seth MacFarlane with some symphony orchestra singing "Singing in the rain" It sounded like a professional and until the announcer went on to clarify that yes, it's the "Family Guy" Seth I was thinking what are the odds
 
In spite of my hatred for all things Family Guy Seth does have a fantastic voice.
 
3:32 PM
Hey @billinkc what sort of experience do you have with encryption in SSIS?
 
@Zane new avatar
 
Indeed.
 
@Zane Encryption of what?
 
Password.
 
Still not catching you. An SSIS encrypted with a password, encrypting data to be sent somewhere, storing and retrieving encrypted data...
 
3:40 PM
We have an SSIS package that has a script task that does SFTP to another company through WinSCP. Right now the password is stored in the package as a variable in plain text. Obviously this is not ideal but I'm trying to get a feel for what the best route is for going forward. Using SQL server encryption and loading the variable at runtime or maybe storing it an encrypted Config file. Thoughts?
 
pre-2012, yeah?
 
We have SSDT but haven't migrated the packages yet.
So yes but there is a possibility of upgrading.
 
k. The SSISDB catalog makes the storing and management of sensitive data much easier as it's more native than the manual steps you'd use with pre 2012/package deployment model
 
Oh yeah. We are a ways away from having that up. We use a homebrew to manage all of our packages called PANDA.
 
Best practice, can't say but we used native SQL Server configuration. Extended the base table to include a column Senstive. The DBAs then denied read access to the developer group for any rows that were marked as sensitive. The service account could access those rows so things worked on servers.
For development purposes, we all ended up knowing the password. Less than ideal, I know. SFTP seems to be a finicky thing from my most recent experience with it.
Sooo, I guess I have no answer. Sorry
 
3:49 PM
Gotcha.
 
JNK
4:19 PM
You can use powershell secure strings for that too
 
I can't use PowerShell at all.
 
JNK
ugh nevermind then
 
Sorry homie.
 
You should use Powershell.
 
I was unfamiliar with secure strings until now social.technet.microsoft.com/wiki/contents/articles/…
I like that MS thought that preventing the next ILoveYou outbreak by denying access to PS execution was a good thing but in practice, it's a punch to the junk
 
4:30 PM
@MikeFal but I can't use powershell. Not in the I don't know what I'm doing sense but in more of a I can't use it because of the environment I'm in.
 
@Zane Bummer.
 
@MikeFal yeah they made a home brew SSIS management application called PANDA some 10 years ago. It's a solid effort and does some cool things. However I feel that it gives more limitations than it actually helps.
 
At least it has a clever name
 
That's always important.
 
5:07 PM
there is an optimization in sql server known as something like "early grouping" or somesuch. doesn anyone know what i'm talking about?
 
Well having sufficiently read up on the subject I believe that I have a gameplan for encrypting these passwords.
I believe it will be at least somewhat more secure than storing them in plain text in a package variable.
 
it was referenced in a sql bits presentation i think (this grouping phenomenon)
 
JNK
5:53 PM
@swasheck I think it has to do wth performing aggregations separately earlier in a workflow
I.e. if I need to get
SELECT A, MAX(c), MAX(d) FROM TblA JOIN TablB on somekey JOIN TablC on SomeotherKey
group by a obviously
If say D is functionally independent of C or A, and you just want to get a value from that table matching the join key, you can do the aggregate first then join to the intermediate result set
Is that what you mean?
I use it in reporting sometimes
 
For some reason I just updated my LinkedIn and finally accepted all the requests I have. I forgot how crappy this website is.
 
My only sister is my favorite sister
Although it looks like I won't be able to get the data needed, this is the best answer and, therefore, I will mark it as such. — Wes Crockett 13 mins ago
 
6:28 PM
I didn't say what I said
@Brandon Unless you specify a nolock hint, there will always be a lock. <-- this implies if you use nolock there might not be locks. I was merely clarifying. — Aaron Bertrand ♦ 46 secs ago
 
6:42 PM
@JNK pre-group transformation is what it's called
 
JNK
@swasheck is that different than what I described?
 
@JNK my understanding is that it's a transformation that's applied by the optimizer. if that's what you described then yes :)
 
JNK
Mine is doing hard work for the optimizer before joins
If you know you need to get the sum of some measure for each day in a month, it may be more efficient to group/sum it all first then do your other filtering depending on indexes etc
 
My new gravatar doesn't appear in the Top bar on any stack exchange sites.
 
@JNK that may be what the optimizer does in the transformation. i'm going to try to figure this out
 
JNK
6:47 PM
@swasheck im curious now, so tell me what you find
googling that phrase with the pre-group transformation in quotes returns 0 results
so godspeed :)
 
6:58 PM
yeah
hmm
 
 
1 hour later…
8:09 PM
hi guys
 
Howdy. Thanks for the efforts on the site
 
heyy I was looking at this question dba.stackexchange.com/questions/78061/…
can you have a look whether I am correct or not I guess so I do but Mark has some conflicting opinion
actually I know my answer is not absolutely correct but as per OP question it seems Ok as locking varies a large with Isolation level
 
Outside my domain of knowledge so I defer to the others
 
Well thank you it good to meet you guys. I though I could find Aaron here but he would have a look. Thanks for time :)
 
JNK
@Shanky Mark is pretty knowledgeable about this stuff.
3
 
8:24 PM
@Shanky Mark is correct. The KB article is not brilliantly worded. It is referring to some types of locks that are held to end of statement or end of transaction (e.g. an exclusive lock protecting modified rows). In general, locks are released eagerly, not in the way described in your answer. Sorry.
 
@PaulWhite how's it going?
 
Good.
 
that's good
 
Great
I wonder what's up with the move from support.microsoft.com to support2.microsoft.com, plus requiring me to log in to view KB and Technet articles
 
8:40 PM
Goodness only knows. The login thing has been around (and annoying) for a long time though.
 
i'm more inclined to believe that evil is what knows, not goodness
 
@PaulWhite Weird, I don't remember needing to log in to view free stuff until a week or so ago
 
Weirdness gonna weird.
 
it's a windows 10 optimization
 
LOL Windows 10.
Seen the screenshots floating around today? Looks awful.
 
8:42 PM
Microsoft OS X
 
@James It doesn't require me to login to view support2.microsoft.com/kb/224453
 
@PaulWhite i havent seen them --- just saw the headline that said that microsoft was skipping the windows 9 name because this version was just "too big"
 
But if I've ever access a MS property, then yeah I get redirected through the login thing and Oh, It's expired, log in again. WOULD YOU LIKE TO TAKE A SURVEY?
 
@Paul Ok well thank you I agree to Mark's statement he is correct I read about that but OP question was can locks be held and I guess so it does or I am not correct ?
 
@billinkc that gets the same response as "DO YOU WANT TO BUILD A SNOWMAN?" (internal rage)
 
8:44 PM
@Shanky Arguably, in certain cases. The way I read your answer you seem to be making a different argument. Perhaps you can reword it a bit to make it clearer?
^ Windows OS X ^
 
@PaulWhite just that screenshot of the delta-bravo looking guy makes me not want to click
 
Anti-click-bait.
 
TECH ENTHUSIASTS
 
GET A HAIR CUT!!!!
 
... AND TAKE A SHOWER!
 
8:47 PM
:-D
 
@PaulWhite Free labor? They're learning.
 
Ha!
 
@billinkc Yes, maybe it has something to do with whether I logged in previously but now the cookie has expired, or something. I guess I'll look next time
 
@James expired cookies are still edible ... they may just be a bit more crunchy
 
@swasheck Pop them in the microwave for 10-15 seconds and they're good as new
 
8:48 PM
Windows 10 - now with resizable windows! LOLz
 
@PaulWhite well that seems correct will update it thanks
 
Presented by an intern. Amazing.
 
resizable windows that you can swipe into the cloud with your touchscreen
 
We're so cynical :)
Installing SQL Server 2008 SP 4.
 
@James nice
i'm trying to think of a nice response to this email i just got
> Aight.. so I did it as a sub query, the problem is when I move the where clause to outside the query it takes forever to run… inside the subquery it works fine. But the problem is with it inside I can’t run generically for any (parameter combination)
 
8:55 PM
Don't understand the question.
 
given the pattern:
select row_number() over (partition by x order by y), *
from (
    select y = sum(i)
    a,b,z
    from table
   where b=5 and z=6
   group by a,b,z
) tbl
select row_number() over (partition by x order by y), *
from (
    select y = sum(i)
    a,b,z
    from table group by a,b,z
) tbl
   where b=5 and z=6
first one is fast. second one is slow
but the person who mailed me said that the first is impossible to run "generically" for combinations.
 
combinations of values for b and z?
 
yeah
 
I wonder what "generically" means? With parameters? A view instead of a subquery?
I want to say the "solution" is an in-line TVF, but I'm still not 100% on what the question is :)
 
@PaulWhite if this were an inline TVF, would that be bad?
hahaha
@PaulWhite neither am i :)
 
9:01 PM
i.e. an in-line TVF with b and z as parameters.
 
yep
 
Good luck.
 
Sorry folks just got off a call
sigh In the time it took you to ask this question, you could have checked both
Should I look at the system clock of the CLIENT: 192.168.45.242 or the server it is trying to connect? The original image is for the server it is trying to connect to. — Debbie 31 mins ago
 
sigh
 
9:18 PM
"I think something changed at the o/s level" You think you did or you did. These are the people that think computers are magical machines and hitting the sides will free up whatever's gummed up the works
 
JNK
@billinkc I put clicks in and cat videos come out.
3
That's pretty magical.
 
I couldn't decide whether to love you or send a fist in the box priority mail to you over that
 
The important thing is that when they die, do not throw your body on top of theirs
 
i'm not quite dead
 
Obama offers military support to fight ebola? I just picture him going "pew! pew! take that virus!"
 
10:11 PM
Would any of you disagree that inserting 600 MB with a single transaction during peak hours into a table that has lots of concurrent reads is probably a bad idea with OLTP, absent further details?
(Assuming SQL Server, default isolation level)
 
That's what nolock is for, duh
 
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITED; INSERT INTO TABLE WITH NOLOCK; GO -1
Genuine question though
 
@James depends on what this 600MB of data is
5 million rows of 25 integers?
(or whatever the maths are in that)
or 50 rows of VARBINARY/NVARCHAR(MAX) data
 
I assume the insert will escalate to a table lock and will either be waiting forever to get lock or everyone else will be waiting while data gets inserted
 
what's your fill-factor
etc. etc. etc. etc. etc.
@billinkc right.
but generally, i'd think it's unwise to do such a thing during peak prod hours
 
10:17 PM
But maybe that 600MB is what must be done right then and there as people are making operational decisions based on it. "We're out of chicken nuggets! ORDER MOAR (but if you'd let me get my BA query run, you'll see we're flush with nuggets)"
 
@swasheck Blobs. I can't remember which blob data type it is, though.
It is a good point, though. I don't know how important it was to get this data inserted.
 
i like my page splits raw and wriggly
@billinkc mmm. pink goo processed chicken scrap. NOM NOM NOM
 
I wonder if you could make service broker work for the megarow data load.
 
10:35 PM
@James Yes.
 
@PaulWhite tell me more
 
@PaulWhite Due to not knowing the importance of getting the data in quickly, or technical reasons?
 
@James Oh sorry I misread the question as: "Would any of you agree"
 
ooooooooooooooooooooooohhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
 
@PaulWhite My fault for how I phrased it
 
10:38 PM
My fault for how I parsed it
:-D
 
@James you need to throw in a few double negatives just for added complexity
@James @PaulWhite just timed out during optimization of the query
 
Yep
 
heh
Anyhow, the reason I asked is that someone was upset that someone inserting into an invoices tables during the day caused blocking because "SQL Server should be able to handle this." My response was to consider RCSI or batch it up. I thought about suggesting a lock hint, but was worried that would just make it worse.
Service Broker is an interesting idea. This is a vendor app so I'm not sure how difficult it would be to fit in.
 
RCSI/SI would be the most general solution, though it depends on the priorities. I worked on a very busy OLTP system once that only ever performed changes (of any size) as single row operations with a small WAITFOR delay between each one.
 
10:57 PM
Hmm
I think I might do a distributed replay with RCSI enabled in a test environment and see how bad TempDB gets hit.
But first, I'll sleep. Thanks for the answers
 
11:12 PM
If it's a plan insert you'll probably find the row versioning overhead is minimal, or even zero. Inserts don't generally generate row versions.
 

« first day (1365 days earlier)      last day (3489 days later) »