SQL Server: Invalid object name 'x'. (Msg 208)
The table/view doesn’t exist in the current database or schema.
Seen on:
SQL
Meaning
Wrong database context (USE), missing schema prefix (dbo vs custom), case-sensitive collation, or migrations not run.
Common causes
- Connected to the wrong database (default is master)
- Schema prefix missing
- Migrations not applied
- Temp table out of scope
⚡ Quick fix
- Specify the database (Initial Catalog)
- Use schema-qualified names (dbo.Orders)
- Run migrations
Detailed fix by platform
SQL
SELECT DB_NAME(); SELECT * FROM dbo.Orders;
How to diagnose
- Database — Current context?
- Schema — Which schema owns it?
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 2 Oct 2026