« first day (666 days earlier)      last day (4216 days later) » 

1:17 AM
oh aptem
1
Q: Undo changes made by SQL Server Database Tuning

Saif KhanI am not sure if this question can be asked here or serverfault. I was wondering...Is there is a way to quickly undo the changes made by SQL Server 2005 Tuning Advsor other than recovering from a backup?

 
 
1 hour later…
2:45 AM
0
Q: What is the etymology of "tablespace" in Oracle?

ajw0100What is the etymology of of the word "tablespace" in Oracle?

 
 
3 hours later…
5:59 AM
@Phil we don't get told who flags a comment but sometimes I can guess ;)
 
6:09 AM
It was a semi-interesting question, but ultimately unanswerable
 
6:27 AM
@JackDouglas it is either Phil or me? :)
 
No, neither of you :)
I'm not 100% sure but the "closed as off topic by SQL Kiwi, Jack Douglas♦ 32 mins ago" is a hint.
 
Not sure - it was in the Vote to Close queue, someone must have VtC'd it before me
 
I left a mod flag (or whatever the terminology is) of it being offtopic
 
Ok, then my idea was wrong.
 
Weird that it doesn't include @dezso in the "closed as.." message though
 
6:38 AM
I have too few rep for VtC
(and apparently my language module has not booted properly :)
 
Ah I see
 
So flags stay anonymous.
 
that's good, yesterday I flagged a mrdenny 'answer' again
 
Link?
 
chat is not anonymous though :)
 
6:42 AM
Ha ha true.
 
I know, but w/o @ it remains silent
I'd start by running DBCC CHECKDB and see what corruption the database engine finds. — mrdenny 11 hours ago
 
@dezso: Don't be so sure. Anyone can read the chat, without logging in.
 
this is now converted
 
Thanks
 
If anybody catches that I defamate him here, then it's OK :)
I know that this is fully public
 
6:45 AM
That question is answered
What is @@VERSION? There are fixes that may be relevant: support.microsoft.com/kb/2522893 & support.microsoft.com/kb/2603910Aaron Bertrand 14 hours ago
 
What's more, until know I didn't know that flags are anon
I'm not afraid of anybody :)
 
Sometimes I'd like to convert a comment to an answer, rather than the other way around.
 
You can always suggest it in a comment :)
Or simply steal it
haha
 
@Jack: Can you close this, too? It has 4 close votes and the OP says he already found an answer at SO: dba.stackexchange.com/questions/25613/…
 
 
1 hour later…
8:04 AM
i managed to get an answer on stackoverflow, where the community seems more active and they do answer a lot on mysql stuff, i did an INNER join table ON condition (where it displays only the ON condition id's)...and worked :) — Adrian Tanase Oct 14 at 7:21
but
The query seems to have several syntax errors. And there is no condition for joining the two tables: myl_contacts and mya_usersypercube Oct 8 at 14:05
sigh
@dezso I'm pretty sure this one was Phil (unless you have been brushing up on UK slang) :)
@SQLkiwi so do you feel rested after your 3 hours of sleep?
 
8:43 AM
@JackDouglas hah
I hardly ever leave commentary on a flag, this one was simply 'offtopic'
however, I'm constantly working on my English (slang and sillyness included)
 
this one made me laugh:
2 hours ago, by dezso
(and apparently my language module has not booted properly :)
 
@JackDouglas I had to edit practically all my comments because of language errors
Now that I arrived at office I hope it will be better
 
@JackDouglas Tip top and raring to go!
 
9:44 AM
Is the OP after LIKE here?
-1
Q: Can I make that connection?

Hatem GhazyIf I have a column with data type varchar(max) in a table that contains a big piece of text, can I make a connection between a word or a sentence in that text with another word or a sentence in another column with data type varchar(max) in different table? For example, if I wrote a word in the f...

 
That or full-text as Jon Seigel suggested. Without a query or more details, it's hard to say. Probably should be on SO?
 
sure
 
gbn
@dezso yes. But it's a bad idea.
 
@gbn This guy had some of them already
 
gbn
9:59 AM
@dezso he he. Why I specialised in databases many years ago. Lots of shit to keep me employed.
 
@gbn now that's a career plan, haha
 
ugh
the other answer, from a 40k+ user
 
gbn
I've seen bad answers from him before. With 41k rep.
 
saddening
(reminds me our denny...)
 
gbn
10:04 AM
The invisible mod
I've had some arguments before with him. Some people actually do , some people advertise...
Lordy I'm in a feisty mood today
Hi Mikael
 
@gbn good word that
who knows which meaning you mean :)
 
@gbn Hi there.
The talk about a 40k+ users had me worried there for a while :). Luckily it was not me.
 
gbn
@MikaelEriksson nah, we spoke about you a few lines further up ;-)
he he he
 
@gbn :) Well... I probably deserved it.
 
gbn
Anyone agree that this belongs here?
0
Q: PAGE compression in SQL Server effect on running queries

swanand kantI am planning to apply PAGE compression to some of the big tables in my database (DW to be precise). These tables are fairly big with over 15 Billion rows. When I applied the compression in test environment, the whole process took around 22 hours.These tables are accessed daily with quite long ru...

 
10:21 AM
@gbn I think so but I have no word in it
@SQLkiwi that idea was declined by a mod
 
@dezso Oh well Jack's probably right
 
@dezso I'm the only mod awake at this time :)
it's borderline but if the 'answer' is FTS, I thought it probably not too basic
@SQLkiwi :)
 
:)
By the way it wasn't the basic-ness that troubled me, it was the quality of the question.
 
10:38 AM
yes it is poor but the flag was for 'off topic' :P
 
@JackDouglas Isn't that the correct flag for moving to SO?
 
Does SO want our rubbish?
 
who cares? :) We'd get rid of it
 
Nope, they'll send it back again
 
ah
but why?
too basic for them? or low qlty?
 
10:42 AM
because it is rubbish?
nothing is too basic for SO :)
 
(snark self-censored)
 
I think we could be generous and give him a chance to respond to gbn's answer
 
My subjective impression is SO has a lower threshold for question quality.
 
@JackDouglas of course
 
@JackDouglas Yes gbn's answer wasn't there at the time. As it stands now I wouldn't want it to move.
 
10:44 AM
@SQLkiwi to be fair, you are probably right. I'd still rather close than migrate poor questions though
 
@JackDouglas Fair enough, will bear that in mind.
 
11:19 AM
So pleased I finally had a chance to use that ASCII table tool
7
A: Index with multiple leaf levels

SQL Kiwi "My question is how and when does SQL Server create multiple leaf levels (index_level 0) for the same index." The 2008 R2 documentation for sys.dm_db_index_physical_stats includes a link to Table and Index Organization, which shows the following diagram: It describes the data that may b...

 
nice one
 
I went with the Unicode look :)
 
MySQL look isn't bad either
 
Agree, I just wanted to be different (it's a personality trait!)
 
I have to tell that the code you included is remarkably readable
We are all different!
Me not!
 
11:22 AM
@SQLkiwi that's top-drawer stuff, +1
 
"I'm an individual!"
"So amI!"
"Me too!"
"I'm not!"
Python I think
 
Life of Brian :)
 
Ha I was close. Ish. :)
@JackDouglas Chur
 
12:06 PM
@SQLkiwi I've added a Q&A to meta as I'm sure everyone is now going to want to copy you :)
0
Q: How do I include tables with Ascii art lines in my answer?

Jack DouglasSome answers on the site like this one and this one include tables drawn with ascii art. Is this done by hand or is there a tool I can use to help me?

2
 
12:18 PM
great job!
2
A: can i ask about the software recommendations here?

Jack DouglasThere is not a blanket ban on this sort of question, but you must stay within the guidelines in the faq: You should only ask practical, answerable questions based on actual problems that you face Your questions should be reasonably scoped. If your motivation for asking the question is ...

Shouldn't we add that such questions may be asked here as well?
 
@JackDouglas Very nice!
 
12:52 PM
@dezso good point, yes, please add another answer pointing him at chat!
 
done
 
1:28 PM
Please, don't answer 'yes' too fast
0
Q: Is it stupid to create an Index on every column?

alfonxI use PostgreSQL 9.2. I have a table with ~5 Mio rows and 150 columns. The table does not change at all (I replace it once a year). Users query this table with all kinds of filters on any some of the columns, e.g. select * from table where C > 43 and H is not null; select * from table where A...

 
@dezso Is there a hard limit on the number of indexes on each table?
 
someone liked it enough to upvote it!
 
@JackDouglas never read about such a limit
I imagine if there is any, it's much higher than 150
 
@DTest ha ha, I confess that was me
it's a very special case: a read-only table
 
@DTest it's not a bad Q at all
@JackDouglas postgresql.org/about says "Maximum Indexes per Table Unlimited"
 
1:37 PM
good find
 
@dezso Oh i don't think it's a bad question.
Does postgres ignore indexes if the cardinality is low?
 
your comment sounded like a complaint
very much yes
(I haven't yet tested index-only scans, however)
 
@DTest yes, and it uses histograms to improve cardinality estimates
though sometimes that is more art than science
 
gbn
1:56 PM
@JackDouglas aka "statistics"? Like SQL Server et al
 
Hello
In Full mode the transaction log keeps growing until you back up the database. In Simple mode: space in the transaction log is 'recycled' every Checkpoint.

1) is that mean that when im backingup the SQL , the ldf file will be 0 bytes ?

2) what is exactly "Checkpoint" ?
 
gbn
1. A backup is a copy of all used data pages + any changes that happen during the backup. The LDF isn't backed up. Neither is the MDF for that matter: only the pages
But, the info on them (path, site, growth etc) is also saved so they can be created/replaced on RESTORE if they don't exist or are currently different
 
@gbn , so restoring bak wont allow me do rollbacks....right ?
 
gbn
@RoyiNamir of transactions? in reality, no
 
I dont understand why he said ( the quote from my question) " keeps growing until you back up the database"
 
gbn
2:10 PM
@RoyiNamir You gave VLFs within the LDF. If you don't backup the log, you need to extend the LDF to allocate more VLFs.
@RoyiNamir I commented
 
Sorry , I must be missing something : if I have a 1gb ldf file. and i backup the whole DB. does sqk start writing transaction logs from the Beginning of the file ? as opposed to not backup , and appending the 1GB ?
 
gbn
Neither
 
@gbn yes though on Oracle at least it is possible to gather statistics without histograms. As an aside, multi-column (aka 'extended') statistics are lush.
 
gbn
It doesn't back up the LDF. At all.
 
only pages.
 
gbn
2:14 PM
and the transaction log consists of a circular chain of VLFs: simple-talk.com/sql/database-administration/…
 
THe part which I dont understand :
"keeps growing until you back up the database"

what happens when I backup ? it wont grow ? something is happenning at this stage. what is happening so that it doesnt grow anymore ?
what happens with this 1gb file ?
 
gbn
he is wrong
I commented on that answer
 
1 hour talking and now you tell it ? :-)
 
gbn
read the simple talk link too I posted
 
5 mins ago, by gbn
@RoyiNamir I commented
 
2:19 PM
:-)
thanks for helping
 
Aye
Just got suspicious about my SO rep
checked it, and seen that I got 30 reps today for ancient answers
(I only check SO for up- and downvoting in the last months)
 
gbn
@dezso don't be :-)
 
Nah, only felt that the number is faulty visually
 
2:35 PM
Does prefixing SP with "sp_" cause it to be searched FIRST in Master DB ?
 
16
Q: Still wrong to start the name of a user stored procedure with sp_?

JosienOne of my co-workers named a stored procedure in our SQL Server 2008 R2 database 'sp_something'. When I saw this, I immediately thought: "That is WRONG!" and started searching my bookmarks for this online article that explains why it is wrong, so I could provide my co-worker with an explanation. ...

 
Thanks.
So I wont do sp_ again
ps how do you write your sp's ?
PersonInsertById
InsertPersonById

?just curios .
 
I don't use sql server, so take it with a grain of salt....but I do action_noun_by_id :)
 
2:53 PM
I do PersonInsertById
this was i can find it quickly
 
Oracle came back with [Error] Execution (1: 1): ORA-03113: end-of-file on communication channel AGAIN! What does this mean when executing one particular proc?
I recreated the package yesterday and the problem went away, but now it's back...
 
@CadeRoux 3113 almost always means 'call support'
 
@JackDouglas Great
 
what's your exact version?
and is it happening every time you call the sp now? (reproducible ones are a lot easier to find workarounds for)
support will want a trace file btw
 
@JackDouglas Oracle Database 10g Release 10.2.0.3.0 - Production
@JackDouglas Yep. But same proc works fine on another site...
 
2:59 PM
@CadeRoux same exact version?
are both on RHEL?
 
@JackDouglas Apparently not, the US site is Oracle Database 10g Release 10.2.0.1.0 - Production
 
or Solaris or Windows or whatever?
 
@JackDouglas Windows 2008 on the broken site, Windows 2003 on the working site.
 
do you have a test environment where you can reproduce the 3113?
I'd want to slice and dice the sp until you have the exact SQL causing the error
or you can get it from the trace file
@CadeRoux R1 or R1, 32 bit or 64?
either way, I think the latest patchset is 10.2.0.5
and would highly recommend you patch if possible
bearing in mind that patching is not risk-free. Have you an Oracle DBA on the payroll or is that down to you?
 
@JackDouglas Windows Server 2008 Std 32-bit. There are two statements in the SP, one which loads a config into a row and then a giant select. One of the later test environments seems to have the same Oracle version, so let me see. It seems unlikely to repro there, because otherwise we would have seen this before. Client has a DBA team who I have forwarded this to. They seem pretty competent. I like to stay in SQL and not have to get into this kind of crap, but stuff like this makes me look bad
 
3:09 PM
@CadeRoux try running each statement outside of the sp and see if you get the 3113. Ideally not on your prod environment but that is up to you.
can you post the sp on gist or something?
 
@swasheck finally arrived, fortunately
 
halloween, or something like that
there's also a particularly frustrating troll^H^H^Huser (to adopt @COTW's paradigm) whom I wish to avoid.
 
I was worried after yesterday's fleeing
 
@swasheck sorry, i'll leave you alone today
 
i duck in and look for green ...
@dezso i was just noting that i needed a new place to spend my time ... a place untouched by trollery ;) ... i dont know where that is, though
 
3:21 PM
@swasheck have you asked the Billy Goats Gruff?
 
@JackDouglas back in the old days, my grandfather would mail me books with tapes of him reading those books to me. that story was one of them. when you said that, i was instantly transported back in time nearly three decades
 
/me performs quick wikipedia lookup
 
@JackDouglas It is directly-related to a new piece of code which appends a comma separated list of traits (based on a link table) to a tank name. There is a scalar function which retrieves that, and when I comment that out it doesn't get the error.
 
@CadeRoux can you repro by calling that function from plain SQL? I'd be aiming for a minimal reproduction before tinkering with the code to work around it...
@swasheck :)
 
@JackDouglas No, I call it on every row in the set and it's fine.
I moved it (it was inside a CTE and I moved it to later in the process) and the problem has gone away.
 
3:30 PM
@CadeRoux yippee :-)
 
@JackDouglas This is par for the course with Oracle, isn't it? A cryptic error unrelated to the SQL on perfectly valid SQL and an inexplicable dependency on version and sensitivity to order of operations.
 
@CadeRoux too harsh. 3113 usually means 'bug', most Oracle experts know that on sight. All the RDBMSs have bugs of course.
patchsets fix bugs, often lots of them
you are well off the most recent patchset—you should probably look into getting that fixed
@Phil do you agree with all that ^^^^^^^^ (when you get a minute)?
 
@JackDouglas I just seem to find a lot more in Oracle. I will see what to do about getting patched up.
 
Scan count 9, logical reads 139728, physical reads 1, read-ahead reads 2, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
 
@CadeRoux I'd be willing to bet @SQLkiwi and the other SQL Server folk hit bugs from time to time ;)
 
3:41 PM
haha, you carefully avoided mentioning PG people
 
@JackDouglas I seem to find problems with the GUI side in SQL Server - SSIS quirks, SSMS quirks. Not so much the engine.
@JackDouglas Should I be pushing them to move to 11g?
 
@CadeRoux are there any particular features you are after?
We upgraded for the improved bind peeking
 
@JackDouglas No, just for stability and not being left behind. Like I would move a bog-standard ASP.NET app like this one on 2000 or 2005 to 2008R2. There's no rocket science in this CRUD app.
 
@CadeRoux I don't think 11.2 is 'more stable' than 10.2, just different bugs. There is certainly some logic in the 'not getting left behind' reasoning though. 10.2 to 11.2 is reasonably straightforward in my experience but YMMV
Are you licensed for 11.2 or would you have to pay?
 
@JackDouglas Only problem I have seen when I last tried to do it was issues with the .NET provider/ODP.NET vs. Microsoft driver because this app still has a hodge-podge of data-access mechanisms I'm still trying to clean up.
 
3:49 PM
sounds about right
you on SE?
 
@JackDouglas Not sure about licensing. This app is small enough (because each site has their own) that I would recommend the express edition. I've mentioned it before, but they are probably worried about support. They are married to Oracle because they run financials on Oracle as well...
 
@CadeRoux XE is ok as long as you aren't connected to the internet :)
 
@JackDouglas explain?
 
@swasheck No security updates!
 
@JackDouglas yikes. didn't know that.
 
3:57 PM
@JackDouglas Good to know.
 
@CadeRoux ha you aren't patching anyway ;)
 
@JackDouglas Well, I have dreams for them to get to a proactive state on this entire system. Right now there's a lot of firefighting and janitorial duties.
 
3 months without a blog post. Everyone's busy?

But I like that http://dba.blogoverflow.com has the sane `'2012-08-06'` format instead of the `'10-29-12'` at http://blog.stackexchange.com
 
4:13 PM
@ypercube that pesky 29th month
 
@DTest it always scares me
figuring out what 10/11/12 could mean in which country
 
4:39 PM
@dezso i keep forgetting to put on smileys on my comments :(
 
5:02 PM
yay for the register
"fondletops"
 
5:37 PM
"i need an update made to my report."
"ok. which one?"
"MY report."
"right. what's the name of the report and how do you get this report?"
"isn't that YOUR job? do you give this level of service to everyone?"
...
 
@swasheck Give me your social security number. That's how we look up your reports.
 
@CadeRoux I'm going to need your credit card, social security number, and date of birth as a means of accessing that information.
the sense of entitlement among middle management is baffling.
@gbn how goes the red gate support?
 
gbn
6:30 PM
@swasheck ah, they've acknowledged a bug now with filtered indexes
 
6:47 PM
DBA sent me details:
Error:
=======

ORA-07445: exception encountered: core dump [ACCESS_VIOLATION] [___intel_new_memcpy+51] [PC:0x2699ED3] [ADDR:0x8541E25] [UNABLE_TO_READ] []
@JackDouglas Which is of course another generic message simply indicating a bug.
 
7:13 PM
is that what was in the alert log when you got the 3113?
 
@JackDouglas I guess so. I made another copy of the package under a different name and it still has the problem. The DBA wanted to test it after bouncing the server. So that's what's going to happen in a few minutes. And then I expect it may still happen and then I think they would want to look at patching it up first before talking to Oracle.
 
I thought I'd put a sane answer
1
Q: Undo changes made by SQL Server Database Tuning

Saif KhanI am not sure if this question can be asked here or serverfault. I was wondering...Is there is a way to quickly undo the changes made by SQL Server 2005 Tuning Advsor other than recovering from a backup?

The comment I got makes me thing... some people can make games of everything...
 
@RichardTheKiwi Aptem
 
@swasheck I'm betting it will get paid. Companies have too much invested into the patent culture they can't burn their own bridges or risk damaging the landscape. Even if it means a bit of hurt here and there.
thinG -> thinK of course. First hour of the morning, forgive me spellerings. I'm norwally good.
 
Narwhally good?
 
7:25 PM
@RichardTheKiwi And he gave you a bounty :-), you have a groupie
@RichardTheKiwi and now that I remember, a couple of months ago, when you were inactive, I stumbled upon a question in wich the user was upset since you were no longer around and that the rest of the answers were crap
 
MySQL questions never stop to amuse. An explain plan without the query: stackoverflow.com/questions/13165950/…
 
@Lamak Really? haha.. which question do you remember?
 
@RichardTheKiwi I'm gonna try and find it for you
 
Has anyone mentioned AaronB today? I just came across his comment on SO.
 
@RichardTheKiwi Which comment?
Oh and good morning everyone
 
7:39 PM
@SQLkiwi Nothing special about the comment on SO. He left yesterday (speaking in NZDT frame) a bit upset with the chatroom and/or participants.
 
@RichardTheKiwi PATNEWS says that patent is completely invalid, tons of prior art, including Bloomberg terminals.
 
Just noticed that Aptem has 1085 rep, while he has given 10700 with bounties.
 
@ypercube To be fair to him, we should add that rep back in before calculating his rep/answer ration.
 
@ypercube Indeed he has. Well, he always seems truly grateful for the help he gets.
 
@CadeRoux Really? Just like prior art in the Samsung/Apple patent dispute
 
7:43 PM
and more than half was spent on that Using a piano keyboard as a computer keyboard ...
 
@Lamak so much so he will stalk you
 
@ypercube a third, or 3050 to be exact
 
@RichardTheKiwi personally i think that what i've sensed from him (as well as myself) is that the chatroom has taken a turn for the worse. certainly that's subjective, and therefore a matter of opinion.
 
@RichardTheKiwi This is Microsoft vs. someone with no money - they might settle to save money, but Apple vs. Samsung was an incompetent judge and jury tampering and Apple lost their similar cases in other countries.
 
@ypercube I wonder why I haven't seen that in the Close Question queue...
 
7:47 PM
blocked by proxy ... but the headline looks interesting
 
SELECT qty_in_stock - qty_sold as qty_remaining FROM products
You would expect qty_remaining to be -1, right? Wrong! In fact MySQL returns 18446744073709551615 !
hehe
 
a Q at So, similar to the 150-columns indexing one:
2
Q: Index structure to maximize speed across any combination of index columns

user1789507I have a database with about five possible index columns, all of which are useful in different ways. Let's call them System, Source, Heat, Time, and Row. Using System and Row together will make a unique key, and if sorted by System-Row the database will also be sorted for any combination of the...

 
8:02 PM
@JackDouglas problem went away after restart...
 
@CadeRoux restart early, restart often
 
@CadeRoux hmmmmm
 
@DTest Do other DBMS have unsigned? And do they behave the same? Is this mentioned in the ISO standard for SQL?
 
@RichardTheKiwi I'm a MySQL DBA. What do I care for SQL standards?
ps, i have no idea :)
 
8:17 PM
@DTest Yes, you would expect to get an error. MySQL rarely throws errors, as it always goes over the top to be as helpful as possible around errors, e.g. mixing aggs and non-aggs in a GROUP BY.
SQL-SERVER:

create table t1 (id int, s tinyint);
insert t1 select 1,1 union all select 2,2;
select a.s-b.s from t1 a join t1 b on a.id=1 and b.id=2;

*Msg 8115, Level 16, State 2, Line 7*
*Arithmetic overflow error converting expression to data type tinyint.*
 
definitely. I would love to enforce errors :(
 
I give up. I can't get markdown correct in chat. I wanted to fixed-font the middle section and italicise the error
 
I see your point.
SQL-SERVER:
create table t1 (id int, s tinyint);
insert t1 select 1,1 union all select 2,2;
select a.s-b.s from t1 a join t1 b on a.id=1 and b.id=2;
Msg 8115, Level 16, State 2, Line 7
Arithmetic overflow error converting expression to data type tinyint.
 
8:48 PM
Should the question or answer be edited?
3
Q: Do I risk losing the benefits of indexing if I have an index on every column?

alfonxI use PostgreSQL 9.2. I have a table with ~5 million rows and 150 columns. The table does not change at all (I replace it once a year). Users query this table with all kinds of filters on any some of the columns, e.g. select * from table where C > 43 and H is not null; select * from table whe...

Title: Do I risk losing the benefits of indexing if I have an index on every column?
Question: Is it good design for the above described use case to create an index on every column?
Answer: The answer is (almost always) no.

To which question (or both)?
 
 
2 hours later…

« first day (666 days earlier)      last day (4216 days later) »