Sql2005 leapyear patch




















On my central management server I created a script that enumerates all the SQL Servers that my team maintains and saves the info into a table.

My colleague, Arco, has built automated monthly SSRS reports with the current patch state per customer per instance and we plan our patches from there. Can't I I just use use your import, instead of setting up my own? And yes, they do update every 2 hours from CET…. There no install needed, you only need to download the wget.

And to all that disagree with that location Log in or register to rate. Join the discussion and add your comment.

This article shows how to download sqlserverbuilds. Microsoft released hotfix version 8. They do a pretty good job of keeping this list up to date - and they provide links directly to the download for each version. You must be logged in to reply to this topic. Login to reply. July 26, at am I have collected the detail across the web, is that below details correct? The following scalar function takes in a year and returns a bit flag indicating whether the passed in year is a leap year or not.

The function takes in the year, appends '' to it for February 28th and adds a day. If not, it is not a leap year. As you can see, sometimes you can leverage the SQL Server engine to do some heavy lifting for you! Here is a link that might be useful: Energy act of Still, it was a good catch and if you don't think milliseconds matter, process 40 million rows a day.

Thanks again, Bob, and see you back on the "other" forum I know, Jeff. Besides, we probably spent more time on these emails than will ever be saved by the difference in milliseconds. The real point I was trying to make is that folks didn't need to go through all the gyrations they were going through to check for a Leap Year. Nice tweak! Good job! I also wondered after I posted if my test was close enough to yours to merit my claim that it was faster but I didn't want to post again adding unnecessary chat.

So, I'm glad you posted your findings. Thank you very much Using your code as-is came in 2nd place on my first test, though it juggled 1st with Tosc's code on subsequent tests. I was able to squeeze it some more for a guaranteed 1st place as:.

ELSE 1 -- Anything else is. However as a UDF it still isn't as fast as an in-line statement. That was pretty sweet. Doing the same test you described, I got this little snippet to run in milliseconds. The trick here is that the case logic returns early if it catches the obvious no-leap-years such as odd numbered years 1st WHEN condition , which are by far the majority of the values tested. Also, using bitwise operators where possible improves performance as in the first condition above.

One cool thing about this is we can add the logic for the "divisible by " rule or whatever as another WHEN Also, you only need the year so there is no need to deal with a bulky DateTime data type to get the result nor do you need to make any expensive date or cast function calls.

I compared the results of this logic with the results of the author's logic and got the exact same results so I'm pretty sure it's accurate. I wouldn't be surprised if there's a bug in there somewhere though. I whipped this up and tested it in about an hour at 1 AMish so take it with a grain of salt. Try not to become a man of success but rather to become a man of value. So steve, you are my man of value.



0コメント

  • 1000 / 1000