ora-00942

Allowing a users to select from a table

心已入冬 提交于 2019-12-02 18:22:56
问题 The emp table does exist for cis605 and I want to assign permissions to user. Any ideas to what I am doing wrong? SQL> grant select on emp to user; Grant succeeded. SQL> connect user Enter password: Connected. SQL> select * from emp; select * from emp * ERROR at line 1: ORA-00942: table or view does not exist I have also tried doing it differently SQL> connect cis605 Enter password: Connected. SQL> grant select on system.emp to chap7; grant select on system.emp to chap7 * ERROR at line 1: ORA

“ORA-00942: table or view does not exist” for mixed case table and columns

浪子不回头ぞ 提交于 2019-12-02 09:29:30
TOAD gives "ORA-00942: table or view does not exist" when updating mixed case tables or columns. For update I do not write any queries, I am trying to update data on grid (data tab). For upper case tables and columns it updates sucessfully. For some reason TOAD generates query without double quotations. Are there any workarounds for this issue? There is an option in TOAD to double-quote object names. Go into the View menu, choose TOAD Options, select the Oracle/General entry, and change the Double Quote Object Names to "All". 来源: https://stackoverflow.com/questions/9481922/ora-00942-table-or

Multi-Schema Privileges for a Table Trigger in an Oracle Database

北慕城南 提交于 2019-12-01 19:31:00
I'm trying to write a table trigger which queries another table that is outside the schema where the trigger will reside. Is this possible? It seems like I have no problem querying tables in my schema but I get: Error: ORA-00942: table or view does not exist when trying trying to query tables outside my schema. EDIT My apologies for not providing as much information as possible the first time around. I was under the impression this question was more simple. I'm trying create a trigger on a table that changes some fields on a newly inserted row based on the existence of some data that may or

ORA-00942: table or view does not exist : How do I find which table or view it is talking about

半城伤御伤魂 提交于 2019-11-30 09:35:27
We're running a java/hibernate app going against ORACLE 10g in TESTING. Once in a while, we're seeing this error: ORA-00942: table or view does not exist Is there a way to find out which table/view(s) ORACLE is talking about ? I know that I can add extra levels of logging in hibernate which will show all the SQL that it executes on ORACLE and then run that SQL to figure out which TABLE/VIEW is missing or missing permission. But given that it is in TESTING/STAGING, that will slow down performance. Is there a simple way to narrow down on the Table/View Name ? UPDATE : Just so you know, I don't

Oracle errors handling

泪湿孤枕 提交于 2019-11-29 14:29:52
I have such code: DECLARE e_not_exist EXCEPTION; PRAGMA EXCEPTION_INIT(e_not_exist, -942); car_name VARCHAR2(20); BEGIN select name_of_factory into car_name from car where car_id = 1; dbms_output.put_line(car_name); EXCEPTION when e_not_exist then dbms_output.put_line('Table or view does not exist'); when OTHERS then dbms_output.put_line(to_char(SQLCODE)); END; Actually, my table name is CARS but not CAR. But oracle doesn't handle this exception and gives me an error ORA-00942: Table or view doesn't exist. How can I handle this exception? Dan You can't do that with static SQL. The error is

Can I create Foreign Keys across Databases?

橙三吉。 提交于 2019-11-29 10:21:22
We have 2 databases - DB1 & DB2. Can I create a table in DB1 that has a relation with one of the tables in DB2? In other words, can I have a Foreign Key in my table from another database? I connect to these databases with different users. Any ideas? Right now, I receive the error: ORA-00942:Table or view does not exist No, Oracle does not allow you to create a foreign key constraint that references a table via a database link. You would have to use triggers to enforce the integrity. One way to deal with this would be to create a materialized view of the master table on the local database, then

dba_jobs_running: table or view does not exist when trying to access from procedure

梦想的初衷 提交于 2019-11-28 12:29:37
Simply querying running jobs using something like select * from dba_jobs_running; works fine when executed in my sqldevelopers SQL console. However, it does not work, when having exactly the same statement within a procedure. Compilation fails with PL/SQL: ORA-00942: table or view does not exist Any ideas? Is there something like a scope to be considered? Any suggestions are highly appreciated, thanks in advance :) You probably need to do a direct GRANT of DBA_JOBS_RUNNING to the user that owns the procedure. Doing a GRANT via a role won't work.... the grant needs to be explicit. EDIT: Doing a

Spring Batch Framework - Auto create Batch Table

故事扮演 提交于 2019-11-27 23:32:25
I just created a batch job using Spring Batch framework, but I don't have Database privileges to run CREATE SQL. When I try to run the batch job I hit the error while the framework tried to create TABLE_BATCH_INSTANCE. I try to disable the <jdbc:initialize-database data-source="dataSource" enabled="false"> ... </jdbc:initialize-database> But after I tried I still hit the error org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [SELECT JOB_INSTANCE_ID, JOB_NAME from BATCH_JOB_INSTANCE where JOB_NAME = ? and JOB_KEY = ?]; nested exception is java.sql

ORA-00942: table or view does not exist (works when a separate sql, but does not work inside a oracle function)

爱⌒轻易说出口 提交于 2019-11-27 09:01:43
When I have a sql statement like select * from table1 , it works great, but as soon as I put it into a function, I get: ORA-00942: table or view does not exist How to solve this? There are a couple of things you could look at. Based on your question, it looks like the function owner is different from the table owner. 1) Grants via a role : In order to create stored procedures and functions on another user's objects, you need direct access to the objects (instead of access through a role). 2) By default, stored procedures and SQL methods execute with the privileges of their owner, not their

dba_jobs_running: table or view does not exist when trying to access from procedure

最后都变了- 提交于 2019-11-27 07:02:15
问题 Simply querying running jobs using something like select * from dba_jobs_running; works fine when executed in my sqldevelopers SQL console. However, it does not work, when having exactly the same statement within a procedure. Compilation fails with PL/SQL: ORA-00942: table or view does not exist Any ideas? Is there something like a scope to be considered? Any suggestions are highly appreciated, thanks in advance :) 回答1: You probably need to do a direct GRANT of DBA_JOBS_RUNNING to the user