# TotalSQL

> SQL Server consulting, open-source tooling, and a practical library of KB articles and tips from Michael K. Campbell — an independent SQL Server consultant with more than 27 years of real-world SQL Server experience.

Every library document is also available as Markdown: append `.md` to its URL. The library links below point straight to the Markdown.

## KB Articles

- [Enabling SQL Server Trace-Flags without a Service Restart](https://www.totalsql.com/sql-server-content/kb/enabling-sql-server-trace-flags-without-a-service-restart.md): Enable SQL Server trace flags without an immediate restart: add -T startup parameters in Configuration Manager so they persist, then run DBCC TRACEON(xxxx, -1) to apply them globally right now.
- [Understanding Percent of Percent-Load Reports](https://www.totalsql.com/sql-server-content/kb/understanding-percent-of-percent-load-reports.md): Explains percent of percent-load reports (time spent in each load bucket) for SQL Server CPU, IO (IOPs, throughput, latency), and memory (PLE, grants) to aid capacity planning and license right-sizing.
- [Configuring TLS Certificates for SQL Server](https://www.totalsql.com/sql-server-content/kb/configuring-tls-certificates-for-sql-server.md): Step-by-step guide to securing SQL Server with CA-signed TLS certificates: OpenSSL CSRs, signing, PFX conversion, private-key permissions, binding, Force Encryption, FQDN rules, and verifying encryption.
- [MSOLEDBSQL19 Bug with Trust Server Certificate](https://www.totalsql.com/sql-server-content/kb/msoledbsql19-bug-with-trust-server-certificate.md): Leftover MSOLEDBSQL 18 drivers break MSOLEDBSQL 19 'Trust server certificate' with Force Encryption and self-signed certs. Fix: uninstall v18, remove v19, then reinstall v19 fresh.
- [Recovering Backup-Encryption Certificates](https://www.totalsql.com/sql-server-content/kb/recovering-backup-encryption-certificates.md): How to restore SQL Server backup-encryption certificates from .cer/.key files and a password via admindb's restore_server_certificate, then back up the cert, clean up files, and restore encrypted backups.

## Tips

- [Beware of an Odd Problem with CAST() and CONVERT()](https://www.totalsql.com/sql-server-content/tips/beware-of-an-odd-problem-with-cast-and-convert.md): SQL Server quirk: CAST/CONVERT of a negative integer exactly as long as the target varchar returns neither an overflow error nor the number, unlike positive, shorter, or longer values.
- [Searching DMFs and DMVs](https://www.totalsql.com/sql-server-content/tips/searching-through-sql-server-dmv-and-dmf-names.md): Query sys.all_columns filtered to negative object_ids to search DMV and DMF column names by keyword (e.g., %lsn%), a quick way to explore SQL Server internals metadata.
- [A Simple Tip for Acceptance Testing](https://www.totalsql.com/sql-server-content/tips/a-secret-weapon-for-acceptance-testing.md): Getting busy SMEs to finish acceptance testing: keep test environments ready and requests bite-sized, then book short 30-40 minute collaborative testing sessions on their calendars.
- [A Simple Tip for Calculating Percentages](https://www.totalsql.com/sql-server-content/tips/a-simple-tip-for-calculating-percentages.md): T-SQL tip: compute percentages from integers with partial * 100.0 / total, which avoids extra CAST/CONVERT calls and often gives better precision than (partial / total) * 100.

## Consulting

- [SQL Server Consulting](https://www.totalsql.com/sql-server-consulting): Independent SQL Server consulting: talk through a SQL Server problem in a free initial consultation.
- [Services](https://www.totalsql.com/sql-server-consulting/services): Business continuity, HA + DR, performance tuning, remote DBA, AWS, Azure, and more.
- [Experience](https://www.totalsql.com/sql-server-consulting/experience): Distinctions, writing, past clients, and testimonials.
- [Rates](https://www.totalsql.com/sql-server-consulting/rates): Hourly rates, and how billing works.
- [Availability](https://www.totalsql.com/sql-server-consulting/availability): Current availability, and a calendar for booking time.
- [FAQs](https://www.totalsql.com/sql-server-consulting/faqs): Common questions about consultations and engagements.

## Solutions

- [SQL Server Tools and Solutions](https://www.totalsql.com/sql-server-tools): Open-source SQL Server tools and frameworks: backups and restore-testing, auditing, diagnostics, and more.

## Site

- [Home](https://www.totalsql.com/): SQL Server consulting, open-source solutions, and a practical library.
- [Library](https://www.totalsql.com/sql-server-content): The full library: recently added items, plus everything grouped by topic.
- [About](https://www.totalsql.com/about): About TotalSQL and Michael K. Campbell.
- [Site map](https://www.totalsql.com/site-map): Every page on TotalSQL, in one place.
- [All KB Articles](https://www.totalsql.com/sql-server-content/articles): In-depth SQL Server KB articles: step-by-step guidance for real-world SQL Server problems.
- [All Tips](https://www.totalsql.com/sql-server-content/tips): Quick, practical SQL Server tips and tricks.

## Optional

- [Open-source projects on GitHub](https://github.com/overachiever-productions/): admindb / S4, Dynamic Data Audits (DDA), psi (PowerShell SQL Interface), EventStore, TSMake, Proviso.
