I'm trying to find the datasize of Oracle db by using following query
select round((sum(bytes)/1048576/1024),2) from v$datafile;
But facing ORA-00942: table or view does not exist error. How can I resolve this?
Related
is there a possible way to get more accurate error messages from Oracle?
I have this very large query, with many joins ( entity with multiple #oneToMany )
however, i keep getting
ORA-00942: table or view does not exist
Error.
I have no idea why and i have one by one re-granted what i think is every table in query, yet, this error still persists....
How do i find out where the query is actually failing? i have feeling it isnt even a missing about table...
i cant really share the query, but is there possible other things that can throw the same error?
I can also run SELECT on all the tables in query, tested them one by one..
Usually you should get the line of the error:
SQL> select err from so_59733262;
select err from so_59733262
*
ERROR at line 1:
ORA-00942: table or view does not exist
and the * points to the last table which is missing.
When I try to extract a table from Oracle database to Pentaho, there's no result. I get the following message:
Querying select * from table_name limit 10; in Hive returns correct data. But querying same table through presto connection returns below error :
Presto query has failed. cannot find field from
[0:error_error_error_error_error_error_error,
1:cannot_determine_schema, 2:check, 3:schema, 4:url, 5:and, 6:literal]
Querying select count(*) from table_name; in Hive returns correct data. But querying the same table through presto connection returns below error :
Presto query has failed. HIVE_CURSOR_ERROR
I have gone through this link1 and link2 already but it did not help me.
I have solved this issue by correcting avro schema.
when calling liquibase migrate, generatechangelog, etc... with an Oracle database , we allways get the ORA-00942 error when liquibase calls the oracle jdbcdriver for metadata
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:439)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:395)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:802)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:436)
Found the issue by tracing the logging in the ojdbc_g driver. It turns out that getSchemas() in the jdbcdriver queries ´ALL_USERS` view in Oracle
DatabaseMetaData metadata=conn.getMetaData();
ResultSet rs2=metadata.getSchemas();
SELECT username AS table_schem,null as table_catalog FROM all_users ORDER BY table_schem
ORA-00942: table or view does not exist
In our database, ALL_USERS view does not exist, so I created the view again in the standard Oracle way
CREATE OR REPLACE FORCE VIEW "ALL_USERS" ("USERNAME", "USER_ID", "CREATED")
...
I have to copy data from one table to another which one table is in Oracle and one is in MSSQL Server. I want to copy the data from MSSQL Server table to Oracle table. The problem is that the MSSQL Server table has one column which is of data type ntext and the destination column in Oracle table is clob.
When I use the query
insert into oracle.table select * from sqlserver.table#mssql; I get the following error:
SQL Error: ORA-00997: illegal use of LONG datatype
Can anyone advice on this please?
I tried it through a PL/SQL Procedure and it worked. I created a cursor, passed in the values to my variables declared in VARCHAR2 and then run an EXECUTE IMMEDIATE for the INSERT INTO....SELECT * FROM <TABLE_NAME>#MSSQL.