Press "Enter" to skip to content

Curated SQL Posts

AR and VR in Data

Corrinna Peters differentiates augmented reality from virtual reality:

Virtual Realty (VR) and Augmented Reality (AR) is everywhere, with a broad variety of applications across many industries, and the potential to revolutionise many others. The potential of VR and AR technology is endless and drives digital transformation. Lots of market research studies are projecting that VR and AR is forecasted to grow exponentially in the next few years. With this in mind, the questions people are starting to ask themselves are – what does this mean for me? What does this mean for my business? How will this change data and analytics? What are the differences?

In the medium term, I am quite pessimistic on the topic. There are specific use cases where virtual reality can be interesting, such as a virtual house walk-through. But for the most part, the problem with VR is that optical quality is still not good enough, meaning that a lot of people struggle to use a VR headset for more than an hour or so before getting nauseous. There are also problems with the lack of tactile sensation (and haptic feedback can only go so far) and ergonomic challenges when you’re constantly raising your arms to perform actions.

Augmented reality has an easier sell, though, in cases where you’re willing to hold a phone or tablet up against something. For this scenario, think museum pieces, where you hold the phone up and get more information about the piece, artist, and style. Google does have AR for walking directions, with the cost of burning a whole bunch of battery life. But the general failure of HoloLens and wearable AR devices, as well as the inherent privacy concerns from flashing your active camera around crowded areas, dampen the mood a bit for AR.

Comments closed

Handling Optional T-SQL Code via SQLCMD

Louis Davidson shows off a bit of SQL Server Management Studio’s SQLCMD mode:

In the creating a database script, there are quite a few parameters you will want as part of your script. The database name, the settings, whether or not to drop the database or not. Built into SQL Server Management Studio is a cool tool called SQLCMD mode. Scripts using this mode get a few scripting tools that are really useful. These tools allow you to do things like insert other script files, set environment variables, and one I particularly like, make sure you don’t accidentally execute a script if no code is highlighted using EXIT to start your script ().

Where it is really lacking is in the area of control of flow language. In this blog I am going to share a few techniques I have used to get around this when building scripts that need to optionally execute different bits of code.

Click through to see how you can use it. Going one step further, you can directly script against sqlcmd.exe, which can be useful for automating deployments.

Comments closed

GitHub Actions for CI/CD against SQL Server 2022

Kevin Chant has a new template for us:

In this post I want to cover performing CI/CD for SQL Server 2022 using GitHub Actions. For a couple of reasons.

First one is due to the fact that last week I was answering a query on the well known SQLHelp hashtag about deploying updates to SQL Server using GitHub Actions. That is when it dawned on me that I had never shared a repository to solely perform CI/CD for SQL Server using GitHub Actions.

Second reason is due to the fact that I wanted to show how to create an SDK-style database project for SQL Server 2022. By Using the ‘Microsoft.Build.Sql‘ .NET SDK for database projects.

Click through for the GitHub repo and plenty of links and information.

Comments closed

Building a URL Redirect Service in Azure

Bob Pusateri spams the 302 response code:

In WordPress, I used a plugin called Redirection, which enabled me to create URLs that would redirect to other websites. They can come in handy, especially when presenting. I’ll often create a custom redirect link for each presentation I give that will point my attendees toward my resources for that topic. For example, if I were giving a talk about isolation levels, I might direct attendees to visit https://sqlbob.com/isolation, which would redirect them to my GitHub repo with links to slides, demo code, and other materials.

But a HTML file really can’t redirect you to another page. To be fair, you can do it via a <meta> tag, but it’s not guaranteed to work in all browsers. I’m told there’s also a way to do it in JavaScript, but I really wanted a seamless experience for users like the Redirection plugin offered. I also was in need of a little project over the winter months.

Click through for Bob’s solution to the problem.

Comments closed

Trying Azure SQL DB Hyperscale Serverless

Reitse Eskens ran out of money on our behalf:

In one of my last blogs, I wrote about my first encounter with the Azure Hyperscale Serverless offering. Now it’s time to dig a bit deeper and what it’s up to.

Disclaimer. Azure Hyperscale Serverless is in preview and one of the things that isn’t active yet, is the auto shutdown. This means that it will stay online 24/7. And bill you for every second it’s online. In my case, this meant that my Visual Studio credits ran out and I couldn’t use my Azure subscription anymore. Keep it in mind when testing this out, especially if your credit card is connected to said subscription.

Click through to see what Reitse was able to do in the meantime, before those Azure credits ran out for the month.

Comments closed

Tips for People Moving to Postgres

Ryan Booz shares a few bits of advice about people learning about Postgres:

I was much further in my SQL Server career than I should have been before I understood the usefulness of APPLY in T-SQL. I didn’t realize that APPLY isn’t a SQL standard and so when I started using PostgreSQL and needed similar functionality, I was perplexed trying to find the equivalent. Fortunately, I wasn’t the only one searching.

My recollection here is that Microsoft introduced the APPLY operator before there was an ANSI standard, so as long as my memory isn’t faulty here, this wasn’t a case of a vendor just deciding to name something differently for the sake of it.

Regardless, Ryan has a lot of good advice for learners of PL/SQL.

Comments closed

Removing SQL Server Native Client 2012

Sean Gallardy answers a question:

I see many questions, and have been on the receiving end of many myself, about out of support items and removing them from their SQL Server servers. One of these items is the SQL Server Native Client, aka SNAC, aka SQLNCLI, and I’m sure many others. I remember investigating the connections a very long time ago when availability groups first came around (2012) and haven’t looked at it since that time. A question on the database administrators stack exchange asked the question about if SNAC could be removed on a SQL Server 2019 instance used in high availability and my gut reaction was, “nope.” Gut reactions are great but not always correct, so I did a little testing.

Click through for the results of Sean’s testing.

Comments closed

SqlPackage Support for the Serverless SQL Pool

Rui Cunha announces an update to SqlPackage.exe:

SqlPackage release 161.8089.0, dated February 13, 2023, brings a new feature: support for Synapse serverless SQL pools. According to the release notes, you can use SqlPackage to extract and publish both external and internal objects from serverless SQL pools. This includes the T-SQL surface area of serverless SQL pools is limited by design to external tables, external views, stored procedures, functions, statistics, and credentials. 

The following features are included in support for serverless SQL pools:

  • delta external file format
  • openrowset provider CosmosDB with PROVIDER, CONNECTION, OBJECT, and CREDENTIAL or SERVER_CREDENTIAL specified
  • openrowset format SStream
  • with () clause on openrowset

Rui also includes a quick demonstration of this new functionality.

Comments closed