Categories
T-SQL Tuesday

T-SQL Tuesday #156 – Production Code

This month’s invitation from Tom Zika asks us to consider production code and consider what quality makes the code ‘production grade’. It’s interesting to think about all of the areas we may want to consider before putting some code into production – has it been reviewed, has it gone through sufficient testing, does it perform well […]

Categories
SQL Server

Challenges with Changing Object Schema

A few weeks back we looked at altering an object inside our database and changing the schema in which it resides. Whilst the ALTER SCHEMA … TRANSFER statement itself is straightforward, there are some gotchas you might find as a result of the change which I thought it was worth covering. To set up for what we’re going […]

Categories
SQL Server

Comparing Views and Synonyms in SQL Server

Last time out we looked at referencing tables across databases. While we of course have the option of using three-part naming to address the table, we also considered views and synonyms as two alternative options. Both of these can be used to achieve similar results. There are elements which they have in common and others which […]

Categories
SQL Server

Referencing Cross-Database Objects

In SQL Server we’ll typically end up using environments containing multiple databases which happen to have data which relate to each other. Due to this there will be times when we’ll need to reference objects in another database when writing a query. What options do we have for doing this? Here we’ll look at three […]

Categories
T-SQL Tuesday

T-SQL Tuesday #155 – The Dynamic Code Invitation

This months’ invitation from Steve Jones asks us to write about producing SQL dynamically in some form or another. We can create and execute SQL dynamically within our procedures but what about dynamically creating it from other sources before passing it into SQL Server? The quick I have to admit that Steve’s mention of using Excel […]

Categories
SQL

Changing Object Schema in SQL Server

We’ve previously looked at the basics of using schemas in SQL Server where we created a schema and used objects inside of it. If you’re not dealing with new objects though and wanted to move something into or out of a schema how to we go about that? Not by renaming it For renaming most objects within […]

Categories
Personal

New Beginnings

This week sees the closing of a chapter in my career. It was starting to feel like the right time for an all-around change and after a lot of thought and support of close friends and family I set out to find my next adventure. So, after nearly 15 years working through various roles at […]

Categories
SQL Server

Introduction to Partitioning

In SQL Server you can use partitioning to split a table into multiple segments based on the data contained within it. This feature can be used to bring improvements to performance and provide more flexibility with maintenance for those tables which are partitioned. The impact of these will be key for large data sets where […]

Categories
T-SQL Tuesday

T-SQL Tuesday #154 – SQL Server 2022

This month’s invitation from Glenn is to write about what we’ve been doing with SQL Server 2022 as we’ve now had a release candidate unleashed upon the world. Personally I haven’t had the time to adventure through the new features or put any stress onto the version as of yet – the exception being testing […]

Categories
SSAS

Fixing SSAS Query Logging

I’d previously inherited a legacy SQL environment running SSAS with a handful of multi-dimensional models. The models were actively being used however development on them had ceased a number of years earlier so it was just a case of keeping the lights on. The problem Fast forward to the point we wanted to start winding […]