Press "Enter" to skip to content

Curated SQL Posts

Vector Search with Oracle against Iceberg Tables

Brendan Tierney performs a search:

In my previous blog posts I’ve explored how to use Iceberg Tables and how to integrate these in with your Data Lake. Additionally, I showed how to setup your Oracle Data Lake (Database) to access the data stored in Iceberg Tables stored in OCI Object Storage. To access this Iceberg Table data from the Oracle Database we created an External Table. This allows us to query the Iceberg Table data as if it was internal to the database. With all new releases there is continuous improvement in the features and to make them easier to use. One such new feature (as of 23.26.1) is the ability to read vector data types from an External Table. This new feature is called or referred to as ‘Vectors on Ice’.

With Oracle Database External Tables now supporting vector embedding stored in Iceberg Tables, means you can generate vector embeddings with your preferred embedding model (external to Oracle using your faviourite tool/library), store them in Iceberg Tables in cloud object storage (OCI Object Storage, AWS S3, etc.), and run semantic search from Oracle AI Database, accessing vector data stored within the database and externally with the minimum of data movement and with similar SQL queries.

Click through to see how.

Leave a Comment

Working with Indexed Views

Erik Darling talks indexed views:

Anyway. T-SQL Server Management Studio. When most people think about index views, they rightfully think about all the stuff they can’t do with them.

And I sympathize with that because, man, so many times they’ve been like, oh, if only you could do this, if only you could do that, it sure would be nice. And I realize that all the air has gone out of the room as far as making index views more powerful because everyone’s like, well, you could just use batch mode.

Click through for some tips around update operations when dealing with indexed views, as well as a side rant about merge joins.

Leave a Comment

Fixing Blob Lease Issues on BACKUP TO URL

Greg Low fixes a problem:

Regardless of why you are using BACKUP TO URL, one of the problems that you are likely to run into at some point is the dreaded:

Msg 3271, Level 16, State 1, Line 60
A nonrecoverable I/O error occurred on file
“ https://somestorageaccount.blob.core.windows.net/backups/somedatabase.bak : “
Backup to URL received an exception from the remote endpoint. Exception Message: The remote server returned an error: (412) There is currently a lease on the blob and no lease ID was specified in the request…
Msg 3013, Level 16, State 1, Line 60
BACKUP DATABASE is terminating abnormally.

Click through to see when you might get this problem and how you can fix it.

Leave a Comment

Accessing Data between Private Link and Public Fabric Workspaces

Gilbert Quevauvilliers uses the private endpoint:

In this blog post I show how it is possible to access data between a Private Link Workspace, where I want to read the data from my Public Workspace.

An example of this is where I wanted to use a DirectLake Semantic Model sitting in my Public Workspace where the data is from data in my Private Link Workspace.

Click through to see how it works.

Leave a Comment

Recommendations for Purview Data Governance

James Serra provides some recommendations:

Microsoft Purview can be the best data governance tool in the world, but it will still be useless if people do not know it exists, do not trust the metadata, or do not change the way they work. That is the part that often gets missed. We sometimes think that buying or implementing a governance tool means governance is now “done.” I wish it worked that way. I really do. But the reality is that Purview can automate a lot, but it cannot magically fix missing metadata, undocumented business definitions, manual data movement, duplicate datasets, or people who keep building new reports without first checking whether the data already exists.

This blog is about best practices for Microsoft Purview data governance, not the data security and compliance side of Purview. I covered the broader value of Purview data governance in my post, Microsoft Purview: The key benefits of data governance, but here I want to get more practical and a bit more opinionated. Microsoft Purview has many capabilities across governance, risk, compliance, and security, but this post focuses on the governance experience: cataloging data, improving metadata, helping users find trusted data, understanding lineage, organizing data products, and making data easier to use. Microsoft also has helpful guidance, including data governance planningUnified Catalog planningPurview deployment best practicesdeployment checklist, and getting started but the real lesson is this: the tool is only as good as the operating model around it.

Pricing jokes aside, Purview is a very powerful products and there’s a lot of sound advice from James in this post.

Leave a Comment

Apache Kafka 4.3 Now Available

Mickael Maison makes an announcement:

We are proud to announce the release of Apache Kafka® 4.3. This release contains many new features and improvements. This blog post will highlight some of the more prominent ones. For a full list of changes, be sure to check the release notes.

With 25 KIPs and over 600 commits since 4.2.0, this release introduces many new features, improvements and bug fixes to all the components.

Read on to see what’s new, as well as what’s deprecated in the product.

Leave a Comment

Digging into Fabric Apps

Kurt Buhler explains a new capability:

For years, the Power BI community has been clamoring to have native support for visuals-as-code; the ability to create visuals, pages, or even entire dashboards with libraries like Vega, and D3.js. This is now possible in Microsoft Fabric with Fabric Apps, specifically, using a data app.

Fabric App is a new item type that lets you create and distribute any interactive experiences in Fabric, rather than pre-defined reports, dashboards, and data agents. These are web applications (or webapps). A webapp is any program that runs in a browser (like YouTube, Facebook, or Microsoft Word’s online editor) instead of one that you install on your computer (like Power BI Desktop or Microsoft Word).

Read on to see how you can build Fabric Apps, as well as what they are and aren’t.

Leave a Comment

An Introduction to Contained Availability Groups

John Morehouse takes us through contained availability groups:

Availability Groups have been one of the best high availability and disaster recovery options in SQL Server for a long time. They let us move a group of user databases together, keep replicas synchronized, offload some read-only workloads, and give applications a listener instead of a single server name.

That works great until the application needs more than just the user databases.

What about the logins? SQL Agent jobs? Permissions? Objects that live in master or msdb? In a traditional Availability Group, those objects are still tied to each SQL Server instance. That means DBAs have to keep them synchronized manually across replicas. Miss one login, job, credential, or permission and the failover might technically succeed while the application still has a very bad day.

Read on to see how contained availability groups can help resolve these problems.

Leave a Comment

Finding the Windows Groups for a SQL Server Login

Greg Low looks for an answer:

I saw a question on a SQL Server mailing list about how to determine the Windows groups for a given SQL Server login.

That’s actually easy for a sysadmin login, as they have IMPERSONATE permission for other logins/users.

It does require the ability to impersonate, as Greg mentions. If you don’t have that ability and you’re dealing with an Active Directory user, I could recommend: net user /domain {ActiveDirectoryUserName} in a command prompt to start.

Leave a Comment

A First Look at KQL

Andy Brownsword takes a look:

Someone drops a KQL query in your lap and says “you know SQL right?”. Honestly, it’s different enough to trip you up, but similar enough that you’ll pick it up quickly.

In this post I want to touch on what KQL is, why it matters, and show how familiar (or different) it is compared to our beloved SQL.

I’m a pretty big fan of KQL. If you’re at all familiar with Splunk’s querying language, the semantics are quite similar. If you aren’t, Andy provides a comparison to T-SQL.

Leave a Comment