ora-00942

ORA-00942: Can select from “schema.table” but not “table”?

筅森魡賤 提交于 2020-01-28 09:58:20
问题 I experienced an ORA-00942 ("table or view does not exist") when executing select * from brunch However, no such problem when executing select * from joe.brunch May i know what is the issue here? 回答1: Unqualified, BRUNCH refers to a different object than JOE.BRUNCH in your current session. You've got a couple of options to fix that. Create a public synonym. This will allow any user that has privileges on the JOE.BRUNCH table to access it by querying BRUNCH CREATE PUBLIC SYNONYM brunch FOR joe

ORA-00942: Can select from “schema.table” but not “table”?

╄→尐↘猪︶ㄣ 提交于 2020-01-28 09:58:16
问题 I experienced an ORA-00942 ("table or view does not exist") when executing select * from brunch However, no such problem when executing select * from joe.brunch May i know what is the issue here? 回答1: Unqualified, BRUNCH refers to a different object than JOE.BRUNCH in your current session. You've got a couple of options to fix that. Create a public synonym. This will allow any user that has privileges on the JOE.BRUNCH table to access it by querying BRUNCH CREATE PUBLIC SYNONYM brunch FOR joe

Can I create Foreign Keys across Databases?

爱⌒轻易说出口 提交于 2019-12-29 07:38:08
问题 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 回答1: 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. 回答2:

Oracle 9i: Synonymed Table Does Not Exist?

天涯浪子 提交于 2019-12-24 00:57:09
问题 I've created a package that contains a stored procedure that I plan to invoke from a separate application. The stored procedure will return a sorted list of all the views and tables in the schema. To do that, it performs a simple select on the DBA_TABLES and DBA_VIEWS synonyms, as shown below: CREATE OR REPLACE PACKAGE BODY TITAN_ENTITY AS PROCEDURE GETSCHEMAOBJECTS (RESULTS IN OUT T_CURSOR) IS V_CURSOR T_CURSOR; BEGIN OPEN V_CURSOR FOR SELECT 'T' OBJECTTYPE, TABLE_NAME OBJECTNAME FROM DBA

Oracle Create View issue

六眼飞鱼酱① 提交于 2019-12-21 12:18:04
问题 Hey guys. So, I am logged in as the dba account and I want to create a view in User1's schema, but selecting data from User2's. I used the following query: CREATE OR REPLACE VIEW User1.NewView (Column1) AS SELECT DISTINCT Column1 FROM User2.Table and I get the following error: SQL Error: ORA-00942: table or view does not exist 00942. 00000 - "table or view does not exist" *Cause: *Action: To resolve this I had to grant select access to User1 on User2.Table. Is there a way to do this without

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

我与影子孤独终老i 提交于 2019-12-18 13:24:32
问题 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

Oracle errors handling

五迷三道 提交于 2019-12-18 08:41:58
问题 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

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

杀马特。学长 韩版系。学妹 提交于 2019-12-17 16:30:23
问题 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? 回答1: 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)

I want to assign permissions for a user to see the EMP table

天大地大妈咪最大 提交于 2019-12-13 03:52:56
问题 Error says table does not exist. My question is why do I get the error? SQL> GRANT SELECT, INSERT, UPDATE, DELETE ON system.emp to chap7; GRANT SELECT, INSERT, UPDATE, DELETE ON system.emp to chap7 * ERROR at line 1: ORA-00942: table or view does not exist The table does exist, SQL> select ename from emp; ENAME ---------- KING BLAKE CLARK JONES MARTIN ALLEN TURNER JAMES WARD FORD SMITH ENAME ---------- SCOTT ADAMS MILLER Stuttle 15 rows selected. 回答1: Perhaps the EMP table isn't owned by

Fluent Nhibernate Oracle Identifier Too Long - Alias Name Issue

倾然丶 夕夏残阳落幕 提交于 2019-12-12 20:28:32
问题 I've tried to do that. HasManyToMany<YechidotDoarInGroup>(x => x.Col_yig) .Table("PigToYig") .ChildKeyColumn("YIG_GROUP_RECID") .ParentKeyColumn("PIG_GROUP_RECID"); but I've got: ORA-00942: table or view does not exist I am trying to establish HasManyToMany connection not by ID , but by some other property . First I've got - too long message. When I've tried to enter my own Table name as an alias , it's not recognized. What should I do? 回答1: Define Table() method before all of your mapping