Categories
SSRS

Reporting Services Lookup Function

Reporting Services can be a useful tool to surface details for end users but sometimes you get a request to tag on some other data which isn’t contained within the same database or even environment. You could use cross database queries or linked servers respectively to get this data but it ends up building in […]

Categories
SQL Server

Moving Database Files between Drives

So you inherit a server and find the previous owners had left the default data and log folders on the C: drive and at the same time they managed to put half your databases are on the correct drives and the others were left getting cosy with your operating system. Thankfully remediation isn’t too painful […]

Categories
SSIS

Parsing High Precision Timestamps in SSIS

Being able to parse flat files is pretty standard work in SSIS but recently I came upon a situation when reviewing a package and there was something very strange happening with a timestamp being imported. Below you can see an example of the source file and its destination in the database. Clearly there’s something wrong […]

Categories
SQL SQL Server

Renaming Tables in SQL Server

Renaming tables, that’s easy right? Renaming a Table Performing the rename of a table is straight forward in Management Studio via Object Explorer. You can simply select the table and right click and Rename (or press F2) and edit the name right there and then. Hit return and we’re good to go. If you’re scripting […]

Categories
SQL

Commenting with Care

Comments are a wonderful thing whether it’s keeping track of your thoughts in a drawn out stored procedure, or leaving some breadcrumbs to follow when revisiting code in the future. There is, however, a slightly uglier side to these when you’re trying to look at queries as they run. Let’s suppose we’re running a very […]

Categories
SQL Server

A Story of Memory Pressure in SQL Server

Recently there was a question of why a query runs under a second on one environment and another environment runs the same query for 90 seconds and times out the application. It was observed the memory on the second system was running at 94% and so it was put down to that and ‘get more […]

Categories
PowerShell

Cleaning Up with PowerShell

Data has a tendency to grow and every now and again needs some pruning. Flat files can be a big offender, particularly if you’re looking at transactional data or a backup repository for example. If you’re looking to script this process for cleaning up then PowerShell may be a great choice. It’s freely available, quick […]

Categories
SQL Server SSIS

Tidying up the SSIS Database

If we’re running SQL Server Integration Services (SSIS) then it’s database is the wonderful place where we store our packages ready for execution and the lovely logs we can interrogate when those packages inevitably break (of course not, our code is perfect, right?) This database is all well and good in a fresh environment however […]

Categories
C#

Scraping Data from the Web with C#

Sometimes you need to get data from somewhere and it to be in a usable format. Maybe it’s a set of locations and opening times for a particular service, a price listing from a supplier, or it could be that you need alerting when some data out in the wild changes. Chances are that when […]

Categories
T-SQL Tuesday

T-SQL Tuesday #128 – Learn From Others

The topic for this month’s T-SQL Tuesday is to tell folks about something which went wrong and what it took to fix it. Whilst I’m sure there are plenty of more experienced folks out there who’ll have some interesting articles to read, I thought I’d take it in a slightly different direction. As much value […]