Ora-00942 when querying object privs
Hi, I have a OEM 9.2 accessing an Oracle 9.2 instance. When querying object privs I get error 942. All else works OK. I have 07_dictionary_accesibility=true and the OEM user has DBA and select any dictionary privs. oms.nohup does not show anything unusual neither dbsnmp.log . Any ideas?
there will still be some sys objects that may throw this
Similar Messages
-
ORA-00604 ORA-00904 When query partitioned table with partitioned indexes
Got ORA-00604 ORA-00904 When query partitioned table with partitioned indexes in the data warehouse environment.
Query runs fine when query the partitioned table without partitioned indexes.
Here is the query.
SELECT al2.vdc_name, al7.model_series_name, COUNT (DISTINCT (al1.vin)),
al27.accessory_code
FROM vlc.veh_vdc_accessorization_fact al1,
vlc.vdc_dim al2,
vlc.model_attribute_dim al7,
vlc.ppo_list_dim al18,
vlc.ppo_list_indiv_type_dim al23,
vlc.accy_type_dim al27
WHERE ( al2.vdc_id = al1.vdc_location_id
AND al7.model_attribute_id = al1.model_attribute_id
AND al18.mydppolist_id = al1.ppo_list_id
AND al23.mydppolist_id = al18.mydppolist_id
AND al23.mydaccytyp_id = al27.mydaccytyp_id
AND ( al7.model_series_name IN ('SCION TC', 'SCION XA', 'SCION XB')
AND al2.vdc_name IN
('PORT OF BALTIMORE',
'PORT OF JACKSONVILLE - LEXUS',
'PORT OF LONG BEACH',
'PORT OF NEWARK',
'PORT OF PORTLAND'
AND al27.accessory_code IN ('42', '43', '44', '45')
GROUP BY al2.vdc_name, al7.model_series_name, al27.accessory_codeI would recommend that you post this at the following OTN forum:
Database - General
General Database Discussions
and perhaps at:
Oracle Warehouse Builder
Warehouse Builder
The Oracle OLAP forum typically does not cover general data warehousing topics. -
ORA-00942 when creating external table under 10g with AQ
I have an application that runs with AQ. The front-end queues up batch-type
tasks in a queue. When one particular kind of message is dequeued, it
initiates a data load. That load requires the creation of an external
table.
The schema in question is owned by user BL (bulkload). The queue
is owned by BLB (bulkload batch), primarily to simplify some of the
rules needed by the resource manager in order to limit the total CPU
a batch process can consume. The BLB user has full access to the
BL schema, along with the following rights:
CREATE TYPE
CREATE TABLE
CREATE SEQUENCE
CREATE PROCEDURE
CREATE VIEW
CREATE SYNONYM
CREATE SEQUENCE
ALTER SESSION
CREATE SESSION
QUERY REWRITE
CREATE ANY CONTEXT
EXECUTE_CATALOG_ROLE
CREATE MATERIALIZED VIEW
CREATE ANY DIRECTORY
DROP ANY DIRECTORY
The table creation works fine under 9.2.0.8 (our current required
version). However the application generates an ORA-00942 table or view does
not exist when run under 10g (10.2.0.1 and 10.2.0.3).
The following statement is the problem:
CREATE TABLE bulkload33 (
field1 VARCHAR2(2000),field2 VARCHAR2(2000),field3 VARCHAR2(2000))
ORGANIZATION EXTERNAL (
TYPE oracle_loader DEFAULT DIRECTORY EXT_100
ACCESS PARAMETERS ( RECORDS DELIMITED BY "\r\n"
CHARACTERSET 'WE8ISO8859P1'
BADFILE EXT_100:'bulkload_bad.csv'
LOGFILE EXT_100:'bulkload_log.csv'
FIELDS TERMINATED BY ','
OPTIONALLY ENCLOSED BY '"' MISSING FIELD VALUES ARE NULL REJECT ROWS WITH ALL NULL FIELDS (
field1 CHAR(2000),field2 CHAR(2000),field3 CHAR(2000),field4 CHAR(2000)))
LOCATION ('bulkload.csv')
) REJECT LIMIT UNLIMITED PARALLEL;
To clarify, the preceding statement, when handled by the process
for a queue message, failes with an ORA-00942.
Note that I can issue the command directly, as BLB or SYS, against
the BL schema with no problems. Further, as user BLB or SYS, I can do
the following:
CREATE OR REPLACE PROCEDURE dotest
IS
l_sql varchar2(2000);
BEGIN
l_sql := 'CREATE TABLE bulkload33 (
field1 VARCHAR2(2000),field2 VARCHAR2(2000),field3 VARCHAR2(2000))
ORGANIZATION EXTERNAL (
TYPE oracle_loader DEFAULT DIRECTORY EXT_100
ACCESS PARAMETERS ( RECORDS DELIMITED BY "\r\n"
CHARACTERSET ''WE8ISO8859P1''
BADFILE EXT_100:''bulkload_bad.csv''
LOGFILE EXT_100:''bulkload_log.csv''
FIELDS TERMINATED BY '',''
OPTIONALLY ENCLOSED BY ''"'' MISSING FIELD VALUES ARE NULL REJECT ROWS WITH ALL NULL FIELDS (
field1 CHAR(2000),field2 CHAR(2000),field3 CHAR(2000),field4 CHAR(2000)))
LOCATION (''bulkload.csv'')
) REJECT LIMIT UNLIMITED PARALLEL';
EXECUTE IMMEDIATE l_sql;
END;
show errors
EXEC dotest
Does anyone have any ideas of why this doesn't work under 10g? Metalink
has yielded no clues so far.
Thanks.Define "has full access to the BL schema" given that it is impossible to grant access rights, in Oracle, by schema. What was done and how was it done?
My guess is that the privs were granted in a role, rather than explicitly, as is required for PL/SQL. -
Hope someone can help with this problem...
I am querying an object based on the query results of an
another object. If the Contact email does not exist, CF8 throws an
error. What I need to do for this query is to substitute a default
value for a contact record that does not have an email (or some
other fix) so that the error does not occur.
Once again, if the email contact email DOES exist, there is
no problem.
Below is the code for my query:
<cfloop query="oppty">
<cfset getContacts = myObject.QueryObject(
"SELECT Id, accountID, Name, Email
FROM Contact
WHERE accountID ='#oppty.accountID#'").results>
<cfoutput>#getContacts.email#<br></cfoutput>
</cfloop>
Any help would be greatly appreciated...!!
Thanks!Sorry for not being clear. The error is as follows:
Error Occurred While Processing Request
You have attempted to dereference a scalar variable of type
class java.lang.String as a structure with members.
51 : ").results>
52 : <cfoutput> #getContacts.ID#
#getContacts.accountid# #getContacts.name#
#getContacts.email#<Br></cfoutput> <!--- --->
53 : </cfloop>
54 :
This error happens when the object is queried an no results
come back. What is happening is in the query
SELECT Id, accountID, Name, Email
FROM Contact
WHERE accountID ='#oppty.accountID#'"
When no data comes back for "Email", I get that java error. I
need to rewrite the query so that there is a default replacement
email if an email does not come back in the query.
Thanks! -
Ora-00942 when creating time dimension
hi All,
I am new to data warehouse, i have created a date dimension " date_dim " in a target location, it has created a corresponding mapping "date_dim_map" in mappings section.
But when i try to deploy the dimension i get error ora-00942 table or view does not exist.
I get the same error when i try to deploy the corresponding map created by this dimension.
any ideas what the problem could be.
regardsoops got it had to deploy the corresponding table first.\
-
AQ publish - DB subscribe: Error ORA-00942 when starting DB Adapter
I am using AQ adapter to publish and DB adapter to subscribe.
When starting the DB adapter i am receiving the following error:
Fri Sep 09 13:22:50 MDT 2005: ** Error: Unknown error while db_bridge_reader_1 was trying to read messages from the database. Please save log files and contact the integration team.
java.sql.SQLException: ORA-00942: table or view does not exist
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:189)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:242)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:554)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1478)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java:677)
at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2371)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2660)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:457)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:387)
at oracle.oai.agent.adapter.database.DBMessageReader.getNextMessageHeader(DBMessageReader.java:352)
at oracle.oai.agent.adapter.database.DBMessageReader.run(DBMessageReader.java:232)
at java.lang.Thread.run(Thread.java:534)
The table i am inserting into using the DB adapter does exist in the subscribing DB. The only thing i can think of is some table/view is missing within the hub repository itself.
Please help.
Thanks!
-MBInitially I would try calling the subscribe package standalone in SQL*plus or TOAD just to check its not somekind of config problem...
The subscribing adapter trys calling the subscribing package passing in the message as an oracle data type.
I would write a small pl/sql wrapper that calls you subscribing package outside of the runtime Interconnect environment. If this all works and you can insert data into the table then it maybe something to do with the metadata in the repository and then i'd go along with Ian's suggestion.
But usually if you can successfully use iStudio to edi things then usually the repository is OK.
Also from your log you can see that it has picked up the message and is trying to call the packaged/procedure so it looks like the adapter is working OK.
Cheers Stuart. -
ORA-00942 when running application after import
APEX 4.1.1
Hi,
I transferred my application via export/import to our production database. I got no errors during installation, but when I run the application I am getting the following error message.
User not found
ORA-00942: table or view does not exist
Technical Info (only visible for developers)
is_internal_error: true
ora_sqlcode: -942
ora_sqlerrm: ORA-00942: table or view does not exist
component.type: APEX_APPLICATION_COMPUTATIONS
component.id: 3102806535980644
component.name: LANG
error_backtrace:
ORA-06512: at "SYS.DBMS_SYS_SQL", line 1325
ORA-06512: at "SYS.WWV_DBMS_SQL", line 1287
ORA-06512: at "SYS.WWV_DBMS_SQL", line 1358
ORA-06512: at "SYS.WWV_DBMS_SQL", line 1375
ORA-06512: at "APEX_040100.WWV_FLOW_DYNAMIC_EXEC", line 776
ORA-06512: at "APEX_040100.WWV_FLOW", line 4155I do not know, where to look for the error. I do have an application item with the name LANG and there is an application computation for LANG:
SELECT LANG_CODE
FROM GPS_WEB_USERS
WHERE user_name = upper('&APP_USER.')Any Hints where to look?
Edited by: Anne-Marie Rosa on Aug 16, 2012 5:37 AM
Edited by: Anne-Marie Rosa on Aug 16, 2012 6:32 AMHi,
>
I transferred my application via export/import to our production database. I got no errors during installation, but when I run the application I am getting the following error message.
User not found
ORA-00942: table or view does not exist
Technical Info (only visible for developers)
is_internal_error: true
ora_sqlcode: -942
ora_sqlerrm: ORA-00942: table or view does not exist
component.type: APEX_APPLICATION_COMPUTATIONS
component.id: 3102806535980644
component.name: LANG
error_backtrace:
ORA-06512: at "SYS.DBMS_SYS_SQL", line 1325
ORA-06512: at "SYS.WWV_DBMS_SQL", line 1287
ORA-06512: at "SYS.WWV_DBMS_SQL", line 1358
ORA-06512: at "SYS.WWV_DBMS_SQL", line 1375
ORA-06512: at "APEX_040100.WWV_FLOW_DYNAMIC_EXEC", line 776
ORA-06512: at "APEX_040100.WWV_FLOW", line 4155I do not know, where to look for the error. I do have an application item with the name LANG and there is an application computation for LANG:
SELECT LANG_CODE
FROM GPS_WEB_USERS
WHERE user_name = upper('&APP_USER.')The source of the error is ora_sqlerrm: ORA-00942: table or view does not exist
Look for the name of the Application Computation in APEX_APPLICATION_COMPUTATIONS APEX View using component.id: 3102806535980644 to find its name.
Once you have the name you can edit that App Comp and figure out which Table/View is not accessible.
Cheers,
PS: {code} is the tag, lower case.
Edited by: Prabodh on Aug 16, 2012 6:01 PM -
Receiving OCI/ORA-27163 when querying XML data in 11g.
When querying a table with a column stored in XML format, we get this error for large XML values. This works in Oracle 10g but this error happens when the same data is queried in an 11.2.0.3 instance. I have had a support request open with Oracle for about a month and so far it has not made any progress. What we've seen are the following:
1. The xml data itself is good.
2. The good xml data when queried with a wholly 10g client/server environment, works.
3. The same good xml data when inserted into a table in an 11g instance through a stored package run from the 11g instance (server to server) gets the 27163 error.
4. The same xml data when queried in a 10g instance from an 11g client fails with the 27163 error.
5. If we disable the 11g XML parser by setting an internal event (alter session set events='31156 trace name context forever, level 0x400';), then run the same code that was run in item 3 above, it does not get the 27163 error. However, the xml loaded to the 11g instance can then only be queried without getting the 27163 error if we use an older 10g client. An 11g client consistently gets the error.
The server versions are 11.2.0.3 (upgraded from 10.2.0.4). The SQL*Net client versions that we have tested on are 11.2.0.2 and 11.2.0.3 (both produce the 27163 error).
With considerable trial and error, we found that it is some combination of the file size and format that causes the error. Copied below is the smallest sample data of a failing XML that will produce this erro (about 8K). Remove any single character even in an a comment and the file parses successfully – but it’s not the file size alone as the original 800+KB file where we first dicovered this problem will process if the period in the attribute: @value=”${item.id}” is removed.
We are at our wit's end, and with an 11g migration project looming, any ideas anyone can suggest would be very helpful.
Thanks,
Joe
Here is a test case to play around with. Sorry I don't have a way to upload a zip file for this, but you can cut & paste from the post:
1. CREATE TABLE my_xml_test
(record_id NUMBER(4,0),
xml SYS.XMLTYPE,
comments VARCHAR2(200))
ALTER TABLE my_xml_test
ADD CONSTRAINT my_xml_test_pk PRIMARY KEY (record_id)
USING INDEX
2. mkdir SampleData
3. cd into SampleData, copy the XML I will post in the first reply to this message into a new text document called xml_items_removed.xml.
4. cd .. and create a file called 20120112_11g_bad_xml_issue.txt with this in it:
1, .\SampleData\xml_items_removed.xml,"Fails: OriginalXML w/ all instances of <Item> removed (count 600) -- reduces file size to ca. 55KB but still fails (Saved by XMLSpy)"
5. Next create your SQL*Loader control file (call it my_xml_test.ctl):
LOAD DATA
APPEND INTO TABLE my_xml_test
FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
record_id,
ext_fname FILLER CHAR(200),
xml LOBFILE(ext_fname) TERMINATED BY EOF,
comments
6. sqlldr <username>/<password>@<database> control=my_xml_test.ctl data=20120112_11g_bad_xml_issue.txt log=20120112_11g_bad_xml_issue.log bad=20120112_11g_bad_xml_issue.bad
7. Once the data is loaded, query my_xml_test table that you created in step 1. You should get the 27163 error:
SELECT a.record_id,
comments,
a.XML,
length(a.XML.GetClobVal()) clob_length
FROM my_xml_test a<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2012 sp1 (http://www.altova.com) by Martin l (National Board of Medical Examiners) -->
<IRData application="Item Review" version="1.3" itempool="2006001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ViewerTypes>
<Viewer id="its-viewer">
<Title>Item Text</Title>
<Description>Item Text</Description>
<BaseUrl>https://www.starttest.com/flex/4.3.0.0/InstitutionViewItem.aspx</BaseUrl>
<Parameters>
<Parameter name="pid" value="MSST"/>
<Parameter name="iid" value="01123"/>
<Parameter name="username" value="SomeUser"/>
<Parameter name="item" value="${item.id}"/>
<Parameter name="code" value="${CODE}"/>
</Parameters>
</Viewer>
</ViewerTypes>
<Filters>
<Filter id="drop-single-filter">
<AttributeSource>drop</AttributeSource>
<ControlType>select-1-drop-down-plus-all</ControlType>
</Filter>
<Filter id="onoff-single-filter">
<AttributeSource>onoff</AttributeSource>
<ControlType>select-1-drop-down-plus-all</ControlType>
</Filter>
<Filter id="reviewed-single-filter">
<AttributeSource>reviewed</AttributeSource>
<ControlType>select-1-drop-down-plus-all</ControlType>
</Filter>
<Filter id="build-multi-filter">
<AttributeSource>build</AttributeSource>
<ControlType>select-1-drop-down-plus-all</ControlType>
</Filter>
<Filter id="flag-multi-filter">
<AttributeSource>flag</AttributeSource>
<ControlType>select-1-drop-down-plus-all</ControlType>
</Filter>
<Filter id="u1dt-multi-filter">
<AttributeSource>U1DT</AttributeSource>
<ControlType>select-1-drop-down-plus-all</ControlType>
</Filter>
<Filter id="fb2-multi-filter">
<AttributeSource>FB2</AttributeSource>
<ControlType>select-1-drop-down-plus-all</ControlType>
</Filter>
<Filter id="fb1t-multi-filter">
<AttributeSource>FB1T</AttributeSource>
<ControlType>select-1-drop-down-plus-all</ControlType>
</Filter>
<Filter id="scorecat-multi-filter">
<AttributeSource>scorecat</AttributeSource>
<ControlType>select-1-drop-down-plus-all</ControlType>
</Filter>
<Filter id="images-multi-filter">
<AttributeSource>PIXN</AttributeSource>
<ControlType>select-1-drop-down-plus-all</ControlType>
</Filter>
<Filter id="vignettes-multi-filter">
<AttributeSource>VIG1</AttributeSource>
<ControlType>select-1-drop-down-plus-all</ControlType>
</Filter>
</Filters>
<DataPanels>
<Control displayed="true">
<Filters>
<Filter>
<Description>Drop</Description>
<FilterSource>drop-single-filter</FilterSource>
</Filter>
<Filter>
<Description>Version</Description>
<FilterSource>build-multi-filter</FilterSource>
</Filter>
<Filter>
<Description>On/Off Test</Description>
<FilterSource>onoff-single-filter</FilterSource>
</Filter>
<Filter>
<Description>Review status</Description>
<FilterSource>reviewed-single-filter</FilterSource>
</Filter>
<Filter>
<Description>Flag</Description>
<FilterSource>flag-multi-filter</FilterSource>
</Filter>
<Filter>
<Description>Discipline</Description>
<FilterSource>fb1t-multi-filter</FilterSource>
</Filter>
<Filter>
<Description>Organ System</Description>
<FilterSource>u1dt-multi-filter</FilterSource>
</Filter>
<Filter>
<Description>Step 1 outline</Description>
<FilterSource>fb2-multi-filter</FilterSource>
</Filter>
<Filter>
<Description>Images</Description>
<FilterSource>images-multi-filter</FilterSource>
</Filter>
<Filter>
<Description>Vignettes</Description>
<FilterSource>vignettes-multi-filter</FilterSource>
</Filter>
<Filter>
<Description>Score categories</Description>
<FilterSource>scorecat-multi-filter</FilterSource>
</Filter>
</Filters>
</Control>
<ItemList displayed="true">
<Attributes>
<Attribute displayed="true">
<Description>Item</Description>
<AttributeSource>itemref</AttributeSource>
<ControlType>text-display</ControlType>
</Attribute>
<Attribute displayed="true">
<Description>On test</Description>
<AttributeSource>onoff</AttributeSource>
<ControlType>checkbox-select</ControlType>
</Attribute>
<Attribute displayed="true">
<Description>Drop</Description>
<AttributeSource>drop</AttributeSource>
<ControlType>checkbox-select</ControlType>
</Attribute>
<Attribute displayed="true">
<Description>Reviewed</Description>
<AttributeSource>reviewed</AttributeSource>
<ControlType>check-display</ControlType>
</Attribute>
<Attribute displayed="true">
<Description>Flag</Description>
<AttributeSource>flag</AttributeSource>
<ControlType>select-1-drop-down</ControlType>
</Attribute>
<Attribute displayed="true">
<Description>Description</Description>
<AttributeSource>DESCR</AttributeSource>
<ControlType>text-display</ControlType>
</Attribute>
<Attribute displayed="true">
<Description>Discipline</Description>
<AttributeSource>FB1T</AttributeSource>
<ControlType>text-display</ControlType>
</Attribute>
<Attribute displayed="true">
<Description>Organ System</Description>
<AttributeSource>U1DT</AttributeSource>
<ControlType>text-display</ControlType>
</Attribute>
<Attribute displayed="true">
<Description>Step 1 outline</Description>
<AttributeSource>FB2</AttributeSource>
<ControlType>text-display</ControlType>
</Attribute>
<!-- Attribute displayed="false"> <Description>Organ System plus</Description> <AttributeSource>ORGA</AttributeSource> <ControlType>text-display</ControlType> </Attribute -->
<Attribute displayed="true">
<Description>Images</Description>
<AttributeSource>PIXN</AttributeSource>
<ControlType>text-display</ControlType>
</Attribute>
<Attribute displayed="true">
<Description>Vignettes</Description>
<AttributeSource>VIG1</AttributeSource>
<ControlType>text-display</ControlType>
</Attribute>
<Attribute displayed="true">
<Description>Diff</Description>
<AttributeSource>pvalue</AttributeSource>
<ControlType>text-display</ControlType>
</Attribute>
<Attribute displayed="true">
<Description>Discr</Description>
<AttributeSource>rbvalue</AttributeSource>
<ControlType>text-display</ControlType>
</Attribute>
<Attribute displayed="true">
<Description>Answer Key</Description>
<AttributeSource>key</AttributeSource>
<ControlType>text-display</ControlType>
</Attribute>
<Attribute displayed="true">
<Description>Notes</Description>
<AttributeSource>notes</AttributeSource>
<ControlType>text-display</ControlType>
</Attribute>
</Attributes>
</ItemList>
<CurrentItemInfo>
<ItemText displayed="true"/>
<ItemData>
<Attribute>
<DataSource>scorecat</DataSource>
<ControlType>select-each-value</ControlType>
</Attribute>
</ItemData>
</CurrentItemInfo>
</DataPanels>
</IRData>
<?BASELINE FB2-A.02.01 on:4 off:3?>
<?BASELINE FB2-A.02.02 on:4 off:4?>
<?BASELINE FB2-A.03.01 on:3 off:1?>
<?BASELINE FB2-A.03.02 on:0 off:1?>
<?BASELINE FB2-A.03.04 on:3 off:2?>
<?BASELINE FB2-A.03.05 on:1 off:0?>
<?BASELINE FB2-A.03.07 on:4 off:2?>
<?BASELINE FB2-A.04.01 on:2 off:5?>
<?BASELINE FB2-A.04.02 on:5 off:3?>
<?BASELINE FB2-A.04.03 on:3 off:1?>
<?BASELINE FB2-A.04.04 on:1 off:1?>
<?BASELINE FB2-A.05.01 on:12 off:14?>
<?BASELINE FB2-A.05.02 on:9 off:1?>
<?BASELINE FB2-A.05.03 on:0 off:6?>
<?BASELINE FB2-A.06.01 on:7 off:9?>
<?BASELINE FB2-A.06.02 on:2 off:6?>
<?BASELINE FB2-A.06.03 on:10 off:5?>
<?BASELINE FB2-A.06.04 on:1 off:1?>
<?BASELINE FB2-A.07 on:23 off:20?> -
How do I avoid ORA-01473 when querying hierarchial on tables with VPD predicates
My question is how to circumvent what seems to be a limitation i ORACLE, if at all possible. Please read on.
When using VPD (Virtual Private Database) predictaes on a table and performing a hierarchial query on that table I get the following error message:
ORA-01473: cannot have subqueries in CONNECT BY CLAUSE
My query may look like the folwing:
SELECT FIELD
FROM TABLE
START WITH ID = 1
CONNECT BY PRIOR ID = PARENT
As my predicate contains a query in it self, I suspect that the implicit augmentation of the predicate results in a query that looks like:
SELECT FIELD
FROM TABLE
START WITH ID = 1
CONNECT BY PRIOR ID = PARENT
AND OWNER IN (SELECT OWNER FROM TABLE2 WHERE ...)
at least, when executing a query like the one above (with the explicit predicate) I get the identical error message.
So my question is:
Do you know of any way to force the predicate to augment itslef onto the WHERE-clause? I would be perfectly happy with a query that looks like:
SELECT FIELD
FROM TABLE
START WITH ID = 1
CONNECT BY PRIOR ID = PARENT
WHERE OWNER IN (SELECT OWNER FROM TABLE2 WHERE ...)
or do you know of any fix/patch/release to ORACLE that allows you to include subqueries in the CONNECT BY-clause and eliminates the error message?The WHERE clause or AND clause applies to the line directly above it. Please see the examples of valid and invalid queries below, which differ only in the placement of the WHERE or AND clause. If this is not sufficient, please provide some sample data and desired output to clarify what you need.
-- valid:
SQL> SELECT empno,
2 mgr,
3 deptno
4 FROM emp
5 WHERE deptno IN
6 (SELECT deptno
7 FROM dept
8 WHERE dname = 'RESEARCH')
9 START WITH mgr = 7566
10 CONNECT BY PRIOR empno = mgr
11 /
EMPNO MGR DEPTNO
7788 7566 20
7876 7788 20
7902 7566 20
800 7902 20
-- invalid:
SQL>
SQL> SELECT empno,
2 mgr,
3 deptno
4 FROM emp
5 START WITH mgr = 7566
6 CONNECT BY PRIOR empno = mgr
7 WHERE deptno IN
8 (SELECT deptno
9 FROM dept
10 WHERE dname = 'RESEARCH')
11 /
WHERE deptno IN
ERROR at line 7:
ORA-00933: SQL command not properly ended
-- valid:
SQL>
SQL> SELECT empno,
2 mgr,
3 deptno
4 FROM emp
5 START WITH mgr = 7566
6 AND deptno IN
7 (SELECT deptno
8 FROM dept
9 WHERE dname = 'RESEARCH')
10 CONNECT BY PRIOR empno = mgr
11 /
EMPNO MGR DEPTNO
7788 7566 20
7876 7788 20
7902 7566 20
800 7902 20
-- invalid:
SQL>
SQL> SELECT empno,
2 mgr,
3 deptno
4 FROM emp
5 START WITH mgr = 7566
6 CONNECT BY PRIOR empno = mgr
7 AND deptno IN
8 (SELECT deptno
9 FROM dept
10 WHERE dname = 'RESEARCH')
11 /
FROM emp
ERROR at line 4:
ORA-01473: cannot have subqueries in CONNECT BY clause -
I have a report that I am getting the above error one when trying to run. The report will run fine with one table in it however, if I try to do I join to another table I get the error. I read that this could be a rights issue so I have added the select any table option to the user. I have seperate forms for this join tables and I can run these forms and see the data no problem. Any suggestions?
select any table This is a very powerful system-level privilege, not to be granted lightly without thinking of all the consequences (applies to all the "ANY" privileges)
to the userApex applications are run in the context of the "parsing schema", call it the application owner. Doesn't matter which end-user is running the application. Only the parsing schema needs to have the necessary grants to access the objects the application needs. -
ORA-00902 when altering object types in a PL/SQL procedure
The types are altered to the same, so why gives it an error?
Here is how to see the error:
1. Create the described objects below in an Oracle database (I used 8.1.7).
2. Create a bpel-project using the procedure (via a database adapter), and deploy it.
3. Check to see it works.
4. Drop the object-types and create them again, and recompile the procedure.
5. Activate the bpel-process again - and it will fail with error code 902: invalid datatype (and ORABPEL 11811).
CREATE OR REPLACE
TYPE T_TEST AS OBJECT
( AAR NUMBER,
BILAGNR NUMBER
CREATE OR REPLACE
TYPE T_TESTS
IS TABLE OF T_TEST
CREATE OR REPLACE
PROCEDURE TestAlterType (aType T_TESTS) IS
BEGIN
NULL;
END;
Regards,
FlemmingIn such situation, I changed the BPEL wrapper package and made the BPLE generated wrapper package an Invalid Object (Ref below if needed). Now, I tested the Application from BPEL console. Then I got the Application Package is not exists. (Basically an error condition).I think now the Toplink cache gets disrupted. Then I corrected the BPEL generated Wrapper Package. Then executed the BPEL wrapper Package in database. Now I used BPEL console to test it again. It worked fine...
This way you can avoid Restarting the OPMN..
(One easy Step to Make Invalid Object)
1) Intentionally remove the ending ';' in the BPEL wrapper packages. And run the script in database. This Package body will become invalid. -
"Object Browser" Table Query "Drill Up" Fails with ORA-00942
I feel I have tested this capability in an earlier release of apex and it worked flawlessly... :)
but currently it is not. :(
It seems to be a problem with [ APP_ID=4500 Page=46 ].
To Duplicate the error...
Note: This example assumes "Sample Application" is loaded to the workspace.01) Logon as an APEX developer.
02) Click on "SQL Workshop"...
03) Click on "Object Browser"...
04) Click on table "DEMO_ORDERS"...
05) Click on "Data" [ between "Table" and "Indexes" ]...
06) Click on "Query" [ below "Table" ]...
07) Select "Show" in "Drill Up and "Drill Down Links"...
08) Select "Check All"...
09) Click the "Query" button...
10) Once the result is displayed...
Click on the demo_customers in the first "Drill Up" column.
...after the click in "step 10" above...
the following error will be return.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Current Table/View: DEMO_CUSTOMERS
4500_46_RET_TO_QUERY
failed to parse SQL query:
ORA-00942: table or view does not exist
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
"Drill Up" or "Drill Down" both fail with this message.
I am currently running apex version 3.2.0.00.27 and also confirmed that the error occurs in the current apex demo website... which is currently at version 3.2.1.00.11.
Thanks in advance... :)
v/r
RJonesJason ORCL wrote:
I think you misunderstood.
I call the apps API from custom code.
It runs the API with no issue. It fails when it tries to access the HR table. So APPS cannot access HR.
Are you saying I need to modify APPS code?? That is not likely. Are you saying I need to create a public synonym for an HR table for APPS? That seems unlikely also...OK, looks like there is a typo in your first post and the object name is IRC_ASSIGNMENT_STATUSES.
From eTRM, I see the following:
TABLE: HR.IRC_ASSIGNMENT_STATUSES
http://etrm.oracle.com/pls/et1211d9/etrm_pnav.show_object?c_name=IRC_ASSIGNMENT_STATUSES&c_owner=HR&c_type=TABLE
APPS.IRC_ASSIGNMENT_STATUSES
http://etrm.oracle.com/pls/et1211d9/etrm_pnav.show_object?c_name=IRC_ASSIGNMENT_STATUSES&c_owner=APPS&c_type=SYNONYM
So, this indicates that apps user should be able access this table without a prefix.
SQL> show user
USER is "APPS"
SQL> desc IRC_ASSIGNMENT_STATUSES
Name Null? Type
ASSIGNMENT_STATUS_ID NOT NULL NUMBER(15)
ASSIGNMENT_ID NOT NULL NUMBER(15)
ASSIGNMENT_STATUS_TYPE_ID NOT NULL NUMBER(15)
STATUS_CHANGE_DATE NOT NULL DATE
STATUS_CHANGE_REASON VARCHAR2(240)
LAST_UPDATE_DATE NOT NULL DATE
LAST_UPDATED_BY NOT NULL NUMBER(15)
LAST_UPDATE_LOGIN NUMBER(15)
CREATED_BY NOT NULL NUMBER(15)
CREATION_DATE NOT NULL DATE
OBJECT_VERSION_NUMBER NOT NULL NUMBER(9)Thanks,
Hussein -
Dbms_sql in a different schema from query table-error ** ORA-00942
Oracle Experts,
I think I am having problems with using DBMS_SQL in which the function was created in one schema and the query table was created in a different schema.
We have 2 schemas: S1, S2
We have 2 tables:
T1 in Schema S1
T2 in Schema S2
We have a function F1 created by DBA in schema S1 that uses the dbms_sql as:
CREATE OR REPLACE FUNCTION S1.F1(v1 in VARCHAR2) return NUMBER IS
cursor1 INTEGER;
BEGIN
cursor1 := dbms_sql.open_cursor;
dbms_sql.parse(cursor1, v1, dbms_sql.NATIVE);
dbms_sql.close_cursor(cursor1);
return (0);
EXCEPTION
when others then
dbms_sql.close_cursor(cursor1);
return (1) ;
END;
I am using jdeveloper 11G. We have an Oracle DB 11g.
We have a java program which uses jdbc to talk to our Oracle DB.
Basically, in my java program, I call function F1 to check if the query is valid.
If it is, it returns 0. Otherwise, returns 1:
oracle.jdbc.OracleCallableStatement cstmt = (oracle.jdbc.OracleCallableStatement) connection.prepareCall ("begin ? := S1.F1 (?); end;");
cstmt.registerOutParameter (1, java.sql.Types.INTEGER);
cstmt.setString(2, "Select * from S2.T2");
cstmt.execute ();
Since the table that I run the query is T2, created in different schema than F1 was created in, I have the error:
** ORA-00942: table or view does not exist
So my questions are these:
- I am using Oracle DB 11g, if I run the query on a table that created in a different schema from the one that the function (which uses dbms_sql) was created in, I would get the error ORA-00942?
- If I runs the query on table T1 in the same schema as the function F1, would I have the same problem(The reason I ask is I cannot create any table in schema S1 because the DBA has to do it; I am not a DBA)
- This is not a problem, but a security feature because of SQL injection?
- How to resolve this issue other than creating the table in the same schema as the function that utilizes DBMS_SQL?
Regards,
BinhDefiner rights (default) stored objects run under owner's security domain and ignore role based privileges. So regardless what user you are logged in as, function S1.F1 always executes as user S1 and ignores user S1 roles. Therefore exeuting statement within S1.F1:
Select * from S2.T2requires user S1 to have SELECT privilege on S2.T2 granted to S1 directly, not via role.
SY. -
PL/SQL: ORA-22806: not an object or REF when Using Record in Package
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0
I have declared a record type in my package
create or replace
PACKAGE MYPKG AS
TYPE MYREC IS RECORD (VAL1 varchar2(20), val2 date);
PROCEDURE display_error (pSQLERRM number);
PROCEDURE P_LOAD_DATA (pStartDate Date, pEndDate Date);
FUNCTION F_EPI(refno1 in NUMBER, refno2 in NUMBER) return MYREC;
END MYPKG;
--In My Package Body
FUNCTION F_EPI(refno1 in NUMBER, refno2 in NUMBER) return MYREC is
F_param MYREC;
BEGIN
select myvarchar2, mydate into MYREC from MYTable
where myrefno1 = refno1
and myrefno2 = refno2
Exception
when others then
display_error(SQLERRM);
RETURN F_param;
END F_EPI ;
PROCEDURE P_LOAD_DATA (pStartDate Date, pEndDate Date) IS
insert into atable(myvarchar, mydate)
select F_EPI(refno1,refno2).val1,F_EPI(refno1,refno2).val2 from tab2;
END P_LOAD_DATA;
I get errors
Error(187,7): PL/SQL: SQL Statement ignored
Error(225,7): PLS-00382: expression is of wrong type
Error(225,7): PL/SQL: ORA-22806: not an object or REF
When I compile the package.
When I try to call the function from SQL I get an Invalid datatype error.Hi,
Before posting any query/plsql blocks, please ensure that you have written it clean and complete with less syntax errors. ( at least general syntax errors, you can avoid). Then somebody can have an interest to check your logical error.
About your posting, refer below solution step-by-step. It may help you, about what you are looking for? By the way, you must be knowing, what you are going to to do with. I haven't concentrated about your requirement; as it was not missing in your posting.
drop table test;
create table test(myvarchar varchar2(20), mydate date);
create or replace
package mypkg as
type myrec is record (val1 varchar2(20), val2 date);
--procedure display_error (psqlerrm in number); -- if you are passing sqlerrm, then parameter needs to be string type
procedure display_error (psqlerrm in varchar2);
procedure p_load_data (pstartdate in date, penddate in date);
function f_epi(refno1 in number, refno2 in number) return myrec;
end mypkg;
Package created.
--in my package body
create or replace
package body mypkg as -- added
procedure display_error (psqlerrm in varchar2) -- if you are declared a proc/func in spec, it needs to define in pkg body
is
begin
null; -- you should know, what to do here
dbms_output.put_line('Err -'||sqlerrm);
end display_error;
function f_epi(refno1 in number,refno2 in number)
return myrec
is
f_param myrec;
begin
-- select myvarchar2, mydate into MYREC from mytable
-- where myrefno1 = refno1
-- and myrefno2 = refno2;
select ename, hiredate into f_param from emp -- added demo logic by using emp
where empno = refno1
and mgr = refno2;
return f_param; -- added
exception
when others then
raise; -- if you are using OTHERS then, just raise it
display_error(sqlerrm);
--return f_param; -- what is this?
end f_epi;
procedure p_load_data (pstartdate in date, penddate in date) -- you must be knowing the use of 2 params ???
is
v_rec myrec; -- added
begin -- Added
--insert into atable(myvarchar, mydate)
-- select f_epi(refno1,refno2).val1,f_epi(refno1,refno2).val1 from tab2;
-- demo logic added with static params to call f_epi
v_rec:= f_epi(7499,7698);
insert into test values v_rec;
--null;
end p_load_data;
end mypkg;
Package body created.
SQL> exec mypkg.p_load_data(null,null);
PL/SQL procedure successfully completed.
SQL> select * from test;
MYVARCHAR MYDATE
ALLEN 20-FEB-81
Thanks! -
ORA-00942 error when exporting db
Hi,
Has anyone encountered the following error before? Kindly help.
Connected to: Oracle9i Enterprise Edition Release 9.2.0.7.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.7.0 - Production
Export done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
About to export the entire database ...
. exporting tablespace definitions
. exporting profiles
. exporting user definitions
. exporting roles
. exporting resource costs
. exporting rollback segment definitions
. exporting database links
. exporting sequence numbers
. exporting directory aliases
. exporting context namespaces
. exporting foreign function library names
. exporting PUBLIC type synonyms
. exporting private type synonyms
. exporting object type definitions
EXP-00008: ORACLE error 942 encountered
ORA-00942: table or view does not exist
EXP-00024: Export views not installed, please notify your DBA
EXP-00000: Export terminated unsuccessfully
My exp parameters are full=y grants=y indexes=y rows=yHi,
I have executed catexp.sql but when I run the exp it produced the ff error:
Connected to: Oracle9i Enterprise Edition Release 9.2.0.7.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.7.0 - Production
Export done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
About to export the entire database ...
. exporting tablespace definitions
. exporting profiles
. exporting user definitions
. exporting roles
. exporting resource costs
. exporting rollback segment definitions
. exporting database links
. exporting sequence numbers
. exporting directory aliases
. exporting context namespaces
. exporting foreign function library names
. exporting PUBLIC type synonyms
. exporting private type synonyms
. exporting object type definitions
. exporting system procedural objects and actions
. exporting pre-schema procedural objects and actions
EXP-00008: ORACLE error 21779 encountered
ORA-21779: duration not active
ORA-06512: at "SYS.DBMS_AW", line 106
ORA-06512: at "SYS.DBMS_AW", line 222
ORA-06512: at "SYS.DBMS_AW_EXP", line 264
ORA-06512: at line 1
EXP-00083: The previous problem occurred when calling SYS.DBMS_AW_EXP.schema_info_exp
. exporting cluster definitions
EXP-00056: ORACLE error 31600 encountered
ORA-31600: invalid input value EMIT_SCHEMA for parameter NAME in function SET_TRANSFORM_PARAM
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 105
ORA-06512: at "SYS.DBMS_METADATA_INT", line 3926
ORA-06512: at "SYS.DBMS_METADATA_INT", line 4050
ORA-06512: at "SYS.DBMS_METADATA", line 836
ORA-06512: at line 1
EXP-00056: ORACLE error 31600 encountered
ORA-31600: invalid input value EMIT_SCHEMA for parameter NAME in function SET_TRANSFORM_PARAM
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 105
ORA-06512: at "SYS.DBMS_METADATA_INT", line 3926
ORA-06512: at "SYS.DBMS_METADATA_INT", line 4050
ORA-06512: at "SYS.DBMS_METADATA", line 836
ORA-06512: at line 1
EXP-00000: Export terminated unsuccessfully
Maybe you are looking for
-
Why do I get items at top level in Import Manager?
Hello all: When trying to import from XML file using XML Schema, from IDoc type /AFS/MATMAS04, I get items that should appear as a table, as fiels of structure E1MARAM instead of as a separated table. I've already reviewed the XML Schema file XSD, an
-
Bought video, but can't download it
I purchased the pilot show for Aquaman, but everytime it tries to download it I get, "There was an error downloading your purchased music. The disk could not read from or written to." I assume it is a problem on Apple's end, because immediately after
-
Hi friendz, I read the impdp&expdp docs. But it did not say there about database version dependencies. For example, if an output of 10g Db expdp can be imported to 11g Db and vice versa. Any idea? Thanks
-
Regarding basic idea of SAP GUI
Hi friends, I am a fresher in sap family joined before 6 months. I would like to know about basic knowledge of SAP GUI especially its definition. When i searched in Google i didnt get apt information regarding it. So please help me to
-
Reason for dim fact tables ratio
Friends. What is the exact reason for Dim tables not be greater than 20 % of Fact tables. How does that really impact performance?