The view table selection error external references
Can someone explain why the error near the bottom of the code below? If USER1 grants SELECT on the external table to User2, then USER2 can select the view without any problem; However, I would like to avoid to give User2 access to all the columns in the external table. (I mean only to give USER2 access to two of the four columns).SQL> CONNECT sys AS SYSDBA
Connected as SYS@ as sysdba
SQL> CREATE USER user1 IDENTIFIED BY user1
User created.
SQL> CREATE USER user2 IDENTIFIED BY user2
User created.
SQL> GRANT CONNECT, CREATE TABLE, CREATE VIEW TO user1
Grant complete.
SQL> GRANT CONNECT TO user2
Grant complete.
SQL> GRANT READ, WRITE ON DIRECTORY EXT_DATA_DIR TO user1, user2
Grant complete.
SQL> CONNECT user1/user1
Connected as USER1@
SQL> CREATE TABLE emp_xt
(
emp_id NUMBER,
first_name VARCHAR2(30),
last_name VARCHAR2(30),
phone VARCHAR2(15)
)
ORGANIZATION EXTERNAL
(
TYPE ORACLE_LOADER
DEFAULT DIRECTORY EXT_DATA_DIR
ACCESS PARAMETERS
(
RECORDS DELIMITED BY NEWLINE
FIELDS TERMINATED BY ','
OPTIONALLY ENCLOSED BY '"'
)
LOCATION ('emp.txt')
)
REJECT LIMIT 0
Table created.
SQL> SELECT COUNT(1) FROM emp_xt
COUNT(1)
----------
4
1 row selected.
SQL> CREATE OR REPLACE VIEW emp_xt_view AS SELECT first_name, last_name FROM emp_xt;
View created.
SQL> SELECT COUNT(1) FROM emp_xt_view
COUNT(1)
----------
4
1 row selected.
SQL> GRANT SELECT ON emp_xt_view TO user2
Grant complete.
SQL> CONNECT user2/user2
Connected as USER2@
SQL> SELECT COUNT(1) from user1.emp_xt_view
SELECT COUNT(1) from user1.emp_xt_view
*
Error at line 0
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
ORA-04043: object "USER1"."EMP_XT" does not exist
SQL> CONNECT user1/user1
Connected as USER1@
SQL> GRANT SELECT ON user1.emp_xt TO user2
Grant complete.
SQL> CONNECT user2/user2
Connected as USER2@
SQL> SELECT COUNT(1) from user1.emp_xt_view
COUNT(1)
----------
4
1 row selected.
{code}
user503699 wrote:
Sven wrote:
You have an interesting point for the current user AUTHID. What would be the consequences for that?Published by: Sven w. on August 11, 2010 16:45
I'm not quite familiar with the feature of the data cartridge, nor used TYPEs a lot. But as the external tables use a type defined by the system (ORACLE_LOADER), I think a SQL against an external table called the underlying type procedure/function, and it is where the user rights come into picture.
This seems very likely. I'm just thinking if there is a way around the problem. An idea might be to select on the view with User1 instead of user2. Perhaps via a loopback database link.
Complete shot in the dark:
not tested syntax
/* do this as user1! */
create database link myDb connect to user1 identified by user1 using 'myDB';
create view testLink_view as select * from externalTable_view@myDB;
grant select on testLink_view to user2;
I do not know if you need create the link to the db, since these often telesignalisations are already in place.
Tags: Database
Similar Questions
-
How to remove the scroll bar in the view table obiee 11g
Hello
How to remove the scroll bar in the view table obiee 11g other than TNA config.
Thank you
In 11.1.1.7 you can change it in the table's properties. By default, it will be
"Fixed headers with active scroll.
To take
"Pagination of the content" and check
Thank you
AJ
-
Word key missing in to_number conversion in the SQL statement select error
ORA-00905: lack keyword for the below SQL statement error. It should be of to_number (m.EQUIP_SUB_CLASS_ID, '9999')
between 3800 and the 3699 where Clause. Is that what I miss in the SQL below?
SELECT M.EQUIP_NO,M.EQUIP_CLASS_ID, M.EQUIP_DESCR,M.ORG_ID from MAMIS.EQUIP M where M.EQUIP_NO in ( SELECT M.EQUIP_NO from MAMIS.EQUIP M, MAMIS.ORG O where upper(M.ORG_ID) like upper(O.ORG_ID) and length(replace(translate(M.EQUIP_SUB_CLASS_ID, '0123456789', '000000000'), '0')) is null and upper(M.fleet_status) like 'ACTIVE' and upper(M.ORG_ID) not like 'NA' and to_number(m.EQUIP_SUB_CLASS_ID , '9999') between 3699 and 3800 )
Hello
I don't see obvious errors.
Whenever you have a problem, please post a full test script that people can run to recreate the problem and test their ideas. Include CREATE TABLE and INSERT statements for all of the tables involved and the results desired from these data. Format your code so people can read and understand.
See the FAQ forum {message identifier: = 9360002}I saw a couple of things you need to know about Oracle, but none of them would cause an error "Missing key word".
There is no point in using the LIKE operator if you do use wildcards. For example
upper (M.fleet_status) like 'ACTIVE'
is slower than, but otherwise equivalent to
upper (M.fleet_status) = 'ACTIVE'
What are you trying to do here?
length ( replace ( translate ( M.EQUIP_SUB_CLASS_ID , '0123456789' , '000000000' ) , '0' ) ) is null
Want to see if m.equip_sub_class_id consists only of numbers, from ' 0 'to 9'?
If so, you can simply sayTRANSLATE ( m.equip_sub_class_id , 'X0123456789' , 'X' ) IS NULL
Depending on your front end, you may need a sem, i-colon (;) the end of your query.
-
The ODI tables tepository error message?
Hi, can I get the session error messages into the repository as SNP_SESS tables *... so can you please provide the query for the same thing.
Thank you very much.Hello
Here u - go,
Generally the error messages are stored in the SN_EXP_TXT table you'll have to ask as below (need rework as needed).
Select se.txt in the s snp_session, snp_exp_txt et
where s.sess_no =and s.sess_status = 'E' and s.i_txt_sess_mess = to .i_txt; Thank you
Guru -
Create the content table gives error since the site Explorer
Hi all
I'm new to the web sites of the centre.
Trying to create the table from the Explorer of sites.
Tied at the top of the screen for creating the table.
Get above error after clicking OK.
No idea what I can do wrong. I logged in Site Explorer using admin user 'fwadmin '.
Another way, I can create table content?
Thanks in advance...
Kind regards
Ganesh
Hello
As Stephan said, you must create the table with the ID. Also, I wanted to just mention that I did face some questions, creation or update of some tables because of fwadmin ACL.
There is another default user who has these specific ACLs to work on the database:
-name: ContentServer
-password: password
I hope this can help,
Concerning
-
The IKM selector selection error: IKM SQL for Hyperion Planning
Hello
On the tab 'Flow' of my model, I click on my head to target. Then on the drop down 'Selector IKM', select 'IKM SQL for Hyperion Planning. It gives the error:
Internal error: ODI-15526: IKM IKM SQL for Hyperion Planning not accepted for stage director and target technology
Any ideas? I am really new green on ODI and I am at the end to try to run my dimension build. Any help is appreciated.You must select a transit area which is different to the planning, because this isn't an intermediate technology supported. What you need to do is to go to the tab definition of your interface tick the 'target different transit zone"and then select a relational technology (that is, one that takes supported SQL) in the drop-down list below. If you have no relational db on stage your data and then select ENGINE SUNOPSIS MEMORY which is the memory in DB that is provided as part of the ODI.
-
Send the view / table in email
Try to send an email to apex in view, but I don't know how to include it in the body of the message...
What I use as a treat when click the button...
DECLARE
CURSOR EMP_CURSOR IS SELECT email FROM employee;
l_id NUMBER;
BEGIN
FOR SheikYerbouti IN EMP_CURSOR
LOOP
l_id: = APEX_MAIL. SEND)
p_to = > SheikYerbouti. EMAI,
P_FROM = > '[email protected]. "
p_subj = > "employee information"
p_body = > '?') ;
end loop;
I want to understand reviews of method in the mail... that will be displayed in the body... Can you help me please?Hello
DECLARE l_body CLOB; BEGIN l_body := '
'; htp.p(l_body); apex_mail.send( p_to => 'loga@*****.com', -- change to your email address p_from => 'loga@*****.com', -- change to a real senders email address p_body => l_body, p_body_html => l_body, p_subj => 'APEX_MAIL Package - HTML formatted message'); end;EmpNo EmpName ' ; FOR c1 IN (SELECT EMP_ID,emp_name from employee) LOOP l_body:= l_body || ' '; END LOOP; l_body:= l_body || '' || c1.emp_id || ' ' || c1.emp_name || ' Thank you
LogaPublished by: Logaa on May 18, 2012 04:19
-
How to change the texts lov selected on the selection?
Hello!
I have a request in both languages.
The lov selects ID and name of the table, but the 'name' of table fields are in English.
Can I put the code in my lovs Select translate/edit some fields name in the other language?
My lov code is simple: "SELECT name, id OF ELEMENTS."
IM using apex 4.2.1
I imagine something like "name: = 'Item1' where ID = 1, but what I can actually do something like that?
Hi EgaSega,
EgaSega wrote:
Hello!
I have a request in both languages.
The lov selects ID and name of the table, but the 'name' of table fields are in English.
Can I put the code in my lovs Select translate/edit some fields name in the other language?
My lov code is simple: "SELECT name, id OF ELEMENTS."
IM using apex 4.2.1
I imagine something like "name: = 'Item1' where ID = 1, but what I can actually do something like that?
Here is the solution:
- Add a column to your ELEMENTS to store the name in the particular language:
ALTER TABLE ITEMS ADD (NAME_FR VARCHAR2(30));
Note: You translate the NAME column and update the corresponding translated values in column NAME_FR.
- Create a view to retrieve data according to the language preference:
CREATE OR REPLACE FORCE VIEW ITEMS_V ( ID, NAME ) AS SELECT ID , DECODE(NVL(v('BROWSER_LANGUAGE'),'en-us'),'fr-ca', COALESCE(NAME_FR, NAME), COALESCE(NAME, NAME_FR)) NAME FROM ITEMS;
Note: Replace "fr - ca" language code language code appropriate for the language that you use in your application.
- Create LOV based on the view:
SELECT NAME , ID FROM ITEMS_V
Reference: translation of the data in the database - book Expert Oracle Application Express
I hope this helps!
Kind regards
Kiran
-
Invalid SQL syntax causes the removal of the view
I have found that when you change a view through SQL Developer, entering the syntax invalid SQL and hit 'Cancel' causes in my opinion should be deleted. Here are the steps that present this problem for me:
1. create, save, and close a valid database view by clicking right "views" on the Connections tab and selecting «New view...» »
2. open the view via a right click on the view and selecting ' Edit... »
3 change to point to a non-existent table
4 try to save, select "OK".
5. when presented with an error message, click OK in the dialog box "Edit Error object.
6. click on 'Cancel' in the window "Edit View".
7. right click on the view, and then select 'open '. The "SQL" tab is empty, even though you can see the value in the "Columns" tab
8. after refreshing, the view is a party.
I looked under the problems known and searched the forum to see if it had been reported. Please let know us if there is some setting I can change to avoid this problem. I hope it's a bug, because I can't imagine the changes not saved, causing the removal of the view would be the desired behavior. Please find below my contact information of the environment.
-Matt
Details of the environment
==============
The version of SQL Developer: 3.0.04 build HAND - 04.34
DB version:
Oracle Database 10g Release 10.2.0.4.0 - Production
PL/SQL Release 10.2.0.4.0 - Production
"CORE 10.2.0.4.0 Production."
AMT for Linux: release 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production
Java version:
Java version "1.6.0_16.
Java (TM) SE Runtime Environment (build 1.6.0_16 - b01)
The Client Java VM (build 14, 2 - b01, mixed mode, sharing)
OS: Windows XP Pro SP2Yes.
Changed to Bug 12334150: EDIT DELETED THE VIEW DIALOG box ON entering a not VALID AND the CANCELLATION of THE DIA SYNTAX-Rambeau
-
Creating a view using causes error ORA-00600
Hello ladies and gentlemen,
I tried to deploy a recursive query, as a point of view in Oracle XE and Standard Edition, nor a lot of success.
The query is in this issue here: http://stackoverflow.com/questions/17358109/how-to-retrieve-all-recursive-children-of-parent-row-in-oracle-sq
with recursion_view(base, parent_id, child_id, qty) as ( -- first step, get rows to start with select parent_id base, parent_id, child_id, qty from md_boms union all -- subsequent steps select -- retain base value from previous level previous_level.base, -- get information from current level current_level.parent_id, current_level.child_id, -- accumulate sum (previous_level.qty + current_level.qty) as qty from recursion_view previous_level, md_boms current_level where current_level.parent_id = previous_level.child_id ) select base, parent_id, child_id, qty from recursion_view order by base, parent_id, child_id
The query itself works and returns the results. However, when I try to create a view with this query, I get errors.
I posted two screenshots: http://www.williverstravels.com/JDev/Forums/StackOverflow/17358109/ViewError.jpg and http://www.williverstravels.com/JDev/Forums/StackOverflow/17358109/InternalError.jpg one with the! and * is when I am using JDeveloper 11g, using the navigation database, right-click on the view and select "New View". I get the error when I click on OK. I can indeed create the view through a sql script, but when I try to view the data, I get the error ORA_00600.
I tried it work on my machine the two premises for XE (version 11.2.0.2.0) and 11g Standard Edition (11.2.0.2.v6) via Amazon Web Services. The result is the same.
Does anyone know how to get around this problem?
Not 5 minutes after I have this post, I decide not to use the graphical editor of JDev and simply write
SELECT * FROM BOMS_VIEW;
And it works like a charm. I can not just use data tab to display records in the editor. Wish I'd known that there is 5 hours.
-
Using JOIN to two tables to find records in the second table...
I always seem to get these types of queries wrong and need a bit of help:
I have a MARKETER_ACCOUNT relationship table and another table of pending relationships called ACCOUNT_ENROLLMENT.
I have accounts that can register with a MARKETING agent. They enter the table ACCOUNT_ENROLLMENT pending and a certain Effective Date the active go and then move to the MARKETER_ACCOUNT table. If a relationship ends, it can end in any event if registering with another buyer or if no registration pending they are supposed to be going back to the parent company.
So I want to find all the records that came back to the parent company (that is, they may not have a case pending in the ACCOUNT_ENROLLMENT of the table, but have an end date in the MARKETER_ACCOUNT table):
Select * MARKETER_ACCOUNT m
where M.account_no NOT IN (select E.account_no from ACCOUNT_ENROLLMENT E
where E.effective_date between 8 December 2009 "-January 7, 2010")
and M.expiration_date between 8 December 2009 "-January 7, 2010;
This request is still in progress, and I don't know where I am going wrong. I mean GIVE me all the accounts in the table MARKETER_ACCOUNT that have a date of expiry from December 7, 2009 "-January 7, 2010 ' and where these accounts are NOT pending in the ACCOUNT_ENROLLMENT table, where the entry into force is for the same period."
Any help would be greatly appreciated.
SeanPerhaps you could try the version NOT EXISTS in the query:
SELECT * FROM MARKETER_ACCOUNT M WHERE NOT EXISTS ( SELECT NULL FROM ACCOUNT_ENROLLMENT E WHERE M.ACCOUNT_NO = E.ACCOUNT_NO AND E.EFFECTIVE_DATE BETWEEN TO_DATE('08-DEC-2009','DD-MON-YYYY') AND TO_DATE('07-JAN-2010','DD-MON-YYYY') ) AND M.EXPIRATION_DATE BETWEEN TO_DATE('08-DEC-2009','DD-MON-YYYY') AND TO_DATE('07-JAN-2010','DD-MON-YYYY');
If not, check out these discussions:
{message: id = 1812597}
{: identifier of the thread = 863295}
-
By default how to rotate the view for a report of specific answers?
How can I set the view to pivot as the default view for a report of specific answers? Please let me know.
Published by: user11935561 on December 7, 2009 16:151. go in show results
2. add Pivot view
3 delete the view table and all other views that you have previously
4. now you have the title and the Pivot discovered in the Layout is dedicated to the
5. it displays only Pivot view with title. -
PLL error-1074118135 could not phase-lock of the external reference clock
I tried to block the generator of signals Vectoriels PXI-5671 until its source Ref in instead of the clock on board and it is the following error is received:
Error 1074118135 has occurred to niRFSG wait until what Settled.vi
Possible reasons:
The converter has reported the following error:
Measurements: PLL could not phase block for external reference clock.
Make sure that your reference clock is connected and that it meets the specifications of the voltage and jitter. Additionally, make sure that the reference clock frequency is correctly specified.
The clock source I use is the right frequency (10 MHz) and levels (I tried + 6 dBm and + 12 dBm). However, I was never able to get the 5671 to lock to the Ref in the clock source. Any thoughts?
I haven't dived in the measure of the quality of the 10 MHz clock source that is fed to the VSG but it comes from a device of precision GPS timing, so I'm optimistic that the quality of the clock is within tolerances of the plug VSG.
Hello tsileo,
The 5671 requires that you provide it a square of 10 MHz wave which is free race to +/-0.5 ppm precision. I think that the amplitude levels look correct. I would like to confirm the accuracy of your GPS unit's clock. I also would ensure that free running clock is scheduled before the NOR-RFSG task. According to the frame that you use, you might be able to try to connect to the clock of 10 MHz of the chassis with the REF in connector just to make sure that there is not something wrong with the device.
Kind regards
Paul C.
-
"missing the SELECT keyword" error during an insert into the temporary table using the blob value
I'm trying to insert into an oracle temp table using select that retrieves data from a blob field but I get the error: "lack the SELECT keyword.
How we store temporary in oracle result when we make this type of operation (extraction of data in fields and try to load them into a separate table on the fly.?)
with cte as)
Select user_id, utl_raw.cast_to_varchar2 (dbms_lob.substr (PREFERENCES)) as USER my_blob
)
create table new_table as
SELECT user_id,EXTRACTvalue(xmltype(e.my_blob),'/preferences/locale') regional settings
E ETC
----------------------------------------------------------------------------------
BLOB data - value - which is
<? XML version = "1.0" encoding = "ISO-8859-1" ?>
- < Preferences >< time zone > America/New_York < / > zone< displayscheduleinusertimezone > Y < / displayscheduleinusertimezone >< local > Spanish < /locale >< DateFormat > JJ/mm/aaaa < / DateFormat >< timeFormat > hh: mm aaa < / timeFormat >< longformat > Long_01 < / longformat >< doubleformat > Double_01 < / doubleformat >< percentformat > Percentage_01 < / percentformat >< currencyformat > Currency_01 < / currencyformat >< / Preferences >
A WITH clause that must immediately precede the SELECT keyword:
SQL > create table t:
2 with the o as (select double dummy)
3 select * West longitude;
Table created.
-
Refresh the Materialized View constructed from an external table commit?
Is it possible to create a materialized with Refresh view on commit built from an external table?
I think the answer is "no, because there is no way for the outer table report to the view materialized it has been changed," but I would like to be sure before I tell my client who has requested the opportunity to do this (or, Alternatively, to learn how Oracle hoops I have to cross in order to operate).
I can create a Refresh on demand, it is not a question of not having the necessary permissions to create the materialized view itself.No, you can't. The outer table is not modified in a transactional way and there no materialized view logs, so there is no event to hang in and no delta to apply.
However, you can use dbms_scheduler observer file that will ask for the presence of a file and load the data in a table or refresh a materialized view based on the external table.
Justin
Maybe you are looking for
-
Vista recovery disks do not display TOSHIBA HDD Recovery option
Back to school for 4 children with laptops is a pain, he seems to be constantly before wipe them and their establishment again. Any ideas why the Vista recovery disks do not display TOSHIBA HARD drive recovery option? I made a USB key and copied all
-
Bug Safari: could not establish a secure connection &; search bar problem
I'm hosting a server wiki on one of my macs and he got a self-signed certificate (the one generated by the server application). Since a few days ago (10.11.3 upgrade could be the culprit), Safari cannot establish a secure connection, no more. Oddly e
-
DEP problems DEP prevents me opening iTunes.
-
Graphics in a Windows Mail Signature
When you create a signature for Windows Mail, I copy an image in the signature, but when I apply the chart does not open. Any suggestions as to what to do to fix this?
-
Dell Inspiron N4010 (ATI Mobility Radeon HD5470 update)
Hello guys, I have a Dell Inspiron N4010 Specs Intel Corei5 2.6 Ghz 450 M 2 GB DDR3 Ram ATI mobility Radeon HD5470 1 GB dedicated, I wanted to play Battlefield 3, but I had a problem. There were peaks of lag etc. A new update by ATI Radeon 11.12 was