Remote Table Access without Limitations!
Hello,
Does anybody knows about an alternative to RFC_READ_TABLE (or RFC_GET_TABLE_ENTRIES or TABLE_ENTRIES_GET_VIA_RFC) that does not impose a limit over 512 bytes column width?
I need to access a table from outside SAP, and a special requirement is that we DO NOT DEVELOP/INSTALL ANYTHING NEW over the system.
Does anyone know of an option? RFC FM? Web Service? etc??
Thanks!
Hi,
See if following link helps you.
[http://searchsap.techtarget.com/tip/0,289483,sid21_gci997032,00.html]
Manoj
Similar Messages
-
Remote Table Access without Limits!
Hello,
Does anybody knows about an alternative to RFC_READ_TABLE (or RFC_GET_TABLE_ENTRIES or TABLE_ENTRIES_GET_VIA_RFC) that does not impose a limit over 512 bytes column width?
I need to access a table from outside SAP, and a special requirement is that we DO NOT DEVELOP/INSTALL ANYTHING NEW over the system.
Does anyone know of an option? RFC FM? Web Service? etc??
Thanks!Try generating a custom function module and call that using Jco
The liimit of RFC READ TABLE could be because the return is a single string with seperators.
If you try with a normal RFC that return table you will be able to handlle it.
Try using JCo and maintain the login credentials in property file in the server. -
Remote Table access error in PLSQL Procedure
Hi,
I've an issue while accessing remote tables thru DB-link inside stored Package/Procedures.
In a PLSQL procdure I've defined a Cursor to fetch data from a remote table thru DBlink.
When I try to compile it throws me an error saying "ORA-00904, Invalid identifier" on the last column of the cursor.
But when executed directly, I'm able to run the same select statement successfully.
Eg.
==========
CREATE OR REPLACE PROCEDURE TESTPROC IS
CURSOR C_emp IS
SELECT emp_name, emp_code from emp@testdb
where dept_no = 10;
BEGIN
NULL;
END;
============when complied it throws '904 Invalid Identifier'
But when I run the same select directly from say sqlplus, it is fine.
SELECT emp_name, emp_code from emp@testdb
where dept_no = 10
============
FYI. My DB is 10.2.0 and Remote DB that I'm trying access is of version 8.1.7
Not sure, and compatibilty issue between these versions!
Is there any specific grant/access need to be provided from the remote DB for accessing in PLSQL procedures?
Thanks
Kumar RHi!
Check the following docs --
ORA-00904 string: invalid identifier
Cause: The column name entered is either missing or invalid.
Action: Enter a valid column name. A valid column name must begin with a letter, be less than or equal to 30 characters, and consist of only alphanumeric characters and the special characters $, _, and #. If it contains other characters, then it must be enclosed in double quotation marks. It may not be a reserved word.
Regards.
Satyaki DE. -
Remote web access without login
Hello experts,
we have an external web application that handles the user access. Now we have the request to call a BI web template without asking for a new login. Some parameters will be passed to the BI, too.
I remember that it is possible to add a user or user tag to a web template, but I don't remember how this could work.
Has anybody an idea to solve this request?
Thanks in advance
AnsgarHi,
Please check the note:
1059623 Re-logon required when launching BEx Web App from BEx Tools
You are using BEx Tools (BEx Query Designer, BEx Web Application
Designer, BEx Analyzer or BEx Report Designer). Executing a BEx Web
Application from one of the tools, you are prompted again to enter user
and password information, although you have already logged on to BEx
Tools.
As a workaround you can leave the Web browser instance open after
logging on once. By doing so, you won't be prompted for re-logon when
you launch a BEx Web Application from BEx Tools for the second time.
So its working as per the SAP design. Still you have issue please
get back to us.
701205 - Single Sign-On using SAP Logon Tickets.
For further information on the same please take a look at the following:
Single Sign-on using SAP Logon tickets
http://help.sap.com/saphelp_ep50sp6/helpdata/en/89/6eb8e1af2f11d599370
0508b6b8b11/frameset.htm
Regards,
Venkat -
Can I install WSUS alongside Windows Essentials Experience Role without killing IIS & Remote web access?
I have recently installed Windows Server 2012 Essentials R2, but I want to use WSUS on the same server. Is this possible, if so how? Last time I tried this I lost my Remote Web Access.
I did post this in the Windows server 2012 essentials thread but didn't get any replies so thought I'd try posting it here to see if I got any hits here?
Is there a way to get WSUS to install to different web ports i.e. 880 & 8443? Or can I get it to install in a new site in IIS? Its just I know that the Essentials Experience role sets up RWA in IIS and installing the WSUS on top just overwrites
the RWA site & settings? I assume this is also why Remote Desktop Services does the same?
Thanks
JK MCPCan I install WSUS alongside Windows Essentials Experience Role without killing IIS & Remote web access?
http://blogs.technet.com/b/sbs/archive/2013/06/25/how-to-install-wsus-3-0-sp2-on-windows-server-2012-essentials.aspx
Last time I tried this I lost my Remote Web Access.
Remote Web Access uses the Default Web Site. If you install WSUS to the Default Web Site, it will break things. Install WSUS to the alternate "WSUS Administration" site on port 8530.
Is there a way to get WSUS to install to different web ports i.e. 880 & 8443?
No.
Or can I get it to install in a new site in IIS?
Just select the option during the installer to do that.
Lawrence Garvin, M.S., MCSA, MCITP:EA, MCDBA
SolarWinds Head Geek
Microsoft MVP - Software Packaging, Deployment & Servicing (2005-2014)
My MVP Profile: http://mvp.microsoft.com/en-us/mvp/Lawrence%20R%20Garvin-32101
http://www.solarwinds.com/gotmicrosoft
The views expressed on this post are mine and do not necessarily reflect the views of SolarWinds. -
20 Index Restriction on Remote Tables (i.e. using Database Links)
The Oracle Database Administrator's Guides for 10g and 11g document a performance restriction that "No more than 20 indexes are considered for a remote table." If I go back to the 8i documentation it says "In cost-based optimization, no more than 20 indexes per remote table are considered when generating query plans. The order of the indexes varies; if the 20-index limitation is exceeded, random variation in query plans may result."
Does anyone have more details on this performance restriction? In particular I am trying to answer these questions:
1) Are the 20 indexes which are considered by the CBO still random in 10g?
2) Can I influence which indexes are considered with index hints or will my hints only be considered if they are for one of the "random" 20 indexes which are being considered by the CBO?
3) Are there any other approaches or work-arounds to this restriction assuming you need to select from a large remote table with more than 20 indexes (and need to perform the selection using 1 of those indexes to get adequate performance) or do we need to abandon database links for this table?
Thanks in advance for your input.So, here's my simple test.
SQL>
SQL> create table gurnish.indexes20plus ( n1 number, n2 number, n3 number, n4 number, n5 number, n6 number, n7 number,
2 n8 number, n9 number, n10 number, n11 number, n12 number, n13 number, n14 number, n15 number, n16 number,
3 n17 number, n18 number, n19 number, n20 number, n21 number, n22 number, n23 number, n24 number,
4 n25 number, n26 number, n28 number);
create index xin1 on indexes20plus (n1);
Table created.
SQL> SQL> create index xin2 on indexes20plus (n2);
create index xin3 on indexes20plus (n3);
Index created.
SQL> SQL>
Index created.
SQL> SQL> create index xin4 on indexes20plus (n4);
Index created.
SQL> SQL>
Index created.
SQL> SQL> create index xin5 on indexes20plus (n5);
create index xin6 on indexes20plus (n6);
Index created.
SQL> SQL>
Index created.
SQL> SQL> create index xin7 on indexes20plus (n7);
Index created.
SQL> SQL> create index xin8 on indexes20plus (n8);
Index created.
SQL> SQL> create index xin9 on indexes20plus (n9);
Index created.
SQL>
SQL> create index xin10 on indexes20plus (n10);
Index created.
SQL> SQL> create index xin11 on indexes20plus (n11);
create index xin12 on indexes20plus (n12);
create index xin13 on indexes20plus (n13);
Index created.
SQL> SQL>
Index created.
SQL> SQL>
Index created.
SQL> SQL> create index xin14 on indexes20plus (n14);
Index created.
SQL> SQL> create index xin15 on indexes20plus (n15);
Index created.
SQL>
SQL> create index xin16 on indexes20plus (n16);
Index created.
SQL>
SQL> create index xin17 on indexes20plus (n17);
Index created.
SQL> SQL> create index xin18 on indexes20plus (n18);
Index created.
SQL> SQL> create index xin19 on indexes20plus (n19);
Index created.
SQL> SQL> create index xin20 on indexes20plus (n20);
Index created.
SQL> SQL> create index xin21 on indexes20plus (n21);
Index created.
declare
i number;
begin
for i in 1..100
loop
dbms_random.seed(i+100);
insert into indexes20plus values (dbms_random.value(1,5),dbms_random.value(1,21),dbms_random.RANDOM, dbms_random.RANDOM,dbms_random.value(1,20),
dbms_random.value(1,4),dbms_random.value(1,6), dbms_random.value(1,7),dbms_random.value(1,9),dbms_random.value(1,10),
dbms_random.value(1,11),dbms_random.value(1,12),dbms_random.value(1,13),dbms_random.value(1,14),dbms_random.value(1,1),
dbms_random.value(1,1),dbms_random.value(1,19),dbms_random.value(1,122),dbms_random.value(1,20),dbms_random.value(1,20)
,dbms_random.value(4,20),dbms_random.value(1,20),dbms_random.value(1,20),dbms_random.value(1,20),dbms_random.value(1,20)
,dbms_random.value(4,20),dbms_random.value(4,20));
end loop;
commit;
end;
SQL> set autotrace traceonly
SQL> l
1* select * from gurnish.indexes20plus@lvoprds where n1 = 4
SQL> /
no rows selected
Execution Plan
Plan hash value: 441368878
| Id | Operation | Name | Rows | Bytes | Cost (%CPU
)| Time | Inst |
| 0 | SELECT STATEMENT REMOTE | | 1 | 351 | 1 (0
)| 00:00:01 | |
| 1 | TABLE ACCESS BY INDEX ROWID| INDEXES20PLUS | 1 | 351 | 1 (0
)| 00:00:01 | LVPRD |
|* 2 | INDEX RANGE SCAN | XIN1 | 1 | | 1 (0
)| 00:00:01 | LVPRD |
Predicate Information (identified by operation id):
2 - access("A1"."N1"=4)
Note
- fully remote statement
- dynamic sampling used for this statement
Statistics
0 recursive calls
0 db block gets
0 consistent gets
0 physical reads
0 redo size
1897 bytes sent via SQL*Net to client
481 bytes received via SQL*Net from client
1 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
0 rows processed
SQL> select * from gurnish.indexes20plus@lvoprds where n21 = 4;
no rows selected
Execution Plan
Plan hash value: 2929530649
| Id | Operation | Name | Rows | Bytes | Cost (%CPU
)| Time | Inst |
| 0 | SELECT STATEMENT REMOTE | | 1 | 351 | 1 (0
)| 00:00:01 | |
| 1 | TABLE ACCESS BY INDEX ROWID| INDEXES20PLUS | 1 | 351 | 1 (0
)| 00:00:01 | LVPRD |
|* 2 | INDEX RANGE SCAN | XIN21 | 1 | | 1 (0
)| 00:00:01 | LVPRD |
Predicate Information (identified by operation id):
2 - access("A1"."N21"=4)
Note
- fully remote statement
- dynamic sampling used for this statement
Statistics
1 recursive calls
0 db block gets
0 consistent gets
0 physical reads
0 redo size
1897 bytes sent via SQL*Net to client
481 bytes received via SQL*Net from client
1 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
0 rows processed
SQL> -
Best practice for VPD and remote tables
Not specifically an HTMLDB question, but here goes...
HTMLDB 1.6 on 9.2.0.4 connecting over database link (fixed username/password) to 9.2.0.4
I've currently "wrapped" access to the remote tables in views, i.e. view "T" in the HTMLDB parsing schema LOCAL_USER is defined as "SELECT * FROM T@remote"
I'd like to put VPD controls on my backend tables, but I don't get how v('APP_USER') (or even APP_USER put into an application context) would be seen by the remote database.
Should I just put VPD policies on LOCAL_USER's views and call it a day?
Thanks for input!
-JohnIf you implemented the VPD in the remote database, what would your VPD be restricting? All queries would apply the policy based on the DB link fixed username resulting in all users of the HTML DB application having same policy restrictions.
The policy in the remote database does not has access to the value of v('APP_USER'). That value is only available in the database that has HTML DB. You would have to write APIs in the remote database in PL/SQL functions/procedures to pass in the V('APP_USER') value to the remote database. This is doable, but cumbersome.
If you want to have your policy modify your WHERE clause on the fly based on your HTML DB user account, then I would implement the VPD in the database which has your HTML DB repository. I am not sure which of the two scenarios below occur when doing a SELECT * FROM T.
1.) The query goes across the database link, gets all the data out of table T in the remote database, passes back to the HTML DB database, and applies the policy WHERE clause modification in the HTML DB database.
2.) The query applies the policy WHERE clause modification to the view, goes across the database link with the WHERE clause modified, and gets only the data allowed based on the policy from the remote database.
You should test this out to find out for performance purposes what query is actually performed on the remote database.
As always if anyone sees anything inaccurate in what I have written, please correct me.
Mike -
Remote Desktop Access with Mac and Asus Transformer Prime
I have an E2000 router with the most current firmware. I have a Sony VAio laptop with Windows 7 Home Premium 64bit,a Macbook with 10.6.8, and a new Asus Transformer Prime with ICS.My work desktop is a Dell Optiplex 380 with Windows 7 Pro 32bit. I frequently work from home and have no issues remoting into to my work PC from by Sony laptop via VPN and RDP.However I have never been able to connect successfully to my work PC with my Macbook(using Remote Desktop Connection 2.1 for Mac OS) or Asus tablet(using WYSE Pocket Cloud RDP app for Android). I can however connect to the VPN itself on the Macbook and tablet without issue same as my Windows laptop. The other interesting part is I can connect via RDP when I am connected to a Mi-Fi 3g hotspot. So it is definitely something in the my Linksys E2000 blocking the connection for some reason. I have even set Port forwarding of 3389 with the ip's of both the Macbook and Asus tablet.I have also tried connecting via ethernet to the router with the same outcome. I cannot ping my work pc from either device as well.In addition the firewall on my work PC is completely disabled and all services related to Remote desktop access are enabled and running.Does anyone have any ideas?
For my tablet its own ip assigned by the router. Same with the macbook.the Pocketcloud RDP app also uses 3389.I have port 3389 set for both internal and external port and protocol "both" under the Single Port Forwarding tab in the router config.
-
Small Business Server 2011 Essentials Remote Web Access fails to connect to Windows 8.1 PC
I am using Remote Web Access (RWA) gateway with Small Business Server 2011 Essentials.
There are several workstations all running Windows 7, and have been using RWA without an issue for well over a year.
There is now a Windows 8.1 Pro PC added to this domain, but the Remote Desktop does not connect.
The Windows 8.1 PC appears in the RWA pages, It requests the credentials to connect, and then fails with the following error:
Remote Desktop can't find the remote computer "COMPUTERNAME". This might mean that the "COMPUTERNAME" does not belong to the specified network. Verify the computer name and domain that you are typing to connect to.
I can connect to all other PC fine (running Windows 7). I have tried from different locations and PC's and the results are the same.
I thought I had fixed this problem a few weeks back. After running all updates on the server and Windows 8.1 PC, and rebooting both, the RDP worked, but I think it only worked once and then failed the next time someone tried to use it. I have not had
a successful connection to the Windows 8.1 PC since.
I am at a loss on how to troubleshoot this as there are no errors on the system which can't be accessed.
Any suggestions will be appreciated.Hi Mr Cheese,
à
I turned off the Firewall on the Windows 8.1 PC and the RDP is now working.
Thanks for sharing in the forum. Your time and efforts are highly appreciated.
Based on your description, this issue is related to Firewall. Would you please let me know current situation
of this issue?
Just addition. Please open Control Panel, select Windows Firewall and click Allow an app or feature through
Windows Firewall. Then please check if Remote Desktop is allowed. Meanwhile, please click Advanced settings in Windows Firewall panel and click Inbound Rules, then check if rules which be related to Remote Desktop were enabled.
If any update, please feel free to let me know.
Hope this helps.
Best regards,
Justin Gu -
Hello everyone,
I developed a Web Service prototype accessing remote EJB using the EJB
control with special syntax in the jndi-name attribute: @jws:ejb
home-jndi-name="t3://10.10.245.70:7131/AccountDelegatorEJB"
Everything works fine, but I get an error when I restrict access to my web
service with a declarative security model by implementing steps provided in
help doc:
- Define the web resource you wish to protect
- Define which security role is required to access the web resource
- Define which users are granted the required security role
- Configure WebLogic Server security for my web service(Compatibility
Security/Users)
I launch the service by entering the address in a web browser. When prompted
to accept the digital certificate, click Yes, when prompted for network
authentication information, enter username and password, navigate to the
Test Form tab of Test View, invoke the method by clicking the button and I
get the following exception:
<error>
<faultcode>JWSError</faultcode>
<faultstring>Error during JNDI lookup from
jndi:t3://10.10.245.70:7131/AccountDelegatorEJB[Lookup failed for
name:t3://10.10.245.70:7131/AccountDelegatorEJB]</faultstring>
<detail>
<jwErrorDetail> weblogic.jws.control.ControlException: Error during JNDI
lookup from jndi:t3://10.10.245.70:7131/AccountDelegatorEJB[Lookup failed
for name:t3://10.10.245.70:7131/AccountDelegatorEJB] at
weblogic.knex.control.EJBControlImpl.acquireResources(EJBControlImpl.java:27
8) at
weblogic.knex.context.JwsInternalContext.acquireResources(JwsInternalContext
.java:220) at
weblogic.knex.control.ControlHandler.invoke(ControlHandler.java:260) at
ibas.AccountControl.getTransactionHistory(AccountControl.ctrl) at
ibas.GetSecure.retrieveVisaHistoryTxn(GetSecure.jws:64) </jwErrorDetail>
</detail>
</error>
I have a simple Hello method as well in my WebService (which is also
restricted) and it works fine, but remote EJB access doesn't. I tested my
prototype on Weblogic 7.2 and 8.1 platforms - same result.
Is that a bug or I am missing some additional configuration in order to get
that working. Has anyone seen similar behavior? Is there a known resolution?
Or a suggested way to work around the problem?
Thank you.
AndreAndre,
It would be best if this issue is handled as an Eval Support case. Please
BEA Customer Support at http://support.beasys.com along with the required
files, and request that an Eval support case be created for this issue.
Thanks
Raj Alagumalai
WebLogic Workshop Support
"Andre Shergin" <[email protected]> wrote in message
news:[email protected]...
Anurag,
I removed "t3", still get an error but a different one (Unable to create
InitialContext:null):
<error>
<faultcode>JWSError</faultcode>
<faultstring>Error during JNDI lookup from
jndi://secuser1:[email protected]:7131/AccountDelegatorEJB[Unable to
create InitialContext:null]</faultstring>
<detail>
<jwErrorDetail> weblogic.jws.control.ControlException: Error during JNDI
lookup from
jndi://secuser1:[email protected]:7131/AccountDelegatorEJB[Unable to
create InitialContext:null] at
weblogic.knex.control.EJBControlImpl.acquireResources(EJBControlImpl.java:27
8) at
weblogic.knex.context.JwsInternalContext.acquireResources(JwsInternalContext
.java:220) at
weblogic.knex.control.ControlHandler.invoke(ControlHandler.java:260) at
ibas.AccountControl.getTransactionHistory(AccountControl.ctrl) at
ibas.GetVisaHistoryTransactions.getVisaHistoryTxn(GetVisaHistoryTransactions
.jws:67) </jwErrorDetail>
</detail>
</error>
Note: inter-domain communication is configured properly. The Web Service to
remote EJB works fine without a declarative security.
Any other ideas?
Thank you for your help.
Andre
"Anurag" <[email protected]> wrote in message
news:[email protected]...
Andre,
It seems you are using the URL
jndi:t3://secuser1:[email protected]:7131/AccountDelegatorEJB
whereas you should not be specifying the "t3:" protocol.
The URL should be like
jndi://secuser1:[email protected]:7131/AccountDelegatorEJB
Please do let me know if you see any issues with this.
Note that this will only allow you to access remote EJBs in the same WLS
domain. For accessing EJBs on another domain, you need to configure
inter-domain communication by
following a few simple steps as mentioned at
http://e-docs.bea.com/wls/docs81/ConsoleHelp/jta.html#1106135. This link has
been provided in the EJB Control Workshop documentation.
Regards,
Anurag
"Andre Shergin" <[email protected]> wrote in message
news:[email protected]...
Raj,
I tried that before, it didn't help. I got similar error message:
<error>
<faultcode>JWSError</faultcode>
<faultstring>Error during JNDI lookup from
jndi:t3://secuser1:[email protected]:7131/AccountDelegatorEJB[Lookup
failed for
name:t3://secuser1:[email protected]:7131/AccountDelegatorEJB]</faultstr
ing>
<detail>
<jwErrorDetail> weblogic.jws.control.ControlException: Error during JNDI
lookup from
jndi:t3://secuser1:[email protected]:7131/AccountDelegatorEJB[Lookup
failed for
name:t3://secuser1:[email protected]:7131/AccountDelegatorEJB] at
weblogic.knex.control.EJBControlImpl.acquireResources(EJBControlImpl.java:27
8) at
weblogic.knex.context.JwsInternalContext.acquireResources(JwsInternalContext
.java:220) at
weblogic.knex.control.ControlHandler.invoke(ControlHandler.java:260) at
ibas.AccountControl.getTransactionHistory(AccountControl.ctrl) at
ibas.GetSecure.retrieveVisaHistoryTxn(GetSecure.jws:64) </jwErrorDetail>
</detail>
</error>
Anything else should I try?
P.S. AccountDelegatorEJB, the remote EJB my Web Service calls is NOTaccess
restricted.
I hope there is a solution.
Thanks,
Andre
"Raj Alagumalai" <[email protected]> wrote in message
news:[email protected]...
Andre,
Can you try using the following url with username and password
jndi://username:password@host:7001/my.resource.jndi.object ?
once you add webapp level security, the authenticated is the user who
invokes the EJB.
http://e-docs.bea.com/workshop/docs81/doc/en/workshop/guide/controls/ejb/con
CreatingANewEJBControl.html?skipReload=true
has more info on using remote EJB's.
Hope this helps.
Thanks
Raj Alagumalai
WebLogic Workshop Support
"Alla Resnik" <[email protected]> wrote in message
news:[email protected]...
Hello everyone,
I developed a Web Service prototype accessing remote EJB using the EJB
control with special syntax in the jndi-name attribute: @jws:ejb
home-jndi-name="t3://10.10.245.70:7131/AccountDelegatorEJB"
Everything works fine, but I get an error when I restrict access to my
web
service with a declarative security model by implementing steps
provided
in
help doc:
- Define the web resource you wish to protect
- Define which security role is required to access the web resource
- Define which users are granted the required security role
- Configure WebLogic Server security for my web service(Compatibility
Security/Users)
I launch the service by entering the address in a web browser. Whenprompted
to accept the digital certificate, click Yes, when prompted for
network
authentication information, enter username and password, navigate tothe
Test Form tab of Test View, invoke the method by clicking the buttonand
I
get the following exception:
<error>
<faultcode>JWSError</faultcode>
<faultstring>Error during JNDI lookup from
jndi:t3://10.10.245.70:7131/AccountDelegatorEJB[Lookup failed for
name:t3://10.10.245.70:7131/AccountDelegatorEJB]</faultstring>
<detail>
<jwErrorDetail> weblogic.jws.control.ControlException: Error during
JNDI
lookup from jndi:t3://10.10.245.70:7131/AccountDelegatorEJB[Lookupfailed
for name:t3://10.10.245.70:7131/AccountDelegatorEJB] at
weblogic.knex.control.EJBControlImpl.acquireResources(EJBControlImpl.java:27
8) at
weblogic.knex.context.JwsInternalContext.acquireResources(JwsInternalContext
.java:220) at
weblogic.knex.control.ControlHandler.invoke(ControlHandler.java:260)at
ibas.AccountControl.getTransactionHistory(AccountControl.ctrl) at
ibas.GetSecure.retrieveVisaHistoryTxn(GetSecure.jws:64)</jwErrorDetail>
</detail>
</error>
I have a simple Hello method as well in my WebService (which is also
restricted) and it works fine, but remote EJB access doesn't. I testedmy
prototype on Weblogic 7.2 and 8.1 platforms - same result.
Is that a bug or I am missing some additional configuration in order
to
get
that working. Has anyone seen similar behavior? Is there a knownresolution?
Or a suggested way to work around the problem?
Thank you.
Andre -
Oracle 9.2 prefers Table Access Full over Local Index by rowid access
There's this table that has phone call records (30 million per day) that is partitioned by month (using the date column) and stores the last 6 months.
The primary key is date (varchar2 in yymmdd format) + call_id (a varchar2(18) with a format like this yyyymmdd+<3letters>+<sequentialnumber>)
The partition is by range like this:
PARTITION BY RANGE (FECHA)
PARTITION P200804 VALUES LESS THAN ('080501')
LOGGING
NOCOMPRESS,
If I run this query I get this plan
SELECT FECHA, SENTIDOTRAFICO,GEOGRAFIAID,SWITCHID,TIPOTRAFICOID,COUNT(*)
FROM GES_CDRS_RCNG_NEW
WHERE FECHA BETWEEN '080801' AND '080825'
AND TASACION IS NULL
AND BORRADO IS NULL
GROUP BY FECHA, SENTIDOTRAFICO,GEOGRAFIAID,SWITCHID,TIPOTRAFICOID
Plan
SELECT STATEMENT CHOOSECost: 78 K Bytes: 24 K Cardinality: 1 K
2 SORT GROUP BY Cost: 78 K Bytes: 24 K Cardinality: 1 K
1 TABLE ACCESS FULL GESTION.GES_CDRS_RCNG_NEW Cost: 43 K Bytes: 625 M Cardinality: 31 M Partition #: 2 Partitions accessed #5
If I hint the primary key index using /*+INDEX(GES_CDRS_RCNG_NEW PK_CDRS_RCNG_NEW)*/
I get a different plan
Plan
SELECT STATEMENT CHOOSECost: 954 K Bytes: 24 K Cardinality: 1 K
3 SORT GROUP BY Cost: 954 K Bytes: 24 K Cardinality: 1 K
2 TABLE ACCESS BY LOCAL INDEX ROWID GESTION.GES_CDRS_RCNG_NEW Cost: 918 K Bytes: 625 M Cardinality: 31 M Partition #: 2 Partitions accessed #5
1 INDEX RANGE SCAN UNIQUE GESTION.PK_CDRS_RCNG_NEW Cost: 137 K Cardinality: 31 M Partition #: 3 Partitions accessed #5
Looking at the cost, the full scan is way better, but this is obviously not the case. Why does this happen?
This problem forces many querys on this table to use hints or force the index use by adding conditions to the where clause like this
where fecha = '080801'
and clave like '20080801%'
when just by stating the date would be enough to choose the correct partition. It also messes up joins with other tables.
The table is analized every month, it has statistics that claim: 237,981,000 rows, 3,222,677 blocks, GLOBAL STATS: YES, LAST ANALYZED: 15/10/2008 21:05:26, Average row length: 213.
The partition envolved in this query has this stats: 32,520,520 rows, 442,715 blocks, analized on 27/08/2008 20:43:40
The index has this stats: analized on 15/10/2008 21:35:32, Blevel: 3, leaf blocks: 1,056,410, distinct keys: 238,484,510.
It is a local index and each partition has its own statistics.If I don't understand incorrectly the plan and the Predicater information, it seems the full scan version that costs less is actually doing a full scan from the biggining of the table (6 months) up to the 080825 date and the one using an index (hinted) does a better scan.
without hint
| Id | Operation | Name | Rows | Bytes | Cost | Pstart| Pstop |
| 0 | SELECT STATEMENT | | 1170 | 24570 | 78443 | | |
| 1 | SORT GROUP BY | | 1170 | 24570 | 78443 | | |
|* 2 | TABLE ACCESS FULL | GES_CDRS_RCNG_NEW | 31M| 625M| 42579 | 5 | 5 |
Predicate Information (identified by operation id):
2 - filter("GES_CDRS_RCNG_NEW"."FECHA"<='080825')
Note: cpu costing is offWith the hint:
| Id | Operation | Name | Rows | Bytes | Cost | Pstart| Pstop |
| 0 | SELECT STATEMENT | | 1170 | 24570 | 953K| | |
| 1 | SORT GROUP BY | | 1170 | 24570 | 953K| | |
| 2 | TABLE ACCESS BY LOCAL INDEX ROWID| GES_CDRS_RCNG_NEW | 31M| 625M| 918K| 5 | 5 |
|* 3 | INDEX RANGE SCAN | PK_CDRS_RCNG_NEW | 31M| | 136K| 5 | 5 |
Predicate Information (identified by operation id):
3 - access("GES_CDRS_RCNG_NEW"."FECHA">='080801' AND "GES_CDRS_RCNG_NEW"."FECHA"<='080825')
Note: cpu costing is off -
Using Hint option to optimise queries for remote tables
1. How do i provide a hint to access indexes for remote tables in my query?
2. The explain plan in the 'TOAD' does not expand for remote tables, ie there is no way i can find out whether my query is using the remote table index or not.
Any help on the above two questions would be highly appreciated.
Thanks
Varsha1. How do i provide a hint to access indexes for remote tables in my query?
2. The explain plan in the 'TOAD' does not expand for remote tables, ie there is no way i can find out whether my query is using the remote table index or not.
Any help on the above two questions would be highly appreciated.
Thanks
Varsha -
PL/SQL: ORA-22992: cannot use LOB locators selected from remote tables
Dear ALL,
My O/S is Redhatlinux 5.2 and i had Migrated my Oracle databse to 11g2. But after that while i am retrieving records through dblinks from one of my other Oracle 9.2.0.8 databse it's throwing the error : PL/SQL: ORA-22992: cannot use LOB locators selected from remote tables.* This error i am getting in TOAD as well as SQL Developer.
Can anybody tell me how to fix this error ? Because am not able to get the records.
Also am getting another error during retrieving data from some of my tables after migrating i.e the table which having CLOB data type while am accessing to retrieve the records using select query it's throwing the error :
+(The following error has occurred:+
A query with LOB's requires OCI8 mode, but OCI7 mode is used.)
If anyone having any idea kindly share.
Thanks and Regards
BiswaHi,
Ya what u sent that is fine. But already am using one procudure which is accessing LOB data from another databse through DBlink and working fine. But there Both the databse are 9.2.0.8.
But while am executing the same procedure in oracle 11g where the Dblink accessing the data from Oracle 9i , there am getting this error.
Kindly tell if u know any resolution.
Thanks -
Issue with query involving remote tables
Hi I have a query inside a procedure that has 4 union all statements ,2 of which are based on tables at a remote database.
The query is something like
Select col1, col2, col3…..col n from Table_a, table_b, table c where join condition and certain hard-coded conditions based on run time parameters
Union all
Select col1, col2, col3…..col n from Table_a, table_b , table c where some join condition and certain hard-coded conditions based on run time parameters
Union all
Select col1, col2, col3…..col n from Table_a@remote_db, table_b@remote_db, table c@remote_db where join condition and certain hard-coded conditions based on run time parameters
Union all
Select col1, col2, col3…..col n from Table_a @remote_db, table_b @remote_db, table c@ remote_db where some join condition and certain hard-coded conditions based on run time parameters
The join conditions on the tables are quite good and when executed individually bring data in good time.The queries on the remote database also run fine when I execute them in the remote database.
However when I run this query, it doesn’t get data at all and after hours of running I have to cancel or kill it.I don’t get anything in the long-ops and in the wait class it just shows “SQL*Net message from dblink” or “SQL*Net more data to dblink”.
I thought that there could be some latency issues AND the data retreival over the dblink could be slow, so I tried the /*+driving_site(rmote table alias)*/ hint , after which it comes up in the long ops as its reading from Table a/ table b from my current database but the wait time is something like millions of seconds and it runs forever.
The issue is Table A and Table B both in the remote and the current database are huge tables with at least 40-50 million records in them.
Can anyone suggest an easy way out in this scenario, other than the hard way of re-designing the entire program(which I am afraid I might have to in the end).
Thanks@metzquar I Put the hint in the unions where I am accessing the remote tables
@blushadow .. i was thinking about that but as these remote tables are in a sort of archived database, I dont think I will be allowed to create a mview.But thats a good suggestion.
@Earth.. I tried that , but the table population itself gets very time consuming
Thanks -
Excluding slow table access in a UNION ALL view
Hi,
I have a view which unions three tables together.
One component of the view requires a table scan, as 90% of the records are required.
This view is then used in another outer select where these records are actually not required.
So I tagged each component with a code and excluded that in the outer select. However it still appears to access the table.
Is there any way I can exclude a component of the UNION ALL or do I need to explicitly split them?
example:
SELECT * FROM (
SELECT 'A' Q, JANUARY F FROM ENORMOUS.TABLE WHERE KEY = 'Non Selective Key' UNION ALL
SELECT 'B' Q, 1 F FROM DUAL UNION ALL
SELECT 'C' Q, 1 F FROM DUAL
) A
WHERE Q = 'B'
When I run the query plan without the WHERE it performs the table scan
When I include the WHERE it still performs the table scan but with a FILTER NULL IS NOT NULL afterwards.
So it appears that it is doing the table scan regardless and then throwing the records away - is that correct?
Any thoughts appreciated. I would prefer not the split this view out if possible as it is used everywhere.In summary my question is: is The Oracle query planner smart enough to exclude a component from a load of stacked UNION ALL queries?
given this query:
CREATE VIEW TEST AS
SELECT Q, F
FROM
SELECT 'A' Q, JANUARY F FROM ENORMOUS.TABLE WHERE KEY = 'Non Selective Key' UNION ALL
SELECT 'B' Q, 1 F FROM DUAL UNION ALL
SELECT 'C' Q, 1 F FROM DUAL
) A;
-- 1. This one selects from all tables, including a table scan on the enormous table
SELECT * FROM TEST;
-- 2. This one selects from all tables, including a table scan on the enormous table
-- However the query plan has a FILTER after the table scan. Does it exclude this work?
SELECT * FROM TEST WHERE Q = 'B';When I run the query plan without the WHERE it performs the table scan
When I include the WHERE the query plan indicates it's doing the table scan but with a FILTER NULL IS NOT NULL afterwards.
So it appears that it is doing the table scan regardless and then throwing the records away - is that correct?
Any thoughts appreciated. I would prefer not the split this view out if possible as it is used everywhere.
Oracle version:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
PL/SQL Release 11.2.0.2.0 - Production
CORE 11.2.0.2.0 Production
TNS for 64-bit Windows: Version 11.2.0.2.0 - Production
NLSRTL Version 11.2.0.2.0 - Production
Plan output for 1:
SELECT STATEMENT Optimizer Mode=ALL_ROWS (Cost=7166 Card=2 M Bytes=41 M)
1 VIEW (Cost=7166 Card=2 M Bytes=41 M)
2 1 UNION-ALL
3 2 TABLE ACCESS FULL PLANNING.BF_GEN_STATS_TRAN (Cost=7162 Card=2 M Bytes=72 M)
4 2 FAST DUAL (Cost=2 Card=1)
5 2 FAST DUAL (Cost=2 Card=1)
Plan output for 2:
SELECT STATEMENT Optimizer Mode=ALL_ROWS (Cost=2 Card=3 Bytes=48)
1 VIEW (Cost=2 Card=3 Bytes=48)
2 1 UNION-ALL
3 2 FILTER
4 3 TABLE ACCESS FULL PLANNING.BF_GEN_STATS_TRAN (Cost=7162 Card=2 M Bytes=72 M)
5 2 FAST DUAL (Cost=2 Card=1)
6 2 FILTER
7 6 FAST DUAL (Cost=2 Card=1)
Maybe you are looking for
-
Hi All, Here is my issue... I've a sales report against Multi Provider to display a filed <b>'Province Ship To'</b>, it is a Nav attribute of <b>'Customer Ship To'</b>. I've verified in mastre data of <b>'Province Ship To'</b> that there are valu
-
I am working with a spreadsheet with percentage marks; only 5 names out of a class are visible at one time. I need to print the data for the whole class - in a whole sheet.
-
Mac Overrides Key Commands?
Mac Pro 3.1, 16-GB Ram, OS 10.6.8, CS6 Extended I notice trhat recently hitting Key Commands in Photoshop like Command-M minimizes my open window to the dock instead of opening Curves? This used to work. The Keyborad Shortcuts as set in Photoshop co
-
Creating BADI in ECC 6.0 version
hi guys, Can any one help me, 1. when iam creating a BADI in ECC 6.0 version after giving the badi name and description, i dont find the INTERFACE tab. CAN ANY ONE GIVE ME THE STEPS TO CREATE BADI IN ECC 6.0 VERSIO. Thanks ahmed
-
Red ticks in checked out files
Are these red (instead of green) because another 'user' has not checked them back in before I check them out? I actually transfer my files between machines so the check data must be in the files somehow. Are there any dangers doing it this way?