Every AzureRM command I was running I would get an error message telling me to login, I then did a login, checked that I had the right subscription and I was still getting the error message - after logging in 7 times I figured that maybe there was something else wrong :) It turns out that I had originally installed the Azure RM cmdlets via the Azure SDK and had somehow also managed to install the AzureRM.
It seems like more and more recently I have been writing powershell and typescript rather than c# and t-sql and there are quite a few things to like about the tools for both of these (typescript and powershell). One thing I really like with typescript and javascript in general is that it seems everything has a file system watcher so you can have your code ide, a couple of terminals and all your tests run etc in the background.
TLDR: If you build an SSDT project you can get an error which says: “SQL71502: Function: [XXX].[XXX] has an unresolved reference to object [XXX].[XXX].” If the code that is failing is trying to use something in the “sys” schema or the “INFORMATION_SCHEMA” schema then you need to add a database reference to the master dacpac: Add a database reference to master: Under the project, right-click References. Select Add database reference…. Select System database.
I worked one particular contract where I was forced to take my lunch at 11:35 every day, and it was all virtualisations fault! To set the scene it was a company who wasn’t really used to having developers, they had a load of SQL analysts and some mainframe developers but SQL developers writing T-SQL, C# and SSIS code was new to them. The IT management had decided that buying actual computers wasn’t necessary for development.
The question of where to install tSQLt is probably the most common question I get when I talk about unit testing T-SQL, so much so that I thought that it would be a good topic for a blog. I mention tSQLt in the title, but this covers all unit test code for T-SQL. So to be more specific: Where do you install unit tests and unit tests frameworks for SQL Server, which databases should have that code in them?
So Visual Studio 2017 has been released a while and I had created a version of the test adapter (which lets you run tSQLt tests from within Visual Studio with SSDT, ReadyRoll or just plan sql scripts using the test window but I held off on pushing it to the marketplace as it didn’t work with Visual Studio 2015. I spent quite a lot of time trying to work out how to build a single vsix that worked with VS 2015 and 2017 and in the end gave up and now there are two versions, one for 2015 and one for 2017 - I am not putting any fixes into the 2015 version so I would upgrade to 2017 if you want any updates.
A free email course on how to use tSQLt including the technical aspects of writing unit tests AND the art of writing repeatable, using unit tests for even the most complicated T-SQL code UPDATE: I thought that if I got a certain number by October 1st I would run the course but in two days I had three times the number of people subscribe than my initial target so I have closed the first course, sign up if you want to join the waitlist or the next course!
I saw on slack recently a question about how the ssis file enumeraror orders (or more specifically doesn’t order) files. I have been thinking about ssis quite a lot lately and whil I am in no hurry to start using it day to day it is quite an interesting tool. So anyway, I saw this question that went like: “does anyone know in what order files are processed in ‘Foreach File Enumerator’?
K-SSIS-ed - View any property or script in SSIS with a single click A cross platform re-imagined IDE and SSIS package viewer with one goal to allow a developer to get to any property, including a c# or vb.net script within a single click and one second. For support, please raise an issue: https://github.com/GoEddie/K-SSIS-ed-docs Releases: https://github.com/GoEddie/K-SSIS-ed-docs/releases
SQL Cover is a tool to measure code coverage in T-SQL. This will tell you how much of your database code your unit tests are exercising. You can read more about it: https://the.agilesql.club/blogs/Ed-Elliott/2016-04-08/SQLCover-Code-Coverage-For-SQL-Server-T-SQL You can get the source code from: https://github.com/GoEddie/SQLCover You can download it from: https://github.com/GoEddie/SQLCover/releases/ For help feel free to ping me. Articles / Posts about SQL Cover: https://www.red-gate.com/blog/building/sql-cover https://documentation.red-gate.com/display/SR1/Using+SQL+Cover+with+SQL+Release+PowerShell+cmdlets http://www.jankowskimichal.pl/en/2016/09/sql-unit-tests-coverage-report/?utm_campaign=shareaholic&utm_medium=twitter&utm_source=socialnetwork Redgate: Redgate kindly sponsored the initial version of SQLCover and I am most greatful to David Atkinson who really helped to shape what we have ended up with.