Welcome to Geekdojo Sign in | Join | Help

Change Data Capture (CDC) is great new technology available in SQL 2008, and I highly recommend looking into it for those of you who need to track changes to tables. However, when enabling CDC, make sure you create the CDC role first. If you run the stored procedure provided:

USE MyDB
GO
EXEC sys.sp_cdc_enable_table
@source_schema = N'dbo',
@source_name = N'MyTable',
@role_name = N'MyRole',
@filegroup_name = N'MyDB_CT', @supports_net_changes = 1 GO

passing a Role name which does not exist or using NULL will result in the creation of a user rather than a role. This can cause issues later if you try accessing the data using a user who is not a member of DBO.

0 Comments
Filed Under:

The Nativity
by C.S. Lewis


Among the oxen (like an ox I'm slow)
I see a glory in the stable grow
Which, with the ox's dullness might at length
Give me an ox's strength.

Among the asses (stubborn I as they)
I see my Savior where I looked for hay;
So may my beast like folly learn at least
The patience of a beast.

Among the sheep (I like a sheep have strayed)
I watch the manger where my Lord is laid;
Oh that my baaing nature would win thence
Some woolly innocence!

Here’s the wordle for this site. It’s a Java applet that takes in text or a URL and creates a Word Cloud out of it.

Just because, I decided to Wordle the White House's blog...interesting, isn't it, that "think" is bigger than "know."

http://urbanlegends.about.com/od/barackobama/a/harold_estes.htm

"It is the duty of every man to render to the Creator such homage, and such only, as he believes to be acceptable to him. This duty is precedent both in order of time and degree of obligation, to the claims of Civil Society. Before any man can be considered as a member of Civil Society, he must be considered as a subject of the Governor of the Universe." --James Madison, A Memorial and Remonstrance, 1785

0 Comments
Filed Under:

Something we found yesterday, which, in retrospect kinda almost sorta makes sense…we generally run our Reporting Services instances in a multi-tier format, i.e., web server running the website, app server running the RS web portions (occasionally, this also runs on the web server), and the database doing its thing. Well, after upgrading the web/app site to SP3, our datasource stopped working. Turns out that because the credentials are stored securely in the database, the SP3 upgrade invalidates that encryption and sets the datasource to Windows Integrated Security by default. That was a headache.

I’m having some “fun” trying to get the Personal Web Site sample from the Azure SDK up and running. I’m running VS 2010 on a brand new Windows 7 install, and the solution won’t compile because it’s missing the

 

First, I had to comment out these lines:

<!--Import Condition="'$(BuildingInsideVisualStudio)'=='true'" Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v9.0\WebApplications\Microsoft.WebApplication.targets" /-->
  <!--Import Condition="'$(BuildingInsideVisualStudio)'!='true'" Project="..\..\MSBuild\Microsoft.WebApplication.targets" /—>

to even get it to convert. After staring at it for awhile, it suddenly dawned on me…duh…change the “v9.0” to “v10.0.”

Instant Azure wonderfulness….well, maybe not…but at least it compiled!

Gotta love this... Truth About Twitter

Just in case you wanted to know

In reading this article regarding ownership of the moon, on this, the 40th anniversary of the moon landings, made me want to break out my copy of Heinlein’s The Moon is a Harsh Mistress.

Don’t forget to check out the re-mastered Moon landing videos from NASA.

That’s what the teacher of the law asked Jesus in Luke 10:25-37 (otherwise known as the Parable of the Good Samaritan).

I was having a lunch with a buddy of mine yesterday, and, since his wife is studying to be an attorney, the subject of law and lawyers came up (he had some good news to relate regarding her studies). I happened to mention that I’ve been reading Team of Rivals, and, in the book, the author stresses the point that the path to power, wealth, and prestige generally came through reading the law.

That prompted a thought this morning regarding what the per capita of attorneys might be with respect to the U.S. population, which, according to one source, turns out to be approximately 7.48% (with the highest concentration, naturally, in Washington D.C. = 2.77%). By comparison, the percent of the U.S. population engaged in the plumbing industry is 0.19%.

And that made me wonder if the reason we have so many attorneys isn’t directly related to our sinful nature.* It was our sense of Entitlement, our mistaken idea that we, too, deserved to be gods, which caused the Fall in the first place. And, ever since then, God has recognized our need for Law, presumably as a direct acknowledgement of our litigious fallen nature. We, of course, have taken that to extremes and applied beyond the spiritual to the physical realm of our existence. Everything we do is contract based – I’ll do this if you do that…and, if you don’t, well, get a lawyer. Everything’s about what’s legal or not (not whether it’s right or wrong) and what I deserve according to the contractual obligations.

For me, it casts the “teacher of the Law” in the passage in an entirely new light and especially with verse 29 wherein he feels the need to justify himself. His response smacks of the same wish fulfillment Entitlement philosophy to which the Rich Ruler adhered. It’s that great juxtaposition between the inborn knowledge that we were born and destined for greater things (being made in His image) and our poorly placed faith in our ability to get there of our own strength and effort. It’s the genesis of works-based salvation and legalism.

We still want to be our own god.

 

 

* Note that this is not a rant against attorneys. They’re a symptom, not the cause. One might note in passing, however, that the phrase “teachers of the Law” returns several instances throughout the Bible, and not very many of those are flattering.

So, I opened this up to write about it (even thought it's Day 2 and you've already heard all the good stuff), and I just realized that I left my notes back in the hotel. I had to go old school with the notes (pen and paper) because I forgot to get an extended life battery.

The good news is that I just got "The Goods," and, regardless of what you think is on it, the 160Gb Western Digital USB powered external HDD is well worth it alone.

Attendee party at Universal Studios is tonight, so I don't expect to get much more in before then. Until then, do a search for Software + Service, Windows Azure, and Live Services for the big stuff and .Net 4 (and the Dynamic Language Runtime) for the "little" stuff to see what I would've written about.

So, we're finished with the first part of the pre-conference, broken up in to very manageable 2-hour chunks across today. By which I mean, of course, that we got to eat lunch. The only comment I have about lunch is that it seemed to cater rather extensively to a vegetarian crowd...lot's of meatless choices.

So, on to Silverlight...

Our presenter is Jeff Prosise, an engaging speaker who appears to be quite knowledgeable regarding Silverlight. The funniest thing he's said so far has nothing to do with Silverlight, of course: he wants us to "grok" all this stuff. Being a Heinlein fan, I appreciated the reference.

Grok is a good term for Silverlight in any case. You have to fully immerse yourself into the Silverlight experience in order to really appreciate the technology, and, by doing so, you, as the observer, will become part of the observed, i.e., resistance is futile. Prosise calls it a "game changer," and I would find myself hard pressed to argue against that interpretation. A browser plug-in which doesn't require me to learn a new coding paradigm and in which I can basically fully utilize my hard-earned .Net experience.

I plan on using this space not to cover really technical aspects of things, unless they happen to be really cool, but more as a whiteboard on which I can pass on nuggets of the really interesting parts of the presentations that you can only get from being here.

For instance, you can check out the beta site for Microsoft's Silverlight enabled search engine at tafiti.com.

Note, the one other really interesting thing that Prosise pointed out, so far, concerns the "Core" Base Class Library (BCL). He specifically called out that, in the seven assemblies the comprise the so-called "CoreCLR," it's interesting to see System.Threading. You can use Silverlight to write a mult-threaded downloadable application! How cool is that?

Well, technically, it began yesterday since I flew out on Saturday. I've already managed to lose (and find) my credit card, get ripped off for wireless Internet access at the hotel, eat way too much, and lose a lot of sleep because of the time change. I woke up at 4am this morning (local) because, of course, my body is used to waking up at 6 at home. And that was after an apparently all night party going on at the hotel that kept me up late. It makes me feel for the rather large European contingent here at the conference. On the other hand, the free Starbucks coffee is helping!

Enough about my travails already. I'd love to talk about the Conference, but I can't...mostly because it hasn't started yet. I'm waiting for the all day Pre-Conference session I've chosen (Creating Rich Internet Applications with Silverlight) to start. The only thing I can actually comment so far is breakfast, which was surprisingly good. Oh, and, of course, I've already scored my first T-shirt which everyone gets as part of conference participation, but nonetheless, I'm now one up in the Grand Championship T-Shirt Scrounging Contest on my co-workers.

Stay tuned...

Just to carry the example a little further and show the code behind the $64 String, I thought I'd share with you the two methods I was using to read the values of the key.

First, we have the FileStream method, which, basically, reads each byte in sequence and appends it to a byte array:

  65 FileStream fs = new FileStream(AppDomain.CurrentDomain.BaseDirectory + "/keyStore.txt", FileMode.Open);

   66 byte[] key = new byte[fs.Length];

   67             fs.Read(key, 0, (int)fs.Length);

   68             fs.Close();

   69             fs.Dispose();

   79 cryptoProvider.Key = Convert.FromBase64String(sKey);

Note that the result is a byte array of the appropriate length. Obviously, as you read in the previous post, that didn't work so well in this particular instance. I needed to read the entire contents of the key store into a single string so that I could perform the appropriate operation on it. So, enter the StreamReader:

   73 StreamReader sr = new StreamReader(AppDomain.CurrentDomain.BaseDirectory + "/testKey.txt");

   74 string sKey = sr.ReadToEnd();

   75             sr.Close();

   76             sr.Dispose();

So, the StreamReader reads the entire contents into a single string, rather than a byte array, allowing the conversion operation, which, oddly enough converts into a byte array (but of the appropriate size):

  79 cryptoProvider.Key = Convert.FromBase64String(sKey);

Now, note, under the covers, the StreamReader, once passed a path, is simply opening a FileStream object and wrapping it for me. But I'm ok with that, as it's less plumbing that I have to write!

More Posts Next page »