# DBAOps Sovereign™ — When You Return

**Checklist to get from "built" to "pilot-ready"**

---

## 1. Install & Run (No SQL Server)

```powershell
cd "K:\RHOYLLE BUSINESS EMPIRE LLC\Business Plans\PRODUCTS\DBAOps-Sovereign"
.\scripts\install.ps1
.\scripts\run.ps1
```

Opens dashboard at http://localhost:3000 with **mock data**. API at **http://localhost:3041** (separate port so it never collides with React).

---

## 2. Connect to SQL Server (Real Data)

1. Ensure SQL Server is running (local or remote).
2. Copy `.env.example` to `.env` (if not done).
3. Set `SOVEREIGN_DB_CONNECTION`:
   - Windows Auth: `Server=YOUR_SERVER;Database=SovereignRepository;Trusted_Connection=Yes;`
   - SQL Auth: `Server=YOUR_SERVER;Database=SovereignRepository;User Id=sa;Password=YourPassword;`
4. Run migration:
   ```powershell
   .\scripts\migrate.ps1
   ```
5. Restart: `.\scripts\run.ps1`

---

## 3. Run Collectors (Populate Fleet)

```powershell
cd src\collectors
.\DBAOps-Sovereign-Collector.ps1 -ServerList "localhost","SQLPROD01","SQLPROD02" -SovereignApi "http://localhost:3041"
```

Register a managed instance (license limits enforced — `403` when expired or at capacity):

```powershell
Invoke-RestMethod -Method POST -Uri "http://localhost:3041/api/fleet/register" `
  -ContentType "application/json" `
  -Body '{"ServerName":"SQLNEW01","Engine":"SQL Server","Version":"2022"}'
```

License posture: `GET http://localhost:3041/api/license` (instances used/allowed, expiry, `status`: `OK` | `EXPIRED` | `LIMIT_REACHED` | `INACTIVE`).

---

## 4. Pilot Checklist

- [ ] SQL Server 2022+ available for SovereignRepository
- [ ] Migration run successfully
- [ ] Dashboard loads and shows fleet/compliance/alerts
- [ ] API `http://localhost:3041/api/health` returns 200 (liveness)
- [ ] `http://localhost:3041/api/health/ready` returns 200 (readiness; use `SOVEREIGN_REQUIRE_DATABASE=true` in prod orchestration)
- [ ] `http://localhost:3041/api/openapi.json` loads the machine-readable contract
- [ ] `/api/license` shows expected edition and instance counts
- [ ] Update `SOVEREIGN_DB_CONNECTION` for production
- [ ] Schedule collector (Task Scheduler or SQL Agent)

---

## 5. File Locations

| Item | Path |
|------|------|
| Project root | `K:\RHOYLLE BUSINESS EMPIRE LLC\Business Plans\PRODUCTS\DBAOps-Sovereign\` |
| API | `src\api\` |
| Dashboard | `src\web\` |
| Schema | `src\database\schema.sql` |
| Collectors | `src\collectors\` |
| Blueprint | `k:\RHOYLLE BUSINESS EMPIRE LLC\intellectual property copyright\DBAOPS_SOVEREIGN_BLUEPRINT.md` |

---

**DBAOps Sovereign™ — Govern Everything. Command Every Fleet.**  
Powered by RHOYLLE INNOVATION EMPIRE LLC
