JNDI returns different results local vs. remote?
I cannot get the Sun Application Server 8.1 to provide access to EJBs from an independant Tomcat. The server does seem to provide access to the EJB remote interfaces when the client war file is deployed within the SAS-internal web container. In trying to debug this problem, I have noticed that JNDI returns different objects in the two cases, even though the client in both cases is making a "remote" call to IIOP port 3700 to get the JNDI info!
When run within the SunAppServer internal web container, JNDI returns objects of type:
<package name>._<BeanName>RemoteHome_DynamicStub
(e.g. in my case com.aa.ejb._BusinessRemoteHome_DynamicStub for a bean named "Business")
However, when the same .war is deployed on an independant Tomcat running on the same machine, JNDI returns objects of type:
com.sun.corba.se.impl.corba.CORBAObjectImpl
Is this normal? Is there some way that I should be getting the DynamicStubs delivered to the remote clients?
I wouldn't be worried about this except that the PortableRemoteObject.narrow() method returns null when I try to use it on the CORBAObjectImpl references.
The relevant parts of my code are:
p.put( Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.cosnaming.CNCtxFactory" );
p.put( Context.PROVIDER_URL, "iiop://localhost:3700" );
//?? Note: this works the same whether I use "localhost" or my actual IP address.
String objName = "ejb/Business";
InitialContext initial = new InitialContext(p);
out.println("<P>Looking up objName="+objName);
Object objref = initial.lookup(objName);
out.println("<P>objref="+objref);
out.println("<br>objref class="+objref.getClass().getName());
//?? When run in the SAS-internal web container, this displays:
//?? com.aa.ejb._BusinessRemoteHome_DynamicStub
//?? When run in a separate Tomcat, this displays:
//?? com.sun.corba.se.impl.corba.CORBAObjectImpl
BusinessRemoteHome home =
(BusinessRemoteHome)PortableRemoteObject.narrow(objref,
BusinessRemoteHome.class);
//?? When run in the SAS-internal web container, this works correctly.
//?? When run in a separate Tomcat, this returns null!
Okay - a good night's sleep helped. Found the solution:
Properties props = new Properties();
props.setProperty(Context.PROVIDER_URL, "iiop://localhost:3700");
props.setProperty(Context.INITIAL_CONTEXT_FACTORY, "com.sun.appserv.naming.S1ASCtxFactory");
Context ctx = new InitialContext(props);
Object ref = ctx.lookup("ejb/someEJB");
etc.Hope this helps.
Cheers
Keith
Similar Messages
-
Select statement returns different results from 9i and 10g
Hi all,
Would appreciate if someone could help to solve this puzzle here:
I have the exact the statements running on Oracle 9i and 10g, why do they return different results?
Select unique(GroupDesc) , GroupSeq from Module where ModuleId in (Select ModuleId from User_Access where UserId='admin') and Status='A'
In Oracle 9i:
Both columns returned as follows...
GroupDesc | GroupSeq
In Oracle 10g:
Only one column returned, the column with unique keyword was missing...
GroupSeq
Could anyone enlighten me?yes, the table structure... actually the CREATE TABLE statement...
with some sample data (INSERT INTO)
and the actual queries (both of them - copy-paste them from each separate environment)
you can use tags around the statements this will format it to a fixed font - making it easier to read
Edited by: Alex Nuijten on Feb 20, 2009 10:05 AM -
Dear all;
We have only one Database server with some IIS's as web servers on front . Each web server has own oracle client software in order connect to central database..
The same following query used in C# code returns different results on each IIS server.(3 row, or not data found )
why?
select * from aTable where to_char( adate , 'dd.mm.yyyy' ) = :search_date
regards
Siya1006237 wrote:
If adate is of DATE datatype, it will most likely has the time component. Therefore your SQL below is unlikely to return any data.
select * from aTable where adate = to_date(:search_date, 'dd.mm.yyyy')
Perhaps.....
select * from aTable where TRUNC(adate) = to_date(:search_date, 'dd.mm.yyyy')
Hi,
not having any sample data from you I could not understand that you wanted to select the range 00:00:00 - 23:59:59 on search_date.
Your method might not be efficient if you have an index on adate.
Maybe something like this will be more efficient
select * from aTable
where adate >= to_date(:search_date, 'dd.mm.yyyy')
and adate < to_date(:search_date, 'dd.mm.yyyy') + 1;
If you search_date is 30-Aug-2013 it will get records where adate >= 30-Aug-2013 00:00:00 and adate < 31-Aug-2013 00:00:00, so any time of date 30-Aug-2013.
Try like this and let us know if you still have 2 different results.
Regards.
Alberto -
Returning Different Results Based on Input Criteria
I have a complex nested select statement. Based on selection criteria I want to return different results. Say for instance I had an input parameter Called Products which could contain a Yes/No Flag. If the Flag was Yes then I would want the "top" select, statement to be The following:
Select Product, Time_ID, Amt
From
My Complex Nested Select
But if Product was set to "No", I would want the following:
Select Time_ID, Amt
From
My Complex Nested Select
I know, or course that I can have two COMPLETE set of SQL which are invoked based upon testing the value of the PRODUCT Parameter, but If I duplicate the "inner nested select" then I have 2 sets of select staments to maintain. Is there an alternative to this? Could I make the inner portion which does not change a function of some sort so that my code would look something like this?
Select Product, Time_ID, Amt
From
Execute myNestedSelectFunction
But if Product was set to "No", I would want the following:
Select Time_ID, Amt
From
Execute myNestedSelectFunction
This would atleast ensure that I only have to go one place to maintain the logic of the "static Nested Select" statement.
Just want to make sure I do not have a real viable alternative to "duplicating code"
ThanksHi,
Look in TFM for PIPELINED functions which will allow you to:SELECT Product, Time_ID, Amt FROM TABLE(myPipelinedFunctionReturningSelectResult()) T;
SELECT Time_ID, Amt FROM TABLE(myPipelinedFunctionReturningSelectResult()) T;There are samples if you look on AskTom too.
Regards,
Yoann. -
Same Query returning different result (Different execution plan)
Hi all,
To day i have discovered a strange thing: a query that return a different result when using a different execution plan.
The query :
SELECT *
FROM schema.table@database a
WHERE column1 IN ('3')
AND column2 = '101'
AND EXISTS
(SELECT null
FROM schema.table2 c
WHERE a.column3 = SUBSTR (c.column1, 2, 12));where schema.table@database is a remote table.
when executed with the hint /*+ ordered use_nl(a c) */ these query return no result and its execution plan is :
Rows Row Source Operation
0 NESTED LOOPS (cr=31 r=0 w=0 time=4894659 us)
4323 SORT UNIQUE (cr=31 r=0 w=0 time=50835 us)
4336 TABLE ACCESS FULL TABLE2 (cr=31 r=0 w=0 time=7607 us)
0 REMOTE (cr=0 r=0 w=0 time=130536 us)When i changed the execution plan with the hint /*+ use_hash(c a) */
Rows Row Source Operation
3702 HASH JOIN SEMI (cr=35 r=0 w=0 time=497839 us)
22556 REMOTE (cr=0 r=0 w=0 time=401176 us)
4336 TABLE ACCESS FULL TABLE2 (cr=35 r=0 w=0 time=7709 us)It seem that when the execution plan have changed the remote query return no result.
It'is a bug or i have missed somthing ?
PS: The two table are no subject to insert or update statement.
Oracle version : 9.2.0.2.0
System version : HP-UX v1
Thanks.H.Mahmoud wrote:
Oracle version : 9.2.0.2.0
System version : HP-UX v1Hard to say. You're using a very old and deprecated version of the database, and one that was known to contain bugs.
9.2.0.7 was really the lowest version of 9i that was considered to be 'stable', but even so, it's old and lacking in many ways.
Consider upgrading to the latest database version at your earliest opportunity. (or at least apply patches up to the latest 9i version before querying if there is bugs in your really low buggy version) -
Oracle function and query return different results
Hi, I am using oracle 10g database.
Function is :
create or replace FUNCTION FUNC_FAAL(myCode number,firstDate date
*, secondDate date)*
RETURN INTEGER as
rtr integer;
BEGIN
select count() into rtr*
from myschema.my_table tbl where tbl.myDateColumn between firstDate and
secondDate and tbl.kkct is null and tbl.myNumberColumn = myCode ;
return (rtr);
END FUNC_FAAL;
This function returns 117177 as result.
But if I run same query in the function seperately ;
select count()*
from myschema.my_table tbl
where tbl.myDateColumn between firstDate and secondDate
and tbl.kkct is null and tbl.myNumberColumn = myCode ;
I get different result 11344 (which is the right one).
Table and function are in the same schema.
What can be the problem ?
Thanks.1. i think ur parameter name and Column names are same Firstdate and seconddate try to choose different name
2. try using Trunc function around your dates
where trunc(tbl.myDateColumn) between trunc(firstDate) and trunc(secondDate)then compare the result....sometimes time elements comes into play.
Baig
[My Oracle Blog|http://baigsorcl.blogspot.com/] -
"select count(*)" and "select single *" returns different result
Good day!
product version SAP ECC 6.0
oracle10
data transfers from external oracle db into customer tables using direct oracle db link
sometimes I get case with different results from 2 statements
*mytable has 10 rows
*1st statement
data: cnt type I value 0.
select count( * ) into cnt from mytable WHERE myfield_0 = 123 and myfield_1 = '123'.
*cnt returns 10 - correct
*2nd statement
select single * from mytable WHERE myfield_0 = 123 and myfield_1 = '123'.
*sy-dbcnt returns 0
*sy-subrc returns 4 - incorrect, 10 rows are "invisible"
but
1. se16 shows correct row number
2. I update just one row from "invisible" rows using se16 and 2nd statement returns correct result after that
can not understand why
thank you in advance.Thank you, Vishal
but,
general problem is that
1. both statements have the same WHERE conditions
2. 1st return resultset with data (sy-dbcnt=10), 2nd return empty dataset, but must return 1 in sy-dbcnt
Yes, different meaning, you are right, but must 2nd must return 1, because of "select single *" construction, not 0.
Dataset to process is the same, WHERE conditions are equal...
I think the problem is that how ABAP interperets select count(*) and "select single *".
Maybe "select count (*)" scans only PK from index page(s)? and "select single *" scans data pages? and something is wrong with that?
I'm new in SAP and didn't find any SAP tool to trace dump of data and indexes pages with Native SQL.
se16 shows all records.
And why after simple manual update of just one record using se16 "select single *" returns 1?
I've just marked one row to update, didn't change any data, then pressed "save". -
DBMS_PREDICTIVE_ANALYTICS returns different results
I have just noticed that the results returned by the DBMS_PREDICTIVE_ANALYTICS procedures EXPLAIN and PREDICT of Oracle 11.1 (Win32) are very different from those of Oracle 10.2.
Using the sample data from http://www.oracle.com/technology/oramag/oracle/06-mar/o26bi.html, I got the following results. Which one is correct?
Oracle 11.1
===========
begin
dbms_predictive_analytics.explain(
data_table_name => 'CANINE_POKER_RESULTS',
explain_column_name => 'FINISH',
result_table_name => 'EXPLAIN_RESULTS'
end;
select * from explain_results order by rank;
ATTRIBUTE_NAME ATTRIBUTE_SUBNAME EXPLANATORY_VALUE RANK
GAME .269851202 1
FOOD_TYPE .269851202 1
SHAGGY_EYEBROWS .030682642 2
BREED 0 3
CASE_ID 0 3
AGE 0 3
declare
predict_accuracy number(30,10);
begin
dbms_predictive_analytics.predict (
accuracy => predict_accuracy,
data_table_name => 'CANINE_POKER_RESULTS',
case_id_column_name => 'CASE_ID',
target_column_name => 'FINISH',
result_table_name => 'PREDICT_RESULTS');
dbms_output.put_line('Accuracy='||predict_accuracy);
end;
Accuracy=.5766778613
select * from predict_results where case_id < 11;
CASE_ID PREDICTION PROBABILITY
1 1 .817580227
2 0 .817621009
3 0 .817568405
4 0 .817602726
5 1 .817456441
6 0 .817643912
7 0 .817472466
8 0 .817703687
9 1 .817447986
10 0 .817621271
Oracle 10.2
===========
begin
dbms_predictive_analytics.explain(
data_table_name => 'CANINE_POKER_RESULTS',
explain_column_name => 'FINISH',
result_table_name => 'EXPLAIN_RESULTS'
end;
select * from explain_results;
ATTRIBUTE_NAME EXPLANATORY_VALUE RANK
FOOD_TYPE .269033829 1
GAME .261283299 2
SHAGGY_EYEBROWS .030682642 3
AGE 0 4
CASE_ID 0 4
BREED 0 4
declare
predict_accuracy number(30,10);
begin
dbms_predictive_analytics.predict (
accuracy => predict_accuracy,
data_table_name => 'CANINE_POKER_RESULTS',
case_id_column_name => 'CASE_ID',
target_column_name => 'FINISH',
result_table_name => 'PREDICT_RESULTS');
dbms_output.put_line('Accuracy='||predict_accuracy);
end;
Accuracy=.5666155894
select * from predict_results where case_id < 11;
CASE_ID PREDICTION PROBABILITY
1 1 .933983266
2 0 .997126857
3 0 .909820065
4 0 .980890317
5 1 .923646748
6 0 .997403345
7 0 .913264126
8 0 .972332614
9 1 .936501145
10 0 .998156973The differences in EXPLAIN are due to the chances in automatic data preparation used. In 10.2, EXPLAIN was using its own data prep. In 11g it leverages the automatic data preparation (ADP) feature included in ODM. This is, in general, a better approach. Also ADP should continue to evolve over time and become smarter as well.
The differences in PREDICT are also due to the change in automatic data preparation approaches. I am not sure if the algorithm used in PREDICT was also changed or not. I will double check on this and get back to you.
Regards,
-Marcos -
Returning Different Results for the Same Search Value
I'm creating a word list and I'm using Lookup to find text entries in column D and return values from column A. I can manage one result based on the search criteria however I'm wondering if it's possible to return multiple entries from column A if multiple matches are found in column D:
As you can see I'm trying to use the formula =LOOKUP("Aggression",D,A) to find all the instances of "Aggression" in column D and return all the corresponding results from column A (audacious, barefaced, and depredation). Lookup however only returns the last match (depredation).I wish you'd shown where your LOOKUP function is located and what you're trying to do with it. Are you going to be using these results in another function? Or are you simply wanting to display the results of your search?
If the latter, there's an elegant way to make this happen. Let's create a single-cell table on the same page, holding the word you're searching for. (Ideally, this could be a drop-down list -- and that can be made to dynamicly hold all the discrete values in column D -- but that's another discussion.) Let's call this table "Search".
Add a column (which can be hidden) to your original table. Let's insert this next to your column D, making it column E. Cell E2 contains =IF($D2=Search :: $A$1,TRUE,FALSE). Drag/copy that down the column. You'll now have a value of TRUE in this column for all the words you're looking for. Now click on the top of this column E and click "Show More Options".... and click on "Show rows that match the following". Set it to show where Column E is true. You now show only the words in which the "category" matches the search word.
Change the word in your Search table, and the display of your original table automatically adjusts.
The nice part is that the entire line is displayed so you can see definitions and contexts as well.
Vince -
Hi,
I am facing this weird issue. Any help would be appriciated.
I have view with the following definition:
CREATE VIEW [marketing].[OpenedMails]
AS
SELECT
ID_EmailAddress,
ID_Date_Opened,
ID_Contact,
ID_MailSendJobs,
COUNT(ID_OpenedMails) AS OpenCount,
CASE
WHEN ROW_NUMBER() OVER (PARTITION BY CAST(ID_EmailAddress AS VARCHAR(10)) + ' ' + CAST(ID_MailSendJobs AS VARCHAR(10)) ORDER BY ID_Date_Opened) = 1 THEN 1
ELSE 0
END
AS UniqueOpenCount
FROM
dbo.Fact_OpenedMails
where ID_Contact = 382340
GROUP BY ID_EmailAddress, ID_Date_Opened, ID_Contact, ID_MailSendJobs;
order by ID_MailSendJobs
When I run the the select statement in the view definition I get combination of both 1 and 0 for the 'UniqueOpenCount' column.
But when I run the select from the view itself using the following query:
SELECT [ID_EmailAddress]
,[ID_Date_Opened]
,[ID_Contact]
,[ID_MailSendJobs]
,[OpenCount]
,[UniqueOpenCount]
FROM [marketing].[OpenedMails]
I get equal amount of rows but only 0 values for the 'UniqueOpenCount' column which seems to be very weird to me. Why is this happening ? Can anyone help regarding how to solve this ??
Result from the select inside view definition:
Result from the select query directly from the view:
Thanks in advance.
Vivek KamathPlease post DDL, so that people do not have to guess what the keys, constraints, Declarative Referential Integrity, data types, etc. in your schema are. Learn how to follow ISO-11179 data element naming conventions and formatting rules. You failed. Temporal
data should use ISO-8601 formats – you failed again. Code should be in Standard SQL AS much AS possible and not local dialect.
This is minimal polite behavior on SQL forums.
Things like “ID_Date_Opened” are wrong. The affixes “id” and “date” are called attribute properties in ISO-11179 and data modeling. Since a date is a unit of measurement on a temporal scale, it cannot be an identifier by definition. My guess is this would be
“open_date” if it were done right. And the only display format in ANSI/ISO Standard SQL is ISO-8601 (yyyy-mm-dd)
An email address of -1?? Email addresses are VARCHAR(256), not numeric. There is no reason to cast them AS string!
Your vague “mail_send_jobs” is plural, but columns hold scalars and cannot be plural by definition. The partition cause can hold a list of columns:
WHEN ROW_NUMBER()
OVER (PARTITION BY email_address, mail_send_job
ORDER BY open_date)
= 1
THEN 1 ELSE 0 END
This still makes no sense, but the syntax is better. You do not understand how ROW_NUMBER() works.
Would you like to try again with proper Netiquette?
--CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
in Sets / Trees and Hierarchies in SQL -
SQ02 Infoset returns different results in SQ01 Query vs. Segment Builder TG
I want to get Segment Builder to use the same InfoSet and return the same results so, that I can then make a Target Group...but, I'm sure I'm missing some step along the way.
My SQ01 query returns 79 contact persons, but my segment builder only finds 42, none of which appear to actually be the Contact Person, but are in fact the Business Partner the Contact Person has a Relationship to.
I started by copying the CRM_MKTTG_BP_ADDR InfoSet and added the BUT051 table to it, which is when the SQ01 began returning the needed results.
I suspect the problem may be in the Master Group where I am using the B2B/B2C Program, but I don't know if that's the answer or not. I am not declaring an FM as I am using the BP-GUID in the data source, so I don't 'think' that's the issue...
Here's what I'm currently trying as my Data Source settings in case that will help:
Origin Type 03 InfoSet
RFC dest.
Name of InfoSet ZCRM_MKTTG_BP_ADDR
Business Partner BUT000-PARTNER_GUID
Function Module
Sampling InfoSet ZCRM_MKTTG_BP_ADDR_SMP
Sample BUT000-PARTNER_GUID
Object
Partner Function
Description Z BP Address
I already read every Segment Builder forum thread and the Sap Library on the subject, but either I missed something or there is a step not listed.
Anyone have any suggestions?Solved!!
I was wrongly using AND/OR options to add filters in the segmentation tool...ups! -
Same query returning different result set
hi all,
i am using db 10g.
i have a query like below
SELECT SUM(EID_AMOUNT)amt,EID_INCR_CODE,EIH_EFF_DATE
FROM EMP_INC_HEADER,EMP_INC_DETAILS
WHERE EIH_EMP_CODE = EID_EMP_CODE
AND EIH_EFF_DATE = EIH_EFF_DATE
AND EIH_STATUS = 'P'
AND EID_EMP_CODE = '003848'
GROUP BY EID_INCR_CODE,EIH_EFF_DATE
ORDER BY EID_INCR_CODE,EIH_EFF_DATE;which is leading to the output
AMT EID_INCR_CODE EIH_EFF_D
2000 BASIC 21-SEP-10
2000 BASIC 23-SEP-10
2000 BASIC 15-OCT-10
2000 BASIC 21-OCT-10
1200 HTRAN 21-SEP-10
1200 HTRAN 23-SEP-10
1200 HTRAN 15-OCT-10
1200 HTRAN 21-OCT-10
800 OTHERS 21-SEP-10
800 OTHERS 23-SEP-10
800 OTHERS 15-OCT-10
800 OTHERS 21-OCT-10i have query
SELECT SUM(EID_AMOUNT)amt,EID_INCR_CODE,EID_EFF_DATE
FROM EMP_INC_HEADER,EMP_INC_DETAILS
WHERE EIH_EMP_CODE = EID_EMP_CODE
AND EIH_EFF_DATE = EID_EFF_DATE
AND EIH_STATUS = 'P'
AND EID_EMP_CODE = '003848'
GROUP BY EID_INCR_CODE,EID_EFF_DATE
ORDER BY EID_INCR_CODE,EID_EFF_DATE;
leading to
AMT EID_INCR_CODE EID_EFF_D
500 BASIC 21-SEP-10
500 BASIC 23-SEP-10
500 BASIC 15-OCT-10
500 BASIC 21-OCT-10
300 HTRAN 21-SEP-10
300 HTRAN 23-SEP-10
300 HTRAN 15-OCT-10
300 HTRAN 21-OCT-10
200 OTHERS 21-SEP-10
200 OTHERS 23-SEP-10
200 OTHERS 15-OCT-10
200 OTHERS 21-OCT-10
12 rows selected.what second query is returning is correct. as per the table.
but my question what is the difference between my first and second query.
in what way it is different(i am not getting any idea).
if any one is having any clue please share with me.
Thanks..what is the difference between my first and second queryLook like there's no difference.
I think you really meant something like
SELECT SUM(EID_AMOUNT) amt,EID_INCR_CODE,EIH_EFF_DATE
FROM EMP_INC_HEADER EIH,
EMP_INC_DETAILS EID
WHERE EIH.EMP_CODE = EID.EMP_CODE
AND EIH.EFF_DATE = EIH.EFF_DATE
AND EIH.STATUS = 'P'
AND EID.EMP_CODE = '003848'
GROUP BY EID.INCR_CODE,EIH.EFF_DATE
ORDER BY EID.INCR_CODE,EIH.EFF_DATERegards
Etbin -
Does row_number() returns different result set every time?
Hi,
I have a query somewhat like the example:
select /*+ parallel (ftstm,4) */
ftstm. term,
sum(ftstm.revenue) revenue,
sum(ftstm.searches) searches,
row_number() over (order by sum(ftstm.revenue)desc) as depth_rank
from
fact_terms
group by
ftstm.term
ORDER BY
revenue DESC
where
depth_rank <= 100000
I have run this query 2-3 times and surprisingly- when I do MINUS on the result sets, I got few records.
Is that possible or am I doing some mistake with this query? Please help...Nandini wrote:
Hi,
I have a query somewhat like the example:
select /*+ parallel (ftstm,4) */
ftstm. term,
sum(ftstm.revenue) revenue,
sum(ftstm.searches) searches,
row_number() over (order by sum(ftstm.revenue)desc) as depth_rank
from
fact_terms
group by
ftstm.term
ORDER BY
revenue DESC
where
depth_rank <= 100000
I have run this query 2-3 times and surprisingly- when I do MINUS on the result sets, I got few records.well what are you MINUSing from it?
You need to provide us with your database version, example data and expected output (or show us what you are getting)...
{message:id=9360002} -
Same query giving different results
Hi
I m surprised to see the behaviour of oracle. I have two different sessions for same scheema on same server. In both sessions same query returns different results. The query involves some calculations like sum and divisions on number field.
I have imported this data from another server using export / import utility available with 9i server. Before export every thing was going fine. Is there some problem with this utility.
I m using Developer 6i as the front end for my client server application. The behaviour of my application is very surprizing as once it shows the correct data and if I close the screen and reopen, it shows wrong data.
I m really stucked with the abnormal behaviour. Please tell me the possiblities and corrective action for these conditions.
Regards
Asad.There is nothing uncommitted in both the sessions. But still different results are returned.
I m sending u the exact query and result returned in both sessions.
Session 1:
SQL> rollback;
Rollback complete.
SQL> SELECT CC.CREDIT_HRS,GP.GRADE_PTS
2 FROM GRADE G, COURSE_CODE CC, GRADE_POLICY GP
3 WHERE G.COURSE_CDE=CC.COURSE_CDE
4 AND G.SELECTION_ID=45 AND G.GRADE_TYP=GP.GRADE_TYP
5 AND G.TERM_PROG_ID=17 AND GP.TERM_ID=14
6 /
CREDIT_HRS GRADE_PTS
3 4
4 3.33
4 3.33
3 4
3 4
3 4
3 4
7 rows selected.
SQL>
SESSION 2:
SQL> rollback;
Rollback complete.
SQL> SELECT CC.CREDIT_HRS,GP.GRADE_PTS
2 FROM GRADE G, COURSE_CODE CC, GRADE_POLICY GP
3 WHERE G.COURSE_CDE=CC.COURSE_CDE
4 AND G.SELECTION_ID=45 AND G.GRADE_TYP=GP.GRADE_TYP
5 AND G.TERM_PROG_ID=17 AND GP.TERM_ID=14
6 /
CREDIT_HRS GRADE_PTS
3 4
4 3.33
3 4
3 4
3 4
3 4
6 rows selected.
SQL>
U can see in session 1, seven rows are returned while in session 2 six rows are returned. I have issued a rollback before query to be sure that data in both sessions is same. -
Report obsolete returns diff results when backups are UNAVAIL vs AVAIL
Hello from Nova Scotia, Canada:
I'm wondering if someone out there who lives and breaths rman (10gR2) for a living can shed some light...
We are finding that report obsolete (as well as delete obsolete) are returning different results depending on if our backups
are AVAILABLE or UNAVAILABLE.
In our shop, our backups are changed to UNAVAILABLE because they get moved to a different location later, but delete
obsolete doesn't seem to work as expected unless the backups are AVAILABLE.
I am pasting some output below to demonstrate my point. Basically, in the output you are about to see, I'm showing you
my retention policy and I'm listing the backups that I have (and you can see their status is "A" for available). Then I do a
'report obsolete' command to show you what is considered obsolete (3 files are - which is what I expected). Then I change
all my backups to unavailable. Then I list all my backups again and show you that their status has changed to "U" for unavailable.
Then I do 'report obsolete' again and as you can see, I get different results! Can someone explain this to me?? I have RTFManuals
and no where does it say that availability is a factor that can impact determining what is obsolete. You also see in the output
below what version we're using (10.2.0.4.0) and that we are using a recovery catalog.
If someone would like to see additional information, feel free to ask, I'm more than happy to help you help me.
I should also mention this is a 2 node rac on linux.
Many Thanks.
========================================================
$ rman target / catalog rrc/rg@RRC
Recovery Manager: Release 10.2.0.4.0 - Production on Tue May 11 22:06:21 2010
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database: IPCSD (DBID=1703825384)
connected to recovery catalog database
RMAN> show retention policy;
RMAN configuration parameters are:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 1 DAYS;
RMAN> list backup summary;
List of Backups
===============
Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
64093 B F A DISK 05/10/2010 03:06:52 2 1 NO HOTBKUP201005100300_DB
64122 B A A DISK 05/10/2010 03:08:41 1 1 NO HOTBKUP201005100300_ARCHLOGS
64361 B F A DISK 05/10/2010 21:56:33 2 1 NO HOTBKUP201005102149_DB
64362 B F A DISK 05/10/2010 21:56:37 1 1 NO HOTBKUP201005102149_DB
64390 B A A DISK 05/10/2010 21:58:02 1 1 NO HOTBKUP201005102149_ARCHLOGS
64508 B F A DISK 05/11/2010 03:07:01 2 1 NO HOTBKUP201005110300_DB
64509 B F A DISK 05/11/2010 03:07:10 1 1 NO HOTBKUP201005110300_DB
64544 B A A DISK 05/11/2010 03:07:47 1 1 NO HOTBKUP201005110300_ARCHLOGS
RMAN> report obsolete;
RMAN retention policy will be applied to the command
RMAN retention policy is set to recovery window of 1 days
Report of obsolete backups and copies
Type Key Completion Time Filename/Handle
Backup Set 64093 05/10/2010 03:06:51
Backup Piece 64097 05/10/2010 03:06:51 /oracle_admin/rman_backups/201005100300/RMAN_HOTBKUP_IPCSD_201005100300_BS_1349_PC_2_CP_1_DB
Backup Set 64093 05/10/2010 03:04:01
Backup Piece 64096 05/10/2010 03:04:01 /oracle_admin/rman_backups/201005100300/RMAN_HOTBKUP_IPCSD_201005100300_BS_1349_PC_1_CP_1_DB
Backup Set 64122 05/10/2010 03:08:41
Backup Piece 64125 05/10/2010 03:08:41 /oracle_admin/rman_backups/201005100300/RMAN_HOTBKUP_IPCSD_201005100300_BS_1351_PC_1_CP_1_ARCHLOGS
RMAN> change backup unavailable;
changed backup piece unavailable
backup piece handle=/oracle_admin/rman_backups/201005100300/RMAN_HOTBKUP_IPCSD_201005100300_BS_1349_PC_1_CP_1_DB recid=1533 stamp=718599624
changed backup piece unavailable
backup piece handle=/oracle_admin/rman_backups/201005100300/RMAN_HOTBKUP_IPCSD_201005100300_BS_1349_PC_2_CP_1_DB recid=1534 stamp=718599846
changed backup piece unavailable
backup piece handle=/oracle_admin/rman_backups/201005100300/RMAN_HOTBKUP_IPCSD_201005100300_BS_1351_PC_1_CP_1_ARCHLOGS recid=1536 stamp=718600043
changed backup piece unavailable
backup piece handle=/oracle_admin/rman_backups/201005102149/RMAN_HOTBKUP_IPCSD_201005102149_BS_1354_PC_1_CP_1_DB recid=1539 stamp=718667376
changed backup piece unavailable
backup piece handle=/oracle_admin/rman_backups/201005102149/RMAN_HOTBKUP_IPCSD_201005102149_BS_1354_PC_2_CP_1_DB recid=1540 stamp=718667600
changed backup piece unavailable
backup piece handle=/oracle_admin/rman_backups/201005102149/RMAN_HOTBKUP_IPCSD_201005102149_BS_1355_PC_1_CP_1_DB recid=1541 stamp=718667797
changed backup piece unavailable
backup piece handle=/oracle_admin/rman_backups/201005102149/RMAN_HOTBKUP_IPCSD_201005102149_BS_1356_PC_1_CP_1_ARCHLOGS recid=1542 stamp=718667821
changed backup piece unavailable
backup piece handle=/oracle_admin/rman_backups/201005110300/RMAN_HOTBKUP_IPCSD_201005110300_BS_1357_PC_1_CP_1_DB recid=1543 stamp=718686020
changed backup piece unavailable
backup piece handle=/oracle_admin/rman_backups/201005110300/RMAN_HOTBKUP_IPCSD_201005110300_BS_1357_PC_2_CP_1_DB recid=1544 stamp=718686253
changed backup piece unavailable
backup piece handle=/oracle_admin/rman_backups/201005110300/RMAN_HOTBKUP_IPCSD_201005110300_BS_1358_PC_1_CP_1_DB recid=1545 stamp=718686430
changed backup piece unavailable
backup piece handle=/oracle_admin/rman_backups/201005110300/RMAN_HOTBKUP_IPCSD_201005110300_BS_1359_PC_1_CP_1_ARCHLOGS recid=1546 stamp=718686452
Changed 11 objects to UNAVAILABLE status
RMAN> list backup summary;
List of Backups
===============
Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
64093 B F U DISK 05/10/2010 03:06:52 2 1 NO HOTBKUP201005100300_DB
64122 B A U DISK 05/10/2010 03:08:41 1 1 NO HOTBKUP201005100300_ARCHLOGS
64361 B F U DISK 05/10/2010 21:56:33 2 1 NO HOTBKUP201005102149_DB
64362 B F U DISK 05/10/2010 21:56:37 1 1 NO HOTBKUP201005102149_DB
64390 B A U DISK 05/10/2010 21:58:02 1 1 NO HOTBKUP201005102149_ARCHLOGS
64508 B F U DISK 05/11/2010 03:07:01 2 1 NO HOTBKUP201005110300_DB
64509 B F U DISK 05/11/2010 03:07:10 1 1 NO HOTBKUP201005110300_DB
64544 B A U DISK 05/11/2010 03:07:47 1 1 NO HOTBKUP201005110300_ARCHLOGS
RMAN> report obsolete;
RMAN retention policy will be applied to the command
RMAN retention policy is set to recovery window of 1 days
Report of obsolete backups and copies
Type Key Completion Time Filename/Handle
Backup Set 64362 05/10/2010 21:56:37
Backup Piece 64366 05/10/2010 21:56:37 /oracle_admin/rman_backups/201005102149/RMAN_HOTBKUP_IPCSD_201005102149_BS_1355_PC_1_CP_1_DB
RMAN>I just want to point out that the one obsolete file just contains a Control File and a SPFILE, as shown below:
BS Key Type LV Size Device Type Elapsed Time Completion Time
64362 Full 17.64M DISK 00:00:02 05/10/2010 21:56:37
BP Key: 64366 Status: UNAVAILABLE Compressed: NO Tag: HOTBKUP201005102149_DB
Piece Name: /oracle_admin/rman_backups/201005102149/RMAN_HOTBKUP_IPCSD_201005102149_BS_1355_PC_1_CP_1_DB
Control File Included: Ckp SCN: 15213106404 Ckp time: 05/10/2010 21:56:35
SPFILE Included: Modification time: 05/09/2010 18:00:42---------------
**** END *****
Edited by: user478914 on May 12, 2010 3:03 AM
Edited by: user478914 on May 12, 2010 3:24 AMThanks for reading my post. Here is the result of doing the crosscheck command.
Problem still exists. Someone correct me if I'm wrong but I believe crosscheck does
nothing because all my backups are listed as unavailable, so there is nothing for it to do.
Any other thoughts or suggestions?
This problem is driving me bonkers. I have read the Backup and Recovery Basic Guide and Advanced Guide,
googled the web, searched OTN, searched Metalink and I can't find anything on the topic of backup
piece availability affecting obsolescence. Many thanks.
RMAN> list backup summary;
List of Backups
===============
Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
64361 B F U DISK 05/10/2010 21:56:33 2 1 NO HOTBKUP201005102149_DB
64362 B F U DISK 05/10/2010 21:56:37 1 1 NO HOTBKUP201005102149_DB
64390 B A U DISK 05/10/2010 21:58:02 1 1 NO HOTBKUP201005102149_ARCHLOGS
64508 B F U DISK 05/11/2010 03:07:01 2 1 NO HOTBKUP201005110300_DB
64509 B F U DISK 05/11/2010 03:07:10 1 1 NO HOTBKUP201005110300_DB
64544 B A U DISK 05/11/2010 03:07:47 1 1 NO HOTBKUP201005110300_ARCHLOGS
64761 B F U DISK 05/12/2010 03:06:23 2 1 NO HOTBKUP201005120300_DB
64762 B F U DISK 05/12/2010 03:06:30 1 1 NO HOTBKUP201005120300_DB
64792 B A U DISK 05/12/2010 03:08:13 1 1 NO HOTBKUP201005120300_ARCHLOGS
RMAN> crosscheck backup;
using channel ORA_DISK_1
RMAN> report obsolete recovery window of 1 days;
Report of obsolete backups and copies
Type Key Completion Time Filename/Handle
Backup Set 64362 05/10/2010 21:56:37
Backup Piece 64366 05/10/2010 21:56:37 /oracle_admin/rman_backups/201005102149/RMAN_HOTBKUP_IPCSD_201005102149_BS_1355_PC_1_CP_1_DB
Backup Set 64509 05/11/2010 03:07:10
Backup Piece 64520 05/11/2010 03:07:10 /oracle_admin/rman_backups/201005110300/RMAN_HOTBKUP_IPCSD_201005110300_BS_1358_PC_1_CP_1_DB
RMAN>
Maybe you are looking for
-
Regarding creation of two transcation in target system
Hi Friends, I am stuck up in two issues. Can anybody help me out??? 1. How can I create a BizPackage so that when a event of any object is trigger I would like to create two transaction. Ex: Sender System Sender Object Type
-
ITunes Match is deleting my Audio Files, How do I stop this?
I have asked this question before, but have not had time to get into it. I use Radioshift(A Rogue Amoeba program) to record a few hours of radio everyday. It sends the audio files to iTunes in a folder named radioshift and into sub-playlists matchi
-
Error when trying to Preview in CP7
A coworker is getting the following error when trying to preview a project in CP7. This project does not have any advanced actions but does have one system variable for slide number ($$cpinfoCurrentSlide$$) in a text box that runs for the project. H
-
Payment Advice needs to be send as mail to Vendor through SAP.
Hi, There is a requirement in my businees related to payment advice mail. After running T-Code: F110, spool getting generated with all the payment advice (lets say 20 advice at a time for different vendor). now we want to mail each advice to respecti
-
Reduce file size w/o blurring up my images?
I have a Pages (iWork '09) document with a lot of images (screenshots) in it. Many of these are large shots where I've used the mask option to hide what I don't need. The file is pretty large, even when I export it to PDF. Using the Reduce File Size