Ofen() hangs when selecting from a view with a database link.
We have some old COTS software that recently started causing problems after upgrading our database from 9i to 10g (10.2.0.4) on HP Itanium server.
The select statment in quesiton hits a view that references a table via a database link. After returning a few rows, the process hangs. Reducing the number of columns in the select statement resolves the problem.
Any ideas? Note that the full sql statment was working prior to the 10g upgrade.
One thing to try would be to use SCHEMA.TABLENAME rather than just TABLENAME to refer to the tables.
Its just a shot in the dark, but hopefully it may help.
Martin.
Similar Messages
-
ORA-00903 when selecting from a view
Hi,
I'm migrating our existing database on 8.1.7 to 9.2 and I keep getting an ORA-00903 error (on Oracle 9.2.0.1.0) when I try to select from a view with nested selects. Here's a very simple example - no rows are returned when I issue the query (its a dummy query, but it illustrates the problem). However, as soon as I turn it into a view, and do a select from the view, I get an Invalid Table Name error. Can anyone suggest why this is happening?
So... This works on its own
SELECT ID
FROM (
SELECT /*+ ORDERED */
t.id
FROM tblmsg t,
tblevent e,
e_workflowstate s,
(SELECT e_taskstatus_id
FROM e_taskstatus s,
e_workflowplntasks ws
WHERE s.e_taskstatus_id = ws.taskid
UNION ALL
SELECT e_taskstatus_id
FROM e_taskstatus s,
e_workflowmantasks ws
WHERE s.e_taskstatus_id = ws.taskid
UNION ALL
SELECT e_taskstatus_id
FROM e_taskstatus s,
e_workflowtrgtasks ws
WHERE s.e_taskstatus_id = ws.taskid) V
WHERE t.id = e.id
AND t.id = v.e_taskstatus_id
AND V.e_taskstatus_id = e.id)
But this doesn't
CREATE OR REPLACE VIEW TESTVIEW AS
SELECT ID
FROM (
SELECT /*+ ORDERED */
t.id
FROM tblmsg t,
tblevent e,
e_workflowstate s,
(SELECT e_taskstatus_id
FROM e_taskstatus s,
e_workflowplntasks ws
WHERE s.e_taskstatus_id = ws.taskid
UNION ALL
SELECT e_taskstatus_id
FROM e_taskstatus s,
e_workflowmantasks ws
WHERE s.e_taskstatus_id = ws.taskid
UNION ALL
SELECT e_taskstatus_id
FROM e_taskstatus s,
e_workflowtrgtasks ws
WHERE s.e_taskstatus_id = ws.taskid) V
WHERE t.id = e.id
AND t.id = v.e_taskstatus_id
AND V.e_taskstatus_id = e.id);
View created
SELECT * FROM TESTVIEW;
ERROR at line 1:
ORA-00903: invalid table name
This works fine on 8.1.7. I haven't tested it on 9.1 though.
Any ideas?
ThanksOne thing to try would be to use SCHEMA.TABLENAME rather than just TABLENAME to refer to the tables.
Its just a shot in the dark, but hopefully it may help.
Martin. -
ORA-01031 insufficient privileges error when selecting from a view
OK I think this might be a dumb question but I can't figure it out:
User John has been granted SELECT privilege (directly, not through a database role) to schema FRED.table1;
User John can issue select * from FRED.table1; and it works just fine.
User John has then been granted SELECT privilege (directly, not via a database role) to schema
MARK.view1;
MARK.view1 only selects from FRED.table1. No other tables are in the view1.
Schema MARK can successfully query the views. SELECT * FROM VIEW1 returns results.
I also checked the MARK schema to ensure that it has been granted SELECT on FRED.table1 directly which it has.
Now, when logged into schema John, I try SELECT * FROM MARK.VIEW1; and I get ORA-01031 insufficient privileges error.
I'm not sure how to troubleshoot this. If John is granted SELECT ANY TABLE, it of course works but I don't want John to have that powerful priv.
To recap, John has SELECT on both MARK.VIEW1 and the table which VIEW1 selects from (FRED.TABLE1).
John can select from FRED.TABLE1 no problem but receives a privilege error even though John has SELECT on MARK.VIEW1.
Any thoughts?
Oh, Oracle EE 10.2.0.4JSebastian wrote:
OK I think this might be a dumb question but I can't figure it out:
User John has been granted SELECT privilege (directly, not through a database role) to schema FRED.table1;
User John can issue select * from FRED.table1; and it works just fine.
User John has then been granted SELECT privilege (directly, not via a database role) to schema
MARK.view1;
MARK.view1 only selects from FRED.table1. No other tables are in the view1.
Schema MARK can successfully query the views. SELECT * FROM VIEW1 returns results.
I also checked the MARK schema to ensure that it has been granted SELECT on FRED.table1 directly which it has.
Now, when logged into schema John, I try SELECT * FROM MARK.VIEW1; and I get ORA-01031 insufficient privileges error.
I'm not sure how to troubleshoot this. If John is granted SELECT ANY TABLE, it of course works but I don't want John to have that powerful priv.
To recap, John has SELECT on both MARK.VIEW1 and the table which VIEW1 selects from (FRED.TABLE1).
John can select from FRED.TABLE1 no problem but receives a privilege error even though John has SELECT on MARK.VIEW1.
Any thoughts?
Oh, Oracle EE 10.2.0.4Are you certain John has been granted select on Mark.view1 ? In order for that to work Mark would have to have been given select on Fred.table1 WITH GRANT OPTION ... otherwise the grant would fail and then John would not be able to select from the view because the grant was never successfully issued.
Here's a basic test case (which i think conforms to what you've outlined) to get it working.
drop user u1 cascade;
drop user u2 cascade;
drop user u3 cascade;
create user u1 identified by u1;
grant connect, resource to u1;
create user u2 identified by u2;
grant connect, resource, create view to u2;
create user u3 identified by u3;
grant connect, resource to u3;
connect u1/u1@orcl
create table test1 (col1 number);
grant select on test1 to u2 with grant option; --> this is the important part
grant select on test1 to u3;
connect u2/u2@orcl
create view test2 as select * from u1.test1;
grant select on test2 to u3;
connect u3/u3@orcl
select * from u2.test2; -
Performance problem with select from _DIFF view
Hi,
we have a versioned table with more then one million records. We use the DBMS_WM.SetDiffVersions procedure and select from DIFF view to get data differences between two workspaces. The problem is that the select from the DIFF view is very slow. I takes more than 15 minutes. Has anybody an idea why it consumes so much time? Is there any way how to improve it?
Thanks and regards
OndrejHi,
This can be due to any number of things, but is typically caused by an inefficient optimizer plan. Make sure that statistics on the _LT table have been recently analyzed.
Also the following information would be useful:
1. What is the relationship of the workspaces that you are trying to compare (parent/child, children of the same parent, etc) ?
2. How many and of what type dml are being performed in the workspaces ?
3. What version of Workspace Manager are you using and what is the version of the database ?
4. What is the time needed to select from the _DIFF view based on the primary key ?
Regards,
Ben -
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 offUser 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> -
Error while selecting from a view ORA-01031: Insufficient privileges
As DBA I have granted select privileges on a view to a user, but whenever I login as that user and try to select from the view I get the message 'ORA-01031'. When I run the query in the view as the user I do not have problem and can see the results. This view joins tables from more than one schema and does a distinct on the resultset. I am new to Oracle and would appreciate any help I can get.
ThanksBack on this problem when I created another user with select permission on the same view and a default role that has reference on all the objects on the other schemas, I end up with the same error message. Although this time the schema owner of the view has select privileges on all the tables from other schemas referenced in the view.
Thanks -
Hello!
We have the following problem:
LabView (8.2) hangs when using I/O operations with traditional NI-DAQ 7.4.4 after aborting LabView program
We freshly installed LabView 8.2 (2006) and NI-DAQ 7.4.4 on a PC running Windows XP (Service Pack 3). We built a larger vi that remotely controls a traditional NI-DAQ card (AT-AO-10) on a second PC via NI-VISA 5.0.3. We were successfully running this program until a power failure caused the first computer to crash. After this crash we were unable to start the program again: LabView freezes while loading the vi. LabView itself can be started but freezes when adding I/O operations from the NI-DAQ palette to a block diagram.
We have tried to re-install NI-DAQ 7.4.4, but it did not help. We then re-installed all NI software, but still no improvement. In the end we decided to reinstall ALL software, first Windows XP, then LabView and finally NI-DAQ 7.4.4. This worked. However, after a few days of running the program we had to abort LabView via Windows Task manager and afterward we again experienced the same problem as before: LabView freezes when loading the program.
Obviously, we cannot afford to reinstall Windows every time. Are there any known Windows XP / NI-DAQ issues that might cause the freezing of LabView? We would be very grateful for any idea.
Best regards,
MatthiasHello Sprice,
Browse the shipping examples according to “Directory Structure” and then select
DAQ to find the Traditional DAQ examples.
There a lot of examples that are written for counters (Counter >>
daq-stc.llb >> Count Edges (DAQ-STC).vi).
What kind of signals are your photons creating? Are they TTL compatible at a certain
frequency? You don’t care about overwriting
your buffer?
Respectfully,
Rob F
Test Engineer
Condition Measurements
National Instruments -
Selection from maintenance view
Hi,
I have created and activated a maintenance view from tables EKPO and EKKO. I needed an outer join so I had to use maintenance view instead of datbase view. When I see the data in the view using SE11 it works fine. However, when I try to select some fields from it using code it gives me an error message.
Eg.
REPORT Z_TEST_REP.
TABLES: Z_MAINTVIEW.
SELECT * FROM Z_MAINTVIEW.
WRITE: / Z_MAINTVIEW-MYFIELD1.
ENDSELECT.
When activating, this gives me the error message: "Z_MAINTVIEW" is not defined in the ABAP Dictionary as a table, projection view or database view.
Does this mean that it is not possible to select single fields from a maintenance view using the select statement? Is there any way I can do this? Any help is appreciated. Thanks.
KhanHi Khan,
it is in the nature of EKKO (header) and EKPO (items) that you have 1 to n records (ittems) in EKPO with the same EBELN (purchase order document number). They all have different EBELP (item number values).
I just tried: You can create a database view with tables EKKO and EKPO with join condition EKKO-EBELN = EKPO-EBELN. In the view you also need EKKO-MANDT = EKPO-MANDT to make sure you stay in your client.
In the view fields, put all fields you want and/or need.
You can select from this view; works great.
Alternative: Use BAPI_PO_GETDETAIL to get all the header and item data you need. This is 100 % compliant with standard and (as I am convinced) with any programming guidelines.
- OK as I don't know the business scenario, it might be lesss than most appropriate...
Regards,
Clemens -
I am running
Windows 7 64 bit
Access 2010 32 bit
Developing an application with a split FE BE with both files local but continue to have the message "Not Responding" when switching from forms view to design view and back as well as if I try to connect to a subform or object on the sub form.I have seen this behavior when the form's RecordSource is a complex query such as a crosstab or a query with several nested queries. To test if this is your case, remove the RecordSource and see if the form starts acting normal again.
Then again, if the form has several subforms they might be slowing up the loading time.
Bill Mosca
www.thatlldoit.com
http://tech.groups.yahoo.com/group/MS_Access_Professionals -
Developer Server 6.0 hanging when launched from Netscape 4.6
Hi, simple question to ask about OAS and Developer Server.
My Developer Server 6.0 hanging when launched from Netscape 4.61,
I am currently running...
Pentium PII 200Mz running NT sp5
Forms Server version 6.0.5.31.0 (Patch 3 applied)
OAS version 4.0.7.1.0 (Patch applied)
Jinitiator 1.1.7.18
Netscape 4.61 browser
I have all the latest versions of everything that is available,
I have followed the instructions.
I successfully connect to the OAS admin utility and have setup
all the virtual to physical directory mappings under the default
listener www. I successfully start all website OAS services.
I have Forms server successfully started up as a process
listening on port 9000.
I have two statics html files created:
a) with Jinititator 1.1.7.18
The very first time I connected to this static html file it
installed Jinitiator as expected. The Forms server splashscreen
then appears.
Jinitiator then starts up successfully, no errors appear in the
Java console. This has proved I am talking to the listener and
my virtual directory mappings are working.
At this point there is a lot of disk activity and then all
stops, the splashscreen remains and appears in the discussion
area:
FRM-9999 cannot access "koala.ilaco.gov.bo:9000" and
a series of java exceptions
I am pointing to the correct java directories (I think)
b) with out Jinitiator
When I try to call using URL with Netscape 4.61 I get a
message on the status bar saying...
Applet oracle.forms.engine.Main class oracle/forms/engine/Main
got a security violation: Method verification error
Can you help ?
If you know the answer, please let me know as soon as
posible.
Thanks for the answer....
Rgds,
Polo
nullBart LEBOEUF (guest) wrote:
: Hi,
: I've the same problem during this week. I've resolve the
: problem by replace DLL's
: in %ORACLE_HOME%\bin by the ifwcm60.dll from Developer CD-Rom
: (\extras\sp4\ifwcm60.dll) and vgs60.dll
(\extras\vgs\vgs60.dll).
: At first time, it doesn't work. I remove my environnement
: variables
: FORMS60_MAPPING and FORMS60_TIMEOUT from my System Control in
the
: Config panel, then I reboot and surprise, it works !!!
: (Look also in database registry of Windows with regedit
utility
: in
: [HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE] and remove the two
: variables if you found them.)
: I try on my two servers and it worked now perfectly.
: : Bart.
I respond your email, with my actual server configuration my
problem is now: I get the splash screen and after form is hanged.
My server configuration is:
Compaq PC, with Pentium II, the software is:
- Windows NT, with Service Pack 5
- Oracle Application Server, v.4.0.7.1.0 Enterprice Edition,
pathset 1
- Developer Server v.6 patchset 3
- My browser in this machine is Netscape 4.61
- Jinitiator 1.1.7.18 is also used.
My developer server is installed and running on the same machine
that OAS is. I am using other browser in other machine (IE5)
and trying to connect to the OAS on the first machine.
My problems begin when I launch ifsrv60.exe. I copied
ifwcm60.dll v.6.0.5.0.2, and other files required in the %
ORACLE_HOME%\bin
I forced listener Developer Server Port (
c:\orant\bin\ifsrv60.exe -listen port=9000 )
Now, I can connect with this process, with the following line:
telnet koala 9000. The listener is working now.
I tried to work with my (NonCartride-static html)forms60 form on
WEB without Jinitiator, but I couldn't.
With Netscape, in the status bar: Applet
oracle.forms.engine.Main can3t stop ERROR
With IE5, I get the splash screen and after the forms is hanged.
If I use Jinitiator:
With Netscape, in the status bar: Oracle Jinitiato: applet
oracle.forms.engine.Main inited then form is hanged.
With IE5, I get the splash screen and after that, the screen
freezes and looks like the form is hanged.
Any further suggestions on this?
Polo
null -
Problem with MAIL, when select names that start with "E" the mail freeze. Can't fix it.
Now I checked the materials that I got from AT&T Yahoo and
port 25 is used as the outgoing mail port, 110 for incoming.
This is for the POP type account provided by AT&T, not necessarily for an email account and SMTP server not provided by AT&T.
Sounds like AT&T blocks using an SMTP server that is outside of their network or not provided by AT&T on Port 25.
Try the following first.
Go to Mail > Preferences > Accounts and under the Account Information tab for your .Mac account preferences at the SMTP server selection, select the Server Settings button below for the .Mac SMTP server.
Enter 587 in place of 25 in the Server Port field and when finished, select OK to save the changed setting.
If this doesn't work, we will go to plan B. -
how do i access the data stored on my time capsule? for example, if i try to view a photo, i get the option to "view with iphoto" but when i click on "view with iphoto" nothing happens. i'm having similar trouble openning up movies, music, etc. it appears as though the files exist / saved on the time capsule (because i can see how much storage they consume), but i can't open them. thanks!
Unfortunately, Apple removed the feature to "browse backups" in Time Machine backups of iPhoto a few years ago.
You have to restore the entire iPhoto library to a separate location to be able to "see" it, and then choose the specific images that you want use.
For complete details, see #15 in Pondini's excellent support document Time Machine -- FAQ. Check the information in the pink box there.
Frequently Asked Questions -
Can ResultSetMetaData() return the table name if it is selected from a view
hi all
can anyone tell me if ResultSetMetaData() can return the name of the table if it is selected from a view? thanks, i tried and it didn't return nothing. is it because the view is treated differently than table in ResultSetMetaData?hi all
can anyone tell me if ResultSetMetaData() can return
the name of the table if it is selected from a view?
thanks, i tried and it didn't return nothing. is it
because the view is treated differently than table in
ResultSetMetaData?I would say "no". A view could be a multi-table join query, or maybe even a no-table query. The bigger picture I think though, is that you shouldn't need to know what the underlying table(s) were for this query - smells of a mis-design. -
Is selecting from a view more efficient than selecting from multiple tables
Hi heres the problem
Lets say i created a view from 2 tables (person and info). both have a ID column
create view table_view (age,name,status,id) as
select a.age, a.name, b.status, b.id
from person a, info.b
where a.id=b.idif i want to select a given range of values from these 2 tables which of the following queries would be more effective.
select a.age, a.name, b.status, b.id
from person a, info.b
where a.id=b.id
and a.id <1000
select age, name, status, id
from table_view
where id <1000Bear in mind that this concept of views storing the SQL text is something relative to Oracle databases and not necessarily other RDBMS products. For example, Ingres databases create "views" as tables of data on the database and therefore there is a difference between selecting from the view and selecting from the base tables.
Oracle also has "materialized views" which differ from normal "views" because they are actually created, effectively, as tables of data and will not use the indexes of the base tables.
In Oracle, you cannot create indexes against "views" but you can create indexes against "materialized views". -
It's is possible to make a select from a view?
I don't know if it's possible to make a select of a table-view like V_T5F99FW if it's possible does anybody tell me how can I do?
Thanks a lot,
Regards,
RebecaHi Rebeca,
You can surely do a selection from a projection and database view but not from a maintenance view.
The selection from a view works like a normal selection only.
watch this link
http://sap.ionelburlacu.ro/abap/ABAPperformance.html#Select_with_view
Regards,
Manish
Edited by: MANISH GUPTA on Aug 31, 2008 1:38 PM
Maybe you are looking for
-
Wireless N Router Model # WRT150N
I currently have the G series Router and Super Booster. I want to purchase the new N series Router and want to know if it has a compatibel Booster, does it need one, and/or can I use my Wireless G Router Speed Booster with it? Thanks Dr Michael T Nob
-
An error occurred in the source system (DB Conect)
Hi, It message appear while an ODS was loading data fully to a Cube. Please, can anyone help me to solve this problem? Thank you very much in advance. Jorge Mensaje de error del sistema fuente Diagnóstico An error occurred in the source system. Activ
-
I have a MacBook Pro, using Mavericks. A couple of days ago, a box keeps popping up asking for my iCloud ID. I have to put it in several times before it finally accepts my ID. However, when I just get frustrated and cancel it, my iCloud still works a
-
RosettaNet (RNIF) Inbound
Hi Guys, I have previously created a RosettaNet interface to send messages to another server, however I now need to look at receiving RosettaNet messages. I have created the relevent parties, business services and communication channels, observing th
-
Latest NW04 SP16 - installation preparation error
at an attempt to install "Sneak Preview SAP NetWeaver 2004 - Full Java Edition SP16) I am getting an error in the installation preparation phase: guiengine: login in process. ERROR 2006-05-02 13:20:05 [syxxsyshlp.cpp:56] syslib::print