Selecting from a view when tables are in more than one schema problem

I give up where am I missing it. Why is the ORA-01031 error being generated on the view u1.bv1. In testing even if I give object access to u3 I still get the same errors:
SQL>
SQL> drop user u1 cascade;
drop user u1 cascade
ERROR at line 1:
ORA-01918: user 'U1' does not exist
SQL> drop user u2 cascade;
drop user u2 cascade
ERROR at line 1:
ORA-01918: user 'U2' does not exist
SQL> drop user u3 cascade;
drop user u3 cascade
ERROR at line 1:
ORA-01918: user 'U3' does not exist
SQL> drop role aRole;
drop role aRole
ERROR at line 1:
ORA-01919: role 'AROLE' does not exist
SQL>
SQL>
SQL> select user from dual;
USER
SYS
1 row selected.
SQL>
SQL> select * from v$version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bi
PL/SQL Release 10.2.0.1.0 - Production
CORE     10.2.0.1.0     Production
TNS for Solaris: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
5 rows selected.
SQL>
SQL> create user u1 identified by u1 default tablespace users
2 quota unlimited on users;
User created.
SQL>
SQL> create user u2 identified by u2 default tablespace users
2 quota unlimited on users;
User created.
SQL>
SQL> create role aRole;
Role created.
SQL>
SQL> create user u3 identified by u3 default tablespace users;
User created.
SQL>
SQL> grant aRole to u3;
Grant succeeded.
SQL>
SQL> alter user u3 default role all;
User altered.
SQL>
SQL> grant create session to u3;
Grant succeeded.
SQL>
SQL> create table u1.t1(c1 number);
Table created.
SQL>
SQL> create table u2.t1(c1 number);
Table created.
SQL>
SQL> grant select on u2.t1 to u1;
Grant succeeded.
SQL>
SQL> create or replace view u1.bv1 as
2 select u1.t1.c1 as c1 ,u2.t1.c1 as c2
3 from u1.t1, u2.t1 where u1.t1.c1 = u2.t1.c1;
View created.
SQL>
SQL> grant select on u1.bv1 to aRole;
Grant succeeded.
SQL>
SQL> create or replace view u1.gv1 as select * from u1.t1;
View created.
SQL>
SQL> grant select on u1.gv1 to aRole;
Grant succeeded.
SQL>
SQL> connect u3/u3
Connected.
SQL>
SQL> select * from u1.bv1;
select * from u1.bv1
ERROR at line 1:
ORA-01031: insufficient privileges
SQL>
SQL> select * from u1.gv1;
no rows selected
SQL>
SQL> spool off

User u1 cannot do a grant on a view to other user if the view uses tables from other schemas unless you do a "with grant option" grant.
You need to do the following to make it work:
SQL> grant select on u2.t1 to u1 with grant option;
Grant succeeded.
SQL>

Similar Messages

  • Issue on Hyperion Report when we are showing more than one pivot section on

    Hi All,
    I am showing two pivots on the report section.
    One pivot is having variable number of rows (let’s say P1) and other is having fixed number of rows (let’s say P2).
    While creating the report section we are showing P2 below P1. (for any particular selection of filter P1 was having 5 rows including Total and P2 is having fixed number of rows.)
    But while processing the report for any other filter selection the number of rows in P1 got increased and it got overlapped on P2 as P2 will not shift downwards when P1 expands.
    Pivot behaves as images on report section so we are not having properties like scroll bar or any other control on report section for pivot.
    Please suggest some action items to be done to overcome this problem.
    Thanks in Advance.
    Ujjawal

    Thanks Stuart,
    I am using Hyperion Interactive Reporting Studio version 9.3.1. I tried to get the functionality by the method described by you. But I was not able to get 'Position' from the property window. I am having 3 tabs in Properties window i.e. Border and Background, Picture and Alignment. In alignment i tried but it is only for text alignment.
    Can you please elaborate your answer?

  • I accidently closed my window with all my app tabs, now the only window that opens was a 2nd one I had open. How do I get back all my app tabs from the previous window, and why didn't it give me the usual warning you are closing more than one tab?

    I accidently closed the window with all my frequently used app tabs, now the only window that opens was an extra one I had opened. How do I get back all my app tabs from the previous window, and why didn't it give me the usual warning you are closing more than one tab? edit
    Details

    Then the (App) tabs from that window are lost unless you can restore an older copy of the sessionstore.js file (Time Machine?) that has that lost window.
    *http://kb.mozillazine.org/sessionstore.js

  • How to select a substring in oracle up to a more than one specific character

    How to select a substring in oracle up to a more than one specific character
    for ex : 121.051^NP: FAMILY PRACTICE  ( trim the values before ^ )
                121.051^*NP: FAMILY PRACTICE (trim the value before *).
    with below function I can only get rid of ^ , I want both the specific characters ^ and ^* to be removed at the same time.   
    SUBSTR(p.phys_sub_grp_2_desc,INSTR(p.phys_sub_grp_2_desc, '^') +1)

    Another option is to boldly replace 'em:
    SQL> with t as (
      2  select '121.051^NP: FAMILY PRACTICE' str from dual union
      3  select '121.051^*NP: FAMILY PRACTICE' from dual
      4  )
      5  --
      6  -- actuel query:
      7  --
      8  select substr( replace(str, '*')
      9               , instr(replace(str, '*'), '^')+1
    10               ) str
    11  from   t;
    STR
    NP: FAMILY PRACTICE
    NP: FAMILY PRACTICE
    2 rows selected.

  • Table cell with more than one component

    how can i make table cell with more than one component
    like below, cell in column 3 contains few button
    col0 | col1 | col2 |
    a | b |[btn1] [btn2] [btn3]|
    a | b |[btn1] [btn2] |
    and when i click on the any of the button a dialog box pop up saying something..

    Here's link to someone who did a lot with tables. Not sure about multiple buttons, but it should get you started.
    http://www2.gol.com/users/tame/swing/examples/SwingExamples.html

  • When I update applications more than one account appears.  How do I delete second account

    when I update applications more than one account appears.  How do I delete second account?

    I'm wondering if you have to Apples IDs or iTunes IDs and have puchased apps on both accounts.I have the same issue, and must supply both accounts' passwords in order to update apps. From my research here, there's no way to merge the two accouts. It is aggrivating, indeed.

  • TS4123 This is not correct solution. I have fresh copy of Windows 7 64 bit and I have the same problem.  Autorun only shows the Bonjour service.  It started when try to sync more than one iphone.

    This is not correct solution. I have fresh/new copy of Windows 7 64 bit and I have the same problem. 
    Autorun only shows the Apple Bonjour service.  It started when try to sync more than one iphone over WiFi. I have two iphones and an iPad. I turned off syncing over WiFi and still has high CPU utilization. One of the CPU's is pegged at 100%.  It is the AppleMobileDeviceService.exe process.

    For the record, I then followed the suggestion of MarcDCMB in https://discussions.apple.com/thread/4291206 of just manually restarting the Apple Mobile Device service in Windows services.msc once each time after starting iTunes and the service no longer hogs CPU after that service restart.  Not too painful as a work-around, and apparently an effective one, but clearly not a solution to the problem.  Again, as above, all the other solutions didn't work for me and I have no conflicting software as far as I can tell. So you'd have to say this Apple's problem.
    Also FTR, I am still on the 5.2.0.6 version of the Apple Mobile Device Support MSI and I don't know if that is relevant to this work-around working but my sense is that it is NOT relevant.  I'll report back on this thread if I re-upgrade and the problem returns in spite of the service-restart approach.

  • How to create a table cell occupy more than one row using PDF.

    Hi,
    I want create a pdf report,which contains a table cell occupied more than one line.
    just like html language: <rowspan = 2>
    merge cells in one row is allowed,we can use merge cells command(like colspan in html).
    but how to mege cells in one column?

    Hi,
    I want create a pdf report,which contains a table cell occupied more than one line.
    just like html language: <rowspan = 2>
    merge cells in one row is allowed,we can use merge cells command(like colspan in html).
    but how to mege cells in one column?

  • Table referenced by more than one other table

    I'm no DBA so I was wondering if you could answer this fairly basic question. If I have a table that references more than 1 other table. For example Order links to a customer or Order can link to an Employee how would I represent that in the data model?
    I'm guessing I could have the Order table have both an Employee ID and a Customer ID columns and null one or the other out depending on whether it was linked to an Employee or Customer but that seems a bit redundant in that there would always be at least one column being null.
    Perhaps I could use table inheritance and just add the relevant foreign key col on the inherited tables but I'm fairly sure you can't have abstract tables.
    Thanks for the help.

    For example:
    table a = Primary_key1, col2, col3
    table b = Primary_key1, primary_key2, col3
    table c = Primary_key2, col2
    To join all this tables you must do something like this:
    select ....
    from tablea,tableb,tablec
    where tablea.Primary_key1=tableb.primary_key1 and
    tableb.Primary_key2=tablec.primary2;

  • Lumia 520 SMS- when a contact has more than one nu...

    Hi- when calling a contact who has more than one phone number it is easy to choose which of the numbers for that contact to use, but when sending SMS there is no option to choose. How does the SMS system decide which of the available numbers to use?
    Solved!
    Go to Solution.

    If I do the following steps: Messaging > + >To + > Select contact > I see all numbers listed for the contact.
    If I do instead: People > Contact > SMS, the number entered as "mobile" is selected by default. If you want to change it to "mobile2", you need to go: ... > switch number and select from there.

  • Can I have one cell in a table extending over more than one column?

    I'd like to be able to have a table in which some cells extend over more than one column.
    In Word, I can just delete the right hand cell border, and the cell automatically stretches over the next column.
    (Pages 5.2.2.)
    Thanks

    Pages v5 is not an MS Word clone, and therefore, it doesn't matter what you did in Word. Select the adjacent table column cells, and then either two-finger tap, or right-click and choose merge cells from the contextual menu.

  • Some apps stay open when trying to close more than one app at a time in ios 7

    I tried closing down 2 or 3 app at a time in IOS7 and there's always one or two that stay open. The icon at the bottom is still there but I've already swiped it up to close it. When I go out of the closing function and come back I see that they are still open and I need to close them again. I tried this on many ipads, iPhones and ipod touch and they all act the same way.
    Chris

    I guess you didn't know, but yes you can close more than one app at a time. You can close up to 3 apps at a time in the new IOS7 on the iPhone. Try opening at least 3 apps and then double click the main button to see what apps are opened. Then swipe to the left to see the three of them on your screen. Your not gonna see the ones on the side entirely but you can still put all three fingers on them, then simply swipe them up and it closes them up.
    The thing is, when you have let say 10 apps open, and you start using this trick, some of them will stay open meaning you swiped them up to close them down but the bottom icon stays there. When you come back to your main IOS desktop and then go back to close the programs that you have opened, you can see that those apps are still opened. There is only like 2 or three out of all the 10 you had opened that stayed open, but none the less it's a bug in the system I presume.
    You also asked about the icon at the bottom. When you are seeing what apps are opened, there is always a small icon at the bottom and on top you have a representation of what you were working on, and that is the part you swipe up. But often time the bottom icon will stay opened after swiping 2 or 3 of the apps to close them.

  • Reader X shuts down when trying to open more than one pdf, or when clicking certain categories in settings

    Until a few weeks ago I have never had a problem opening more than one pdf at a time. Now Reader just shuts down when I try to do so. The same thing happens when I click on the yellow highlighted categories in settings. All the other categories open fine.
    Appreciate the help of anyone who can help me solve this.

    I guess you didn't know, but yes you can close more than one app at a time. You can close up to 3 apps at a time in the new IOS7 on the iPhone. Try opening at least 3 apps and then double click the main button to see what apps are opened. Then swipe to the left to see the three of them on your screen. Your not gonna see the ones on the side entirely but you can still put all three fingers on them, then simply swipe them up and it closes them up.
    The thing is, when you have let say 10 apps open, and you start using this trick, some of them will stay open meaning you swiped them up to close them down but the bottom icon stays there. When you come back to your main IOS desktop and then go back to close the programs that you have opened, you can see that those apps are still opened. There is only like 2 or three out of all the 10 you had opened that stayed open, but none the less it's a bug in the system I presume.
    You also asked about the icon at the bottom. When you are seeing what apps are opened, there is always a small icon at the bottom and on top you have a representation of what you were working on, and that is the part you swipe up. But often time the bottom icon will stay opened after swiping 2 or 3 of the apps to close them.

  • How to apply data into 2 tables AND to more than one record in same table?

    Hello,
    I am trying to apply/insert data into 2 tables AND at the same time apply data to more than one record (in the same table). How would I do this in APEX?
    I have updated using one table with no problem, however, when I try updating with the two tables/ multiple record sets, I get errors.
    I appreciate the help.
    Thanks.
    Linda

    You can achieve what you want using PL/SQL. Can you post ur code?

  • MM_SPTOCK - Problems when Material assigned to more than one Batch Id

    Hi Experts,
    We are using MM_SPSTOCK object for archiving Batch Records. While executing this Archiving object ,Suppose we have a case where there exists a  material assigned to more than one batch .Lets Say B1 and B2 for Material M1. If we are interested to archive the Batch record M1 B1 then M1 B2 also getting archived even though the batch B2 is not specified in the selection criteria of MM_SPSTOCK .This leads to Data inconsistency.Is there anything that we need to do in order to save the second batch record getting archived.Please suggest.Let me know if you need any information
    Kind regards,

    Hi All,
    Let me know if you come across this situation anytime and have a work around for this.

Maybe you are looking for

  • How to sync with Aperture instead of iphoto

    Hi, I have an iphone 3gs and when I connect the iphone it shows up in iphoto so I can import the images it has taken, but I would prefer it to show up in Aperture as I prefer to use that, I cannot find any settings to make it default to Aperture inst

  • After update, firefox says I'm in offline mode

    Update went smoothly but now I get an "offline mode" message and can't access the intrnet.

  • Installing .TTF, .FON, .TTC Fonts Onto Ipod touch?

    How do you Add any font file(.TTF, .FON, .TTC), and use it in the notes application? I'm using Windows Vista, And My iPhone OS Version is 3.0. Any help will be great.

  • Backup file?

    I am trying to find a backup file on my macbook to delete it but I cannot find it. Help? I Deleted my iphone and ipad backups but my storage overview is still showing I have 31 GB of backups. I think this occured because I prematurely removed my exte

  • Settlement Rule not defaulting in IW32

    Hi Gurus, This is a specific issue related to the 'settlement rule' defaulting in the refurbishment order.  At the time of creating order and trying to release the order, the settlement rule is getting defaulted in the order, but once I save the orde