# Snowflake SQL compilation error: Object 'X' does not exist or not authorized

**Code:** `002003` · **Category:** SQL · **Seen on:** Snowflake, SQL

The table/view/schema name can't be resolved in the current role, database and schema context, or the role lacks privileges.

## Meaning

Snowflake hides objects you can't access, so "does not exist" often means missing grants. Check `USE ROLE/DATABASE/SCHEMA`, fully qualify names (`DB.SCHEMA.TABLE`), quoting and case (`"MyTable"` is case-sensitive), and grant `USAGE` on DB/schema and `SELECT` on the object.

## Common causes

- Wrong current database/schema/role
- Missing USAGE or SELECT grant
- Quoted mixed-case identifier
- Object in another account/region
- Future grants not set

## Quick fix

1. `USE ROLE ...; USE DATABASE ...; USE SCHEMA ...;`
2. Grant privileges: `GRANT SELECT ON TABLE ... TO ROLE ...`
3. Fully qualify the name

## Detailed fix by platform

### SQL

1. 

```sql
SELECT CURRENT_ROLE(), CURRENT_DATABASE(), CURRENT_SCHEMA();
GRANT USAGE ON DATABASE analytics TO ROLE analyst;
GRANT SELECT ON ALL TABLES IN SCHEMA analytics.public TO ROLE analyst;
```


## How to diagnose

1. **Role** — Has grants?
2. **Context** — Right db/schema?
3. **Quotes** — Case matches?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/sql/snowflake-object-does-not-exist-or-not-authorized)
