Skip to content

Latest commit

 

History

History
63 lines (43 loc) · 2.63 KB

README.md

File metadata and controls

63 lines (43 loc) · 2.63 KB

DataverseSQL

image

Welcome to the DataverseSQL repository! This collection showcases useful SQL queries for working with Microsoft Dataverse environments via the TDS (Tabular Data Stream) endpoint. Whether you're troubleshooting, analyzing metadata, or extracting complex relationships, this repository has you covered.

Overview

Dataverse supports direct querying using SQL via the TDS endpoint. This repository provides tested and reusable SQL scripts to interact with Dataverse metadata, retrieve business data, and analyze your environment. These queries:

  • Enhance productivity by simplifying data analysis.
  • Serve as templates for custom scripts tailored to your needs.
  • Demonstrate advanced querying techniques for Dataverse environments.

Features

🔍 Comprehensive Queries

This repository includes scripts for:

  • Metadata analysis (tables, columns, relationships, etc.).
  • Business entity insights (contacts, accounts, activities, etc.).
  • Advanced relationships (hierarchies, lookups, 1:N and N:N relationships).
  • Plugin, workflow, and process diagnostics.

🛠️ Extensibility

Each query is modular and easy to adapt for your specific use cases.

🚀 Real-World Examples

These scripts solve real-world Dataverse challenges, including:

  • Identifying unused fields or custom entities.
  • Tracking solution dependencies and customizations.
  • Monitoring and optimizing system performance.

How to Use

  1. Prerequisites:

  2. Connect to the Dataverse TDS Endpoint:

    • Use your environment URL as the server name (e.g., yourenvironment.crm.dynamics.com).
    • Authenticate using Azure Active Directory credentials.
  3. Run the Queries:

    • Copy the desired SQL query from this repository.
    • Paste it into your SQL client.
    • Execute the query and review the results.

Contributing

Contributions are welcome! If you have a useful SQL query for Dataverse, feel free to open a pull request or submit an issue.


Acknowledgements

Special thanks to the Microsoft Dataverse community for providing tools, guidance, and inspiration for these queries.