# Scheduled Job is failing with database error

**URL:** <https://discourse.getdbt.com/t/scheduled-job-is-failing-with-database-error/13660>\
**Category:** Help\
**Tags:** incremental, redshift, dbt-cloud\
**Created:** [June 4, 2024, 9:50am UTC](https://discourse.getdbt.com/t/scheduled-job-is-failing-with-database-error/13660 "2024-06-04T09:50:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![syedfarooq](https://avatars.discourse-cdn.com/v4/letter/s/e95f7d/32.png) [@syedfarooq](https://discourse.getdbt.com/u/syedfarooq)\
**Post date:** [June 4, 2024, 9:50am UTC](https://discourse.getdbt.com/t/scheduled-job-is-failing-with-database-error/13660/1 "2024-06-04T09:50:48Z")

</div>

## The problem I’m having

I have a running job that loads new data from our staging layer to raw layer, it was running absolutely fine until recently the job started failing with this error "Encountered an error: Database Error could not open relation with OID

## The context of why I’m trying to do this

I trying to load new data from staging layer to raw layer incrementally but model fails sometimes

## What I’ve already tried

I have tried changing the other jobs so that this job does not concide with the other jobs but still this issue persists

## Some example code or error messages

```auto

Encountered an error:
Database Error
  could not open relation with OID xxxxxxx

Put code inside backticks
  to preserve indentation
    which is especially important 
      for Python and YAML! 

```

---

<div class="post-metadata">

**Author:** ![zbrown](https://sea2.discourse-cdn.com/flex020/user_avatar/discourse.getdbt.com/zbrown/32/4355_2.png) [@zbrown](https://discourse.getdbt.com/u/zbrown)\
**Post date:** [August 8, 2024, 3:28pm UTC](https://discourse.getdbt.com/t/scheduled-job-is-failing-with-database-error/13660/2 "2024-08-08T15:28:18Z")

</div>

Did you ever find out what was causing this by any chance? We’re running into the exact same issue with one of our jobs.
