Saturday, December 4, 2010

Migration to a larger Micro SD Card with Android

When I first purchased the HTC Incredible it came with a 2gb micro sd card.  Plenty of space for the time and considering most of the space would be utilized by photos and or music it really worked well for me.  Now that Froyo has come out and we can move Apps to the SD Card I decided to purchase a larger Micro SD Card.  I picked a Sandisk 16 GB Micro SD card.  While it sat next to my computer for a couple of weeks I really wanted to migrate everything over to it so I can start carrying only my Android phone and leave my iPod touch at home.  So, just how hard is this process?  Do you need special software to do it?  I decided to find out.

I popped the battery cover off of the HTC Incredible and pressed the Micro SD Card inward, out it popped.  I placed it inside an SD Card reader housing and inserted it into my Dell XPS card reader.  Up popped the dialog asking what I wanted to do.  I chose view files.  I then went to my NAS disk and created a backup directory called \Backups\Phones\HTC Incredible\ .  I looked at the total number of files and checked my settings to make sure show hidden and system files was checked and then hit ctrl-A to select everything.  Then I hit ctrl-c to copy everything and started a paste to my previously created backup directly.  The 4700 or so files took about 5 minutes to copy over and was around 900 Megabytes in size.  The only problem I ran into was with 8 files that were in the item.cache and it told me that the names were too long to copy, I skipped them so I crossed my fingers that these would not be needed for my phone to be operational.

Once I had this backup I compared the details of the files in the backup directory to the contents still on the smaller micro sd card and they matched save for the 8 files I had skipped.  Now I took the 2 gig micro card out of the SD Reader.  I wanted to make sure that the phone could read the new 16 gig card so I put it into the phone and checked settings, 14.83GB is what it showed which sounded like it makes sense so I popped the card back out and into the SD Reader so I can copy files from the backup directory.  Interesting, when I viewed the files on the computer it appears that the Android system, on preparing the SD card when I put it into the phone, placed some directories on the card.  It included


So, a couple of those are Apps that I know I have and the remainder are system folders.  Now, to see if this copy process will work.  My backup plan here is to just go back to the 2 gig card as I haven't deleted anything off of it yet.  I am probably going to get some duplicates during the copy because of the system created directories but I'll just overwrite and see what happens.  So, I do the reverse of what I did before, I got to the backup directory, copy all files with ctrl-a ctrl-c and then paste them into the 16 gb card's window.  The copy is taking 6 minutes or so.  I begin to ponder what a regression test of this process will be.  Should I go through each and every application to ensure it works as before?  That would take way too long.  I decide that I will reboot the phone with the new card installed and all files intact and make sure it comes up at a minimum and then go through and try my most frequently used "on SD card" applications.  I will be fairly certain all is well by the time I get through these tests.

Ok, what a mess!  It appears that everything that was installed to the SD card now fails on run with a force close.  The icons are now all replacted with the default android icon instead of the app's original icon.  Even more fun, I put the original 2 GB card back in and it is all still messed up.  Reboot the phone, hmmm, all the weird icons are gone but now it looks like 50% of my applications are missing.  Ok, this is going to suck.  Wait, icons are appearing, everything is back to normal, just like the system had to read it all back in and rebuild some cache files?  Anyway, whew, that was a bullet dodged.

So now I am in place with all of this new space what will I do with it?  My primary reason for converting to the larger card was to have space for music and possibly movies.  I have a large collection of MP3's and for years have used an Ipod Touch for all my Music and Apps.  Now that I'm an Android convert I want to use it for music.  Hopefully I will be able to use the Android built in applications for managing the music but I've heard they are not great.  I am going to start looking for a good app, even if it is pay for managing and listening to my music collect.  Any suggestions would be greatly appreciated.  I hope you've enjoyed this short walk through and even though it's not very complicated maybe it will help someone out there to do the same thing if they are concerned over the process.

Tuesday, April 27, 2010

Toastmasters, finishing my Competent Communicator Manual

This week I will give my 10th and final speech of the competent communicators manual.  It is a speech to inspire your audience and hopefully I will do that and not bore them to tears!  I have been having a lot of fun with Toastmasters and hope to ultimately achieve the highest accolade of Distinguished Toastmaster (DTM).  I hear there are only a few thousand of them in the world and this might be the launching pad for my goal to be on the motivational speaking circuit.  I seem to be able to write well and I seem to be able to speak well in front of audiences so together maybe I can do something good in this world and maybe make a few bucks at it.

I sometimes wonder why I got back into the club.  I have a great job at a great company and there was a local club right inside the building I work in so getting to it was pretty easy.  The meetings are over our lunch hour and usually end on time.  All I really had to do was show up.  It's not that easy though.  As a Toastmaster it is so very important to work the program because you get out what you put into it.  So far I've played just about every role in the club including grammarian, toastmaster and evaluator in addition to giving my requisite speeches.  I've even become involved in committees that are responsible for putting on special events such as membership drives and awards celebrations.  The one thing I haven't done is become involved in leadership which I will need to do if I want to become a DTM.

So, after I give my speech this week I will begin working towards advance communicator Bronze level.  This award will be given after 10 more speeches from two completely new manuals that I will have to pick.  Then Silver level is 10 more speeches and Gold is still 10 more.  All along there are other requirements as well.  My goal is to have this completed by the summer of 2012 so just over 2 years to get it done.  Hopefully by then I will also be in leadership with my job and be running a team of database designers/developers for the bank.  I do have great aspirations and the club helps me to keep focused on soft skills that my technical job sometimes does not allow me to flex.

I will keep you posted on my progress towards DTS, thanks for reading.

Sunday, March 14, 2010

Adventures in Upgrading to Windows 7

Recently I purchased an OEM License of Windows 7 64 bit Home Premium from the wonderful online retailer Newegg. I have been running XP Professional for I don't know how long now, at least 5 years, probably more. I was on Service Pack 3 and things were actually quite stable. I am running the following hardware for reference purposes...

  • Asus AV8-XE Motherboard
  • AMD Athlon 64 X2 Dual Core CPU at 2200 MHZ
  • 4 Meg of System Memory
  • Ati Radeon 2900 Pro
  • VIA VT8251 High Def On Board Audio
  • WD740GD 74 Gig 10000 RPM Sata Drive C
  • ST3250823AS 250 Gig 7200 RPM Sata Drive D
  • DVR-111D Pioneer DVD-RW ATA

My first line of business was to get all of my data off of the existing drives. For this reason I purchased a DLink DNS-321 Network Attached Storage and threw a couple of Western Digital Green 1.5 TB drives into it. This journey will be a separate post but I wanted to note it here anyway as it was an important pre-step for this upgrade. Things to think about when you are migrating include

  • Photos
  • Music
  • Documents
  • Game Saves
  • Applications that save outside of My Documents
  • Outlook PST files
  • Favorites
  • Anything else you can think of

Basically what I did is just backed up everything I could think of to the NAS. It took a long time to do this over the network but it was worth it as I was sure that I could get something back if I needed it. The peace of mind is good to have and will save you once you wipe your drive for the operating system upgrade.

Ok, so we've got everything backed up now and are ready to get started. First things first, you have to go into your BIOS settings and make sure you can boot from your DVD drive. In my case I hit the DEL Key while the machine is coming up and then go into the boot settings. Move the boot priority up on the DVD drive (just make sure it is above the Hard Disk). Now exit and save your settings and if the Windows 7 DVD is in it will ask "Hit any Key to boot from DVD". Do so and a few moments later you'll see the cool new Windows 7 installation screen.

After getting through the initial screens I came to the screen which is always fun. I like to call it the blow away your hard drive screen. Here is where you can delete the partitions. Now, since I had backed everything up to the NAS I could confidently press the keys to delete my primary windows partition. Although even having this backup I still hesitated to do so, remember there is NO backing out once you've done this. Oh I'm sure someone will say you can use this tool or that tool to recover it even after deleting the partition but what a hassle that would be.

So you choose the drive you want Windows 7 installed on and the rest is pretty much automatic. There are a few questions regarding your keyboard type and time and date but soon you will see the fruits of your labor in the fancy new Windows 7 Desktop.  First things first, this is NOT windows XP, it's not Vista either.  This is a pretty new experience to me.  Sure you can get around, but things look weird at first.  The task bar for one look quite a bit different.  I'm sure there is a way to get it to look like the old one but I wanted all the new here so I'm embracing the new technology.  Aero is pretty cool too, if you don't know what that is basically it spruces up the entire desktop experience and makes everything behind what you're doing sorta visible through windows that are opaque.  There are plenty of other changes too including Gadgets which are essentially what Yahoo released a couple of years ago but they are cool to have built in.  I chose a clock, a cpu/memory meter and the Weather.  I put these on the 2nd monitor so they don't clutter things up and it really is nice to have the dashboard as I call it.  There are other cool gadgets too like an RSS feed reader and Internet Usage meter to name a couple.  I will continue to investigate these to see if any new ones come up that I want to try.

Alright so things are running but I hit the first snag immediately.  NO Sound.  So what's up with that.  Ok, so snag number two shows up pretty soon too, the machine won't boot unless I have the Windows 7 DVD in the drive, man that's a bummer, gotta fix that.  Finally I had installed the ATI catalyst drivers but the windows desktop is reporting a graphics card crash almost every 2-3 minutes.  Yeah, these are all bad, i'm starting to not feel too good about this upgrade now but let's roll on and see if we can fix some of these issues.

Turns out that there aren't any Audio drivers for Windows 7 for my onboard sound card.  The first thing I tried was an old Sound Blaster Audigy card but I couldn't even get it to work at all. I started poking around the forums and finally found a set of Vista 64 drivers that apparently work.  I installed them and do get sound but it seems a little weird at times, like it fades in an out to a degree.  Here is hoping that Soundmax will eventually release a Windows 7 native driver for this motherboard, but I'm happy for the moment at least.

For the Video card while using the 2900 Pro I actually went back to the included Windows 7 drivers.  Things were stable but not giving me the very best performance.  I purchased an ATI Radeon 4650 HD for a reasonable price and plugged it in.  It has a Gig of DDR3 memory on it and is a couple of years newer than the 2900 Pro so I had pretty good expectations from it.  The catalyst drivers so far are running well and it seems overall faster than what I so I'm happy.

Finally the boot issue.  Turns out that the Windows 7 installer decides where to put a 100mb partition pretty much on its own.  This partition contains the boot information and if you don't have this drive set up to be your boot partition in your bios then it will not boot unless you have the Windows 7 DVD in the drive.  In my case I just went into the BIOS and made sure that this drive was marked first in the boot order and all was well.

So, the Windows 7 upgrade didn't go exactly perfectly but you know, I'm glad I did it.  I certainly enjoy being in the 64 bit world now and being able to use all 4 gigabytes of my system memory.  I do notice some issues though, particularly around certain software not running at all like some of the old games that I have.  Battlefield 2 and Battlefield 2142 didn't run at all.  Outlook 7 seems to crash quite often and I've had a few crashes of Internet Explorer 64 bit which to be fair I had these in the old Windows XP also but I wanted more stability here.  I guess at the end of the day I'm now in the new world so things will get better with time.  I will update more as I get more experience.   Thanks for reading!

Thursday, February 25, 2010

Adventures in Oracle Parallel Index Creation

Adventures in Oracle Parallel Processing

So currently I'm working on a large database rebuild. We are moving from a single node instance to a 3-node RAC System on Oracle 10g. The database is roughly 3 terabytes in size and we keep 18 months of rolling history. I wanted to repartition the tables during this move so instead of just doing a data file move I am re-creating the tables and then using datapump import to get the data into them. Once the table and data is there then I will build all the indexes manually. The tables will be partitioned by month and then sub partitioned by hash (a sequence number field so it is unique). As I said, we keep an 18 month rolling window of partitions available and once a month ends that partition's data is compressed and is essentially read only, although we don't actually make it so there is nothing that will ever write to it again. It's used strictly for historical reporting purposes.

The first time I ran the process I ran into two problems.

Problem #1:

Unless you specify pctfree 0 in the index create scripts it will use the tablespace default which in my case was 10%. Because these partitions exceed 100gig each and sometimes more I was basically wasting 10+ gig per partition and after 18 partition loads it was over 200gig of wasted space.

Problem #2:

I had specified parallel in the index create scripts but not specified degree or instance relying instead on Oracle to make the right choices with regard to both of these parameters. I also was multitasking the index creation and running three of them simultaneously, thinking that with a 3 Node RAC system this would not be a problem. Upon running them though I was finding that the average index creation time was 8-10 hours each! This was certainly unacceptable as I have over 50 indexes to create in the database.


I reworked the scripts and dropped the tablespaces. I added pctfree 0 to the scripts and kept the parallel at the default level but decided to run them one at a time. To my surprise the indexes were each completing in about 1 to 1.5 hours each! When I looked at the session this time oracle had created 32 parallel processes per node and was churning away using all the resources that it could and it was fast! I decided to post on this because I attended the Southeast Oracle Users's conference today and while listening in on one of the presentations the presenter suggested that we should ALWAYS specify the degree of parallelism and instantiation. In this case it is not true. Hope you enjoyed reading and until next time.

Bill Schoonmaker
Database Guy