Thursday, February 20, 2014

Discover your SQL server database table list, count and row count

After restoring some backup of SQL database file, there were dizzying number of tables. Not 20. Not even 50 but close to 20 x 50 tables. I wanted to know the magnitude of the complexity of the database that I’d dealing with.

First I checked for any data constraint issues. Please refer to a previous blog post to do exactly this. Fortunately, none was uncovered in this particular case.

And second I wanted to get a sense for how much data is the database initially populated OOTB when a customer installs this particular software i.e. how many rows of data are in each table of the database.

Friday, February 07, 2014

Getting Started with Fluent Migrator and resolve the listmigrations task issue

In this blog post, the steps it takes to setup a sample FluentMigrator migration classes is explained and in addition the solution to the issue with listmigrations task parameter with FluentMigrator version 1.1.2.1.

1. Create a Class Library Application

2. Add a Reference to the FluentMigrator Assembly
In the Package Manager Console, installed FluentMigrator
                Install-Package FluentMigrator –version 1.1.1.0
                This made a reference to “FluentMigrator.dll” in this project

Friday, January 31, 2014

Uncovering Data Constraint Issues in Your Database

A project of ours included inheriting legacy code and database. The codebase used a mixture of two ORMs: Entity Framework and NHibernate. Through refactoring, we've unified the data access technology to use NHibernate/Fluent NHibernate however it wasn't until the usage of FluentMigrator that I discovered the underlying data suffered from some unchecked constraints/referential integrity issues.

In one of our user stories we set out to trim our data down and provide the following set of data for our integration test project to include:
-          Static Data
-          Configuration Data
-          Dynamic Data


Wednesday, October 31, 2012

How to read the last n% of a large file in C#

Recently we came across the problem of opening a large log file to read only the last few lines of the logs. This log file is a cumulative log file i.e. it had grown to be over 8GB in size. Not even Notepad++ could open it. We could probably find a efficient editor to do this job for us, but decided to read the end of the file ourselves.

Tuesday, October 23, 2012

Explaining the usage of Endeca Search Interfaces

Search interfaces allows for the control of the query-ability of a search across multiple dimension and properties in Endeca. A developer would create a search interface within the Oracle Endeca Developer Studio.