This script will help to get the Database mdf & ldf files size, used space, Free space in MB.
2025-02-27 (first published: 2025-02-25)
72 reads
This T-SQL script helps you monitor the size and status of all databases on your SQL Server instance, providing insights into space usage and performance.
2025-01-29 (first published: 2025-01-20)
578 reads
CDC Changes: The script queries the CDC tables in SQL Server to retrieve the changes (inserts, updates, deletes) since the last sync. Each change is processed with a mapped operation type (INSERT, UPDATE, DELETE).
Real-Time Streaming to BigQuery: The captured changes are streamed directly to BigQuery using its real-time insert_rows_json method, avoiding the need for batch uploads via Google Cloud Storage.
Tracking Last Sync Time: The script tracks the last synchronization time and updates it after every successful sync, ensuring no data is missed.
Low Latency: By continuously querying the CDC tables and streaming the changes, the script achieves near real-time data synchronization.
2024-11-13 (first published: 2024-10-24)
426 reads
In scenarios where you need to consolidate multiple rows into a single, comma-separated value, you can achieve this using FOR XML PATH. This script demonstrates how to retrieve volunteer data and display the days they have selected for participation.
2024-11-11 (first published: 2024-10-23)
762 reads
This script monitors and reports the execution statistics of SQL statements over a specified period, capturing metrics such as execution counts, CPU time, I/O operations, and elapsed time. It provides a comprehensive view of query performance, aiding in the diagnosis of performance issues and identifying problematic SQL queries in the database.
2024-07-29 (first published: 2024-07-11)
1,824 reads
The below code will send an email alert when someone is added to the SYSADMIN Role on your SQL Server
2024-07-26 (first published: 2024-07-16)
797 reads
How Recover a suspecte database by rebuilding the log.
2024-05-30 (first published: 2009-07-13)
395 reads