October 2, 2019 at 2:31 pm
LOL pretty much. It really is shocking how many people still use varchar for dates and sql injection.....
Ugh... you had to bring up that memory for me! I had to work with a database just last year that used NVARCHAR(8) for date columns. They also were considering requiring putting the actual word 'NULL' in the NVARCHAR columns that didn't have a value instead of making the columns NULLABLE. We managed to talk them out of the second one but they wouldn't budge on the dates for some reason.
October 2, 2019 at 2:37 pm
Sean Lange wrote:LOL pretty much. It really is shocking how many people still use varchar for dates and sql injection.....
Ugh... you had to bring up that memory for me! I had to work with a database just last year that used NVARCHAR(8) for date columns. They also were considering requiring putting the actual word 'NULL' in the NVARCHAR columns that didn't have a value instead of making the columns NULLABLE. We managed to talk them out of the second one but they wouldn't budge on the dates for some reason.
Although I agree, not good, if it was an nvarchar(8)
I at least hope they were using the format yyyyMMdd
so the ordering was the same. That doesn't, however, change the fact that it's highly foolish to store something in an 18 byte datatype, when it could be stored in a 3 byte data type (date
), or to store the string N'NULL'
instead of the value NULL
. >_<
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk
October 2, 2019 at 2:56 pm
I wonder if more of us ought to be using UTC or at least datetimeoffset for applications. There are more and more that are crossing time zones and it definitely causes some issues for things like DR if you haven't accounted for movement of the instance.
October 2, 2019 at 3:08 pm
I wonder if more of us ought to be using UTC or at least datetimeoffset for applications. There are more and more that are crossing time zones and it definitely causes some issues for things like DR if you haven't accounted for movement of the instance.
Even Daylight savings, at times, makes me wish we stored things as UTC, or with a timezone at times; and i don't work for a multinational company or multi-timezone country.
That also, however, reminds me that SQL Server Agent actually handles DST quite poorly, as when the clocks go back, the scripts aren't rerun, and when they go forward, tasks could be skipped. Unless my memory fails me or things have changed since.
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk
October 2, 2019 at 3:14 pm
I wonder if more of us ought to be using UTC or at least datetimeoffset for applications. There are more and more that are crossing time zones and it definitely causes some issues for things like DR if you haven't accounted for movement of the instance.
I've already started. The log table that I recently created uses a datetimeoffset field for the log date.
Drew
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
October 2, 2019 at 3:39 pm
I wonder if more of us ought to be using UTC or at least datetimeoffset for applications. There are more and more that are crossing time zones and it definitely causes some issues for things like DR if you haven't accounted for movement of the instance.
HAM radio is primarily driven off of UTC. I'm thinking about moving to that for most of my work now.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
October 2, 2019 at 6:11 pm
Realise that the site is disliked by many (I agree that the community isn't as robust as it is here, or as well knit with many of you having meets at conferences and socially), however, anyone seen the "mass" resignation of moderators on the SE Network?
It seems that SE have a Code of Conduct change coming, which many of the moderators had concerns over. One moderator as a result of them disagreeing with the changes therefore had their permissions revoked. This has now led to another 20 mods resigning (or suspending) their activities on the network.
No one so far has stated specifically what the new Code is, but it does bode a question about what direction SE is trying to go now.
I do find SE a valuable resource, and as network for asking questions not related to SQL Server I do find myself on there often (especially Ask Ubuntu). If, however, that many mods are resigning based purely on the new CoC, and the actions that SE have already taken against their own volunteer(s) that constructively disagree with it (the CoC), then that does bode poorly on them in my view.
And it all happened because apparently the CoC specifies that users must be referred using their preferred gender pronouns. Not even gender neutral writing seems to be accepted.
I feel that this measure is too extreme for the actual problem. I hope that they can actually get something worked out. I personally don't find the use of wrong gender pronouns as something terrible. I've seem multiple times people referring to Lynn as a female, and to Gail as a male. It's just something that can be corrected and left behind.
October 2, 2019 at 6:15 pm
Realise that the site is disliked by many (I agree that the community isn't as robust as it is here, or as well knit with many of you having meets at conferences and socially), however, anyone seen the "mass" resignation of moderators on the SE Network?
It seems that SE have a Code of Conduct change coming, which many of the moderators had concerns over. One moderator as a result of them disagreeing with the changes therefore had their permissions revoked. This has now led to another 20 mods resigning (or suspending) their activities on the network.
No one so far has stated specifically what the new Code is, but it does bode a question about what direction SE is trying to go now.
I do find SE a valuable resource, and as network for asking questions not related to SQL Server I do find myself on there often (especially Ask Ubuntu). If, however, that many mods are resigning based purely on the new CoC, and the actions that SE have already taken against their own volunteer(s) that constructively disagree with it (the CoC), then that does bode poorly on them in my view.
I gave up all hope of seeing sanity on SE a long time ago. The refusal to allow discussion would have been harmless if it hadn't been a mechanism provided for a ruling élite to destroy all remarks or comments that pointed out errors in the answers provided by members of the élite - it seemed to me that the people who had effective control didn't give a toss about accuracy, as the asserted answerss that had been proved to be nonsense by work in science faculties in creditable universities throughout the world, and it was reference to those proofs that were deleted arbitrarily.
If it has changed for the better now, well and good. But my memory of what it was like back then pretty well ensures that I'll never be willing to use it. And a mass revolt by moderators is probably an indication that it hasn't improved.
Tom
October 2, 2019 at 10:42 pm
I wonder if more of us ought to be using UTC or at least datetimeoffset for applications. There are more and more that are crossing time zones and it definitely causes some issues for things like DR if you haven't accounted for movement of the instance.
We recognized this a while back and now are using all UTC times in our databases for anything new.
In fact I feel the whole world should be on one time zone, UTC. Different areas just have different typical hours, I would work from 13:30-22:30 and screw that daylight saving crap 🙂 Everyone would get used to it and no big deal.
October 3, 2019 at 7:22 am
We have a table with one column as UTC and another as local time. So far this hasn't caused any (major) problems but I'm pretty sure that it will bite us one day. I'm not sure if local time actually being UTC for half the year makes the situation better or worse.
How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537
October 3, 2019 at 8:02 am
And it all happened because apparently the CoC specifies that users must be referred using their preferred gender pronouns. Not even gender neutral writing seems to be accepted.
How does one refer to someone as their preferred pronoun when we can't see the person behind the typing? Gender Neutral is probably the best way to refer to people on the internet, as you can't offend anyone (and on a site like these, assume everyone is male due to the majority being so).
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk
October 3, 2019 at 2:50 pm
Well, this is going to be fun. Have a project that's been moving kind of slow because of the various and sundry things going on at work. Audits, our team being brought in a couple MONTHS after the project got rolling (Power BI Server stand up,) etc.
Found out yesterday the servers we were planning to use (fresh install of Windows 2016) were NOT going to be able to be used because there's things that need to be done to get them on the network (infrastructure things, some sort of key management system) that our NEC can't do and hasn't even contemplated doing as these findings changed since they originally stood up the servers.
Then today we find out from the folks in charge of the project, "Oh yeah, hey, there's going to be a grand high muckety-muck coming out in a month who wants to see this in action."
I so sincerely wish we could get away with telling them "a failure to plan on your part does not make an emergency on our part..."
I think then the muckety-muck comes out, I'm going to do my best to make myself scarce so I don't say something to tick off the folks in charge of the project (MY team lead and boss, at least, realize what's gone on with this and are of the same mindset as me.)
October 3, 2019 at 10:00 pm
Ok, I’m officially envious.
how well thongs must be organised at your place, if this kind of events come as a surprise for you?
i can hardly remember when things went as planned. Well, if you can name it “planned”.
_____________
Code for TallyGenerator
October 3, 2019 at 10:25 pm
OMG.
i finally went to the bottom of this page and clicked “take a peek into our servers”.
and what do I see?
One of the “top” queries:
SELECT DISTINCT wp_posts.* , wp_postmeta.meta_value FROM wp_posts INNER JOIN wp_postmeta ON( wp_posts.ID = wp_postmeta.post_id ) WHERE 1=1 AND (
wp_postmeta.meta_key = '_bbp_last_active_time'
) AND wp_posts.post_type = 'topic' AND ((wp_posts.post_status = 'publish' OR wp_posts.post_status = 'closed')) ORDER BY meta_value DESC OFFSET 267735 ROWS FETCH NEXT15 ROWS ONLY
Execution time 10 seconds
and in the query plan the main feature - yes, correct, Clustered Index Scan.
Isn’t it a kinda shame to have such queries exposed on a specialised site of SQL Server professionals?
Could we form a group of volunteers who could fix this terrible mess?
_____________
Code for TallyGenerator
October 3, 2019 at 10:28 pm
Ok, I’m officially envious.
how well thongs must be organised at your place, if this kind of events come as a surprise for you?
i can hardly remember when things went as planned. Well, if you can name it “planned”.
Can't beat an organised thong.
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
Viewing 15 posts - 64,036 through 64,050 (of 66,712 total)
You must be logged in to reply to this topic. Login to reply