Tuesday, October 03, 2006 - Posts

Bumped up against and interesting problem today.  Seems that Management Studio by defaults save your code as Unicode, UCS-2 to be exact.  Previously, Query Analyzer saved files in ASCII text format.  You might be saying, who cares!  Ah, but if you want to use source control (especially non-Microsoft flavors), you might.  We found the problem when we realized that files were being checked in as Unicode, and our deployment automation tools were not working.  At my current client, we use Borland StarTeam for Source Control. StarTeam was treating the files as Binary, which meant we couldn't diff, merge, search, etc. 

Well after a bit of research, there is a work around for this UNICODE vs. ASCII problem in SSMS. You can save as something different by clicking File | Save (or Save As…). When the dialog box appears, click the drop down on the Save button. Choose Save With Encoding

Another box will appear allowing you to choose ASCII text. I could find no way of making this the default, so if someone does posting it would be appreciated.

So if you want your developers to be sure their files are ASCII, this is the only way I could find. Here's a less than politically correct opinion from HsuGotaQ on a blog. http://hsugotaq.spaces.live.com/blog/cns!B10E712EC5D7D360!863.entry. Thanks for that input. 

with 0 Comments

In his post on DB Snapshots, Andrew Calvett offers some great examples of how to use DB Snapshots.  I'll offer another. 

I currently work with a General Ledger and Accounts Receivables system that has some large batch cycles.  Testing for these behemoths can take hours at a time, which only changes a fraction of the database.  A second run of a batch test sometimes must wait on a database restore, which severly limits the number of test cycles in a day.  I'm working to use snapshots to speed up the database restore time, allowing the QA team to get more than 1 test per day. 

Pros :
Restore performance could be greatly increased
More testing = better code (or so you'd hope)

Cons:
If the batch changes a lot of data, size could be a factor
There will be some performance overhead as a write to the source DB means a copy of the page to the snapshot DB.

What do you think about database snapshots?  How are you using them?

Jon

with 0 Comments