Problems with AP joining vWLC
I am working with a vWLC on 7.4 code with a 3500i AP on 12.4(23c)JA code. The AP is not joining the controller automatically here is the output from the AP during a join failure,
*Jul 15 09:57:58.000: %CAPWAP-5-DTLSREQSEND: DTLS connection request sent peer_ip: 10.2.98.225 peer_port: 5246
*Jul 15 09:57:59.000: %CAPWAP-5-CHANGED: CAPWAP changed state to
*Jul 15 09:57:59.016: %LWAPP-3-CLIENTERRORLOG: Peer certificate verification failed
*Jul 15 09:57:59.016: %CAPWAP-3-ERRORLOG: Certificate verification failed!
*Jul 15 09:57:59.016: DTLS_CLIENT_ERROR: ../capwap/capwap_wtp_dtls.c:333 Certificate verified failed!
*Jul 15 09:57:59.016: %DTLS-4-BAD_CERT: Certificate verification failed. Peer IP: 10.2.98.225
*Jul 15 09:57:59.016: %DTLS-5-SEND_ALERT: Send FATAL : Bad certificate Alert to 10.2.98.225:5246
*Jul 15 09:57:59.016: %DTLS-3-BAD_RECORD: Erroneous record received from 10.2.98.225: Malformed Certificate
*Jul 15 09:57:59.016: %DTLS-5-SEND_ALERT: Send FATAL : Close notify Alert to 10.2.98.225:5246
*Jul 15 09:57:59.016: %CAPWAP-3-ERRORLOG: Invalid event 38 & state 3 combination.
*Jul 15 09:58:18.881: %CDP_PD-2-POWER_LOW: All radios disabled - NON_CISCO-NO_CDP_RECEIVED (0000.0000.0000)
From my research about this issue I should be able to do debug pm pki enable and get the SSC key hash and join the AP manually to the controller. When I do the debug I do not see the SSC key hash, I only see,
(Cisco Controller) >*sshpmLscTask: Jul 15 09:46:08.268: sshpmLscTask: LSC Task received a message 4
*spamApTask1: Jul 15 09:57:58.190: 50:3d:e5:f0:dc:f1 Discovery Request from 10.2.98.3:3536
*spamApTask1: Jul 15 09:57:58.190: 50:3d:e5:f0:dc:f1 Join Priority Processing status = 0, Incoming Ap's Priority 1, MaxLrads = 200, joined Aps =0
*spamApTask1: Jul 15 09:57:58.190: 50:3d:e5:f0:dc:f1 Discovery Response sent to 10.2.98.3:3536
*spamApTask1: Jul 15 09:57:58.190: 50:3d:e5:f0:dc:f1 Discovery Response sent to 10.2.98.3:3536
*spamApTask1: Jul 15 09:58:09.121: 50:3d:e5:f0:dc:f1 DTLS connection not found, creating new connection for 10:2:98:3 (3536) 10:2:98:225 (5246)
*spamApTask1: Jul 15 09:58:09.121: sshpmGetCID: called to evaluate <cscoDefaultIdCert>
*spamApTask1: Jul 15 09:58:09.121: sshpmGetCID: comparing to row 0, CA cert >bsnOldDefaultCaCert<
*spamApTask1: Jul 15 09:58:09.121: sshpmGetCID: comparing to row 1, CA cert >bsnDefaultRootCaCert<
*spamApTask1: Jul 15 09:58:09.121: sshpmGetCID: comparing to row 2, CA cert >bsnDefaultCaCert<
*spamApTask1: Jul 15 09:58:09.121: sshpmGetCID: comparing to row 3, CA cert >bsnDefaultBuildCert<
*spamApTask1: Jul 15 09:58:09.121: sshpmGetCID: comparing to row 4, CA cert >cscoDefaultNewRootCaCert<
*spamApTask1: Jul 15 09:58:09.121: sshpmGetCID: comparing to row 5, CA cert >cscoDefaultMfgCaCert<
*spamApTask1: Jul 15 09:58:09.121: sshpmGetCID: comparing to row 0, ID cert >bsnOldDefaultIdCert<
*spamApTask1: Jul 15 09:58:09.121: sshpmGetCID: comparing to row 1, ID cert >bsnDefaultIdCert<
*spamApTask1: Jul 15 09:58:09.121: sshpmGetCID: comparing to row 2, ID cert >cscoDefaultIdCert<
*spamApTask1: Jul 15 09:58:09.121: sshpmGetCertFromCID: called to get cert for CID 1234873a
*spamApTask1: Jul 15 09:58:09.121: sshpmGetCertFromCID: comparing to row 0, certname >bsnOldDefaultCaCert<
*spamApTask1: Jul 15 09:58:09.121: sshpmGetCertFromCID: comparing to row 1, certname >bsnDefaultRootCaCert<
*spamApTask1: Jul 15 09:58:09.121: sshpmGetCertFromCID: comparing to row 2, certname >bsnDefaultCaCert<
*spamApTask1: Jul 15 09:58:09.121: sshpmGetCertFromCID: comparing to row 3, certname >bsnDefaultBuildCert<
*spamApTask1: Jul 15 09:58:09.121: sshpmGetCertFromCID: comparing to row 4, certname >cscoDefaultNewRootCaCert<
*spamApTask1: Jul 15 09:58:09.121: sshpmGetCertFromCID: comparing to row 5, certname >cscoDefaultMfgCaCert<
*spamApTask1: Jul 15 09:58:09.121: sshpmGetCertFromCID: comparing to row 0, certname >bsnOldDefaultIdCert<
*spamApTask1: Jul 15 09:58:09.121: sshpmGetCertFromCID: comparing to row 1, certname >bsnDefaultIdCert<
*spamApTask1: Jul 15 09:58:09.121: sshpmGetCertFromCID: comparing to row 2, certname >cscoDefaultIdCert<
*spamApTask1: Jul 15 09:58:09.121: sshpmGetCID: called to evaluate <cscoDefaultIdCert>
*spamApTask1: Jul 15 09:58:09.121: sshpmGetCID: comparing to row 0, CA cert >bsnOldDefaultCaCert<
*spamApTask1: Jul 15 09:58:09.121: sshpmGetCID: comparing to row 1, CA cert >bsnDefaultRootCaCert<
*spamApTask1: Jul 15 09:58:09.121: sshpmGetCID: comparing to row 2, CA cert >bsnDefaultCaCert<
*spamApTask1: Jul 15 09:58:09.121: sshpmGetCID: comparing to row 3, CA cert >bsnDefaultBuildCert<
*spamApTask1: Jul 15 09:58:09.121: sshpmGetCID: comparing to row 4, CA cert >cscoDefaultNewRootCaCert<
*spamApTask1: Jul 15 09:58:09.121: sshpmGetCID: comparing to row 5, CA cert >cscoDefaultMfgCaCert<
*spamApTask1: Jul 15 09:58:09.121: sshpmGetCID: comparing to row 0, ID cert >bsnOldDefaultIdCert<
*spamApTask1: Jul 15 09:58:09.121: sshpmGetCID: comparing to row 1, ID cert >bsnDefaultIdCert<
*spamApTask1: Jul 15 09:58:09.121: sshpmGetCID: comparing to row 2, ID cert >cscoDefaultIdCert<
*spamApTask1: Jul 15 09:58:09.121: sshpmGetSshPrivateKeyFromCID: called to get key for CID 1234873a
*spamApTask1: Jul 15 09:58:09.121: sshpmGetSshPrivateKeyFromCID: comparing to row 0, certname >bsnOldDefaultIdCert<
*spamApTask1: Jul 15 09:58:09.121: sshpmGetSshPrivateKeyFromCID: comparing to row 1, certname >bsnDefaultIdCert<
*spamApTask1: Jul 15 09:58:09.121: sshpmGetSshPrivateKeyFromCID: comparing to row 2, certname >cscoDefaultIdCert<
*spamApTask1: Jul 15 09:58:09.121: sshpmGetSshPrivateKeyFromCID: match in row 2
*spamApTask3: Jul 15 09:58:09.139: 50:3d:e5:f0:dc:f1 DTLS connection closed event receivedserver (10:2:98:225/5246) client (10:2:98:3/3536)
*spamApTask3: Jul 15 09:58:09.139: 50:3d:e5:f0:dc:f1 No entry exists for AP (10:2:98:3/3536)
*spamApTask3: Jul 15 09:58:09.139: 50:3d:e5:f0:dc:f1 No AP entry exist in temporary database for 10.2.98.3:3536
What else can I try to get this AP to join the controller??
Thank you.
"configure certificate ssc hash validation disable" didn't help, same problems
I tried to add the AP by its MAC and MIC to the authorized APs list but it just tells me "
50:3d:e5:f0:dc:f1 No AP entry exist in temporary database for 10.2.98.3:3536"
The SSC key Hash still doesn't show in the debug output. What else can I try?
Similar Messages
-
Select distinct problem with muliple join tables, help needed
Hi,
I have two main tables. Each has its of sub joined tables.
guest_id_for_reservation connects two major tables. This has
to be that way
because my guest may change the room status from single to
double (and the
similar exceptional requests).
guests reservation
guest_id_for_reservation
countrytable hoteltable
delegationtable roomtype
I form a query. I want to select distinct those results. But
it does not
work.
If I do not include any table related to reservation table
and its sub
joined tables (disregarding guest_id_for_reservation), it
works.
Is there a specific syntax for select distinct of this type
or any
workaround.?
Thank you
HakanHi I'm still battling with this - have connected the AX to my Imac via ethernet and it shows up fine in Airport Utility. Status light is green and it says its set up to connect to my existing wireless network using wireless connection. Security in Network Preferences is the same for both: WPA2 Personal.
So I don't think there's a problem with the AX, and my current wireless network (BT Home Hub) is working fine.
And when I restore factory settings Airport Utility can see the AX before updating settings so the wireless side of AX must work too.
I'm figuring it must be something about the settings that mean AU can't see it anymore. But I can't work out what, since security is the same.
Any ideas would be great! -
Problem with outer join with filter on join column
Hi,
In physical layer I have one dimension and two facts, and there's an outer join between the facts.
dim_DATE ,
fact_1 ,
fact_2
Joins:
dim_DATE inner join fact_1 on dim_DATE.DATE = fact_1.DATE
fact_1 left outer join fact_2 on fact_1.DATE = fact_2.DATE and fact_1.SOME_ID = fact_2.SOME_ID
When I run a report with a date as a filter, OBIEE executes "optimized" physical SQL:
select fact1.X, fact2.Y
from
Fact_1 left outer join on fact_1.DATE = fact_2.DATE and fact_1.SOME_ID = fact_2.SOME_ID
where Fact_1.DATE = TO_DATE('2009-05-28' , 'YYYY-MM-DD' )
and Fact_2.DATE = TO_DATE('2009-05-28' , 'YYYY-MM-DD')
The filter on Fact_2.DATE effectively replaces outer join with inner.
Is there a way to disable this "optimization", which is actually very good for inner joins, but doesn't allow outer joins?
Thanks in advance,
Alex
Edited by: AM_1 on Aug 11, 2009 8:20 AMIf you want to perform a Fact-based partitioning with OBIEE (two fact with the same dimension), you have to :
* create in your physical layer for each fact table the joins with the dimension
* create in the Business Model layer ONE star schema with ONE logical fact table containing the columns of your two physical fact table
In this way when you choose minimal one column of your fact1 and one column of your fact2, OBIEE will perform two query against each fact table/dimension, join them with an OUTER JOIN and your problem will disappear.
Cheers
Nico -
A simple problem with natural join
i have 2 tables what have columns with distinct's names are referenced.
natural join not works 'cose only foreign key reference this 2 tables.
Have something to make table join in using an specific foreign key??
I'm using oracle9i
Example:
table a( a_cod number, a_name varchar2(20))
table b( b_cod number, b_month_year date, b_salary number)
ALTER TABLE b ADD ( CONSTRAINT b_a_FK FOREIGN KEY (b_cod)
REFERENCES a (a_cod));
select * from a natural join b
where trunc(b_month_year) = trunc(sysdate)I'm not express me correctly.
We have 2 tables like this:
CREATE TABLE PPTBA001
PPA001_GROUP NUMBER(3) NOT NULL,
PPA001_PEOPLECODE VARCHAR2(20 BYTE) NOT NULL,
PPA001_NAME VARCHAR2(60 BYTE) NOT NULL,
PPA001_DATEOFBIRTHDAY DATE NOT NULL);
CREATE TABLE CLTBA001
CLA001_GROUP NUMBER(3) NOT NULL,
CLA001_CLIENTCODE VARCHAR2(20 BYTE) NOT NULL,
CLA001_SITUATION NUMBER(1) DEFAULT 1);
SELECT * FROM PPTBA001 NATURAL JOIN CLTBA001;
ALTER TABLE CLTBA001 ADD (
CONSTRAINT CLA001_PPAA001_FK1 FOREIGN KEY (CLA001_GROUP, CLA001_CLIENTCODE)
REFERENCES PPTBA001 (OFA001_GROUP,OFA001_PEOPLECODE));
the select returns without results. 'cose does not have columns like same name.
Natural join use a columns with same name. I need something use an foreign key.
Why?? Now i have a problem .. i need aggregate one more column in primary key
and i need change all selects that have join with PPTBA001 and put manualy a new column.. if have a other possibility like natural join to using a foreign key to join the selects problems is so more easy to resolve.
Message was edited by:
jonas.lima -
2 problem with BITMAP JOIN INDEX and access plan
On my schema ("LSA") I have 3 tables:
AAB_VENDUTO (~4.200.000 record)
AAB_ARTICOLO (~8.200 record)
AAB_CLIENTE (~15.000 record)
AAB_ARTICOLO.MARCA has 1079 distinct values
AAB_CLIENTE.TITOLO_STUDIO has 22 distinct values
I create 2 different bitmap join index:
CREATE BITMAP INDEX lsa.AAB_V_ARTICOLO_MARCA_IDX ON LSA.AAB_VENDUTO(MARCA)
FROM LSA.AAB_VENDUTO vv, LSA.AAB_ARTICOLO aa WHERE vv.articolo_id=aa.articolo_id;
CREATE BITMAP INDEX lsa.AAB_V_CLIENTE_TIT_STUDIO_IDX ON LSA.AAB_VENDUTO(TITOLO_STUDIO)
FROM LSA.AAB_VENDUTO vv, LSA.AAB_CLIENTE cc WHERE vv.cliente_id=cc.cliente_id;(star_trasformation_enabled is TRUE)
I run (on SQL Developer 1.5.5) these similar queries:
SELECT DISTINCT VV.cliente_id FROM LSA.AAB_VENDUTO VV JOIN LSA.AAB_ARTICOLO AA on VV.articolo_id=AA.articolo_id
WHERE (MARCA='ALGIDA' OR MARCA='SAMMONTANTA');
SELECT DISTINCT VV.cliente_id FROM LSA.AAB_VENDUTO VV JOIN LSA.AAB_CLIENTE CC on VV.cliente_id=CC.cliente_id
WHERE (titolo_studio='LAUREA BREVE' OR titolo_studio='MAGISTRALE');The first one use correctly the bitmap join index, this is the access plan:
!http://bitlgs.altervista.org/_altervista_ht/marca.png!
but the second query...
!http://bitlgs.altervista.org/_altervista_ht/titolo_studio.png!
why the second query doesn't use the bitmap index?
problem #2:
I create another bitmap index:
CREATE BITMAP INDEX LSA.AAB_V_CLIENTE_SESSO_IDX ON LSA.AAB_VENDUTO(SESSO)
FROM LSA.AAB_VENDUTO vv, LSA.AAB_CLIENTE cc WHERE vv.cliente_id=cc.cliente_id;and I run this query:
SELECT VV.cliente_id, COUNT(*) FROM LSA.AAB_VENDUTO VV JOIN LSA.AAB_CLIENTE CC on VV.cliente_id=CC.cliente_id
WHERE sesso='Donna' and (titolo_studio='LAUREA BREVE' or titolo_studio='MAGISTRALE') GROUP BY VV.cliente_id;this is the access plan:
!http://bitlgs.altervista.org/_altervista_ht/terzo.png!
In my opinion, the part that I have marked as 'A' is superfluous...
why it make a join with AAB_CLIENTE table? Why it filter again the titolo_studio and sesso field?
Edited by: Nirpol on 4-set-2009 13.25Nirpol wrote:
I create 2 different bitmap join index:
CREATE BITMAP INDEX lsa.AAB_V_ARTICOLO_MARCA_IDX ON LSA.AAB_VENDUTO(MARCA)
FROM LSA.AAB_VENDUTO vv, LSA.AAB_ARTICOLO aa WHERE vv.articolo_id=aa.articolo_id;
CREATE BITMAP INDEX lsa.AAB_V_CLIENTE_TIT_STUDIO_IDX ON LSA.AAB_VENDUTO(TITOLO_STUDIO)
FROM LSA.AAB_VENDUTO vv, LSA.AAB_CLIENTE cc WHERE vv.cliente_id=cc.cliente_id;
What happens if you just create two plain bitmap indexes without the join?
CREATE BITMAP INDEX lsa.AAB_V_ARTICOLO_MARCA_IDX ON LSA.AAB_VENDUTO(MARCA);
CREATE BITMAP INDEX lsa.AAB_V_CLIENTE_TIT_STUDIO_IDX ON LSA.AAB_VENDUTO(TITOLO_STUDIO) ;You can also go with normal indexes on the FK rows (cliente_id) and the optimizer can do a bitmap conversion from normal index to bitmap index if needed. Are the column values evenly distributed? If not you might need to go for some column histogram. but I don't have the impression that this is really useful in your case. -
Problem with outer join/insert
I created a test case in scott schema that describes my problem. I use emp table, and I want to have one more table - emp_info - that will store some additional info about employees. Not every employee will have additional info. I can't add a field to emp table - this has to be in an additional table.
I want to display all the emp's in a swing table, and an info if it exists - of course, using outer join. Further more, I want users to be able to enter info in this same table. If info already exists in the emp_info it will be updated, if not a new record is created.
I hope you get the picture.
So, emp_info table is:
create table emp_info(empno number(4), info varchar2(10))
ALTER TABLE "SCOTT"."EMP_INFO"
ADD (CONSTRAINT "PK_EMP_INFO" PRIMARY KEY("EMPNO"))
ALTER TABLE "SCOTT"."EMP_INFO"
ADD (CONSTRAINT "FK_EMP_INFO_EMP" FOREIGN KEY("EMPNO")
REFERENCES "SCOTT"."EMP"("EMPNO"))
In Jdev I create entitiy objects for emp and emp_info, and create View object 'ViewOuter' using these two entities. emp is updatable and empinfo is updatable and reference.
SQL query for the view object is:
SELECT Emp.EMPNO, Emp.ENAME, Emp.JOB, Emp.MGR, Emp.HIREDATE,
Emp.SAL, Emp.COMM, Emp.DEPTNO, EmpInfo.EMPNO AS EMPNO1,
EmpInfo.INFO
FROM EMP Emp, EMP_INFO EmpInfo
WHERE Emp.EMPNO = EmpInfo.EMPNO(+)
I changed View row class of the ViewOuter view:
public void setInfo(String value) {
if (getEmpno1()==null) {
setEmpno1(getEmpno());
setAttributeInternal(INFO, value);
Now I create the table in swing. It works fine - if a user changes info, new record is created or existing updated etc. There is only one problem:
If I change info on an employee, and then requery the view without commiting to the database, I don't see this info. If I try to change it, I get error
(oracle.jbo.TooManyObjectsException) JBO-25013: Too many objects match the primary key oracle.jbo.Key[7499 ].
It seams that the new info is cached, but requerying the view didn't pick it up. And when it creates new row for info PK is violated.
How can I avoid this?I set up the primari key for emp_info like this:
public void setInfo(String value) {
if (getEmpno1()==null) {
setEmpno1(getEmpno());
setAttributeInternal(INFO, value);
It's set when the user enters info.
What is the difference between transaction.commit and transaction.postChanges?
Posting changes looks like good temp solution. How can I change view object, so it calls postchanges before executing query? Since I can do requery on multiple places in application, this should be handled by the view itself.
Is there any better way? -
Problem with outer joins and the class indicator/discriminator
Hello,
I am having a problem defining a query in toplink (10.1.3.3).
In the workbench, I have created a parent and 2 child descriptors. The parent is "AbstractValue", the children are "DefaultValue", classified by the discriminator 'DEF', and "OverrideValue", classified by 'OVR', both located in the same table.
Another descriptor (containing a one-on-one mapping to both a "DefaultValue", and a "OverrideValue") needs to be queried for its 'value'.
The way the query should act is: If an override value (row) exists, this one applies for that object. If an override doesn't exist, return the default value.
The query then comes down to (as I have it now):
builder.getAllowingNull("OverrideValue").getAllowingNull("value").ifNull(builder.get("DefaultValue").get("value")).equal(builder.getParameter(VALUE_PARAM));
The problem is that toplink adds the distinction for the different kind of "values" in the where clause WITHOUT checking for null values e.g. it performs an outer join, but then still checks for the discriminator value thus
....t1.ovr_id = t2.id(+) AND t2.discriminator = 'OVR' AND ...
instead of
... LEFT JOIN values t2 ON (t1.ovr_id = t2.id AND t2.discriminator = 'OVR') ...
This leads to the behaviour that the query returns ONLY the objects that have override and default values.
An overview of the queries (simplified)
Toplink, at the moment, returns only results if both override and default values exists:
SELECT t1.id
t1.def_id,
t1.ovr_id
FROM values t2,
parameter t1,
values t0
WHERE nvl(t2.value, t0.value) = 15 AND
t1.ovr_id = t2.id(+) AND t2.discriminator = 'OVR' AND
t1.def_id = t0.id AND t0.discriminator = 'DEF'
Situation Wanted:
SELECT t1.id
t1.def_id,
t1.ovr_id
FROM parameter t1
LEFT JOIN values t2 ON (t1.ovr_id = t2.id AND t2.discriminator = 'OVR')
JOIN values t0 ON (t1.def_id = t0.id AND t0.discriminator = 'DEF')
WHERE nvl(t2.value, t0.value) = 15
Anyone know if there is some statement I am missing to allow an actual outer join on descriptors containing class indicators/discriminators? A possible rewrite?
Thanks in advance,
RudyThis is a bug in TopLink's outer join support for Oracle. Currently the outer join is put in the where clause, instead of the from clause, as we do on other platforms. You might be able to fix it by changing your OraclePlatform to return false for shouldPrintOuterJoinInWhereClause().
Please log this bug on EclipseLink, or through Oracle technial support.
There is a workaround using,
descriptor.getInhertiancePolicy().setAlwaysUseOuterJoinForClassType(true);
James : http://www.eclipselink.org -
Performance problem with inner join
Hi
With this Query
SELECT *
FROM TABLE1
INNER JOIN TABLE2
ON TABLE1.Col1 = TABLE2.Col2 AND TABLE1.Col2 = TABLE2.Col2
WHERE TABLE1.Col3 = 'AB' AND
TABLE2.Col4 = 'ZZ';
TABLE1 have 6,000,000 of records
TABLE2 have 9,000,000 of records
when I run this query the result take 30 secs
If I change the Optimizer_mode for 'RULE'
the result take 4 secs
All statistics is ok
Primary Key exists for TABLE1 and TABLE2 base-on Col1 and Col2
And index on Table1.Col3,Table1.Col4
somebody can help me ?Analyze tables compute statistics
and analyze index compute statistics
I join explain plan
STATEMENT_ID TIMESTAMP REMARKS OPERATION OPTIONS OBJECT_NODE OBJECT_OWNER OBJECT_NAME OBJECT_INSTANCE OBJECT_TYPE OPTIMIZER SEARCH_COLUMNS ID PARENT_ID POSITION COST CARDINALITY BYTES
OTHER_TAG PARTITION_START PARTITION_STOP PARTITION_ID OTHER DISTRIBUTION CPU_COST IO_COST TEMP_SPACE
WithRule1 2004-01-19 16:28:43 SELECT STATEMENT RULE 0
WithRule1 2004-01-19 16:28:43 SORT AGGREGATE 1 0 1
WithRule1 2004-01-19 16:28:43 NESTED LOOPS 2 1 1
WithRule1 2004-01-19 16:28:43 TABLE ACCESS BY INDEX ROWID MICRODEV T088_INSC 1 ANALYZED 3 2 1
WithRule1 2004-01-19 16:28:43 INDEX RANGE SCAN MICRODEV IX4_T088_INSC NON-UNIQUE ANALYZED 2 4 3 1
WithRule1 2004-01-19 16:28:43 TABLE ACCESS BY INDEX ROWID MICRODEV T090_CPOS_DEM 2 ANALYZED 5 2 2
WithRule1 2004-01-19 16:28:43 INDEX UNIQUE SCAN MICRODEV PK_T090_CPOS_DEM UNIQUE ANALYZED 2 6 5 1
7 rows selected.
STATEMENT_ID TIMESTAMP REMARKS OPERATION OPTIONS OBJECT_NODE OBJECT_OWNER OBJECT_NAME OBJECT_INSTANCE OBJECT_TYPE OPTIMIZER SEARCH_COLUMNS ID PARENT_ID POSITION COST CARDINALITY BYTES
OTHER_TAG PARTITION_START PARTITION_STOP PARTITION_ID OTHER DISTRIBUTION CPU_COST IO_COST TEMP_SPACE
WithChoose1 2004-01-19 16:29:37 SELECT STATEMENT CHOOSE 0 21680 21680 1 40
21680
WithChoose1 2004-01-19 16:29:37 SORT AGGREGATE 1 0 1 1 40
WithChoose1 2004-01-19 16:29:37 HASH JOIN 2 1 1 21680 59050 2362000
21680 3875000
WithChoose1 2004-01-19 16:29:37 TABLE ACCESS BY INDEX ROWID MICRODEV T088_INSC 1 ANALYZED 3 2 1 7031 96727 2708356
7031
WithChoose1 2004-01-19 16:29:37 INDEX RANGE SCAN MICRODEV IX4_T088_INSC NON-UNIQUE ANALYZED 2 4 3 1 232 96727
232
WithChoose1 2004-01-19 16:29:37 TABLE ACCESS FULL MICRODEV T090_CPOS_DEM 2 ANALYZED 5 2 2 11224 5662693 67952316
11224
6 rows selected. -
Hi!
I'm learning SQL and I have lot of doubts but I think with this example I can generalize them.
I have the tables:
book {idbook (PK), namebook}
auhor {idauthor (PK), nameauthor, idcountry (FK)}
authorship {idauthor (FK), idbook (FK)} (both the same constraint PK)
country {idcountry (PK), namecountry}
I want the name of the books that have authors from Canada.
I assumed that a correct query would be:
SELECT namebook FROM book NATURAL JOIN (authorship NATURAL JOIN (author NATURAL JOIN country)) WHERE country.namecountry = 'Canada';
The result that I expected was:
Book3
Book5
but this query returns me all books that have relations in authorship (with authors from any country), 2 times!! like:
book2
book3
book4
book5
book2
book3
book4
book5
the best I can do to get my correct result is:
SELECT namebook FROM book NATURAL JOIN (authorship NATURAL JOIN author) WHERE author.idcountry = 2;
But of course I can't use this one...
Does anyone can explain me what is happening?
Thanks a lot!
Edited by: user12040235 on 15/10/2009 09:37
Edited by: user12040235 on 15/10/2009 09:51Hi,
That may be a bug.
I get the correct results (2 rows) in Oracle 10.1, but I get the same bad results you do (12 rows) in Oracle 11.1.
In Oracle 11, I get the expected results if say "SELECT *" instead of "SELECT book.namebook".
I also get the correct results if I add any of the join columns to the SELECT clause. Adding a non-join column, e.g.
SELECT BOOK.namebook, author.nameauthor
FROM book
...gets the wrong results.
For the benefit of anyone who wants to try this:
DROP TABLE author;
create table author AS
SELECT 1 AS idauthor, 'Jose Luiz do Rego' AS nameauthor, 1 AS idcountry FROM dual UNION ALL
SELECT 2, 'Barbara Bela', 2 FROM dual UNION ALL
SELECT 3, 'Juan Domingues', 5 FROM dual UNION ALL
SELECT 4, 'José Mauro de Vasconcelos', 1 FROM dual UNION ALL
SELECT 5, 'Vader', 2 FROM dual UNION ALL
SELECT 6, 'navathe', 4 FROM dual UNION ALL
SELECT 7, 'Machado de Assis', 1 FROM dual
drop table AUTHORSHIP;
CREATE TABLE authorship AS
SELECT 2 AS idauthor, 5 AS idbook FROM dual UNION ALL
SELECT 1 AS idauthor, 1 AS idbook FROM dual UNION ALL
SELECT 5 AS idauthor, 3 AS idbook FROM dual UNION ALL
SELECT 6 AS idauthor, 2 AS idbook FROM dual UNION ALL
SELECT 7 AS idauthor, 4 AS idbook FROM dual UNION ALL
SELECT 7 AS idauthor, 6 AS idbook FROM dual;
drop table book;
CREATE TABLE book AS
SELECT 1 AS idbook, 'book1' AS namebook FROM dual UNION ALL
SELECT 2 AS idbook, 'book2' AS namebook FROM dual UNION ALL
SELECT 3 AS idbook, 'book3' AS namebook FROM dual UNION ALL
SELECT 4 AS idbook, 'book4' AS namebook FROM dual UNION ALL
SELECT 5 AS idbook, 'book5' AS namebook FROM dual UNION ALL
SELECT 6 AS idbook, 'book6' AS namebook FROM dual UNION ALL
SELECT 7 AS idbook, 'book7' AS namebook FROM dual;
DROP TABLE country;
CREATE TABLE country AS
SELECT 1 AS idcountry, 'Brazil' as namecountry FROM dual UNION ALL
SELECT 2 AS idcountry, 'Canada' as namecountry FROM dual UNION ALL
SELECT 3 AS idcountry, 'Chile' as namecountry FROM dual UNION ALL
SELECT 4 AS idcountry, 'Venezuela' as namecountry FROM dual UNION ALL
SELECT 5 AS idcountry, 'USA' as namecountry FROM dual UNION ALL
SELECT 6 AS idcountry, 'Argentina' as namecountry FROM dual ; -
Tables
Normal EMP TABLE and dept TABLE
query
SELECT e.deptno,d.dname
FROM emp e , dept d
WHERE E.DEPTNO(+)=D.DEPTNO
AND (e.deptno=20 or e.job='CLERK')
question
When i use the above query i cannot get the extra records from dept table( 40 , OPERATIONS) due to a condition
as long as it is "OR" we cannot use outer joins.
Regardless of that condition i need to get that record(40,OPERATION)
Please reply me it is very urgent for my work now..
regards
Boopathiselect e.deptno,d.dname
FROM emp e , dept d
WHERE E.DEPTNO(+)=D.DEPTNO
AND (e.deptno=20 or e.job='CLERK')
This will only fetch the record for 20, IF you want for deptno 40 then you should remove your AND clause (AND (e.deptno=20 or e.job='CLERK'))
select * from dept
===========
DNAME DEPTNO
OPERATION 20
FINANCE 40
TRADE 22
select * from emp
===========
ENAME DEPTNO JOB
a 20 CLERK
b 22 XXX
select e.deptno,d.dname
FROM emp e , dept d
WHERE e.DEPTNO(+)=d.DEPTNO
=======================
DEPTNO DNAME
20 OPERATION
22 TRADE
FINANCE--- This is the one which does not ahve a record in emp but is there in dept hence it has been returned -
3 tables with left joins - bug?
Hello,
i am making query where i encounter problem with left join in oracle. I am using oracle 10g and i prepare simple test case.
he is testing tables and datas - really simple i think:
drop table t1;
drop table t2;
drop table t3;
create table t1 (a number not null);
create table t2 (a number, b number);
create table t3 (b number);
insert into t3 values (1);
insert into t3 values (2);
insert into t3 values (3);
insert into t1 (a) values (1);
insert into t2 (a,b) values (1,1);
insert into t1 (a) values (2);
insert into t2 (a,b) values (2, null);
insert into t1 (a) values (3);
insert into t1 (a) values (4);
insert into t2 (a,b) values (4,1);
insert into t1 (a) values (5);
insert into t2 (a,b) values (5,3);
and now query with left joins:
select
t1.a
, t2.a, t2.b
, t3.b
from
t1, t2, t3
where
t1.a = t2.a (+)
and t2.b = t3.b (+)
and t3.b is null
order by t1.a
i get two rows as result:
A A_1 B B_1
2 2 null null
3 null null null
i expect these rows but when i change my query - i dont want get back t3.b column:
select
t1.a
, t2.a, t2.b
/* , t3.b*/
from
t1, t2, t3
where
t1.a = t2.a (+)
and t2.b = t3.b (+)
and t3.b is null
order by t1.a
i get only one row
A A_1 B
2 2 null
My question is simple how can i only by changing columns getting back change number of returned rows? I must say i dont expect these result i expect two rows again.
Thanks for help.BluShadow wrote:
I think I know what you are getting at.
By testing for null on t3.b when you aren't selecting the column, you are enforcing oracle to perform the join through t2 onto t1, but Oracle can't join because t2 has no matching row (although it's outer joined to t1) and therefore, for the one row it can't actually determine if t3.b is null or not, so that row can't match the conditions in a "true" sense and be displayed. If you select the column then oracle can test its nullness ok. (Perhaps this is a bug, I don't know, it's just how I know it works)If you get different results only by changing the projection part of the query this is a bug and nothing else. I can't reproduce using Oracle 10g XE, I get in both cases shown the expected two rows.
What versions are you using to test this?
SQL>
SQL> select * from v$version
2 where rownum <= 1;
BANNER
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
SQL>
SQL> drop table t1 purge;
Table dropped.
SQL> drop table t2 purge;
Table dropped.
SQL> drop table t3 purge;
Table dropped.
SQL>
SQL> create table t1 (a number not null);
Table created.
SQL> create table t2 (a number, b number);
Table created.
SQL> create table t3 (b number);
Table created.
SQL>
SQL> insert into t3 values (1);
1 row created.
SQL> insert into t3 values (2);
1 row created.
SQL> insert into t3 values (3);
1 row created.
SQL>
SQL> insert into t1 (a) values (1);
1 row created.
SQL> insert into t2 (a,b) values (1,1);
1 row created.
SQL>
SQL> insert into t1 (a) values (2);
1 row created.
SQL> insert into t2 (a,b) values (2, null);
1 row created.
SQL>
SQL> insert into t1 (a) values (3);
1 row created.
SQL>
SQL> insert into t1 (a) values (4);
1 row created.
SQL> insert into t2 (a,b) values (4,1);
1 row created.
SQL>
SQL> insert into t1 (a) values (5);
1 row created.
SQL> insert into t2 (a,b) values (5,3);
1 row created.
SQL>
SQL> commit;
Commit complete.
SQL>
SQL> select t1.a
2 , t2.a, t2.b
3 , t3.b
4 from
5 t1 left outer join t2 on (t1.a = t2.a)
6 left outer join t3 on (t2.b = t3.b)
7 where t3.b is null
8 order by t1.a;
A A B B
2 2
3
SQL>
SQL> select t1.a
2 , t2.a, t2.b
3 -- , t3.b
4 from
5 t1 left outer join t2 on (t1.a = t2.a)
6 left outer join t3 on (t2.b = t3.b)
7 where t3.b is null
8 order by t1.a;
A A B
2 2
3
SQL>Regards,
Randolf
Oracle related stuff blog:
http://oracle-randolf.blogspot.com/
SQLTools++ for Oracle (Open source Oracle GUI for Windows):
http://www.sqltools-plusplus.org:7676/
http://sourceforge.net/projects/sqlt-pp/ -
Is anyone having a problem with iOS 6 update? Random, unknown people are involved in my text messages!
I noticed that after I linked Facebook to my iphone, I had tons of new entries in my Contacts. I found a way to turn that feature off. Perhaps that's your problem with randoms joining in on your convos.
Yep, follow the instructions listed by the guy above me. I also did this: Settings ---> Facebook ---> Contacts: Off (allow these apps to use ur account). That cleared out all my Facebook friend phone numbers from my Contact list on my phone. Hope this helps. Updating an os should not require oodles of work on our end. -
Problem with XMLTABLE and LEFT OUTER JOIN
Hi all.
I have one problem with XMLTABLE and LEFT OUTER JOIN, in 11g it returns correct result but in 10g it doesn't, it is trated as INNER JOIN.
SELECT * FROM v$version;
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
PL/SQL Release 11.2.0.1.0 - Production
"CORE 11.2.0.1.0 Production"
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
--test for 11g
CREATE TABLE XML_TEST(
ID NUMBER(2,0),
XML XMLTYPE
INSERT INTO XML_TEST
VALUES
1,
XMLTYPE
<msg>
<data>
<fields>
<id>g1</id>
<dat>data1</dat>
</fields>
</data>
</msg>
INSERT INTO XML_TEST
VALUES
2,
XMLTYPE
<msg>
<data>
<fields>
<id>g2</id>
<dat>data2</dat>
</fields>
</data>
</msg>
INSERT INTO XML_TEST
VALUES
3,
XMLTYPE
<msg>
<data>
<fields>
<id>g3</id>
<dat>data3</dat>
</fields>
<fields>
<id>g4</id>
<dat>data4</dat>
</fields>
<fields>
<dat>data5</dat>
</fields>
</data>
</msg>
SELECT
t.id,
x.dat,
y.seqno,
y.id_real
FROM
xml_test t,
XMLTABLE
'/msg/data/fields'
passing t.xml
columns
dat VARCHAR2(10) path 'dat',
id XMLTYPE path 'id'
)x LEFT OUTER JOIN
XMLTABLE
'id'
passing x.id
columns
seqno FOR ORDINALITY,
id_real VARCHAR2(30) PATH '.'
)y ON 1=1
ID DAT SEQNO ID_REAL
1 data1 1 g1
2 data2 1 g2
3 data3 1 g3
3 data4 1 g4
3 data5 Here's everything fine, now the problem:
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 HPUX: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
--exactly the same environment as 11g (tables and rows)
SELECT
t.id,
x.dat,
y.seqno,
y.id_real
FROM
xml_test t,
XMLTABLE
'/msg/data/fields'
passing t.xml
columns
dat VARCHAR2(10) path 'dat',
id XMLTYPE path 'id'
)x LEFT OUTER JOIN
XMLTABLE
'id'
passing x.id
columns
seqno FOR ORDINALITY,
id_real VARCHAR2(30) PATH '.'
)y ON 1=1
ID DAT SEQNO ID_REAL
1 data1 1 g1
2 data2 1 g2
3 data3 1 g3
3 data4 1 g4As you can see in 10g I don't have the last row, it seems that Oracle 10g doesn't recognize the LEFT OUTER JOIN.
Is this a bug?, Metalink says that sometimes we can have an ORA-0600 but in this case there is no error returned, just incorrect results.
Please help.
Regards.Hi A_Non.
Thanks a lot, I tried with this:
SELECT
t.id,
x.dat,
y.seqno,
y.id_real
FROM
xml_test t,
XMLTABLE
'/msg/data/fields'
passing t.xml
columns
dat VARCHAR2(10) path 'dat',
id XMLTYPE path 'id'
)x,
XMLTABLE
'id'
passing x.id
columns
seqno FOR ORDINALITY,
id_real VARCHAR2(30) PATH '.'
)(+) y ;And is giving me the complete output.
Thanks again.
Regards. -
Problem with variable inside split-join
Hello,
I'm using Oracle BOM Suite 10.3.0.0 and i want to use the split gateway.
In general the split activity ends with a join.
the problem is when i affect a value to a variable between the split and join, it could not get this value after the join, which means after the join the variable becomes empty just like it was before the split.
could anyone help me please.
thanksHI
Case 1: Instance variables are not shared:
At join you can copy the variables from one of the branches to the main instance (that waits at join).
this.instanceVar = copy.instanceVar
This will copy the value of variable 'instanceVar' from the instance that just arrived at join to the instance that was waiting at join (main instance)
Case 2: Instance variables are shared:
This would mean that the main instance shares its variables with the child instances (instances between split - join). In such a case, when a variable is updated by any of the branches, the change is reflect in all the copies.
You can set the property to share or not to share instance variables, in the advanced properties of the split activity.
HTH
SAtinder -
Problem with joined piece under Exchange
I have two mail box one in Notes8.5 and a new one in Exchage 2010. When I receive a mail with a joined peice like a pdf when I want to use it by press it, in Notes no problem I can select the Application but under Exchange it's charged charged but nothing I can select application. It's a problem with Exchange or I have to do something with applications?
UPDATE: The problem has been fixed. It turned out I had a different alias than my login in my account, which was confusing things. Getting rid of it fixed the problem.
Maybe you are looking for
-
How to unlock an iPhone 3 ?
how do i unlock an iphone 3 gs?
-
HT204370 Unable to view purchased movies
I have purchased movies from the itunes store. These movies appear in my 'purchased' history; however, they are not available in my library. What's that all about? Any suggestions?
-
I am using POP mail account and want to know how to set up folders in mail..?
I am using my iPad 2 to check emails. I want to save some in another folder, however I am unable to do so...! Any suggestions on setting up extra folders for POP email accounts?
-
Hi..Experts.. I have also another question. plz help me. Q- should we create a separate Master Repository for Production in ODI? Suppose 1st time we imported Master repository,Work Repository of Development to Production.Now if after 5 months we need
-
Final Cut X doesn't seem to be reading my hard drives....
I have two drives connected to my macbook pro via firewire 800. I launched final cut today and neither one of my drives appears to be read by final cut. None of my meda or projects are anywhere to be found..its just blank. The computer seems to read