Andy M Mallon - AM²

Databases & Diversity — Checking Integrity

  • Home
  • About Andy
  • Stack Exchange Stuff
    • DBA Stack Exchange
    • Stack Overflow
    • Server Fault
    • Super User
  • GitHub Stuff
    • Profile
    • DBA Database
    • Data Blogger Resource Kit
    • Presentation Content
  • Legal Stuff

Stack Exchange

These posts were previously published on the Stack Exchange Network, and have been cross-posted here for ad-free posterity. I’m no longer active with responding to questions on the Stack Exchange Network, and consider these to be the canonical links for my answers. If I update any of my responses to correspond to changing technology, they will only be updated on my own site, and not on the Stack Exchange post.

log_reuse_wait_desc = AVAILABILITY_REPLICA, log is 100% full but AG is all fine

November 28, 2021 Andy 0

Question That’s a weird scenario. The transaction log is full. It waits on AG. AG is all good. No latency, last commit/hardened time is almost real-time on all the nodes. The Estimated Recovery Time is zero. I checked this from the primary node and secondaries … [Read More]

Order by one column if not null, otherwise by another column, columns are of not matching types

November 28, 2021 Andy 0

Question I have an application that uses PostgreSQL as RDBMS. There is a table containing orders placed by customers. The table has an id as primary key, an order_number (integer) and a created_at field (timestamp). id and created_at are assigned automatically when the row is … [Read More]

Database context for sys.databases and sys.master_files

November 15, 2021 Andy 0

Question I have a query that pulls information for a database from the following tables sys.master_files sys.databases sys.filegroups Currently, the context set is the specific database which I want to query about. But if the database is in a mode such that USE DB_NAME doesn’t … [Read More]

decoding instance_name in sys.dm_os_performance_counters on Azure SQL Database

November 9, 2021 Andy 0

Question doing some work with the SQL Perfmon counters and banging my head against the wall trying to work out how to translate the instance_name column to a database name. So if I run a query like the following I get a resultset like Log … [Read More]

SQL Server service – Not Starting With Automatic Startup, “The system cannot find the file specified”, but starts fine manually

October 29, 2021 Andy 0

Question This is a weird one, and I’ve run out of ideas for how to go about troubleshooting this. Here’s the issue, best as I can sum it up. The SQL Server engine and Agent services are not started when the server first boots when … [Read More]

Are Basic Availability Groups a reliable HA solution without integrity checks on the secondary replica?

October 26, 2021 Andy 0

Question We have a few Basic Availability groups in production and I’ve been reading about the limitations of them. I’m concerned about the following limitations: No backups on secondary replica. No integrity checks on secondary replicas. Suppose that we haven’t failed over in months. In … [Read More]

Why are there no “Daylight Time” time zones in SQL Server?

October 21, 2021 Andy 0

Question I am converting the times of some datetimeoffset columns from UTC to Eastern. I am doing this via the command This seemed to be working correctly (times were shifted 4 hours earlier and now have a -04:00 offset, exactly what I wanted), but then … [Read More]

How do I put the result of stored procedure in a new column in a view?

October 17, 2021 Andy 0

Question I have created a stored procedure which takes as inputs a schema name and a table name and outputs an INT containing the largest value in the id column of the table. I have also created a view containing all the schema names, table … [Read More]

Is it possible to do a partial transaction log backup with SQL Server 2017? I don’t have enough disk space to do a full backup

October 15, 2021 Andy 0

Question Inherited a database server to maintain and found that the transaction log is 92 GB. My plan is to do the backup of that and get it brought back down to a regular size, then fix it. The problem is I don’t have enough … [Read More]

Can I use both Log Shipping and Transaction Replication at the same time?

October 15, 2021 Andy 0

Rich Vieira asks about the feature compatibility of using AlwaysOn Availability Groups and Replication on the same database.

Posts pagination

« 1 2 3 4 … 17 »
github logo Github Profile
DBA Database
Data Blogger Resource Kit
Mastodon Logo Mastodon:
[email protected]
DBA.se profile
My Stack Exchange answers (mirror)

Subscribe via Email

Join 979 other subscribers

SSMS Shortcuts

Awards & Programs



Recent Posts

  • Consuming SQL Agent dates & durations
  • Migrating my Stack Overflow answers to blog posts (Sorry for the spam)
  • Not all stats should be auto-updated
  • T-SQL Tuesday: The last ticket I closed
  • Enforce a specific constraint to be checked first?

Archives

Categories

RSS RSS

  • Consuming SQL Agent dates & durations March 7, 2025
  • Migrating my Stack Overflow answers to blog posts (Sorry for the spam) November 11, 2024
  • Not all stats should be auto-updated August 29, 2024
  • T-SQL Tuesday: The last ticket I closed February 13, 2024
  • Enforce a specific constraint to be checked first? October 7, 2023
  • AG secondary is out of sync for hours after index maintenance February 21, 2023
  • Using OPENJSON, can’t get results to GROUP BY December 24, 2022
  • SQL Modulo Function gives the wrong value? November 18, 2022
  • Is SQL Server affected by OpenSSL 3.0 Vulnerabilities: CVE 2022-3786 and CVE 2022-3602 November 8, 2022
  • What’s the use case of disabling an index? September 25, 2022

Copyright © 2025 | Andy Mallon | am2.co