Question

I'm at my wits' end with this error.

I have a view which uses a function contained in a package in another schema. I've created a synonym to said package, and on my local dev DB, the view compiles correctly. On the build server, the view gives compilation errors.

When I run the select of the view manually, Oracle throws an ORA-00904 error on the synonym in the query. I just can't understand why it works in one place and not the other. The code on both servers is identical, as it's coming from our source control repository.

Was it helpful?

Solution

As phlogratos suggested, it was a privileges issue. As the user didn't have execute permissions on the package in the separate schema, it was causing this error.

The underlying problem was an issue with our script that applies grants, but it's good to know that references like this without permissions fail in this manner.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top