|
 Tuesday, August 21, 2007

DB2 / SQL SERVER 2005 / .NET

db2Logo For those of you who are lucky enough to work with DB2 and .NET, you're probably already aware that you can run into some issues if you're  not using the correct DB2 Driver.

I've been writing some SSIS packages that move some data from a DB2 environment into a SQL Server 2005  dotnetlogoDatabase. I also had to write a few .NET applications that spoke to the DB2 database. Here's a couple drivers that I used and some of the notes regarding them. I've also included a few links that help in regards to development.

Drivers

 

  • IBM DB2 Driver for ODBC and CLI
    • Please note, I COULD NOT get the IBM web site to work with IE7. I had to use Firefox to download the file.  
      • Link Name: IBM DB2 Driver for ODBC and CLI
      • File Name: v9fp2_win_db2driver_for_odbc_cli.zip
    • Download the file, install and you'll have the drivers on your machine.
    • The thing is, this worked great for the BLOB/CLOB fields, but when the SSIS Package went to transform the DateTime fields it complained about data loss because DB2 has more DateTime precision than SQL Server 2005.
      • This was solved by using the Microsoft OLE DB2 Provider as it did not complain about the DateTime. The team I worked with knew that we'd lose some millionths of a second, but that was acceptable for the project. Basically the Microsoft Provider didn't complain about it like the DB2 provider did. The data came through the conversion correctly, so we were fine with it.

 

Other Useful Information/Tools

  • SQLState Error Message Reference
    • Sometimes SSIS can throw some nasty HRESULT errors your way and you're left scratching your head trying to figure out what went wrong. If the message includes a SQLState, look in this reference, it will probably be in here, or will point you in the right direction.

 

  • WinSQL Lite
    • I like to say its like the SQL Management Studio for DB2. A very nice GUI that allows you to interact with the DB2 system. A lot of "old schoolies" (as I call them) like to use the command line to hammer away at DB2. Me? I like to look at the GUI when I'm looking at tabular data. This tool will make your life 10 times easier when looking for data anomalies.
#    Comments [0] |

SQLyog MySQL GUI Tool

I've always worked with UNIX, for years (on the side as a side project as well as for consulting). I've ran my own web servers, database servers, and I usually did this all through the command line. When I needed to use MySQL I either went command line or I went through phpMyAdmin. PhpMyAdmin is a great web interface for managing databases, but still, I always felt it was lacking in somewhat. It wasn't responsive and it was kind of "clunky" but it was still better than the command line.

Don't get me wrong, I love the command line for certain things, but sometimes when I need to look at tabular data, the command line isn't my tool of choice.

sqlyog

I recently ran into SQLyog, and I'm using the Community Version and I fell in love with it. The interface reminds me of old Query Analyzer from SQL 2000 and yonder, but its light years better than working with the web interface. I was able to get 10x as much work done with this tool at a client as compared to the command line. Again, I know there are MySQL super guru's out there who can smoke me on the command line, and I'm cool with that, but this is for the guy who likes the GUI and wants to get a few normal tasks done without having to memorize the entire MySQL Api.

If you work with MySQL at all this tool is worth looking at (if you haven't already).

#    Comments [2] |
 Friday, August 17, 2007

Outlook Live Mail Connector

Microsoft just released something that's pretty cool, yet when I realized it wasnt EXACLTY what I wanted, it was a let down. MS released a connector that will allow Microsoft Office Outlook to connect to your Windows Live (Hotmail) account. (Download link at the bottom of post)

Using this you can:

  • Manage your Email
  • Manage your Live Contacts
  • Use advanced options for blocking junk e-mail
  • Manage multiple email accounts

If you drop some skrilla on a paid account you'll also get the following (which IMO, I think is BULL and should be included for free, hell Google gives you this stuff for free pretty much with Google Apps).

  • Manage Share and synchronize your Live Calendar in Outlook
  • Access your tasks and notes.

 

Will this connector make me drop GMail? Ummm, Nope. Will I still be called a "traitor" for being an MS developer but using Google Products, YULP. Don't get me wrong, I use TONS of MS Products, I just think GMail is on another level when it comes to free email. They've had my account since the beginning, back when Gmail accounts were on EBay for hundreds of dollars.

So far, its Gmail for me, mayne.

But... if you still want the connector...

Download it here

#    Comments [0] |

Installing BlogEngine.NET on GoDaddy Shared Hosting

benlogo80  gdLogo

I recently installed BlogEngine.NET on a GoDaddy.com shared deluxe Windows hosting account.  

After following the directions located on BlogEngine.NET's website I ran into a few problems.

Problems

  • Trust Level
    • The hosting account complained that I was trying to over ride a setting that was set at their Machine level for application Trust. Note: You cannot change the trust on GoDaddy hosting accounts (as far as I know).
  • App_Data Directory Permissions
    • You can upload the App_Data folder, but there is not a way to set the permissions on the folder (this folder needs Read/Write/Web access so that BlogEngine.NET can write to it).

Resolution

Here's how I installed BlogEngine.NET on a GoDaddy Shared Hosting account:

ASP.NET Set Up

  1. Log into your Hosting Account and go to the control panel.
  2. Go to Settings --> ASP.NET Runtime
  3. Ensure that the Runtime Version is set to 2.0.
    1. If not, select "Content Root" and then change it to 2.0. Click Continue.

 

[This next step is optional.]

Setting up The Blog in A Sub Folder (If you want to set up your blog on a sub directory like this: www.example.com/blog/ then you'll want to do follow these steps. If you want the blog to be your main URL such as www.example.com then skip this step).

  1. Return to the ASP.NET Runtime area of the hosting account (Steps outlined above).
  2. Click "Create Directory" and call it whatever you want, e.g. "blog"
  3. Set the settings of "Read", "Web", "Set Root" (this sets up the directory as a virtual directory)
  4. Click Continue to finish.

 

Setting Up the App_Data Folder

The App_Data folder needs to have write access enabled so BlogEngine.NET can do its work.

  1. Return to the ASP.NET Runtime area
    1. (If you've  decided to put your blog in a sub-folder, then select that folder name now)
  2. Click "Create Directory"
  3. Give it a name of "App_Data" with permissions of "Read", "Web", "Write"
  4. Click continue to finish.

 

BlogEngine.NET Configuration Setting Change

You will need to remove one line of configuration in the web.config file.

  1. Open the web.config file
  2. Find the line that has this in it: <trust level="High" />
  3. Remove that line
  4. Save and exit the file

 

Uploading Files to your site

Use your favorite FTP Client, I recommend FileZilla, to upload the files.

  1. Connect to your GoDaddy account with the FTP Client.
  2. Navigate to the folder in which you want to install the blog.
    1. If its a sub directory like "blog", go into the blog directory, otherwise if you want it as your main site landing page, use the home area which will usually be yoursitesname.com (or whatever your domain is)
  3. Copy all files EXCEPT FOR THE App_Data to the host. The App_Data folder should already be created (if not, then wait 5 minutes for Go Daddy's system to create the directory for you  - we did this in a previous step, but it can take a few minutes for the process to complete).
  4. After the files uploaded, go into the "App_Data" folder of your installation (on your local drive) and then upload all files and folders into the "App_Data" of the web site.

 

Now navigate to your site and finish with the regular installation

 

Contact Setup

This step I had to poke around to figure out...

You'll need a mail account with GoDaddy to set this up. Set up the mail account on GoDaddy (see their help for this)

  • Once a mail account is configured, go to your site, in the settings tab, and use the smtp adress of 'relay-hosting.secureserver.net'

 

Enjoy!

#    Comments [21] |
 Monday, August 13, 2007

Postponing .NET User Group Presentation

Unfortunately due to some unforeseen circumstances recently I have had to reschedule the .NET User Group presentation I had scheduled for tomorrow night.

I apologize to anyone who was making plans to come see it. I will be rescheduling in the next couple of months. I will make another announcement when that date is secured.

#    Comments [0] |