Database Administration Service
The shortcut: Most freelance DBAs price every engagement as a project and end up doing free 2 AM phone calls. The ones who clear $5K/month sell an on-call retainer first — the project work shows up later, billed separately.
Industry: Software & Tech
Investment level: Small — $3,000-$10,000
Time to launch: 6-10 weeks (LLC + E&O bind + first paid audit + first retainer SOW)
Best for: A backend engineer or SRE who can write EXPLAIN ANALYZE output by hand, recover a Postgres cluster from a failed pg_upgrade, and stay calm at 2 AM. You're a fit if you've already shepherded at least one production database through a real outage and you'd rather be the person three startups call than a full-time hire at one. What you'll likely make: $1,500-$3,000 month 3, $3,500-$6,000 month 6, $6,000-$10,000 month 12. Math is in Section 4.
Market Opportunity
Every Series A company you've worked at has the same database story. Two engineers set up Postgres on RDS in 2022, the app caught on, nobody touched the database for eighteen months, and now one slow query is taking down checkout twice a week. They don't need a full-time DBA — they need a phone number.
That phone number is the product. A solo on-call DBA serving three or four SaaS clients does what a full-time hire would do at one of them, for a fraction of the salary, and never has to attend a sprint planning meeting. The database administration services market sits at roughly $8.5 billion globally in 2024 and is projected to reach $16.9 billion by 2030 Grand View Research.
The trap is treating this as project work. The core money is the on-call retainer at $1,000-$3,000/month — the founder pays for you to be available, you bill projects on top. Pick a platform. PostgreSQL on AWS RDS is the densest market — most YC-backed SaaS companies of the last four years run on it. "PostgreSQL performance tuning + zero-downtime migrations for Series A SaaS" closes faster than generic "database consulting."
Launch With AI
Pro tip: AI is the explanation engine that turns a 4-hour EXPLAIN ANALYZE deep-dive into a 6-page audit report a CTO can read at the airport. The actual schema judgment is yours; the writing, the executive summary, the per-finding fix prompt, and the migration runbook are what AI takes off your weekends.
Upfront honesty: AI cannot recover a Postgres cluster from a failed pg_upgrade at 2 AM, cannot read pg_stat_statements output and know that the third-from-bottom query is the actual bottleneck because the auto-vacuum schedule is wrong, and cannot replace your judgment about whether to add a covering index or rewrite the query. The DBA work is your craft, and it's the entire reason a CTO pays you $1,500/mo to be on call. What AI does is everything that surrounds it: per-engagement audit report writing, MSA/SOW/DPA/BAA template generation, SBOM/dependency-license documentation for clients with compliance requirements, schema-change review summaries, and the cold-pitch outreach to founders whose Series A you can see coming.
AI Tools You'll Use
| Tool |
What it does for you |
Cost |
| ChatGPT (Plus) |
Audit report writing, MSA/SOW templates, retainer pitch emails, cold outreach |
$20/mo |
| Claude (Free + Pro) |
Reading pg_stat_statements + pg_locks output and triaging top 20 slow queries |
Free / $20/mo |
| Cursor or GitHub Copilot |
Generating migration scripts (zero-downtime cutover SQL, blue-green RDS dance) |
$20/mo |
| Linear or Notion |
Per-client retainer log + schema-change review queue + incident postmortem template |
Free / $10/mo |
| Stripe Billing |
Recurring monthly retainer invoicing + ACH for the larger contracts |
2.9% + 30¢ / 0.8% ACH |
The Workflow
Step 1: Run pg_stat_statements + EXPLAIN ANALYZE on top 20 queries — let AI triage in 30 min. Most DBAs spend 4-6 hours hand-reading slow query output. Claude triages in 30.
Prompt (paste pg_stat_statements top-20 + sample EXPLAIN ANALYZE plans into Claude): "Triage these top 20 slow queries from a Postgres 15 production database for a [client industry] SaaS app. For each: (1) classify the bottleneck — missing index, sequential scan over filter, JOIN explosion, lock contention, ORM-generated N+1, or auto-vacuum lag, (2) recommend a specific fix — exact CREATE INDEX statement, query rewrite, or schema change, (3) estimate the impact on p95 latency (high / medium / low), (4) flag the risk of the fix (locking timeout during index build on large table = use CONCURRENTLY; query rewrite changing semantics = needs app-team review). Output as a triage table sorted by impact × risk. Then write me the 3 'must-do this week' fixes in plain English a non-DBA CTO will understand."
Step 2: Generate the 6-page audit report from triage output. The deliverable that justifies $1,200 isn't the queries — it's the polished report with executive summary, ranked findings, and a 'next 90 days' roadmap.
Prompt: "Generate a 6-page Postgres performance audit report for [client name]'s [database name] cluster, audited [date]. Sections: (1) executive summary — 1 paragraph overview, 1-line headline finding (e.g., '3 missing indexes are causing 80% of p95 latency above 500ms'), (2) methodology — pg_stat_statements top 20, EXPLAIN ANALYZE on top 5, schema review of largest tables, vacuum + replication topology check, (3) findings ranked Critical/High/Medium/Low — for each: the query or pattern, root cause, recommended fix with specific SQL, estimated effort (engineer-hours), estimated impact (% latency reduction, % CPU reduction), (4) 90-day remediation roadmap — week 1, week 2-4, week 5-12, (5) operational recommendations — pgBouncer config tuning, autovacuum thresholds for top 5 tables, monitoring gaps + tools to add (Datadog/pganalyze/RDS Performance Insights), (6) optional retainer scope — what an ongoing $1,500/mo DBA-on-call relationship would cover. Format as markdown that converts cleanly to PDF. Tone: confident, specific, never alarmist. Avoid 'best practice' clichés — cite specific Postgres docs or pg-hackers list discussions."
Step 3: Write the MSA + DPA + BAA template suite that protects you on production data. A single-member LLC is the firewall, but the contracts are the doors. AI generates the suite — then your one-time attorney review at $200-$500 makes them production-ready.
Prompt: "Generate a 3-document template suite for a solo DBA consultancy: (1) MASTER SERVICES AGREEMENT — scope of services (no code commits to client production without their explicit written approval per change; all schema changes via PR/SOW; my work is advisory unless explicitly engaged for execution), payment terms (Net-15 default, late fee 1.5%/mo), liability cap (3x annual fees paid to me, with carve-outs for gross negligence + willful misconduct), warranty disclaimer (services provided 'as-is,' no warranty of error-free operation since I'm advising on their systems), governing law + venue (my state), termination (60 days mutual). (2) STATEMENT OF WORK template — fillable fields for engagement name, scope, deliverables, timeline, milestone payments, success criteria. (3) DATA PROCESSING ADDENDUM (DPA) per GDPR Art. 28 + CCPA — I'm a Data Processor; client is the Controller; I will not access PII outside scope of the engagement; I will not move PII outside [region/country] without written consent; I maintain an audit log of database queries I run with the client's superuser credentials; subprocessor list = none unless disclosed. Add: a HIPAA Business Associate Agreement (BAA) trigger clause — if client is a Covered Entity or processes ePHI, the engagement requires a separate BAA before any work begins. Plain English with code-cited references where applicable. End with: 'This template is a starting point and should be reviewed by an attorney licensed in [my state] before execution.'"
Step 4: Cold-pitch Series A SaaS founders before they hit their first DB outage. The best DBA retainer is signed BEFORE the 2 AM call. AI writes the cold outreach that gets a 20-min call.
Prompt: "Write a 4-line cold email to [CTO name] at [Series A SaaS company]. Hook: I noticed [signal — they just announced their Series A, are hiring backend engineers, posted a senior SRE role on Greenhouse, mentioned RDS/Aurora in their job description, etc.]. Bridge: 'Most of the YC-batch-N teams I work with hit their first 'why is checkout slow' incident around month 12-18 post-Series-A. The fix is usually 3 missing indexes + 1 query rewrite, but it takes 4 weeks of senior-engineer time to find and prove without a database specialist.' Offer: 'I run a productized $1,200 Postgres audit — 5 business days, 6-page report, ranked findings with specific SQL fixes. No retainer commitment, no upsell pressure.' Close: 'Want to see a sample report from a similar-stage company (anonymized)?' Sign with name + cell + my GitHub or LinkedIn (with 1 production-DBA war story pinned). Tone: peer-to-peer engineer, never sales-y. Avoid 'I noticed your team' (creepy) — use 'congrats on the Series A' (specific)."
Step 5: Build the schema-change review queue + monthly health-check report. The retainer makes money because the client knows you'll catch the schema change that breaks replication. AI writes the queue + the health-check.
Prompt: "Generate a Notion template for a per-client DBA retainer engagement. Sections: (1) 'About This Cluster' — RDS instance class, Postgres version, replication topology (primary + N replicas + their lag tolerance), top 10 tables by size, top 5 hottest queries, vacuum schedule, backup retention + tested-restore date. (2) Schema-Change Review Queue — kanban with columns 'Proposed,' 'Reviewing,' 'Approved,' 'Deployed,' 'Verified-In-Prod.' Each card has: PR link, change description, my review comments, blast-radius estimate, rollback plan, deploy timing recommendation. (3) Monthly Health-Check Report template — autovacuum status, bloat %, replication lag p95 over month, slowest 10 new queries this month vs last month, index-usage delta, any new error patterns in postgres logs, recommended action items for next month. (4) Incident Postmortem template — timeline, root cause, what worked, what didn't, action items + owner + due date. Formatted so I can copy-paste it as a new client onboards."
Time Saved Per Week
- Audit triage from raw pg_stat output: ~4 hrs saved per audit
- Audit report writing: ~6 hrs saved per audit
- MSA/SOW/DPA suite (one-time + per-client customization): ~10 hrs saved overall
- Cold pitch outreach (10 founders/week): ~3 hrs/wk in steady-state
- Monthly health-check report per retainer client: ~2 hrs saved per client per month
- Total: 8-12 hrs/wk back — that's the difference between 2 retainer clients and 4 solo.
Total AI Stack Cost
- Budget tier: ChatGPT Free + Claude Free + Notion Free + Stripe = $0/mo to start
- Full tier: ChatGPT Plus ($20) + Claude Pro ($20) + Cursor ($20) + Linear ($10) = $70/mo
- Compare: A junior associate doing report writing + admin = $4K-$6K/mo. AI does it for $70.
Your First Win (30-min action)
Pick the closest 5 Series A SaaS companies in your network (LinkedIn + AngelList + your YC alumni list). For each, find the CTO or VP of Engineering. Use Step 4's prompt to write 5 personalized cold-pitch emails. Send them today.
Prompt to write the 'sample audit' anchor PDF you attach: "Generate a 6-page sample Postgres performance audit report for an anonymized Series A B2B SaaS company. Use realistic findings: 2 missing indexes on JOIN columns causing 60% of slow queries, 1 N+1 ORM pattern in their Rails/Django/Express app, 1 autovacuum lag on a fast-write events table, 1 missing covering index for a sort-then-limit query. For each: the SQL, the EXPLAIN ANALYZE output excerpt, the recommended fix with specific CREATE INDEX statement, the estimated effort (1-4 hrs each), the estimated impact (X% latency reduction, Y% RDS CPU reduction). Make the writing tight and specific so a CTO reading the sample feels 'oh, this is what I'd actually want.' Footer: 'This is an anonymized sample report. Real engagements include a 30-min walk-through call + Slack-channel-based revisions for 14 days post-delivery.'"
That single sample PDF + 5 personalized cold pitches typically lands 1-2 paid audits within 14 days. From the audits, ~50% convert to a $1,500/mo retainer within 60 days. That's $1,200 + $1,500/mo MRR from one Tuesday afternoon of cold outreach.
Product / Service Offering
You sell three things, in this order:
- Database performance audit — slow query analysis, index review, EXPLAIN ANALYZE on the top 20 queries, pg_stat_statements review, written recommendations and a prioritized fix list. $800-$1,500 for a small Postgres or MySQL database, 1-3 days of work. The entry product. It has a defined start, end, and deliverable — what a CTO can approve without a procurement meeting.
- On-call DBA retainer — you're the database person they call. Schema-change reviews before production releases, incident response during business hours, monthly health check, quarterly index/vacuum review, written runbook for backup and restore. $1,500-$2,500/month with explicit response-time tiers. The recurring core.
- Migration project — moving from MySQL to PostgreSQL, self-hosted to RDS or Aurora, or a major version upgrade with zero-downtime cutover planning. $2,000-$8,000 depending on data volume and downtime tolerance. Sold to existing clients more often than to cold leads.
Lead with the audit. It reveals problems that justify the retainer. The retainer surfaces the migration. Selling the retainer cold is hard — selling it after you've shown them five queries killing their write throughput is easy.
Revenue Model
Unit economics for a solo DBA working part-time hours, no employees, working from a laptop with a couple of paid tools:
| Service |
Price |
Variable cost |
Your time |
Take-home per engagement |
| Performance audit (Postgres/MySQL, small DB) |
$1,200 |
~$45 (Stripe 2.9% + $0.30) |
12-20 hours |
~$1,150 |
| On-call retainer (business-hours, schema review) |
$1,500/mo |
~$45 (Stripe) + $10 (DataGrip) |
6-10 hrs/mo |
~$1,440/mo |
| On-call retainer (24/7 with after-hours rate) |
$2,500/mo + $250/hr after-hours |
~$80 (Stripe) |
8-15 hrs/mo + incidents |
~$2,400/mo + incident bill |
| Migration project (MySQL → Postgres, zero-downtime) |
$4,500 |
~$135 (Stripe) |
30-50 hours |
~$4,350 |
Your first $1K month = one performance audit at $1,200, take-home roughly $1,150. Two to three weeks of part-time work including discovery, the actual analysis, and the writeup call.
Your first $3K month = one $1,500 business-hours retainer + one $1,200 audit + one small follow-on project at $500 = ~$3,200, take-home ~$3,100. Maybe 25-35 hours that month.
The recurring math is what matters. Three retainer clients at $1,500/month is $4,500/month in baseline revenue at maybe 25 hours of total work. Add one audit or migration on top each month and you're clearing $6,000-$8,000 working part-time. Retainer churn on this product is unusually low — once you've memorized a client's schema, replication topology, and release habits, the cost for them to find another DBA who'll re-learn it is high.
Startup Costs
- LLC + EIN + business bank account: $35-$500 LLC filing depending on state — LLC University 50-state table. EIN is free at IRS EIN Online — never pay a third party.
- E&O + cyber liability insurance: $1,200-$2,500/year for a solo DBA — higher end of the software-services band because you're touching production data. Quote via Hiscox or Insureon. Add cyber liability — most production-data engagements require it in the MSA.
- Tools: DataGrip at ~$10/month, pgAdmin 4 free, pgBadger free for Postgres log analysis. A personal AWS account ($30-$80/month) for spinning up test RDS instances, billed back to client where possible.
- Certs (optional, pricing-relevant): AWS Certified Database — Specialty at $300, MongoDB Certified DBA Associate at ~$150, or Microsoft DP-300 at $165. Not required for retainers won by word of mouth — they open the door at procurement-driven enterprise clients.
- Contract templates + legal review: $200-$500 for a one-time attorney review of your MSA, SOW, and DPA template. Templates via Bonsai or similar.
- Accounting: QuickBooks Self-Employed at ~$20/month or Wave (free) to start. Move to Bench at $249-$499/month once revenue clears $80K/year.
Realistic all-in: $3,000 if you defer certs and do basic legal review only; $10,000 if you sit two certs, bind a year of E&O + cyber up front, and pay for a full attorney-drafted MSA suite.
Legal & Formation
Business entity. Single-member LLC the moment you sign your first paid retainer — a database mistake on a client's production data can produce six- or seven-figure losses, and you don't want that pointed at your house. Pass-through taxation, no payroll overhead. Once your net profit clears roughly $80K-$100K/year, run the math on an S-corp election via IRS Form 2553 — for solo DBAs hitting three retainers plus regular project work in year two, this is realistic. Get your EIN free directly from the IRS — never pay a third party.
Licenses & sales tax. No professional license is required for database administration in any U.S. state. Custom DBA services billed as professional consulting are generally not subject to sales tax in most states. The wrinkle: if you start packaging recurring health-check reports as a "subscription" or hosting a monitoring tool for clients, you're closer to taxable SaaS in roughly 25 states — confirm via the Avalara state SaaS tax tracker. Once you cross $100K in sales or 200 transactions in any single state, you have economic nexus there — track your state-by-state revenue from the start so this doesn't sneak up on you in year two.
Industry-specific risk. The biggest exposure is GDPR/CCPA data-handling responsibility on retainer engagements. The minute you connect to a client's production database holding EU user personal data, you're a "processor" under GDPR Article 28 — a written Data Processing Agreement is mandatory, not optional. Same logic under CCPA: without a written service-provider agreement restricting your use of California consumer data to performing services only, you're exposed as a "business" with your own consumer-rights obligations. Build a DPA into every retainer SOW. Disclose your sub-processors (your AWS account, any monitoring tool, local backup storage). Pair this with a rollback-required clause: every schema change that drops columns, truncates tables, or renames fields must have a tested backup restore and written client sign-off before you execute against production. The "DBA followed client-approved instructions and still got blamed for the data loss" lawsuit is a real category, and it lands on the contractor whose hands were on the keyboard.
Marketing & First Customers
Your first three clients come from your own network. Not Upwork, not LinkedIn ads — engineers you've worked with who are now CTOs or staff engineers elsewhere.
- Direct outreach to your warm engineering network. Message 25-40 backend engineers, SREs, and CTOs from your last three jobs. Pitch the performance audit at $800-$1,200 as a one-week engagement. You will close 2-4 in the first month. The audit gets you inside the company.
- Convert the audit into a retainer. Every audit writeup ends with a "what's next" section — three to five issues you found that need ongoing attention. Quote the on-call retainer as the way to handle them. Conversion should run 30-50% if your audit was actually useful.
- Hacker News Ask HN: Who wants to be hired? thread posts the first weekday of each month. Post a tight one-paragraph pitch with your specialization (e.g., "PostgreSQL performance + zero-downtime migrations, Series A SaaS, $1,500/mo retainer"). One serious lead per month is the realistic baseline.
- A short technical write-up of one real audit (sanitized, anonymized, client permission) ranks for long-tail Postgres/MySQL queries on Google. Two solid posts beat ten thin ones. Cross-post to dev.to.
- Wellfound and Y Combinator's Work at a Startup find YC companies at the stage where they need on-call DBA help but can't justify a hire. Filter for Series A-B SaaS, message the CTO directly.
Skip Upwork. The 10% fee isn't the issue — the buyer profile on Upwork rarely matches a $1,500/month retainer with a DPA. Spend the time on warm outreach instead.
First 90 Days
- Week 1. File LLC. Get EIN free from the IRS. Open business bank account. Start the E&O + cyber liability quote process via Hiscox or Insureon (binding takes 1-2 weeks).
- Week 1-2. Draft your MSA, SOW template, and DPA. Pay an attorney $200-$500 for a one-time review before any client signs. Write a one-page audit deliverable template and a one-page retainer SOW with explicit response-time tiers (business-hours vs. 24/7) and after-hours emergency rates.
- Week 2-3. Bind E&O + cyber liability. Set up Stripe for invoicing and ACH. Pick your specialization in writing — "PostgreSQL performance tuning + migrations for Series A SaaS" — and put it on your LinkedIn headline.
- Week 3-4. Message 25-40 warm contacts with the audit pitch at $800-$1,200. Don't pitch the retainer yet. Aim for 2 audits booked by end of week 4.
- Week 4-6. Run your first audit. Use pgBadger and pg_stat_statements. Write the deliverable. End it with a prioritized fix list that justifies a retainer conversation.
- Week 6-8. Pitch the retainer to your audit clients. Target one signed retainer by week 8 at $1,500/month, business-hours coverage. Post your first technical write-up (sanitized) to your blog and dev.to.
- Week 8-10. Run a second audit. Post on the next Ask HN: Who wants to be hired? thread. Aim for one inbound serious lead.
- Week 10-12. Close a second retainer. Target by day 90: two retainers ($3,000/month baseline) plus one audit or small project ($1,000-$1,500), totaling $4,000-$4,500 in month-3 revenue.
Common Pitfalls
- Flat retainer that includes 2 AM emergencies. A $1,500/month retainer with no response-time tier defined is an open invitation to incident calls at any hour, billed at zero. Define business-hours coverage explicitly in the SOW. Charge $200-$300/hour for after-hours emergencies, with a 2-hour minimum. Clients respect the structure; they only abuse the structure that isn't there.
- Running a destructive migration without a tested rollback. Dropping a column, truncating a table, or renaming a field in production without a verified backup restore is the single most common way DBA contractors end up in litigation. Always run the backup restore on a staging copy first. Get written client sign-off (email is fine) before executing. Document the rollback procedure inside the migration plan.
- Skipping the DPA on EU-data engagements. Connecting to a database that holds EU user records without a GDPR Article 28 DPA in place exposes you and your client to processor-without-agreement penalties. Build the DPA into your SOW template so it's never an afterthought.
- Pricing every engagement as a project. Project pricing means you start from zero every month. Lead with the audit, then convert to retainer. Two retainers cover your fixed costs; everything beyond that is upside.
Get your full launch plan — take the free 60-second quiz.