Restore BACPAC to SQL Azure

[Hello!

2 posts in 1 day? When you’re hot, you’re hot!

I’m actually writing this one whilst I’m waiting for a BACPAC to restore to Azure. It’s actually incredibly easy: use SQLPackage! Setthe /SourceFile to your bacpac, and use the connection string published on Azure, and you’re done!

Only a short post yes, but the precursor to some much longer and more interesting posts…

Updating XML Using PowerShell

Hello! One of the patterns in Continuous Delivery is to “build once, deploy many”. Another is to “deploy the same way to each environment”. This is certainly easier said than done: The 3 biggest challenges in creating a Continuous Delivery pipeline can be summed up as follows: Configuration Configuration Configuration Obviously values of variables are going to change across environments. So how can we take something static that contains meta data of an environment, like say some xml, and update the values so that it is correct at runtime. [Read More]

Get Dll VersionInfo Using PowerShell

Hello!

Let’s be brief and not mince words: PowerShell is great. And so recently I needed to get the VersionInfo of a given DLL, and so was able to write up a module that did exactly that.

Create or Update Octopus Variables Through The API

Hello! As I have mentioned many times before, I have conflicting opinions when it comes to Octopus Deploy. On the one hand I think it does things that are a bit lousy, like variables only being strings for PowerShell (so it is not possible to include HashTables scoped easily). And whilst we’re on the subject of variables, the page to enter/edit variables is a tedious process. Firstly it has an autocomplete feature for the scoping, which is fine for tiny installs but is painfully slow on larger servers. [Read More]

T-SQL Tuesday - Deleting SSAS Cube Partitions Using PowerShell and AMO

This month’s T-SQL Tuesday topic is about automating with PowerShell. I’ve been using PowerShell to help automate deployments for all sorts of SQL solutions; SSDT-based database projects, ISC-based SSIS projects, SQL Agent Jobs, multi-dimensional SSAS projects, to name a few. And when I worked as a DBA I wrote many ad-hoc scripts to automate many tedious processes I was required to do. And so when it came to pick a topic for today’s post I decided to go for something that not so much offers a complete, out-of-the-box, one-size-fits-all solution to everyone’s automation woes, but a bit of a left field example of how you can make use of . [Read More]

Truncate vs Delete in SQL Server Whats the Difference

I’ve been using TRUNCATE TABLE to clear out some temporary tables in a database. It’s a very simple statement to run, but I never really knew why it was so much quicker than a delete statement. So let’s look at some facts: The TRUNCATE TABLE statement is a DDL operation, whilst DELETE is a DML operation. TRUNCATE Table is useful for emptying temporary tables, but leaving the structure for more data. [Read More]

Mega Melee Competition

Hello! Ive yet to write up in any detail on the No Holds Barred Competition, but frankly seeing as this write-up is going to be a lot simpler and shorter I’m going to start here. The competition for September is called “Mega Melee”. This Single Battle competition allows for you to use only Pokémon that are capable of Mega Evolution. To be clear, despite a team of 3-6 being added, only 1 Pokémon will be used during each match. [Read More]

New Baby Musings (AKA Things I've Thought Upon On Sleepless Nights)

ello! One month ago I became a dad for the 3rd time. And so my spare time, which has always been a premium, has shrunk even further. But here’s some thoughts on some stuff: SQL Stuff SSDT Supports Visual Studio 2017. And not only that, SSDT supports SQL Server Database, Analysis Services, Reporting Services, and Integration Services projects in Visual Studio 2017. SSDT has come a long way since those days of requiring two different IDE’s - one to support BIDS and the other to support Database projects. [Read More]

Deleting SQLCMD SetVar The Brute Force Way

Hello! Security has always been an important issue, and this is more true today than it ever has been. And one of the cardinal sins of IT Security is storing sensitive data as clear text stored in files. So with the case of sql scripts generated by SSDT, this sets an issue, as the variables are stored as clear text. I know of no way to mask variables, and so there are three options: Do something clever involving KeyVault that may well get convoluted. [Read More]

Seven Things I Learned From The Weakness Cup

Hello! About 2 weeks ago I had just come off the back of a very busy weekend where some way or another I was still able to find time to take part in The Weakness Cup. I didn’t play the full quota of matches, but at any rate something was far better than nothing [1]. I’ll post my team review sometime. But for now I thought I’d share some things I learned whilst taking part in this competition. [Read More]