ora-00942

Troubleshooting ORA-00942

你说的曾经没有我的故事 提交于 2019-12-11 07:45:52
问题 In the middle of an automated test run last night, one of my twenty worker threads blew out; the application was attempting an INSERT. Springframework reports ORA-00942: table or view does not exist. Connecting to the database (11.1.0.6.0) through the enterprise manager, I pull up a SQL worksheet and query the table, discovering (a) that the table exists now (b) the row that should have been inserted is missing (c) the row previously inserted by this thread is present (d) that the table has

question about pl/sql stored program text

為{幸葍}努か 提交于 2019-12-11 02:10:48
问题 I use TOAD to do my PL/SQL development. In TOAD when i type a procedure name and press f4, I can see this procedure's source code. I think TOAD get the source code from v$sqltext view. To confirm my thought, I wrote a query: select * from v$sqltext but when I execute the upper query, Oracle give me an error: ORA-00942: table or view does not exist 00942. 00000 - "table or view does not exist" *Cause: *Action: Error at Line: 29 Column: 15 So I think TOAD get the procedure's source from other

Suppress ORA-00942 errors in ddl create scripts

↘锁芯ラ 提交于 2019-12-11 01:53:56
问题 Say you generate ddl to create all your db tables etc via Hibernate SchemaExport etc. What you get is a script which starts with drop statements at the beginning. Not a problem, as I want this. But running this script produces a crapload of ORA-00942 errors running on an Oracle db. Since they're not really errors if the tables just didn't exist yet, I'd like my create script to be error free when it executes so it's easy to determine what (if any) failed. What are my options? I DO want drop

Java does not run prepare statements with parameter

元气小坏坏 提交于 2019-12-07 17:00:58
问题 I am using PreparedStatement to query my table. Unfortunately, I have not been able to do so. My code is as simple as this: PreparedStatement preparedStatement = connection.prepareStatement( "Select favoritefood from favoritefoods where catname = ?"); preparedStatement.setString(1, "Cappuccino"); ResultSet resultSet = preparedStatement.executeQuery(); The error thrown is java.sql.SQLException: ORA-00911: invalid character . As if it never run through the parameter given. Thanks for your time.

How to access Oracle system tables from inside of a PL/SQL function or procedure?

ぃ、小莉子 提交于 2019-12-07 05:02:24
问题 I am trying to access information from an Oracle meta-data table from within a function. For example (purposefully simplified): CREATE OR REPLACE PROCEDURE MyProcedure IS users_datafile_path VARCHAR2(100); BEGIN SELECT file_name INTO users_datafile_path FROM dba_data_files WHERE tablespace_name='USERS' AND rownum=1; END MyProcedure; / When I try to execute this command in an sqlplus process, I get the following errors: LINE/COL ERROR -------- --------------------------------------------------

Java does not run prepare statements with parameter

孤人 提交于 2019-12-06 02:16:44
I am using PreparedStatement to query my table. Unfortunately, I have not been able to do so. My code is as simple as this: PreparedStatement preparedStatement = connection.prepareStatement( "Select favoritefood from favoritefoods where catname = ?"); preparedStatement.setString(1, "Cappuccino"); ResultSet resultSet = preparedStatement.executeQuery(); The error thrown is java.sql.SQLException: ORA-00911: invalid character . As if it never run through the parameter given. Thanks for your time. I've spend a day to debug this yet still unsuccessful. As mention by Piyush, if I omit the semicolon

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

你。 提交于 2019-12-04 05:50:21
问题 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? 回答1: 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

Oracle Create View issue

一世执手 提交于 2019-12-04 04:46:59
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 having to grant access, since I am already logged in as the dba? Thanks guys! Yes, you have (and always

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

烂漫一生 提交于 2019-12-04 04:10:03
问题 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

Why doesn't Oracle tell you WHICH table or view does not exist?

冷暖自知 提交于 2019-12-03 04:02:29
问题 If you've used Oracle, you've probably gotten the helpful message "ORA-00942: Table or view does not exist". Is there a legitimate technical reason the message doesn't include the name of the missing object? Arguments about this being due to security sound like they were crafted by the TSA. If I'm an attacker, I'd know what table I just attempted to exploit, and be able to interpret this unhelpful message easily. If I'm a developer working with a complex join through several layers of