Hi,
Oracle 11.x database Toad 12.8 and 12.9 last beta.
I have database where current incarnation is second one.
When I open AWR report all the time old (previous) DBID is in focus, so mine AWR SNAPID search ends bad.
Please, could you make default DBID or current database incarnation.
Brg
Damir
When the window opens, we run this query:
select distinct dbid, db_name
from DBA_HIST_DATABASE_INSTANCE
If it finds more than one value, we’ll display the DBID dropdown on the toolbar. Then we run this query
Select DBID
from V$DATABASE
and default the dropdown to whatever is found in V$Database.
So it seems like we are already doing what you are asking for, but maybe I am misunderstanding you. If I am missing the point, please let me know. Screen shots are always helpful.
Ok here is what I have:
The one with “P” is old and in focus when I open window initially.
New one with “M” is current and not in focus so have to change combo all the time.
What I would suggest is to sort by version, last_ash_sample_id desc so the newest one comes first in the list. here is mine situation (no sort):
select dbid, startup_time, version, substr(db_name,1,1) db_name, substr(instance_name,1,1) instance_name, last_ash_sample_id from DBA_HIST_DATABASE_INSTANCE;
DBID STARTUP_TIME VERSION D I LAST_ASH_SAMPLE_ID
928736751 15-SEP-15 11.47.09.000 PM 11.2.0.3.0 M M 255113231
928736751 15-JUL-15 01.33.03.000 AM 11.2.0.3.0 M M 252727885
928736751 19-AUG-15 12.38.15.000 AM 11.2.0.3.0 M M 255101225
928736751 16-SEP-15 03.11.09.000 AM 11.2.0.3.0 M M 255114403
928736751 17-NOV-07 02.40.53.000 AM 10.2.0.2.0 P P 14125849
928736751 17-NOV-15 10.31.59.000 PM 11.2.0.3.0 M M 0
928736751 20-JAN-16 01.30.50.000 AM 11.2.0.3.0 M M 266538300
928736751 18-AUG-15 10.58.39.000 PM 11.2.0.3.0 M M 252733387
928736751 18-NOV-15 03.07.48.000 AM 11.2.0.3.0 M M 265789992
928736751 19-JAN-16 10.58.54.000 PM 11.2.0.3.0 M M 265798161
928736751 16-SEP-15 03.47.13.000 AM 11.2.0.3.0 M M 260444712
928736751 17-NOV-15 10.51.36.000 PM 11.2.0.3.0 M M 260459456
Brg
Damir
Oh, OK. So, if you run “select name from v$database”, the value you see is the one that starts with M?
Just was editing mine answer when you replied…hope you get the information.
And mine query returns this:
DBID STARTUP_TIME VERSION D I LAST_ASH_SAMPLE_ID
928736751 17-NOV-07 02.40.53.000 AM 10.2.0.2.0 P P 14125849
928736751 17-NOV-15 10.31.59.000 PM 11.2.0.3.0 M M 0
928736751 15-JUL-15 01.33.03.000 AM 11.2.0.3.0 M M 252727885
928736751 18-AUG-15 10.58.39.000 PM 11.2.0.3.0 M M 252733387
928736751 19-AUG-15 12.38.15.000 AM 11.2.0.3.0 M M 255101225
928736751 15-SEP-15 11.47.09.000 PM 11.2.0.3.0 M M 255113231
928736751 16-SEP-15 03.11.09.000 AM 11.2.0.3.0 M M 255114403
928736751 16-SEP-15 03.47.13.000 AM 11.2.0.3.0 M M 260444712
928736751 17-NOV-15 10.51.36.000 PM 11.2.0.3.0 M M 260459456
928736751 18-NOV-15 03.07.48.000 AM 11.2.0.3.0 M M 265789992
928736751 19-JAN-16 10.58.54.000 PM 11.2.0.3.0 M M 265798161
928736751 20-JAN-16 01.30.50.000 AM 11.2.0.3.0 M M 266538300
12 rows selected.
Go to the editor and run “select name from v$database”.
Is the result the one that starts with M?
OK, I made a change so that in the next beta, that drop down will be on the dbid/name that matches the database. If you still have problems after that, let me know and I’ll probably have to try to recreate the situation. I don’t think I ever considered the situation where you have multiple DB Names on the same DBID.
Now I realize it was not new incarnation (DBID is the same) but seems that someone was “manually” changing AWR records … and now Oracle was not able to delete them by it self (have AWR records from 2007 where “P” is mentioned).
Thx