Posted on October 31, 2009, 1:40 pm, by Rhys, under
DBA,
MySQL,
T-SQL.
I’ve recently been busy documentation various systems at work and came up with these queries to get a list of databases and their sizes for each SQL Server. These queries will show the server name, database names, and their sizes in KB, MB and GB. For SQL Server 2005 & 2008 ?View Code TSQL– SQL [...]
Posted on October 28, 2009, 9:34 pm, by Rhys, under
Powershell.
Powershell is a pretty cool tool for many things including working with data. It’s just such a great time saver if you have to deal with multiple files or need to change them into different formats. Here’s how easy it is to turn a csv file into well-formed xml. ?View Code POWERSHELL# csv file to [...]
Posted on October 22, 2009, 1:34 pm, by Rhys, under
SSIS.
Here’s a quick VB.Net snippet that allows you to write messages to the Windows Event Log from your packages. Nothing to configure here, just change the log message to something appropriate. Obviously, in order to work, the package would have to be run under an account that has permission to write to the event log. [...]
Posted on October 15, 2009, 10:06 pm, by Rhys, under
SSIS.
When creating SSIS packages it’s a common requirement to be able to archive the processed files. Here’s VB.Net code snippet, with a quick walkthrough, that does exactly that. The script uses two variables, inFiles and archiveFiles. The variable inFiles contains the folder we want to move files from, and archiveFiles is the destination. Configure your [...]
Posted on October 1, 2009, 8:14 pm, by Rhys, under
Powershell.
A few days ago I was working with a client that was providing an export of data from Oracle. The file being produced was choking my SSIS package due to various formatting issues. After working with the client and getting a file that looked good to the naked eye I discovered that a large amount [...]