I recently came across an article on UTC to store date/time values. A decision made on a current project I am working on was to use UTC for client applications. However, the dates stored in SQL currently not in UTC. I guess I've just gotten used to the GetDate() function in SQL. A more appropriate function for our application would be the GetUtcDate(), which will return the current date/time in UTC format. From the article: The primary advantage of storing date/time values in UTC is that it makes the data transportable. To see what I mean, imagine that following scenario: you have an eCommerce website that is being hosted in a web server located in the Pacific time zone (UTC -8) and this application stores the date and time orders were placed in server time. Say a user, Bob, makes an order on August 1, 2007 at 9:00 AM UTC -8. After many months of phenomenal growth, you decide to switch to a larger web hosting company, one on the east coast where the time zone is UTC -5. Since the date/time is stored in server time, Bob's previous order still shows that it was made on August 1 2007 at 9:00 AM. But since we are now in UTC -5, it is as if Bob's order was made three hours earlier than it really was (since when it was 9:00 AM on August 1, 2007 in the west coast it was really 12:00 noon on the east coast). The author then goes into explain how you can fix the above issue by doing an update on the data to correct the time, which he refers to as "Ick", and I will have to agree with that. You don't want to, nor should you have to ever update a time stamp type property. The next example uses various time zones to illustrate the problem of converting from one time zone to another (not to mention DST and SDT). Since we plan on eventually offering localized versions of our Web Application, displaying all times in CST/CDT is not idea. Not to mention the change from daylight savings time to stand time makes the way we display data currently, very confusing. Things seem out of order at best. Well, I'm off to update my use of GetDate to GetUTCDate. Be sure to read the full article. Note: I found this article originally from ScottGu's RSS feed. However, the actual blog doesn't have the UTC article listed under Asp.Net, or listed at all.
All I wanted to do was make an ISO of a CD so that I could keep it on my server for use with VMware Server. I didn't think it should be that hard, I have Nero 7 ultra edition, surely that can create a prefect ISO copy. Nope, no go, couldn't find the option to create anything other then a Nero image file. Onto ISO buster, which I had installed a long time ago. I'm pretty sure I used it to create an ISO before, but it just wasn't working out. I was able to create an iso, but it wasn't bootable like the original. /sigh Off to Google to search. 4th hit on a search for free iso tool led me to DoISO whish is a GPL ISO Creation utility. A quick download and install, and I was off and running. Creation process was a success, selected it as my image for my VM CD-ROM drive, and, didn't boot. Back to Google, and found ISO Recorder. Lists support for XP and Vista, and it is free. So far so good, however, looking at the user guide, it struck me, that I already had this installed, I had just forgot about it. Trial #3 for making an ISO was then underway. Success, created the ISO, and it was bootable. Summary: ISO Recorder created a perfect ISO copy from a CD. Note to self, check to see what you already have installed before going off in search of something else.
This is my first post for my new blog, and it will be short, as I've just spent most of the night getting everything setup. So far I am very happy with dasBlog. I just need to get email submission working, and move all my old posts over. Hopefully this post I'm writing in Live Writer will work, so I can cross that (test with Live Writer) off my to do list. Speaking of Live Writer. After using it for less then 5 minutes, I like what I see. I can't wait to install it at work as well and begin contributing en-mass to the blog sphere! Blog To-Do List: - Move old blogs from personal site
- Move new blogs from work site
- Setup some type of nightly backup of this blogs content to my local computer
- Get email submission working
- Define Categories (Check to see if it's easy to rename a category)
- Define additional Macros
Update: Just tested updating a previous entry using Live Writer. If you see this, it worked.
Scott posted another edition of his "Weekly Source Code" where he lists open source projects that he finds interesting. The idea is to examine the source to find ways to improve your own coding, by finding examples of what to do, and what not to do. One of the projects listed was Fog Creek's Co-Pilot software, which is a remote help desk software that works across firewalls. The client code, based on VNC, is available under the GPL. Reading thru their tech page, they talk about implementing a version of the STUNT protocol. The STUNT protocol, put simply, is a way to do direct Internet connections across NAT, bypassing the need for a proxy or reflector (Co-Pilot's term) piece of server software. The main advantage to the STUNT approach is that it is much faster since you are not going thru an intermediary. STUNT reminds me of one of the methods used by Skype to establish connections. While they didn't use the term STUNT, it was very similar in concept. This is particularly interesting for me due to my current project, and some of the communication requirements we have for our products. The idea of a direct connection, possibly to a VNC type application listening on the other end would make trouble shooting a whole lot easier....assuming we were not trouble shooting network connectivity.
After being informed of VS2008 multi-targeting capabilities, I went to download and install Beta 2. The install was quite easy and allot faster then VS 2005. I had to reboot once after installing the framework 3.5, and then once after the install was completed. My first 2 issues that I encountered were, no support for rptproj files, and it wanted to do an upgrade on the solution and project files. For the upgrade, if it just updates the solution, I'm not that concerned, as we don't keep solutions in source control. However, if the project files are updated, then that is a problem, and will prevent me from using Beta2 until the entire team is ready to upgrade. To test, I copied a project to a separate folder and ran an inplace upgrade. Since I don't have TFS client installed (issue #3, need to either install the 2005 TFS client or download and install the TFS Beta 2 client, or rather the entire ISO), I had to remove the source control bindings (good for this test). The project file converted successfully with no errors. I opened up VS2005 and selected the project, and was prompted with a warning about invalid tags in the csporj file, and I could either open for browsing, or open normally. I chose to open normally, and it did successfully. There was a hint that installing a registry key will allow you to specify to ignore the new tag that VS2008 inserts. I think that this will be a suitable work around. Next step is to try upgrading on the live projects, rebuild and make sure everything works. Then create a registry file that the team users can execute. Upon closer examination of the converted csproj file, it replaces an Import statement, with a new one. Old: <Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v8.0\WebApplications\Microsoft.WebApplication.targets" /> New: <Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v9.0\WebApplications\Microsoft.WebApplication.targets" Condition="" /> I added the old line manually to the converted csproj file, and it still built. However on a machine that doesn't have Vs2008 installed, that new import path doesn't exist, and the project can not load. Doing some more searching has yielded no suitable work around except coping the new build targets to each workstation. This seems to work. One other upgrade issue is VS2008 will replace what version of the UnitTesting assembly you use (8 to 9). Changing the reference to use specific version to false seems to be a suitable workaround. I just need to remember to set it back to true once everyone else is up and running.
I found a new blog that had a ton of information that I just happen to be looking for. http://blogs.technet.com/daven All of the following was taken from the above blog. - Microsoft.com is running on IIS7/Win2k8 Beta 3
- http://blogs.iis.net/bills/archive/2007/06/15/www-microsoft-com-is-live-on-iis7-beta-3-are-you.aspx
- The web server role is now included in the core
- Speaking of core, below is a list of command line commands that can be used to get your core install off to a good start.
When the Core installation is finished, you have a server with an unknown name, with a blank administrator's password in a workgroup. To get it configured you'll need these commands: net user administrator * hostname netdom renamecomputer <ComputerName> /NewName:<NewComputerName> netsh interface ipv4 show interfaces netsh interface ipv4 set address name="<ID>" source=static address=<StaticIP> mask=<SubnetMask> gateway=<DefaultGateway> netsh interface ipv4 add dnsserver name="<ID>" address=<DNSIP>index=1 netdom join <ComputerName> /domain:<DomainName> /userd:<UserName> /passwordd:* And a few optional ones: Cscript C:\Windows\System32\Scregedit.wsf /ar 0 WinRM quickconfigcontrol timedate.cpl control intl.cpl Slmgr.vbs -ato start /w ocsetup /?
So Automatic updates installed some stuff and rebooted my computer. I thought I had it set to download and let me choose to install, but I guess not. Upon getting to work this morning, I couldn't log on. I kept on getting an error about something could not be initialized. Turns out, this was HP Credential Manager. Messing around with the logon options, I finally found the checkbox to bypass credential manager for logon (at least HP was smart enough to put that in there). One weird thing I noticed, was that the finder print reader, which had stopped working after installing those 2 Vista reliability patches, was working again. Upon logging into Windows, I started to notice things were broken. Folder Share failed to start, I could not login to outlook, MSN IM said it was down, and VS said that I had a licensing error. Needless to say I was quite concerned. After messing around for awhile, I got around to uninstalling HP credential manager, and most of my login issues were resolved. I could login normally, outlook worked, MSN, and foldershare, and I'm sure a bunch more stuff that I hadn't tried worked now as well. Unfortunately, VS was still hosed. A Google search revealed that I need to uninstall delete some registry keys and reinstall. Well the first time thru, that failed, and I was left with a partially installed VS. Next up, I started following the instructions from this KB article. http://support.microsoft.com/kb/907965 Thankfully I had already downloading the windows SDK to get SvcTraceViewer for WCF, so I had the MsiZap utility. After I was done with the KB article, I deleted the registry keys specified here as well: http://blogs.msdn.com/astebner/archive/2005/11/14/492765.aspx UPDATE: It's been a little over a week since this all went down. I'm happy to report that everything is pretty much back to normal. Some of the VS addins needed to be reinstalled, like TestDriven.Net and the Business intelligence stuff for SQL 2005. I found a posting on how to re-install the sql BI: go to the location for SQL Server setup and run .\Tools\Setup\vs_setup.exe. This will install the VS Shell. After this is installed repair the BI Studio installation by running the following from the command line from the .\Tools directory: start /wait setup.exe /qb REINSTALL=SQL_WarehouseDevWorkbench REINSTALLMODE=OMUS Unfortunately, it still didn't give me BI support in VS 2008.
Today I came across 2 articles relating to SQL server. The first, talks about determining events that take place during a time slice. I can see possible uses for this in scheduling, and definite use in reporting. The second article, discusses some new features and functionality in SQL 2008. Below are some quick notes that were important to me. - Transparent DB encryption - I'm more in interested in transparent table encryption, including indexes (in case the index contains sensitive data). Further research is needed. I know SQL 2005 has some encryption functionality, so I'm interested in what has exactly changed.
- Built in support for auditing data. Configured thru T-SQL.
- Data Compression.
- MS says slight processor performance hit on compression, but made up due to less I/O.
- It will be an interesting exercise to see how this will work on VMWare.
- Resource Governor
- Prevent users or groups from consuming high levels of resources.
- Since everyone is going to be coming in as Network Service (a rather large assumption), be interesting to see if we can still take advantage of this
- HotPlug CPU
- Don't know if we can take advantage of this. Probably only if we were using blades.
- Performance Data
- Sql Dashboard to display
- Suggestions for improving performance
- Current and historical data
- Installation sounds allot easier
- Configuration data separate from engine, so you should be able to setup once, deploy multiple servers and then configure.
- Should help with cloning.
So I got around to adding Database rollback functionality to my MSTest unit tests by using an article I read in MSDN magazine back in 04, before switching to MBUnit at my last job. Everything was working great on my local computer (Vista even), and then I checked in my tests, and the failed, horribly on the build server. Fist issue was MSDTC network access was not enable, so I fixed that, but Then the build wouldn't even complete. I dropped down to a console window and ran the tests manually using the MSTest command line tool. When running all of the tests, it hung after about test #9 of 17. When running the tests individually I was getting MSDTC errors. After spending too long just randomly trying DTC settings, I rememberd the trusty MSDTC testing tool I had stashed away for problems like this. Got that copied over to the build server and.....a generic error message that had me searching on google to no avail. Around this time, I noticed that the event view was conviently located in the same MMC windows as Component Services, and had ment to check it for the past 30 minutes, I finally opened it up and BAM, there it was, a DTC error, but would it give me a clue as to what the problem was? YES! Not only a clue, but a god dam solution to boot (a welcome change). The problem? My build server was from the same clone as my Dev Server that had the SQL DB on, and since I did not use sysprep, but SysInternals NewSid app, the DTC was not setup correctly (they both had the same ID). The solution? Run msdtc -uninstall and then msdtc -install from the command line to reinstall msdtc. I had to run msdtc -install twice and click around in the Component Services windows a couple of times before i could get DTC configured for using a local cooridantor, but in the end, it was running. Back to dtctester, which passed, back to my command line unit tests, which passed, back to the build server, which passed. Now because I like the extra challenge, I thought I'd enable windows firewall on the build server as well. Whooops, broke it again, but I knew I had gotten DTC to work before so it was just a matter of comparing settings. It's pretty easy to get DTC to work with windows firewall, just enable an exception in the firewall for c:\windows\system32\msdtc.exe, and don't forget to restart MSDTC service for changes to really take affect. Bam, everything works, and now, I can go home.
So I got around to adding Database rollback functionality to my MSTest unit tests by using an article I read in MSDN magazine back in 04, before switching to MBUnit at my last job. Everything was working great on my local computer (Vista even), and then I checked in my tests, and the failed, horribly on the build server. Fist issue was MSDTC network access was not enable, so I fixed that, but Then the build wouldn't even complete. I dropped down to a console window and ran the tests manually using the MSTest command line tool. When running all of the tests, it hung after about test #9 of 17. When running the tests individually I was getting MSDTC errors. After spending too long just randomly trying DTC settings, I remembered the trusty MSDTC testing tool I had stashed away for problems like this. Got that copied over to the build server and.....a generic error message that had me searching on Google to no avail. Around this time, I noticed that the event view was conveniently located in the same MMC windows as Component Services, and had meant to check it for the past 30 minutes, I finally opened it up and BAM, there it was, a DTC error, but would it give me a clue as to what the problem was? YES! Not only a clue, but a god dam solution to boot (a welcome change). The problem? My build server was from the same clone as my Dev Server that had the SQL DB on, and since I did not use sysprep, but SysInternals NewSid app, the DTC was not setup correctly (they both had the same ID). The solution? Run msdtc -uninstall and then msdtc -install from the command line to reinstall msdtc. I had to run msdtc -install twice and click around in the Component Services windows a couple of times before i could get DTC configured for using a local coordinator, but in the end, it was running. Back to dtctester, which passed, back to my command line unit tests, which passed, back to the build server, which passed. Now because I like the extra challenge, I thought I'd enable windows firewall on the build server as well. Whooops, broke it again, but I knew I had gotten DTC to work before so it was just a matter of comparing settings. It's pretty easy to get DTC to work with windows firewall, just enable an exception in the firewall for c:\windows\system32\msdtc.exe, and don't forget to restart MSDTC service for changes to really take affect. Bam, everything works, and now, I can go home.
|