Press "Enter" to skip to content

Category: Tools

Running SQL Server in a Local Container via VSCode

Eduardo Pivaral uses the MSSQL extension in Visual Studio Code:

You are a developer using SQL Server for your applications, and you need to quickly setup a local development environment. How can you make sure the environment is OS agnostic, so it can run on any operating system? Let’s see how we can quickly create a local container to run SQL Server using the VSCode MSSQL Extension.

Read on for the instructions. I still do the old-fashioned thing of opening up a terminal window and running docker commands, but this is pretty convenient.

Leave a Comment

Running Data API Builder in an Azure Container Instance

Jess Pomfret deploys an API:

This is post two in my series about the Data API Builder (dab), the first post, Data API Builder, covers what dab is and how to test it locally against SQL Server in running in a container. This was great for testing, but now we want to start to productionise this, and the first step is to get it running somewhere other than my laptop.

There are several deployment options available, I recommend you review the Microsoft docs here: Deployment guidance for Data API builder.

ACI wouldn’t necessarily be my first choice for, well, much of anything. However, it is cheap and easy, so it has that going for it.

Leave a Comment

Generating an Entity Diagram in a Fabric Eventhouse

Guy Reginiano announces a new tool:

As your KQL database grows, tables gather data from several Eventstreams, functions connect different tables, update policies move and transform data, and materialized views quietly keep aggregated data up to date – all working together behind the scenes 

It’s powerful, but it can also be hard to see the full picture. 

That’s exactly why we built the Entity Diagram – to give you a simple, visual way to explore how everything in your database connects.

Click through to see how it works.

Leave a Comment

“The Parameter is Incorrect” with Copy-DBACredential

Jack Corbett diagnoses a problem:

I was working with a client to do an upgrade/migration from SQL Server 2016 to SQL Server 2022, and this client assigns non-default ports to SQL Server.  As part of the process, I had to create a credential on one node and needed it on the other node, so I went to the handy Copy-DBACredential dbatools cmdlet, but it didn’t work.

Read on for the troubleshooting process and the ultimate issue.

Leave a Comment

Simple Data Quality Validation with T-SQL

Kenneth Omorodion builds a validation process:

As the need and use of data grows within any organization, there is a corresponding rising issue for the need of data quality validation. Most organizations have large stores of data but most of it are not managed efficiently in terms of data quality assurances, thus leading to inaccurate insights for the business which in turn leads to distrust in the data.

Organizations have now, more than ever, realized the importance of an efficient data quality process as part of their Business Intelligence and Analytics processes. The issue is, how can they implement data quality for their data? For larger and more data-centric organizations, they might be using pre-built data management and validation tools like Microsoft Purview or other Master Data Management tools like Informatica, Talend, SAP, Talend, and Stibo Systems. But for those organizations that can not commit to subscribing to pre-built options, or they are operating primarily on On-Premises environments, they might want to build one themselves, that’s where this article comes in.

I’m of two minds about this. One the one hand, I appreciate the effort that Kenneth put into this and expect that it would work reasonably well. On the other hand, I look at what it can do and say “Yes, but if you just use constraints like you should, then you don’t need this process.” It’s basically a very asynchronous way of applying check constraints, foreign key constraints, and specifying that an attribute is NOT NULL.

If there’s some reason why applying these constraints is impossible—such as receiving this data as an extract from some poorly-designed system—then this can do a good job of describing the failures of the upstream system. But this is where data architects need to get it right up-front.

1 Comment

Merging the Measures of Two Power BI Semantic Models

Jon Vöge declares a hostile takeover:

Now, how you best maintain multiple copies/variants of the same Semantic Model is a whole other discussion but as a one-off, I was asked to merge the Measures of the two models.

Initially, the question actually stumped me as my usual tool of choice for external manipulation of semantic models Tabular Editor does not have a great native way to solve this. 

Jon lists a variety of options and then gets the job done with ALM Toolkit.

Leave a Comment

Using Log Parser to Preprocess Data

Lucas Kartawidjaja gives us a blast from the past:

When dealing with data inside SQL Server, especially when it’s delimited by a clear separator character, earlier versions (before SQL Server 2016) required us to write custom parsing functions—either as T-SQL user-defined functions or CLR functions. Starting with SQL Server 2016, we can use the built-in STRING_SPLIT() function to handle most of these tasks.

However, more often than not, we need to parse data that resides outside SQL Server—for example, in log files, CSV data, or other data sources. For these cases, I often use Microsoft Log Parser, a free command-line tool available here.

Click through for a demonstration of how it works. Or a reminder, if you’ve been in the business for a long long time.

Comments closed

Regular Expressions in Power BI TMDL View Find and Replace

Jon Vöge performs a search:

For this weeks blog, a quick tip about a feature in Power BI desktop which had flow entirely over my head: You can use RegEx for Find & Replace operations in Power BI Desktop TMDL View!

Yes! You heard that right!

I had no idea, until I caught it in a live demo by Power BI partner director Mohammad Ali at his Power BI Next Step keynote.

Read on to see what you can do with this. The same is possible in other tools like Visual Studio Code and even SQL Server Management Studio, though what specific regular expression capabilities are available and the exact syntax for them will differ based on the product.

Comments closed

SSMS Query Hint Recommendation Tool

Brent Ozar tries out a new feature of SQL Server Management Studio:

The maximum tuning time defaults to 300 seconds, but I tacked on a couple zeroes because my slow query already took ~20 seconds to run on its own, and I wanted to give the wizard time to wave his little wand around. The tool actually runs your query repeatedly with different hints, so if you have a 5-minute query, you’ll need to give the tool more time.

Click Start, and it begins running your query with different hints. A couple minutes later, I got:

Brent’s review is quite positive, in a “This is way better than the alternative of doing nothing” sense.

Comments closed