Monday 1 October 2012

September (and summer, and fiscal year) Review

The last three months were a little lighter than usual, but I did work on a few things:
  • Access database that converts sales data to resource requirements by employee position
  • Database maintenance utility to purge old data from a program that's been running a number of years
  • Maximo related program that automatically emails vendors to remind them of outstanding purchase orders.
  • Client ranking function from an EMS system to help determine which clients are the most profitable.
  • Maximo related program to generate RFQ spreadsheets to email to clients and then upload the returned data from the clients.
  • SQL function to return written off totals for the year in an EMS database.
  • Plus a number of minor requests and edits to existing programs.
My fiscal year ended yesterday.  2011/2012 was a good year.  Got a new client at the beginning of it and it looks like they are going to be a long term one.

Monday 6 August 2012

Restoring SQL Server Database with Change Data Capture

Just upgraded my SQL Server to version 2012.  I needed to because a client had upgraded and some features were making it difficult to restore their database to my computer.  Still, I got an annoying error when trying to restore the database via the wizard:


"System.Data.SqlClient.SqlError: Could not update the metadata that indicates database DBNAME is not enabled for Change Data Capture. The failure occurred when executing the command '[sys].[sp_MScdc_ddl_database triggers] ' drop". The error returned was 15517: 'Cannot execute as the database principal because the principal "dbo" does not exist, this type of principal cannot be impersonated, or you do not have permission.'. Use the action and error to determine the cause of the failure and resubmit the request. (Microsoft.SqlServer.SmoExtended)"

I love cryptic error messages.

Anyway, after a bit of research I was able to restore the database by using the following line:

restoredatabase DBNAME FROM DISK = 'c:\data\BackupFile.bak' with keep_cdc 

The important bit was the 'with keep_cdc' option.

Tuesday 3 July 2012

June Review

June was a bit slower, as is often the case just before summer.  There was one small SSRS project and a bunch of changes and enhancements to existing programs.

Going to attempt to keep July and August light on the work, as my oldest son is home from school.  Also, I'm turning 40 this month, so as reward for making it to the life half-way mark intact, I'm going to try to take as much time off as possible and enjoy the summer.

September will be the awe-inspiring time of both my kids in school (My youngest turned 5 this year).  Looking forward to it.  Hopefully I'll be able to find myself some largish projects.

Thursday 31 May 2012

May Review

May involved a lot of Maximo work.  I wrote a program to automatically email purchase orders that were generated in the Maximo re-order process.  The program is in Access and it generates a PO report that is printed as a PDF.  It automatically attaches the PDF file to an Outlook email message and then puts it into the user's outbox.  Got a lot of complements on this one - the main user said they didn't realize how much time they were spending manually on this task until they didn't have to do it anymore.  Aside from that, did some revisions on some of the custom java classes and minor changes to other items I had done previously.

The rest of my time in May was spent writing some stored procedures and SSRS reports for one client, and revisions to Access programs for a couple of other clients.

The fiscal year of 2011/2012 is turning out to be a good one.  So far I've billed more than last fiscal year and I've still got 4 months to go.

Tuesday 8 May 2012

Spring Review

Well, it appears regularly contributing to a blog is more difficult than originally thought, especially when things are busy.  Here's a quick re-cap of what I've been working on these last few months.
  • Wrote a program to track a company's inventory of forestry certification credits.
  • Wrote some SQL Server stored procedures to take a snapshot of data in an EMS system.  Also created some SSRS reports to view the data and compare the historic data with live data.
  • Added a bunch of changes to a Ministry of Forests database I had written a few years back.
  • Wrote a function to upload data from a spreadsheet to a Great Plains Dynamics SQL Server database.

Saturday 4 February 2012

January Review

The first month of 2012 was fairly busy. 

A lot of it was SQL Server work.  I worked on a script to merge a couple of databases together, another smaller SQL script to copy some data within the same database, and wrote a stored procedure and SSRS report for a management system.

Also did some work on a Maximo / Great Plains Dynamics interface, programming a means to let the user edit some of the data before it was copied over.

The plan for February was to work on a new project for a forestry client.  That's still the plan, but in the first three days of the month, four different clients sent me requests as well.  It's going to be a busy month.

Tuesday 10 January 2012

Comment Spam

I've had this blog up for less than a month and I've gotten a couple comments on my original post.  I welcome comments, but these are obviously spam, complete with a link to another company's web site.

They're kind of funny as it's obvious they were written by someone with a poor grasp of the English language.  Check this one out:
Computer is world most used device of technologies. It provide well services in different way that known as IT solution work. It is one of the most effective device of technologies.
It's like they picked a bunch of keywords and randomly put them into a sentence without any regard to it making sense.

Friday 6 January 2012

Use T-SQL to restore a database

Way quicker than using SQL Server Management Studio, especially if you have to repeat often.

RESTORE DATABASE [Database Name]
FROM DISK 'c:\data\client\project\backupfile.bak'
WITH FILE = 1

Monday 2 January 2012

Happy New Year!

Hope everyone has a happy and prosperous 2012.

2011 was a good year for LCS.  I kept fairly busy, mostly through one mining client, but also various small jobs for other clients.  But it wasn't so busy I felt overwhelmed.  I like it when my workload is that nice happy medium between not enough and too much.

January and February look like they're going to be pretty busy, so time to get at it...