Blog Stats
  • Posts - 8
  • Articles - 0
  • Comments - 5
  • Trackbacks - 0

 

Friday, October 07, 2011

Data Balancing GOTCHA!


As one of my KPI’s I am responsible for implementing a solution to split one of my databases in two… no problem you may think except if I tell you that one table is 100GB’s big (don’t ask I am new here). Having limited experience working with such a cumbersome amount of data I am learning things as I go. So as a first port of call I have decided to create a series of holding tables that I am going to use to hold one months worth of data, drop the original table rename the holding table, implement the original constraints and hey presto step one complete … or so I thought. When it came to doing a cross check to ensure the number of records exported matched the number of records imported I wanted the script to be dynamic and used DATEADD(m, GETDATE(), -1) to ensure that I always retrieved a rolling month of data. This, it would turn out, would cause much frustration and cursing when my tables would not balance. The reason was due to the export taking so long that there was a significant difference in time between the getdate() in the retrieval script and the getdate() in the balancing script. The solution was to change the date calculation to be just that and not date and time which was causing the skew… solution below (I personally prefer ISO format): DATEADD(m, -1, CONVERT(VARCHAR(8), GETDATE(), 112))

Cheers

David

Tuesday, September 27, 2011

Free Microsoft Tools & Websitespark Follow Up!


In response to a post from an anonymous individual on one of my posts (http://geekswithblogs.net/OceanWanderer/archive/2011/09/26/microsoft-development-tools-are-free.aspx) regarding free Microsoft tools I thought a follow up post was required!

Anonymous, unfortunately you are mistaken; Websitespark is free and is open to individuals it truly provides all the possible tools & software that you could require to get started. If you read the program details on the Microsoft website (http://www.microsoft.com/web/websitespark/support.aspx?tab=ProgramDetails)

You will notice that individuals are catered for:

Individual: An individual that performs web-related development and/or design services for its current customers or plans to provide such services to its customers in the future. An Individual does not have his/her own company and/or does not work for a web design or development company.

Term: Eligible Web development and design Companies and/or Individuals can participate in WebsiteSpark for up to 3 years. On the first and second anniversary of initial enrollment, they must update their enrollment (e.g., confirm they haven't gone public and their ownership hasn't changed).

Fee: There is no cost for Web Pros to join WebsiteSpark or receive its benefits.

There is a validation/vetting process for applicants and if you are so intent on stealing Visual Studio there are far easier ways. In terms of what you receive, I have downloaded Visual Studio Professional and SQL Server 2008 so I am not too sure what more your require to build web apps? Below is a listing that will no doubt age very quickly however I included it for completeness to demonstrate what is available:

·         New Downloads (3)

o   Visual Studio 11 Developer Preview

o   Windows Developer Preview

o   Windows Server Developer Preview

·         Applications (1)

o   Patterns & Practices

·         Designer Tools (2)

o   Expression 3

o   Expression 4

·         Developer Tools (3)

o   Visual Studio 11 Developer Preview

o   Visual Studio 2008

o   Visual Studio 2010

·         Operating Systems (4)

o   Windows Developer Preview

o   Windows Server 2008

o   Windows Server 2008 R2

o   Windows Server Developer Preview

·         Servers (3)

o   SQL Server 2008

o   SQL Server 2008 R2

o   Windows MultiPoint Server 2011

·         Tools and Resources (2)

o   .NET Framework 4

o   Web Platform Installer

Thank you for the feedback I hope this clear up your confusion. Microsoft is doing a great thing by encouraging individuals to use their tools and I think the spirit of the initiative needs to be taken into account. As a final note a lot of Microsoft’s tools are completely free as part of their express edition programs, you may want to check those out as well.

Cheers

David

 

 

Reboot Required!


In my seemingly never ending quest to understand what keeps on devouring my BlackBerrys battery I noticed the day after synchronising my BlackBerry to my laptop the battery life reverted to a pitiful 8 hours. From my previous post you will know that I have already removed a number of potentially offending applications, however. After scouring the task manager I could not find a particular process that had consumed an unusual large amount of processing time or memory usage. In a desperate bid to understand what is going on I rebooted the device (by removing the battery) and it would appear battery life has returned to normal!

Big sigh...

Monday, September 26, 2011

Microsoft Development Tools Are Free!


I have posted about this on StackOverflow already but feel it is just too important not post about it here either. If like myself you love cutting code for fun and have found some restrictions with the free editions of Visual Studio why not register for WebSiteSpark (http://www.microsoft.com/web/websitespark/ ) . All of the full flavour development tools available at your disposal … FOR FREE!
I hope this helps you all!

BlackBerry Document To Go Work-A-Round


I am not too sure how long this will be valid, but here is a neat work-a-round to not having to buy the premium editions of the Blackberry “To Go” applications. The basic editions do not allow you to create new documents, so email yourself a blank spreadsheet/document copy this to your device and voila you can now save, copy etc to your hearts content! You don’t even need to buy the Office suite of products download OpenOffice instead!

Saturday, September 24, 2011

SSRS Tables Magically Resizing!


So, I am working on a small project for a friend and after many screens and much learning about MVC I have finally started to create some reports. I am very familiar with SSRS and Crystal Reports so I though this would be a breeze… famous last words unfortunately….

The problem was that although the report was working I was getting very inconsistent layout results between the designer, report viewer and the PDF export. So in the designer everything would line up perfectly, in the report viewer fields within tables would magically adjust themselves (I am not talking about the growth you expect) and finally in the PDF I had a plethora of blank pages…

It turns out that SSRS in Visual Studio is EXTREMELY sensitive when it comes to size and width. The solution I found was to set my designer page to be A4 (21cm wide for both interactive and page) with a 0.5cm border all round, then I set my designer page to be 20cm – this cures the mysterious blank pages problem when exporting to PDF. To make the designer appear attractive and give the same perceived result in the PDF drag the tables to both edges of the designer window – this is very important as for some bizarre reason when you use a table with a large notes field and a subreport the table automatically maximises to the maximum available width!

 Happy reporting…

SQL Server Job Monitoring


To ensure the systems I am responsible for have as much up time as possible we have a very simple monitoring service which monitors all critical systems and notifies of any failures via email and SMS. One of the systems I am responsible for receives daily data (CSV format) from multiple business units, during the week it is considered a critical failure if a file from a business unit does not land. This is less true on weekends as some business units do not work and thus if their system fails and does not generate a file my system throws a subsequent failure (domino effect) even though the generation of this file is out of my control. So to counter this problem I crafted what I consider a rather elegant solution.

The monitoring service I referred to above has many ways of monitoring everything from Windows services through to individual SQL server jobs. Although the jobs that load the files have a designated start time the files land sporadically throughout the day and as such I created a table that holds the jobs I wish to monitor and a stored procedure which monitors the status of those jobs through sysjobs and sysjobsteps (thus if any one of the steps fails [some steps rely on each other] I am notified). The monitoring service throws an error if the stored procedure returns any rows and subsequently sends an SMS with a description etc etc.

So to stop the service reporting a false negative on weekends I added a column to the table which holds the jobs I want to monitor – DayOfWeekExclusion | varchar(16). This column holds a comma separated list of values which represent the numeric days of the week. I then use the DATEPART function with the dw parameter and hey presto no more SMS notifications for the non critical jobs on the weekend, pseudo SQL below:

SELECT JobName FROM JobsToMonitor

WHERE DayOfWeekExclusion NOT LIKE

'%' + CAST((SELECT DATEPART(dw, GETDATE()))AS VARCHAR(1)) +'%')

Cheers

David

Monday, September 19, 2011

BlackBerry Pearl Battery Life Fix


I recently upgraded my BlackBerry Pearl’s operating system to the latest supported version (version 6.x) only to find that my battery life dropped dramatically from 24+ hours to 6-7. I had noticed a plethora of new applications that had been installed by default. These applications are mainly instant messenger/facebook related. My suspicion was that even though the applications were “switched off” they were attempting to poll the various social networking/instant messenger sites. Testing my theory was relatively easy as I don’t use the applications I uninstalled them and my battery life has been restored to 30+ hours.

Happy BBM'ing!

 

 

Copyright © OceanWanderer