Unusual RMAN RESTORE behavior 11.1 standard edition.

Doing an 11.1 standard edition restore of a database from source A to Source B (2 different windows servers). Backup is an old backup and RMAN just seats there and nothing comes back with errors. I don't believe its doing anything. Alert log shows a lot of "ORA-12751: cpu time or run time policy violation" and a tracefile has a lot of indication that the source was an ASM file system(this should be ok as it doesnt change the conversion till the end of my script where i tell it to "switch datafile all" (My script is also below). Not sure what the issue is. Find the behavior very weird.Thanks.
Hot Backup end marker scn: 0x0000.00000000
aux_file is NOT DEFINED
Plugged readony: NO
Plugin scnscn: 0x0000.00000000
Plugin resetlogs scn/timescn: 0x0000.00000000 01/01/1988 00:00:00
Foreign creation scn/timescn: 0x0000.00000000 01/01/1988 00:00:00
Foreign checkpoint scn/timescn: 0x0000.00000000 01/01/1988 00:00:00
DDE rules only execution for: ORA 1110
----- START Event Driven Actions Dump ----
---- END Event Driven Actions Dump ----
----- START DDE Actions Dump -----
Executing SYNC actions
Executing ASYNC actions
----- END DDE Actions Dump (total 0 csec) -----
*** 2013-09-09 07:58:13.921
WARNING: Failed to start ASM background process (ASMB)
*** 2013-09-09 07:58:20.906
WARNING: Failed to start ASM background process (ASMB)
DATA FILE #40:
  (name #49) +DATA/jDIR_NAME/datafile/cvdtat.303.686779457
creation size=128000 block size=8192 status=0xe head=49 tail=49 dup=1
tablespace 40, index=41 krfil=40 prev_file=0
unrecoverable scn: 0x0000.00000000 01/01/1988 00:00:00
Checkpoint cnt:9108 scn: 0x0002.7f538e2a 08/25/2013 04:50:52
Stop scn: 0xffff.ffffffff 08/11/2013 14:19:07
Creation Checkpointed at scn:  0x0000.015cc44a 05/13/2009 20:04:23
thread:1 rba:(0x6b.24144.10)
My RECO SCRIPT and output:
run {
ALLOCATE CHANNEL C1 DEVICE TYPE DISK;
ALLOCATE CHANNEL C2 DEVICE TYPE DISK;
ALLOCATE CHANNEL C3 DEVICE TYPE DISK;
ALLOCATE CHANNEL C4 DEVICE TYPE DISK;
ALLOCATE CHANNEL C5 DEVICE TYPE DISK;
set newname for datafile 1 to 'E:\DATA\DIR_NAME\datafile\system.dbf';                                                                                                                         
set newname for datafile 2 to 'E:\DATA\DIR_NAME\datafile\sysaux.dbf';                                                                                                                         
set newname for datafile 3 to 'E:\DATA\DIR_NAME\datafile\undotbs1.dbf';                                                                                                                       
set newname for datafile 4 to 'E:\DATA\DIR_NAME\datafile\users_01.dbf';                                                                                                                          
set newname for datafile 5 to 'E:\DATA\DIR_NAME\datafile\undotbs2.dbf';  
set until sequence 9360;
RESTORE DATABASE;
SWITCH DATAFILE ALL;
RECOVER DATABASE;
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET until clause
Starting restore at 07-SEP-13
datafile 6 not processed because file is offline
datafile 10 not processed because file is offline
datafile 14 not processed because file is offline
datafile 18 not processed because file is offline
datafile 22 not processed because file is offline
datafile 26 not processed because file is offline
datafile 32 not processed because file is offline
datafile 33 not processed because file is offline
datafile 34 not processed because file is offline
datafile 35 not processed because file is offline
datafile 36 not processed because file is offline
datafile 37 not processed because file is offline

Hi,
Check this Doc:MMON Suspended Due to ORA-12751 "cpu time or run time policy violation" (Doc ID 761298.1)
Its not reported for SE, but i believe Symptom like same during the RMAN restore. Check the Various  load on server as compare to your DB and Server.
HTH

Similar Messages

  • Downgrade SQL Server 2008 Enterprise to SQL Server2008 Standard Edition

    I would like to know from fourm users, what are the necessary steps I would take care for above mentioned activity and also please let me know best suitable option for Production.
    SNS

    You can't do in-place downgrade. You need to go with backup -> uninstall ent -> install std -> bring it to same patch -> restore databases approach.
    You need to make sure that there is not enterprise only feature used else you can't restore database on standard.
    Balmukund Lakhani | Please mark solved if I've answered your question, vote for it as helpful to help other user's find a solution quicker
    This posting is provided "AS IS" with no warranties, and confers no rights.
    My Blog |
    Team Blog | @Twitter
    Balmukund's answer above is the Microsoft supported route for doing a downgrade of an instance of SQL Server.  However, before you do this, you need to query the sys.dm_db_persisted_sku_fearures DMV in each of your user databases to make certain that
    you don't have any Enterprise features in use that would block your ability to restore a database onto Standard Edition.
    No matter what you are going to have to do an uninstall and reinstall of the SQL Server instance to downgrade the SKU.  However, you can save yourself some time and the headache of trying to restore the system databases if you are careful about what
    you do.  I have done a couple of SKU downgrades in the past and the easiest way to do it, and I am not saying this is the Microsoft supported way but that it works if done correctly, is to:
    Take a good backup of all of your databases (system and user).  
    Run SELECT @@VERSION and note the specific build number of SQL Server that you are currently on.
    Shut down your existing instance of SQL Server.  
    Copy the master, model, and msdb database files (both mdf and ldf), don't move them copy them, from the current location to a new folder that you mark as readonly. 
    Uninstall SQL Server from the system.
    Reboot the server.
    Install SQL Server Standard Edition.
    Apply the necessary Service Pack and/or Cumulative Updates to bring the instance up to your previous build number.
    Shutdown SQL Server.
    Copy the master, model, and msdb database files (both mdf and ldf) from the folder you saved them in to the correct location for the new install and remove the readonly flag from the files, and change the file ACL's so that the SQL Service account has Full
    Control over the files.
    Startup SQL Server and if you did it correctly it will startup and be exactly where you were before you made any changes, with all of your user databaes online and you should be ready to let applications connect and resume operations.
    If you screw something up in the above, you still have your backups and you can run setup to rebuild the system databases and then go about following the Microsoft supported path for restoring the system databases and then user databases into the system
    to bring it online.  Essentially the file copy is no different that what would occur through attach/detach you are just doing it with system databases which is not supported, but it does work.  The key is to have your backups from before you do anything
    so you have the supported route available if you encounter an issue.  The only issue I have ever had doing this set of steps is that I didn't set the file ACL's correctly and the database engine threw Access Denied errors and failed to start until I fixed
    the ACL's correctly.  This can save you many hours of frustration and downtime trying to restore everything since the database files are already there and it is just some small copy operations to put them where you need them to be.
    Balmukund, feel free to beat me over the head for suggesting a non-supported path. :-)
    Jonathan Kehayias | Senior Consultant,
    SQLSkills.com
    SQL Server MVP | Microsoft Certified Master: SQL Server 2008
    Feel free to contact me through
    My Blog or
    Twitter. Become a
    SQLskills Insider!
    Please click the Mark as Answer button if a post solves your problem!

  • SQL Server 2014 Expired-Not allow the licensed Standard Edition SSMS

    Hi
      I have installed SQL server 2014 Enterprise edition Trial version, It is expired, So i install the SQL server 2014 standard edition , now if i type ssms in my server,It show , Evaluation period has expired, guide me how to change the ssms instance
    to my sql server standard edition
    Thanks & Regards Manoj

    Manoj - For upgrading the evaluation edition , the only upgrade option will be to upgrade it to Enterprise Edition. There is no downgrade path for it.
    Having said this, you can either upgrade to ENT edition or follow these steps:
    Take backup of User Databases
    Un-install/Remove the existing instance
    Install SQL Server 2014 Standard edition and restore your databases over it
    Few important considerations:
    You can restore user databases to standard edition provided you are not using any enterprise class features such 
           Database Partitioning
           Data Compression
           Change Data Capture
           Transparent Data Encryption
    To know whether any of the above are enabled use this query:
    SELECT * FROM sys.dm_db_persisted_sku_features
    Good Luck! Please Mark This As Answer if it solved your issue. Please Vote This As Helpful if it helps to solve your issue

  • RMAN Backup Standard Edition

    Hey, I have 2 node rac on 10.2.0.4.0 with Standard Edition. (SLES10)
    No rman catalog is used.
    I like to perform a daily level 0 backup of my database by running this:
    BACKUP incremental level 0 format '/backup/%d_LVL0_%T_%u_s%s_p%p' database
    PLUS ARCHIVELOG format '/backup/%d_AL_%T_%u_s%s_p%p' delete input;
    How could I restore this backup on a different node, hence duplicate db is not available on standard edition?
    Do I need to create a rac instance on a kind of a standby system ? (say 2 virtual machines waiting for the disaster case)
    What about tnsnames,listener, etc....
    Christian

    Hi Christian,
    if you can read German, than this may help you/give you an idea:
    http://www.oracle.com/global/de/community/dbadmin/tipps/RMAN_II_Restore/index.html
    => So simply copy all your backup to the new machine
    => You don't need RAC on the second machine. In this case you have to make some changes to the spfile (after you restored it).
    => All files external to the datbase have to be maintained manually (listener.ora, tnsnames.ora, passwordfile etc.)
    Regards
    Sebastian

  • Backup/restore across Enterprise & Standard Editions?

    With the exception of incremental backups, are there any impediments to backing up from an Enterprise & restoring in a Standard edition??

    The restores via RMAN from EE to Standard should just work. Limitiation of the RMAN Standard edition are:
    Parallelization
    Duplexed backups
    TSPITR via RMAN
    Incrementals
    The other issue that you have to be concerned with is the features and functions that you have implemented in the EE version vs. the Standard version of the database.
    Thanks, Tammy

  • RMAN duplicate db Standard Edition

    As many of you know, Oracle Standard Edition license allows only one channel for RMAN. Given this restriction, is it still possible to perform database duplication using RMAN? I read that you need at least an auxiliary channel. Please comment...

    yes you need to auto allocate or manual allocate the channel at least one channel is must required for RMAN to work
    rest out gurus will put light on it
    rgds
    shahzad

  • RMAN backup with Standard Edition

    I want to backup Oracle RAC database using RMAN.I am using Standard Edition so flashback database option is not available and many RMAN related features are also not available.I have set flash recovery area of 30 GB.
    Now please tell me commands to take full backup and incremental backup.
    I was able to backup using format clause.
    Backup database format '+rac_dg2/dbbackup/dbf_%p'
    tag 'DB_full_backup' ;
    but in this command I have to specify format clause otherwise backup was stored at $ORACLE_HOME/dbs.
    Now I want to take incemental backup
    OS : Solaris 10 (sparc 64bit)
    Oracle : Oracle 10.2.0.3.0 Standard Edition

    Please suggest me where I have to change so I can store archive logs on FRA as well as on Local hard disk.
    show parameter LOG_ARCHIVE_DEST
    NAME TYPE VALUE
    log_archive_dest string
    log_archive_dest_1 string LOCATION=+RAC_DG1/INDORAC/
    log_archive_dest_10 string
    log_archive_dest_2 string
    log_archive_dest_3 string
    log_archive_dest_4 string
    log_archive_dest_5 string
    log_archive_dest_6 string
    log_archive_dest_7 string
    log_archive_dest_8 string
    log_archive_dest_9 string

  • Manual Standby on Standard Edition

    Hey, I try to setup a manual standby on standard edition 10gR2.
    Source is a RAC database (standard edition on sles10 sp3)
    I created a node and created a oracle instance on this node. This node is using the filesystem for the oracle files.
    I did a hotbackup of the source database and copied all files over to the other host.
    Which parameters needs to be change in the init.ora and how can I recover my database ?
    Articles like
    http://www.databasejournal.com/features/oracle/article.php/3682421/Manual-Standby-Database-under-Oracle-Standard-Edition.htm
    or
    Alternative for standby database in standard edition [ID 333749.1]
    does not really help me.
    Thanks for your patience... :-)

    ./rman target / cmdfile=/opt/oracle/rman.sh
    rman.sh
    run{
    change archivelog all crosscheck;
    allocate channel ch1 type disk;
    backup incremental level 0 database format
    '/opt/oracle/backup/backupnew/bk_inc0_%s_%p' include current
    controlfile for standby ;
    sql "alter system archive log current";
    backup archivelog all format '/opt/oracle/backup/backupnew/al_%s_%p';
    release channel ch1;
    copy files from '/opt/oracle/backup/backupnew' to standbyhost:'/opt/oracle/backup/backupnew'
    ./rman cmdfile=/opt/oracle/duplicate.rman
    duplicate.rman
    connect auxiliary sys/oracle@standby
    connect target /
    run {
    allocate auxiliary channel ch1 type disk;
    duplicate target database for standby dorecover nofilenamecheck;
    release channel ch1;
    Now I get this:
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of Duplicate Db command at 09/15/2010 15:20:35
    RMAN-03015: error occurred in stored script Memory Script
    RMAN-06026: some targets not found - aborting restore
    RMAN-06024: no backup or copy of the control file found to restore
    When do have I to issue the
    ALTER DATABASE CREATE STANDBY CONTROLFILE AS '/opt//oracle/stbycf.ctl';
    command. And where to copy ?

  • Standby db-EE edition and Standard edition

    Dear friends,
    10g on solaris 10.
    What are the differences in standby db when using a enterprise edition and standard edition ?..
    Any input will be of great help
    Kai

    Niall and team
    I have read your presentation - "You Probably Don't need dataguard" and I tried it out on test database. I setup a manual standby database, archivelog is manually copied to standby db.
    Maybe you have an idea on regarding SCN or archivelog that is not present but Oracle is asking/suggestion during recovery procedure..
    environment:
    2 virtual box - Solaris 10 Virtual Machine host on Windows XP
    Oracle 10.2.0 Standard Edition
    Primary DB host name: SE
    Standby DB host name: SE2
    archive dest = /export/home/oracle/archive (same on both machine)
    db file = /export/home/oracle/oradata/se , /export/home/oracle/oradata/se2 --> so I used db_file convert parameter in init.ora
    Steps:
    On the newly created database, create a test table and insert values.
    SQL> create table test(a number) tablespace users;
    Table created.
    SQL> insert into test values(&a);
    Enter value for a: 1
    old 1: insert into test values(&a)
    new 1: insert into test values(1)
    1 row created.
    SQL> /
    Enter value for a: 21
    old 1: insert into test values(&a)
    new 1: insert into test values(21)
    1 row created.
    SQL> /
    Enter value for a: 31
    old 1: insert into test values(&a)
    new 1: insert into test values(31)
    1 row created.
    SQL> /
    Enter value for a: 41
    old 1: insert into test values(&a)
    new 1: insert into test values(41)
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> alter system archive log current;
    System altered.
    SQL>
    $ ls -lrt
    total 41808
    -rw-r----- 1 oracle oinstall 21378048 Feb 24 15:52 1_2_711819574.dbf
    $
    Again, insert some values to test table,
    SQL> insert into test values(&a);
    Enter value for a: 33
    old 1: insert into test values(&a)
    new 1: insert into test values(33)
    1 row created.
    SQL> /
    Enter value for a: 44
    old 1: insert into test values(&a)
    new 1: insert into test values(44)
    1 row created.
    SQL> /
    Enter value for a: 55
    old 1: insert into test values(&a)
    new 1: insert into test values(55)
    1 row created.
    SQL> /
    Enter value for a: 11
    old 1: insert into test values(&a)
    new 1: insert into test values(11)
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> alter system archive log current;
    System altered.
    SQL> select * from test;
    A
    1
    21
    31
    41
    33
    44
    55
    11
    8 rows selected.
    check archivelog dir,
    $ ls -lrt
    total 41816
    -rw-r----- 1 oracle oinstall 21378048 Feb 24 15:52 1_2_711819574.dbf
    -rw-r----- 1 oracle oinstall 4096 Feb 24 15:55 1_3_711819574.dbf
    $
    Then,
    1. shutdown immediate (primary)
    SQL> shutdown immediate
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL>
    2. copy datafile, redo, archive log to SE2 node.
    $ pwd
    /export/home/oracle/oradata/se
    $ ls
    control01.ctl control03.ctl redo02.log sysaux01.dbf temp01.dbf users01.dbf
    control02.ctl redo01.log redo03.log system01.dbf undotbs01.dbf
    $ scp * [email protected]:/export/home/oracle/oradata/se2
    Password:
    control01.ctl 100% |******************************************************| 6896 KB 00:01
    control02.ctl 100% |******************************************************| 6896 KB 00:01
    control03.ctl 100% |******************************************************| 6896 KB 00:00
    redo01.log 100% |******************************************************| 51200 KB 00:09
    redo02.log 100% |******************************************************| 51200 KB 00:11
    redo03.log 100% |******************************************************| 51200 KB 00:08
    sysaux01.dbf 100% |******************************************************| 240 MB 00:54
    system01.dbf 100% |******************************************************| 480 MB 01:35
    temp01.dbf 100% |******************************************************| 20488 KB 00:04
    undotbs01.dbf 100% |******************************************************| 25608 KB 00:05
    users01.dbf 100% |******************************************************| 5128 KB 00:01
    $
    $ ls -lrt
    total 41816
    -rw-r----- 1 oracle oinstall 21378048 Feb 24 15:52 1_2_711819574.dbf
    -rw-r----- 1 oracle oinstall 4096 Feb 24 15:55 1_3_711819574.dbf
    $ scp 1_2_711819574.dbf [email protected]:/export/home/oracle/archive
    Password:
    1_2_711819574.dbf 100% |******************************************************| 20877 KB 00:04
    $
    3. startup (primary)
    4. create standby control file
    SQL> startup
    ORACLE instance started.
    Total System Global Area 167772160 bytes
    Fixed Size 1279120 bytes
    Variable Size 62917488 bytes
    Database Buffers 100663296 bytes
    Redo Buffers 2912256 bytes
    Database mounted.
    Database opened.
    SQL> alter database create standby controlfile as '/export/home/oracle/standby.ctl';
    Database altered.
    5. copy standby control file to SE2
    $ pwd
    /export/home/oracle
    $ scp standby.ctl [email protected]:/export/home/oracle
    Password:
    standby.ctl 100% |******************************************************| 6896 KB 00:01
    $
    6. edit init.ora, specify location of control file - use standby control file
    *.control_files='/export/home/oracle/standby.ctl'
    7. SE2,
    SQL> startup nomount pfile=/export/home/oracle/product/10.2.0/db_1/dbs/initse.ora
    ORACLE instance started.
    Total System Global Area 167772160 bytes
    Fixed Size 1279120 bytes
    Variable Size 62917488 bytes
    Database Buffers 100663296 bytes
    Redo Buffers 2912256 bytes
    8. alter database mount standby database;
    SQL> alter database mount standby database;
    Database altered.
    SQL>
    9. we'll try to open as read only without recovery,
    SQL> alter database open read only;
    alter database open read only
    ERROR at line 1:
    ORA-16004: backup database requires recovery
    ORA-01152: file 1 was not restored from a sufficiently old backup
    ORA-01110: data file 1: '/export/home/oracle/oradata/se2/system01.dbf'
    10. then, we recover by - recover standby database;
    SQL> recover standby database;
    ORA-00279: change 540274 generated at 02/24/2010 15:58:26 needed for thread 1
    ORA-00289: suggestion : /export/home/oracle/archive/1_4_711819574.dbf
    ORA-00280: change 540274 for thread 1 is in sequence #4
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    auto
    ORA-00308: cannot open archived log
    '/export/home/oracle/archive/1_4_711819574.dbf'
    ORA-27037: unable to obtain file status
    Intel SVR4 UNIX Error: 2: No such file or directory
    Additional information: 3
    ORA-00308: cannot open archived log
    '/export/home/oracle/archive/1_4_711819574.dbf'
    ORA-27037: unable to obtain file status
    Intel SVR4 UNIX Error: 2: No such file or directory
    Additional information: 3
    ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
    ORA-01152: file 1 was not restored from a sufficiently old backup
    ORA-01110: data file 1: '/export/home/oracle/oradata/se2/system01.dbf'
    <observation> notice that archive log 4 is not yet present in Primary DB and STBY DB.
    Question: Why Oracle is asking archivelog that does not exist? I noticed in other exercise that you can use the redo log instead of archive log that does not exist. Is this because when we create the standby control file, the SCN is in sync with redo log.
    10. Now, we will copy archive log 3 to STDB,
    $ cd archive
    $ ls
    1_2_711819574.dbf 1_3_711819574.dbf
    $ scp 1_3_*711819574.dbf [email protected]:/export/home/oracle/archive
    Password:
    1_3_711819574.dbf 100% |******************************************************| 4096 00:00
    $
    11. on SE2, recover
    SQL> recover automatic standby database until cancel;
    ORA-00279: change 540274 generated at 02/24/2010 15:58:26 needed for thread 1
    ORA-00289: suggestion : /export/home/oracle/archive/1_4_711819574.dbf
    ORA-00280: change 540274 for thread 1 is in sequence #4
    ORA-00278: log file '/export/home/oracle/archive/1_4_711819574.dbf' no longer
    needed for this recovery
    ORA-00308: cannot open archived log
    '/export/home/oracle/archive/1_4_711819574.dbf'
    ORA-27037: unable to obtain file status
    Intel SVR4 UNIX Error: 2: No such file or directory
    Additional information: 3
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    cancel
    ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
    ORA-01152: file 1 was not restored from a sufficiently old backup
    ORA-01110: data file 1: '/export/home/oracle/oradata/se2/system01.dbf'
    ORA-01112: media recovery not started
    12. Now, to generate the archivelog 4 and get the SCN that is indicated above, from one of our redo log. we will go to PRIMARY DB, and insert some rows to TEST TABLE and switch log file.
    SQL>
    SQL> insert into test values(&a);
    Enter value for a: 99
    old 1: insert into test values(&a)
    new 1: insert into test values(99)
    1 row created.
    SQL> /
    Enter value for a: 100
    old 1: insert into test values(&a)
    new 1: insert into test values(100)
    1 row created.
    SQL> /
    Enter value for a: 101
    old 1: insert into test values(&a)
    new 1: insert into test values(101)
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> alter system switch logfile;
    System altered.
    $ ls -lrt
    total 42568
    -rw-r----- 1 oracle oinstall 21378048 Feb 24 15:52 1_2_711819574.dbf
    -rw-r----- 1 oracle oinstall 4096 Feb 24 15:55 1_3_711819574.dbf
    -rw-r----- 1 oracle oinstall 376832 Feb 24 16:28 1_4_711819574.dbf
    13. We will again, switch logfile, to generate archive 5, before we copied archive 4 to STBY, we are sure that arch 5 is the active archivelog.
    SQL> alter system switch logfile;
    System altered.
    SQL> exit
    Disconnected from Oracle Database 10g Release 10.2.0.2.0 - Production
    $ ls -lrt
    total 42570
    -rw-r----- 1 oracle oinstall 21378048 Feb 24 15:52 1_2_711819574.dbf
    -rw-r----- 1 oracle oinstall 4096 Feb 24 15:55 1_3_711819574.dbf
    -rw-r----- 1 oracle oinstall 376832 Feb 24 16:28 1_4_711819574.dbf
    -rw-r----- 1 oracle oinstall 1024 Feb 24 16:31 1_5_711819574.dbf
    $
    14. copy archive log 4 to STBY (SE2)
    $ scp 1_4_711819574.dbf [email protected]:/export/home/oracle/archive
    Password:
    1_4_711819574.dbf 100% |********************************************| 368 KB 00:00
    $
    15. In SE2, recover
    SQL> recover automatic standby database until cancel;
    ORA-00279: change 540985 generated at 02/24/2010 16:28:36 needed for thread 1
    ORA-00289: suggestion : /export/home/oracle/archive/1_5_711819574.dbf
    ORA-00280: change 540985 for thread 1 is in sequence #5
    ORA-00278: log file '/export/home/oracle/archive/1_5_711819574.dbf' no longer
    needed for this recovery
    ORA-00308: cannot open archived log
    '/export/home/oracle/archive/1_5_711819574.dbf'
    ORA-27037: unable to obtain file status
    Intel SVR4 UNIX Error: 2: No such file or directory
    Additional information: 3
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    cancel
    Media recovery cancelled.
    15. Now let's see if we can open as read only and check test table.
    SQL> alter database open read only;
    Database altered.
    SQL> select * from test;
    A
    1
    21
    31
    41
    33
    44
    55
    11
    99
    100
    101
    11 rows selected.
    16. Now shutdown STBY database,
    SQL> shutdown immediate
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL>
    17. On SE (PRIMARY), insert some records to TEST table, please take note that current archivelog is no. 5. We want to generate archivelog 6 and archivelog 7. Then only archivelog 5 and 6 will be copied to STBY.
    SQL> insert into test values(&a);
    Enter value for a: 1000
    old 1: insert into test values(&a)
    new 1: insert into test values(1000)
    1 row created.
    SQL> /
    Enter value for a: 1001
    old 1: insert into test values(&a)
    new 1: insert into test values(1001)
    1 row created.
    SQL> /
    Enter value for a: 1002
    old 1: insert into test values(&a)
    new 1: insert into test values(1002)
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> alter system archive log current;
    System altered.
    SQL> exit
    Disconnected from Oracle Database 10g Release 10.2.0.2.0 - Production
    $ ls -lrt
    total 42632
    -rw-r----- 1 oracle oinstall 21378048 Feb 24 15:52 1_2_711819574.dbf
    -rw-r----- 1 oracle oinstall 4096 Feb 24 15:55 1_3_711819574.dbf
    -rw-r----- 1 oracle oinstall 376832 Feb 24 16:28 1_4_711819574.dbf
    -rw-r----- 1 oracle oinstall 1024 Feb 24 16:31 1_5_711819574.dbf
    -rw-r----- 1 oracle oinstall 31744 Feb 24 16:41 1_6_711819574.dbf
    we will do, log switch to create archive log 7,
    SQL> alter system switch logfile;
    System altered.
    SQL> exit
    Disconnected from Oracle Database 10g Release 10.2.0.2.0 - Production
    $ ls -lrt
    total 42634
    -rw-r----- 1 oracle oinstall 21378048 Feb 24 15:52 1_2_711819574.dbf
    -rw-r----- 1 oracle oinstall 4096 Feb 24 15:55 1_3_711819574.dbf
    -rw-r----- 1 oracle oinstall 376832 Feb 24 16:28 1_4_711819574.dbf
    -rw-r----- 1 oracle oinstall 1024 Feb 24 16:31 1_5_711819574.dbf
    -rw-r----- 1 oracle oinstall 31744 Feb 24 16:41 1_6_711819574.dbf
    -rw-r----- 1 oracle oinstall 1024 Feb 24 16:42 1_7_711819574.dbf
    Then copy, arc 5 and arc 6 to SE2 (STBY)
    $ scp 1_5_711819574.dbf 1_6_711819574.dbf [email protected]:/export/home/oracle/archive
    Password:
    1_5_711819574.dbf 100% |*********************************************************| 1024 00:00
    1_6_711819574.dbf 100% |*********************************************************| 31744 00:00
    $
    17. in SE2, recover
    SQL> startup nomount pfile=/export/home/oracle/product/10.2.0/db_1/dbs/initse.ora
    ORACLE instance started.
    Total System Global Area 167772160 bytes
    Fixed Size 1279120 bytes
    Variable Size 62917488 bytes
    Database Buffers 100663296 bytes
    Redo Buffers 2912256 bytes
    SQL> alter database mount standby database;
    Database altered.
    SQL> recover automatic standby database until cancel;
    ORA-00279: change 541270 generated at 02/24/2010 16:41:26 needed for thread 1
    ORA-00289: suggestion : /export/home/oracle/archive/1_7_711819574.dbf
    ORA-00280: change 541270 for thread 1 is in sequence #7
    ORA-00278: log file '/export/home/oracle/archive/1_7_711819574.dbf' no longer
    needed for this recovery
    ORA-00308: cannot open archived log
    '/export/home/oracle/archive/1_7_711819574.dbf'
    ORA-27037: unable to obtain file status
    Intel SVR4 UNIX Error: 2: No such file or directory
    Additional information: 3
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    cancel
    Media recovery cancelled.
    18. open as read only, to check if the newly inserted records can be view,
    SQL> alter database open read only;
    Database altered.
    SQL> select * from test;
    A
    1
    21
    31
    41
    33
    44
    55
    11
    99
    100
    101
    A
    1000
    1001
    1002
    14 rows selected.
    OK, that means that archive log 5 and archivelog 6 are applied to STBY database.
    Question. Why Oracle is asking the arc 7 , is it correct to say that last SCN is based on arc 5 and arc 6. Or is it Oracle behavior to ask the "next" SCN, after the arc 6. when performing recovery? ... that's why we have CANCEL.
    Appreciate your response on this..
    Thanks..
    19. For the sake of curiosity, lets try if we can use - recover managed standby database; (archivelog is still manually copied)
    on SE2, we will put it on "recovery mode"
    shutdown immediate,
    startup nomount pfile =
    alter database mount standby database
    recover managed standby database; (though the archivelogs are still copied manually )
    SQL> shutdown immediate
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL> startup nomount pfile=/export/home/oracle/product/10.2.0/db_1/dbs/initse.ora
    ORACLE instance started.
    Total System Global Area 167772160 bytes
    Fixed Size 1279120 bytes
    Variable Size 62917488 bytes
    Database Buffers 100663296 bytes
    Redo Buffers 2912256 bytes
    SQL> alter database mount standby database;
    Database altered.
    SQL> recover managed standby database; (it will "hang", if you need to CANCEL open new session and use - recover managed standby database cancel)
    our current arch is 7, we will insert records to test table, and generate arch 8 and arch 9, then we will transfer arch 7 and arch 8 to SE2,
    on SE,
    Connected to:
    Oracle Database 10g Release 10.2.0.2.0 - Production
    SQL> insert into test values(&a);
    Enter value for a: 2000
    old 1: insert into test values(&a)
    new 1: insert into test values(2000)
    1 row created.
    SQL> /
    Enter value for a: 2001
    old 1: insert into test values(&a)
    new 1: insert into test values(2001)
    1 row created.
    SQL> /
    Enter value for a: 2003
    old 1: insert into test values(&a)
    new 1: insert into test values(2003)
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> alter system archive log current;
    System altered.
    SQL> alter system switch logfile;
    System altered.
    SQL> exit
    Disconnected from Oracle Database 10g Release 10.2.0.2.0 - Production
    $ pwd
    /export/home/oracle/archive
    $ ls -lrt
    total 45758
    -rw-r----- 1 oracle oinstall 21378048 Feb 24 15:52 1_2_711819574.dbf
    -rw-r----- 1 oracle oinstall 4096 Feb 24 15:55 1_3_711819574.dbf
    -rw-r----- 1 oracle oinstall 376832 Feb 24 16:28 1_4_711819574.dbf
    -rw-r----- 1 oracle oinstall 1024 Feb 24 16:31 1_5_711819574.dbf
    -rw-r----- 1 oracle oinstall 31744 Feb 24 16:41 1_6_711819574.dbf
    -rw-r----- 1 oracle oinstall 1024 Feb 24 16:42 1_7_711819574.dbf
    -rw-r----- 1 oracle oinstall 1584640 Feb 24 17:02 1_8_711819574.dbf
    -rw-r----- 1 oracle oinstall 2048 Feb 24 17:02 1_9_711819574.dbf
    $
    $ scp 1_7_711819574.dbf 1_8_711819574.dbf [email protected]:/export/home/oracle/archive
    Password:
    1_7_711819574.dbf 100% |*********************************************************| 1024 00:00
    1_8_711819574.dbf 100% |*********************************************************| 1547 KB 00:00
    $
    Please take note that in SE2 initse.ora file, we also set standby_control_file = /export/home/oracle/archive parameter.
    19. On SE2, open new session, and cancel recovery,
    session 2,
    SQL> recover managed standby database cancel;
    Media recovery complete.
    SQL>
    session 1,
    SQL> recover managed standby database;
    ORA-16043: managed recovery session canceled
    ORA-16037: user requested cancel of managed recovery operation
    Lets check if archivelog is applied, by checking test table,
    SQL> alter database open read only;
    Database altered.
    SQL> select * from test;
    A
    1
    21
    31
    41
    33
    44
    55
    11
    99
    100
    101
    A
    1000
    1001
    1002
    14 rows selected.
    Notice that 2000, 2001, 2002 are not added in TEST table.
    Lets do manual recovery,
    SQL> startup nomount pfile=/export/home/oracle/product/10.2.0/db_1/dbs/initse.ora
    ORACLE instance started.
    Total System Global Area 167772160 bytes
    Fixed Size 1279120 bytes
    Variable Size 62917488 bytes
    Database Buffers 100663296 bytes
    Redo Buffers 2912256 bytes
    SQL> alter database mount standby database;
    Database altered.
    SQL> recover automatic standby database until cancel;
    ORA-00279: change 541804 generated at 02/24/2010 17:02:34 needed for thread 1
    ORA-00289: suggestion : /export/home/oracle/archive/1_9_711819574.dbf
    ORA-00280: change 541804 for thread 1 is in sequence #9
    ORA-00278: log file '/export/home/oracle/archive/1_9_711819574.dbf' no longer
    needed for this recovery
    ORA-00308: cannot open archived log
    '/export/home/oracle/archive/1_9_711819574.dbf'
    ORA-27037: unable to obtain file status
    Intel SVR4 UNIX Error: 2: No such file or directory
    Additional information: 3
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    cancel
    Media recovery cancelled.
    SQL> select * from test;
    select * from test
    ERROR at line 1:
    ORA-01219: database not open: queries allowed on fixed tables/views only
    SQL> alter database open read only;
    Database altered.
    SQL> select * from test;
    A
    1
    21
    31
    41
    33
    44
    55
    11
    99
    100
    101
    A
    1000
    1001
    1002
    2000
    2001
    2003
    17 rows selected.

  • RMAN Restore on Test DB Fails - ORA-01152:file 1 was not restored from blah

    Calling all RMAN Gurus!
    I'm having trouble recovering an RMAN backup on my test DB server. Please Help!
    Solaris 10/Oracle 10.2.0.4 Standard Edition (Both Servers)
    Part one - Step by Step
    Primary Server
    1. Perform full backup: backup database plus archivelog;
    2. Copy Backupset & Controlfile to test server: "RSYNC/NFS Mount"
    Test Server
    1. rman target /
    2. startup nomount;
    3. restore controlfile blah blah
    4. alter database mount;
    5. catalog backuppiece
    6. restore database; - no issues
    *7. recover database noredo; - no issues*
    *8. alter database open resetlogs;*
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of alter db command at 09/09/2009 08:48:22
    ORA-01152: file 1 was not restored from a sufficiently old backup
    ORA-01110: data file 1: '/data/oracle/oradata/planodb/system01.dbf'
    All is good until I try and open the database. What am I missing?? Why doesn't this work???
    Because .... If I go through the exact steps but I perform a "recover database" instead of "recover database noredo", I can open the database!!!
    Example :
    6. restore database; no issues
    7. recover database;
    Starting recover at 09-SEP-09
    using channel ORA_DISK_1
    starting media recovery
    channel ORA_DISK_1: starting archive log restore to default destination
    channel ORA_DISK_1: restoring archive log
    archive log thread=1 sequence=34
    channel ORA_DISK_1: reading from backup piece /data/oracle/orabase/backup/backup
    set/2009_09_09/o1_mf_annnn_BACKUP_PLANODB_000_0_5bgkffqq_.bkp
    channel ORA_DISK_1: restored backup piece 1
    piece handle=/data/oracle/orabase/backup/backupset/2009_09_09/o1_mf_annnn_BACKUP
    PLANODB000_0_5bgkffqq_.bkp tag=BACKUP_PLANODB_000_090909010005*
    channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
    archive log filename=/data/oracle/oradata/arch/PLANODB/archivelog/2009_09_09/o1_
    mf_1_34_5bhdkwd4_.arc thread=1 sequence=34
    channel default: deleting archive log(s)
    archive log filename=/data/oracle/oradata/arch/PLANODB/archivelog/2009_09_09/o1_
    mf_1_34_5bhdkwd4_.arc recid=42 stamp=697106925
    unable to find archive log
    archive log thread=1 sequence=35
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of recover command at 09/09/2009 08:48:52
    RMAN-06054: media recovery requesting unknown log: thread 1 seq 35 lowscn 1425007
    This is ok because seq 35 doesn't actually exist!
    8. alter database open resetlogs;
    database opened!

    You could also explore the UNTIL clause of the RECOVER DATABASE command to specify Recovery until a specific Log, SCN or Timestamp.
    Since you are cloning a Hot Backup to another server the Recovery has to be an Incomplete Recovery. So, it will be to a Log, SCN or Timestamp -- either of which you could also explicitly specify with the UNTIL clause.
    Hemant K Chitale
    http://hemantoracledba.blogspot.com

  • Retore a backup from RAC to Standard Edition

    Hi,
    We have a production environment with a 2 nodes RAC 11g.
    This environment is secured with a RMAN backup startegy.
    Could we restore the backup to a single node Oracle Standard Edition 11g database?
    Best regards,
    Sébastien

    So I would be careful, this metalink has a list of differences between EE and SE:
    Differences Between Enterprise, Standard and Personal Editions on Oracle 11.1
    Doc ID: NOTE:465460.1
    If you use EE options and features, you cannot have these in the restored SE instance.
    Werner

  • Migration from Enterprise edition to Standard Edition

    Hi,
    DB version :10.2.0.4 (production database)
    OS version :windows 2003 Std edition 64 bit.
    how to migrate database from enterprise edition to standard edition.
    1)cold backup will be sufficient?
    or any way to migrate with best way> will be any impact after migrating.
    will be appreciated fro right answers.
    Thanks

    hi sb,
    Thanks for your response.
    1)i did clone database from enterprise edition to standard edition, no invalid objects found ( from production to development)
    2) i did restoration using RMAN backupsets from ENterprise edition to standard edition , no invalid objects found (from production to development)
    3) i did cold backup from enterprise edition to standard edition , no invalid objects found ( test machine)
    i already checked this before, but here mentioned as to use traditional export / import instead of expdp/impdp. ?
    Thanks

  • RMAN Restore on new host

    Hey, I am trying to create a manual standby using this metalink article:
    Alternative for standby database in standard edition [ID 333749.1]
    First I create a hotbackup from my rac configuration
    then
    SQL>alter database backup controlfile to '/tmp/standby.ctl';
    copy all over to the standby database.
    startup nomount pfile=init<sid>.ora
    alter database mount
    --> rman target /
    restore database --> all files are getting restored.
    Then I try to recover the database by applying the archivelogs - thats not working.
    I added the archivelog backup to the rman --> start catalog with '/tmp/.......'
    Both configurations are using ASM: diskgroup DATA & RECO
    So no file name convert neccessary
    Any ideas whats wrong ?
    Now I get these messages
    QL> recover database using backup controlfile until cancel;
    ORA-00279: Anderung 1079665, erstellt von 02/15/2011 13:26:56. Erforderlich fur
    Thread 1
    ORA-00289: Vorschlag: +RECO
    ORA-00280: Anderung 1079665 fur Thread 1 in Sequenz #53
    Log angeben: {<RET>=suggested | filename | AUTO | CANCEL}
    AUTO
    ORA-00308: Archiviertes Log '+RECO' kann nicht geoffnet werden
    ORA-17503: ksfdopn:2 konnte Datei +RECO nicht offnen
    ORA-15045: ASM-Dateiname "+RECO" hat nicht das Format fur Referenzen
    ORA-00308: Archiviertes Log '+RECO' kann nicht geoffnet werden
    ORA-17503: ksfdopn:2 konnte Datei +RECO nicht offnen
    ORA-15045: ASM-Dateiname "+RECO" hat nicht das Format fur Referenzen
    Chris

    I added the archivelog backup to the rman --> start catalog with '/tmp/.......'but 'recover database using backup controlfile until cancel;' is a command issued in sqlplus,'catalog' does not apply.
    The controlfile expects the archivelogs in diskgroup +RECO, but these are physically located under /tmp.
    When prompted you have to provide these logfiles from /tmp, this has to be done manually. After the last available archivelog,stop with 'cancel'.
    Werner

  • Focus issue with CardLayout (Java 2 SDK, Standard Edition 1.4.0_01)

    I am having an issue with focus and CardLayout with Java 2 SDK, Standard Edition 1.4.0_01. I have created a small sample application to illustrate my problem. In general, I am trying to create a "Wizard" that the user will enter information and then press a "Next" button to proceed to the next step.
    When the first card is displayed, the focus is on the first text field as expected.
    When I go to the next card by clicking "Next", the focus is not on the text field that has requested it (through the requestFocusInWindow method). The focus is on the "Cancel" button, which is the next component to receive focus after the "Next" button on that panel. I do notice that if I use my mouse to bring focus to the window the text field will gain focus.
    Similarly, when I proceed to the last card, the focus is not on the "Finish" button until the mouse moves over the window.
    Is there something I am doing wrong or is there a bug with focus and CardLayout?
    One other problem I have noticed is that the buttons no longer respond to the "Enter" key press and instead respond to the space bar. Any suggestions as to why this is the case?
    Thanks,
    S.L.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class CardWindow extends JFrame implements ActionListener {
    public CardWindow() {       
    setTitle("Focus Problems with CardLayout");
    setDefaultCloseOperation(EXIT_ON_CLOSE);
    cards = new JPanel();
    cardLayout = new CardLayout();
    cards.setLayout(cardLayout);
    cards.add(createFirstNamePanel(), "FirstNamePanel");
    cards.add(createLastNamePanel(), "LastNamePanel");
    cards.add(createFullNamePanel(), "FullNamePanel");
    getContentPane().add(cards,BorderLayout.CENTER);
    getContentPane().add(createButtonPanel(), BorderLayout.SOUTH);
    resetButtonPanel();
    pack();
    private JPanel createFirstNamePanel() {
    JPanel panel = new JPanel();
    JLabel lblDescriptionProjectName = new JLabel("Please enter your first name:");
    txtFirstName = new JTextField(20);
    panel.add(lblDescriptionProjectName);
    panel.add(txtFirstName);
    return panel;
    private JPanel createLastNamePanel() {
    JPanel panel = new JPanel();
    JLabel lblDescriptionProjectName = new JLabel("Please enter your last name:");
    txtLastName = new JTextField(20);
    panel.add(lblDescriptionProjectName);
    panel.add(txtLastName);
    return panel;
    private JPanel createFullNamePanel(){
    JPanel panel = new JPanel();
    lblFullName = new JLabel();
    resetTextOnFullNamePanel();
    panel.add(lblFullName);
    return panel;
    private JPanel createButtonPanel() {
    buttonPanel = new JPanel();
    btnPrevious = new JButton("< " + "Back");
    btnPrevious.setMnemonic('B');
    btnPrevious.addActionListener(this);
    btnNext = new JButton("Next" + " >");
    btnNext.setMnemonic('N');
    btnNext.addActionListener(this);
    btnCancel = new JButton("Cancel");
    btnCancel.setMnemonic('C');
    btnCancel.addActionListener(this);
    btnFinish = new JButton("Finish");
    btnFinish.setMnemonic('F');
    btnFinish.addActionListener(this);
    buttonPanel.add(btnPrevious);
    buttonPanel.add(btnNext);
    buttonPanel.add(btnCancel);
    buttonPanel.add(btnFinish);
    return buttonPanel;
    private void resetTextOnFullNamePanel(){
    lblFullName.setText("Your name is: " + getFirstName() + " " + getLastName());
    private void resetButtonPanel(){
    Component c[] = buttonPanel.getComponents();
    for(int i = 0; i < c.length; i++){
    c.setVisible(false);
    switch(iWizardStep){
    case FIRSTNAMEPANEL:
    btnPrevious.setVisible(true);
    btnNext.setVisible(true);
    btnCancel.setVisible(true);
    break;
    case LASTNAMEPANEL:
    btnPrevious.setVisible(true);
    btnNext.setVisible(true);
    btnCancel.setVisible(true);
    break;
    case FULLNAMEPANEL:
    btnFinish.setVisible(true);
    break;
    buttonPanel.validate();
    public void actionPerformed(ActionEvent e) {
    Object object = e.getSource();
    if (object == btnNext) {           
    btnNextPressed();
    } else if (object == btnPrevious) {           
    btnPreviousPressed();
    } else if (object == btnFinish) {
    System.exit(0);
    } else if (object == btnCancel) {
    System.exit(0);
    private void btnNextPressed() {       
    switch (iWizardStep) {
    case FIRSTNAMEPANEL:
    setFirstName(txtFirstName.getText());
    break;
    case LASTNAMEPANEL:
    setLastName(txtLastName.getText());
    resetTextOnFullNamePanel();
    break;
    iWizardStep++;
    resetButtonPanel();
    this.cardLayout.next(this.cards);
    switch (iWizardStep) {             
    case LASTNAMEPANEL:
    txtLastName.requestFocusInWindow();
    break;
    case FULLNAMEPANEL:
    btnFinish.requestFocusInWindow();
    break;
    private void btnPreviousPressed() {
    iWizardStep--;
    resetButtonPanel();
    this.cardLayout.previous(this.cards);
    public void setFirstName(String value) {
    firstName = value;
    public String getFirstName() {
    return firstName;
    public void setLastName(String value) {
    lastName = value;
    public String getLastName() {
    return lastName;
    public static void main (String[] args) {
    CardWindow c = new CardWindow();
    c.show();
    private CardLayout cardLayout;
    private JPanel cards, buttonPanel;
    private JTextField txtLastName, txtFirstName;
    private JLabel lblFullName;
    private JButton btnNext, btnPrevious, btnCancel, btnFinish;
    private String firstName = "";
    private String lastName = "";
    private int iWizardStep = 0;
    private static final int FIRSTNAMEPANEL = 0;
    private static final int LASTNAMEPANEL = 1;
    private static final int FULLNAMEPANEL = 2;

    Manfred,
    Thanks for your reply. I tried requestFocus() and it gives the same results. Also Sun's 1.4.0 API (http://java.sun.com/j2se/1.4/docs/api/) mentions the following with respect to the requestFocus() method in the JComponent class:
    Because the focus behavior of this method is platform-dependent, developers are strongly encouraged to use requestFocusInWindow when possible.
    That is why I used requestFocusInWindow.
    S.L.

  • Bug report, Beta 2.12 Standard Edition

    Bug report: redundant, confusing, and apparently erroneous calls to
    jdoPreClear
    and jdoPostLoad. Note in output the null name in the third iteration.
    Hi,
    A lot of information being sent. Sorry, but I think you'll find it
    helpful. I expected the exact same sequence of calls to jdoPreClear
    and jdoPostLoad on the 2nd and third iteration. In fact, since,
    retain values is true, and no changes are being made, I expected that
    jdoPreClear and jdoPostLoad would not be called at all on the 2nd and
    3rd iteration.
    David Ezzio
    Using 2.12 Beta, standard edition
    Business method uses one PM. Configured to datastore transaction,
    retainValues == true, non-TR == false, and non-TW == false.
    The business methods open a transaction and leave it open.
    The client calls commitTransaction() to close the open
    transaction.
    Two persistent objects, Widget and Box. Each implement
    InstanceCallbacks and put out a message in jdoPreClear ("will be
    made hollow") and in jdoPostLoad ("has been made persistent-clean").
    The Widget has a reference to its Box. The number in parenthesis
    is the sequence number obtained from the object ID.
    Business methods implementation:
    public ArrayList getWidgetsByName(String name)
    Transaction trans = pm.currentTransaction();
    if (!trans.isActive())
    trans.begin();
    Collection c = (Collection) widgetsByOneName.execute(name);
    ArrayList aList = new ArrayList(c);
    widgetsByOneName.close(c);
    return aList;
    public void commitTransaction()
    Transaction trans = pm.currentTransaction();
    if (trans.isActive())
    trans.commit();
    Output: from three loops that:
    call findWidgetsByName("Maxi-Widget")
    list the widgets returned
    call commitTransaction()
    finding Maxi-Widgets ...
    Widget Maxi-Widget (650) has been made persistent-clean
    Box Large (652) has been made persistent-clean
    Widget Maxi-Widget (650): Box Large (652) at location Top Shelf
    Widget Maxi-Widget (709) has been made persistent-clean
    Box Large (710) has been made persistent-clean
    Widget Maxi-Widget (709): Box Large (710) at location Middle Shelf
    Widget Maxi-Widget (708) has been made persistent-clean
    Box Large (713) has been made persistent-clean
    Widget Maxi-Widget (708): Box Large (713) at location Top Shelf
    Widget Maxi-Widget (700) has been made persistent-clean
    Box Large (717) has been made persistent-clean
    Widget Maxi-Widget (700): Box Large (717) at location Top Shelf
    Widget Maxi-Widget (707) has been made persistent-clean
    Box Large (716) has been made persistent-clean
    Widget Maxi-Widget (707): Box Large (716) at location Top Shelf
    Finding them again
    finding Maxi-Widgets ...
    Widget Maxi-Widget (650) will be made hollow
    Widget Maxi-Widget (650): Box Large (652) at location Top Shelf
    Widget Maxi-Widget (709) will be made hollow
    Widget Maxi-Widget (709): Box Large (710) at location Middle Shelf
    Widget Maxi-Widget (708) will be made hollow
    Widget Maxi-Widget (708): Box Large (713) at location Top Shelf
    Widget Maxi-Widget (700) will be made hollow
    Widget Maxi-Widget (700): Box Large (717) at location Top Shelf
    Widget Maxi-Widget (707) will be made hollow
    Widget Maxi-Widget (707): Box Large (716) at location Top Shelf
    Finding them yet again
    finding Maxi-Widgets ...
    Widget null (650) will be made hollow
    Widget Maxi-Widget (650) has been made persistent-clean
    Widget Maxi-Widget (650): Box Large (652) at location Top Shelf
    Widget null (709) will be made hollow
    Widget Maxi-Widget (709) has been made persistent-clean
    Widget Maxi-Widget (709): Box Large (710) at location Middle Shelf
    Widget null (708) will be made hollow
    Widget Maxi-Widget (708) has been made persistent-clean
    Widget Maxi-Widget (708): Box Large (713) at location Top Shelf
    Widget null (700) will be made hollow
    Widget Maxi-Widget (700) has been made persistent-clean
    Widget Maxi-Widget (700): Box Large (717) at location Top Shelf
    Widget null (707) will be made hollow
    Widget Maxi-Widget (707) has been made persistent-clean
    Widget Maxi-Widget (707): Box Large (716) at location Top Shelf
    -- All done!

    Due to better understanding on my part, and the fixes in Beta 2.2, the
    issues raised in this thread are put to rest.
    Abe White wrote:
    >
    We'll investigate further. Stay tuned...
    "David Ezzio" <[email protected]> wrote in message
    news:[email protected]..
    Abe,
    Actually, it doesn't make sense. The first iteration shows
    jdoPostLoad is called just prior to using the fields of Widget and Box.
    After the commit, the instances are not cleared. So far, so good.
    In the second iteration, we see that jdoPreClear is called, but
    jdoPostLoad is not called. Yet the values are there for use during the
    call to Widget.toString() and Box.toString() within the iteration. How
    did that happen?
    On the third iteration, now the value of name is null, but last we
    looked it was available in the second iteration. Other than that, I
    agree that the third iteration looks ok, since it is being cleared and
    loaded prior to use. But in the jdoPreClear, the values should be there
    since the values were used in the previous iteration and are not cleared
    at transaction commit due to retainValues == true.
    David
    Abe White wrote:
    David --
    I believe the behavior you are seeing to be correct. Section 5.6.1 of
    the
    JDO spec outlines the behavior of persistent-nontransactional instancesused
    with data store transactions. As you can see, persistentnon-transactional
    instances are cleared when they enter a transaction; thus the calls to
    jdoPreClear. When the default fetch group is loaded again (like whenyou
    access the name of the widget) a call to jdoPostLoad is made.
    You are seeing the name of one instance as 'null' in the third iterationof
    your loop because the instance has been cleared in the second iteration,and
    the jdoPreClear method is not modified by the enhancer (see section10.3).
    Make sense?

Maybe you are looking for