Contents tagged with sql server
-
Opserver - several different kinds of cool
A year or so ago I discovered Opserver, a monitoring system/solution built by the guys at Stack Exchange (i.e. those who built Stack Overflow and all its sibling Q&A sites) that can monitor a …
-
Backing up SQL Server to Azure storage - doing it the long way round
So, as I can't seem to get the baked-in way of backing up to Azure Blob Storage to play ball, I've decided to do it the long way round for now, which isn't the end of the world as it gives me an …
-
Backing up SQL Server to Azure storage
I've been looking at using the baked-in backup SQL to Azure blob storage feature to, well, backup some databases and have been thoroughly stumped! :( The SQL I've put together is:
IF EXISTS (SELECT 1 …
-
Escaping identifiers in SQL when building up commands in C#
I answered a question on Stack Overflow recently about how to "encode" identifiers so that they aren't a source of SQL injection. As it's something I'm likely to keep "in the bank" I wanted to put up …
-
Using SQL Server CLR to add "earliest" and "latest" aggregate functions
Whilst there are undoubtedly very funky ways to achieve the same result, many moons ago I wrote a couple of SQL CLR aggregate functions for retrieving the earliest and latest values for a given …
-
What are the INFORMATION_SCHEMA views?
They're fantastically useful things which make it easy to access metadata in SQL Server in a (theoretically!) version agnostic manner. I've mentioned them (or similar) in SQL Server 2005: sysXXXX …
-
Finding the Foreign Keys for a table
For a while it's been driving me barmy, trying to obtain a list of Foreign Keys which reference a particular table. Below is the end result of my hunting. No doubt the code could be optimised, which …
-
Enumerating the databases on a server in SQLDMO/vb.net
Whilst you could just execute the following TSQL command:
select name from master..sysdatabases
to obtain the list of databases on a SQL Server box, it's far more fun to try and do it the SQLDMO …
-
Using SQLDMO in .net (VB.net)
Using SQLDMO within .net isn't the easiest thing to find information about, so here goes with some documentation.
The first thing that you need to do is add a reference to the SQLDMO library. With . …