January 11, 2012

So I Bricked my Kindle Fire…And Got it Back Again

Filed under: Uncategorized — Joe Casella @ 9:02 pm

I was growing tired of the Kindle Fire’s Carousel and decided to try a new launcher. Without doing my homework, I downloaded and installed the Ice Cream Sandwich Launcher.  My Fire got stuck in an endless loop at launch, with an error screen that said:

"Sorry, the ics 4.0 application launcher (process android.process.acore) has stopped unexpectedly. Please try again."

I tried the steps in this helpful thread, but they didn’t solve the problem (it’s definitely worth checking out, though). I finally gave up and decided to restore my Fire to factory settings as described in this blog post. It worked perfectly, the first time. 

When I lunched the Fire after the restore I had to register again and reconnect to my wireless network.  All of my books and documents were still there, but the applications needed to be downloaded again from the cloud. I also had to reinstall the Nook reader I discussed in my earlier post.

I’m glad to have everything working again, but I’d rather have spent the evening playing Skyrim…

December 31, 2011

Reading Nook Books on a Kindle Fire: How to Install the Nook Reader on Your Fire Without Rooting it.

Filed under: Uncategorized — Joe Casella @ 2:31 pm

I bought a first-generation Nook shortly after they were released and it soon became one of my favorite possessions. No matter where I was, my favorite books and magazines were always available! My Nook library eventually grew to contain almost 100 books. A few weeks ago my Nook died, leaving me without easy access to that library.

This week, I replaced the Nook with a Kindle Fire. The Fire is a beautiful reader, but there’s no native way to access the Nook library that I’d spent hundreds of dollars to build. Each platform uses proprietary DRM and the Nook’s Android reader isn’t available in the Amazon App store. The Nook reader can be installed on a Fire, however, and you don’t need to root it. All you have to do is visit another Android app store in the Fire’s browser, download the Nook for Android reader, and run the installer.

The Nook application is available in several Android markets but I had the best results using to email myself a link to download the file, which I then opened in the Fire’s mail reader. This CNET article, which generated a lot of buzz, suggests using, but the Nook app is no longer available there. Google’s own app store won’t work because the Fire can browse to, but not download from its Android Marketplace. Once you’ve found the Nook application, here’s all you need to do:

  1. Enable installing android apps on the Fire: Go to Settings—>More—>Device—>Allow Installation of Applications From Unknown Sources and select “on”.
  2. Download the Nook reader to the Fire: I had Handango email me a download link to the application, which I opened in the Fire’s email app.  Clicking the link opens the Fire’s browser and begins downloading the app to the Downloads folder in the Fire’s file system.
  3. Using a File Browser, navigate to the Download directory, and click the Nook reader’s .apk file to launch it:  I installed “ES File Explorer” from the Fire’s marketplace, but other browsers should work. The file should be easy to find because its icon is a Nook logo.
  4. Launch the Nook Reader, log into your account, and enjoy your library! The Nook reader will appear in the Fire’s application menu and carousel.

The only limitation I’ve found so far is that the Fire seems to be storing the Nook books in its Application Storage, which only has 1.7 GB of space, instead of in it’s internal storage, which contains 5.36 GB of space. 

July 28, 2011

Resolving My Problems Installing and Using the Windows Home Server 2011 Connector

Filed under: Windows Home Server — Joe Casella @ 10:53 pm

Are you having problems installing the WHS 2011 Connector or connecting to your server with Launchpad?  If so, you may want to check the status of your NetTcpPortSharing service.  I’ve found that issues with this service can cause both problems.

My Windows XP PC, with the Connector installed, was having intermittent problems connecting to a WHS 2011 machine through the Launchpad. Sometimes, when I tried to connect,  I’d receive the error: “The server appears to be offline. Do you want to sign in to offline mode.” There didn’t seem to be a problem with the server because it was accepting RDP and Dashboard connections.

I uninstalled the connector and tried to reinstall it, but each time the installer would fail with an “unknown error” and roll back. There was nothing in the PC’s application error log, so I checked the WHS installation log and found the following error:

Could not ensure NetTcpPortSharing service is Running: System.ServiceProcess.TimeoutException: The timeout provided has expired and the ‘NetTcpPortSharing’ service has not reached any of the desired states. Desired states are ‘Running’, ‘Paused’, ‘Stopped’, and the current state is ‘StartPending’).

(The log isn’t in an obvious place. It’s in C:\Documents and Settings\All Users\Application Data\Microsoft\Windows Home Server\logs)

With the service in a StartPending state, I couldn’t manually restart or stop it. Rebooting didn’t help—the service would still suspend in a StartPending state. Eventually, the PC wouldn’t even maintain a wireless network connection. I don’t know what caused this problem but after a lot of troubleshooting, I think it resulted from problems with installing the .Net Framework 4.0.  I eventually gave up and did a clean install of Windows and the .NET Framework. After that, the WHS 2011 Connector installed without any problems.

The NetTcpPortSharing service is set to start up automatically on that PC but I’ve found that I still receive an occasional “server appears to be offline” error.  Each time, starting or restarting the service resolves the problem.

June 30, 2011

My Windows Home Server Project

Filed under: Windows Home Server — Joe Casella @ 10:27 am

I haven’t posted for a couple of weeks because I decided to build a Windows Home Server and the project wound up consuming a lot of my free time. As I was researching the build I was disappointed to find how few people had written about their experiences with the 2011 version, so I decided to chronicle mine here.

My family has accumulated a lot of devices over time (cameras, mp3 players,eBook readers, computers, Xbox, a real server…) and our files are scattered among them all.  It became a challenge to keep track of what’s where and to make sure it’s all backed up. Creating shared folders and a Windows HomeGroup helped, but it didn’t make sense to leave all the household computers on just in case we need a file, especially since the gaming PC idles at about 145 watts.  Backups eventually involved manually connecting a portable drive to each and running windows backup each weekend.

Network-storage seemed like a natural solution. I’d started shopping a NAS when a friend told me about Windows Home Server. WHS offers all the features of a good NAS: centralized storage and backups, remote access, and streaming, along with a number of additional features such as web hosting and the ability to monitor the health of all the computers on the network.  It’s built off of the Windows Server 2008 r2 base, supports 3rd party plug-ins, and there’s an SDK available–giving me yet another excuse to tinker with PowerShell.  After reading the MS website and a few blogs and reviews, I was convinced that WHS was the way to go.

WHS 2011 is relatively new and there aren’t many pre-configured machines unavailable. The ones that are look like they’re built on previous-generation hardware that meet the system requirements but don’t seem to have much capacity future growth.  Once you add drives they also cost a little more than I wanted to spend, so I decided to build a system from scratch.  My goal was to keep the project as close to $500 as possible, a bit low for a desktop, but attainable for this build because I already had access to the WHS2011 software through TechNet, saving me the $100 cost of an OEM license.

(As an aside, if you build your own PCs, it’s really worth checking out TechNet. You get access to all the Microsoft Operating Systems, Office, and all of the Servers for a single annual fee. It’s been fantastic way to build a study/test environment at home that mirrors the one at work.  If you decide to sign up, make sure you Google around for a discount code!)

In my next post, I’ll describe the hardware I chose and my experience working with it.

June 6, 2011

Meme Monday: Please, Don’t Ask Stupid Questions

Filed under: SQLServerPedia Syndication — Joe Casella @ 9:15 am

I’ll never forget my very first day as a philosophy TA. I’d been assigned to”Introduction to Ethics” and Professor Oldenquist was describing his expectations and class mechanics. After explaining that, “no, ethical theory is not just a matter of opinion” and “yes, we can give you an objective grade”, he walked to the edge of the stage, smiled wryly, and said: “There’s one more thing I’d like to clear up: you may hear some of your professors say that ‘there’s no such thing as a stupid question’. They’re wrong. That’s rubbish. There are stupid questions, please don’t ask them in my class.”

He paused for effect and continued, “A stupid question is one whose sole purpose is to make the speaker look bad or the questioner look good.  Please, don’t ask them in my class”.

We still got our share of “stupid” questions (embarrassing new TAs is a Big 10 sport, after all) but I think that bit of administrivia was his most important lesson of the quarter.

Which brings me to “Stupid SQL Questions”, the subject of this month’s MemeMonday creative writing assignment.

Whenever I’m at a user group or seminar and the speaker says “there’s no such thing as a stupid question.”   I remember Professor Oldenquist.  Yes, there are stupid questions.  In a professional context, a stupid question is one that’s designed to make the speaker look bad, the questioner look good, or one that derails the speaker from the presentation’s topic to “a problem I encountered this week.”

Yes, there are stupid SQL questions: please, don’t ask them.

June 1, 2011

Finding an Expression Definition in a Graphic Execution Plan

Filed under: SQLServerPedia Syndication,T-SQL — Joe Casella @ 10:18 pm
Tags: ,

Today on Twitter #SqlHelp, someone asked how to find the definition of an expression in a graphic execution plan. I thought I’d pass along my answer in case it helps someone else.

Consider a very simple query, which includes a scalar operator, such as a SUM():

  1. SELECT ProductID
  2.       , TotalQty = sum(sd.OrderQty)
  3.   FROM AdventureWorks2008R2.Sales.SalesOrderDetail  sd
  4. GROUP BY ProductID

It produces a simple graphical execution plan like this:


Examining the Hash Match operator shows an output named “EXPR1002”. It’s a calculated expression, but what’s its definition?


To find a calculated expression’s definition, select the operator and hit F4 to bring up the Properties window.  The definition is in the Defined Properties entry.  Here, it’s the SUM() of the OrderQuantity.


In a more complex query the output of one operator may be used by another operator, resulting in expressions operating on expressions, so you may need to check more than one step to find the fields involved.

May 10, 2011

TSQL-Tuesday # 18: Using a Recursive CTE to Create a Calendar Table

Filed under: SQLServerPedia Syndication,T-SQL — Joe Casella @ 6:20 am
Tags: , ,


This month’s TSQL-Tuesday topic is so much fun to write about that I’ve decided to create a second post.

When Recursive CTEs were introduced in SQL Server 2005, many people gave examples of how they can be used to generate a “numbers” table.  (I’ll ignore the debate about whether it’s the best way to generate the table, or if we should even care).   Well, once you have a numbers table it’s easy to create a Calendar table or Date Dimension.

The script consists of three parts.  The first section is a recursive CTE, using a method attributed to Itzik Ben-Gan, that generates a numbers table.  In the second section, each number in the table is added to your starting date to generate a list of days between the start and end dates.  Each date is also associated with the first date of its fiscal year using a creative approach I learned from this forum post.  This “first date” of a fiscal year will be used to perform the fiscal date calculations in the final step. Finally, the days CTE is used with a series of date functions to populate the calendar table or date dimension.

  3. DECLARE @StartDate smalldatetime = '01/01/2009' –First Calendar date to include in table
  4. DECLARE @EndDate smalldatetime = '12/31/2011' –Last calendar date to include in the table
  5. DECLARE @FiscalBeginMonth smallint = 10  –Month in which the fiscal year begins e.g. October 1
  6. ;
  8.    WITH –This secton generates the number table
  9.         E00(N) AS (SELECT 1 UNION ALL SELECT 1),
  10.         E02(N) AS (SELECT 1 FROM E00 a, E00 b),
  11.         E04(N) AS (SELECT 1 FROM E02 a, E02 b),
  12.         E08(N) AS (SELECT 1 FROM E04 a, E04 b),
  13.         E16(N) AS (SELECT 1 FROM E08 a, E08 b),
  14.         E32(N) AS (SELECT 1 FROM E16 a, E16 b),
  15.    cteTally(N) AS (SELECT ROW_NUMBER() OVER (ORDER BY N) FROM E32),
  16.     –This CTE generates a list of calendar dates
  17. CalendarBase as (
  18. SELECT
  19.         DateKey = n
  20.       , CalendarDate = DATEADD(day, n 1, @StartDate )
  21.       , FiscalYearBegin = DATEADD(MONTH, DATEDIFF(MONTH, 0, DATEADD(DAY, n 1, @StartDate )) (12 + DATEPART(MONTH, DATEADD(day, n 1, @StartDate )) @FiscalBeginMonth) % 12, 0)
  22.    FROM cteTally
  23.   WHERE N <= DATEDIFF(day, @StartDate , @EndDate +1)
  24. )
  26. –Finally, use the list of calendar dates to fill the date dimension
  27. SELECT DateKey
  28.     , IsoDate       = CONVERT(char(8), CalendarDate, 112)
  29.     , CalendarDate
  30.     , CalendarYear  = YEAR(CalendarDate)
  31.     , CalendarQuarter =  (DATEPART(QUARTER,CalendarDate) )
  32.     , CalendarMonth = MONTH(CalendarDate)
  33.     , CalendarDay   = DATEPART(DAY, CalendarDate)
  34.     , DayofWk       = DATEPART(Dw, CalendarDate)
  35.     , CalendarWeekOfMonth = DATEDIFF(week, DATEADD(day,1, CalendarDateDAY(CalendarDate) + 1) 1, CalendarDate) +1
  36.     , WeekofYr      = DATEPART(WEEK, CalendarDate)
  37.     , DayofYr       = DATEPART(DAYOFYEAR, CalendarDate)
  38.     , NameMonth     = DATENAME(Month, CalendarDate)
  39.     , NameDay       = DATENAME (Weekday,CalendarDate )
  40.     , FiscalYear    = CASE WHEN MONTH(CalendarDate)  < @FiscalBeginMonth THEN  YEAR(CalendarDate)
  41.                            ELSE YEAR(CalendarDate) + 1 END
  42.     , FiscalMonth    = DATEDIFF( MONTH, FiscalYearBegin, CalendarDate) + 1
  43.     , FiscalWeek     = DATEDIFF( WEEK, FiscalYearBegin, CalendarDate) + 1
  44.     , FiscalDay      = DATEDIFF( day, FiscalYearBegin, CalendarDate) + 1
  45.   FROM CalendarBase

Here’s a sample of the output:

  1. DateKey         IsoDate  CalendarDate            CalendarYear CalendarQuarter CalendarMonth CalendarDay DayofWk     CalendarWeekOfMonth WeekofYr    DayofYr     NameMonth            NameDay        FiscalYear  FiscalMonth FiscalWeek  FiscalDay
  2. ————— ——– ———————– ———— ————— ————- ———– ———– ——————- ———– ———– ——————– ————– ———– ———– ———– ———–
  3. 1               20100510 2010-05-10 00:00:00     2010         2               5             10          2           3                   20          130         May                  Monday         2010        8           33          222
  4. 2               20100511 2010-05-11 00:00:00     2010         2               5             11          3           3                   20          131         May                  Tuesday        2010        8           33          223
  5. 3               20100512 2010-05-12 00:00:00     2010         2               5             12          4           3                   20          132         May                  Wednesday      2010        8           33          224
  6. 4               20100513 2010-05-13 00:00:00     2010         2               5             13          5           3                   20          133         May                  Thursday       2010        8           33          225
  7. 5               20100514 2010-05-14 00:00:00     2010         2               5             14          6           3                   20          134         May                  Friday         2010        8           33          226

Do I get extra credit for writing two posts?

Next Page »

Create a free website or blog at