Scope of GUI instances

OK so I am writing a Swing application for a law firm that they are going to be running on a virtual desktop that is on one of their main servers, so with that being said I want to make sure I'm as memory efficient as possible. So, here's my question: when does this object (a "ConfigureUI" object) go out of scope (really when is it available for the garbage collector).
configure.addActionListener(new ActionListener()
            public void actionPerformed(ActionEvent ae)
                      new ConfigureUI();
       });The ConfigureUI is a JFrame subclass that when finishes calls setVisible(false) on itself.
Does this set visible allow the object to go out of scope (and be available to the garbage collector) at any time, or does it keep an anonymous, uncallable object in memory?

The "new ConfigureUI();" is not the problem i think.
It is the actionlistener attached to the button.
There are some very good article to find concerning WeakActionListener, try to google it. sample
I'm fighting myself with this issues, and it is hard to understand.
GC only collect object with no references, so my guess is NO, it will not be garbage collected.
Use a memprofiler to see for your self.
[using jhat, standard java, page 67|http://java.sun.com/j2se/1.5/pdf/jdk50_ts_guide.pdf]
Edited by: Jason.Donovan on Aug 11, 2009 12:33 AM

Similar Messages

  • Stateless Bean - scope of instance variable in EJB Timer call back function

    Hi,
    I would like to know on the scope of an instance variable of a Stateless Bean object,
    when used in a EJB Timer call back.Let me explain this in more detail below.
    I have a requirement to use a EJB Timer.
    For this, I have created a stateless object since Timer creation needs to be done
    from a stateless bean. I have a member variable "count" of the stateless bean class.
    In the timer call back(ejbTimeout), I am able to use this count variable during
    each time of the call back, and the value of this variable is also updated properly.
    I have a few queries with respect to the above behaviour:
    1) Does stateless bean object not get destroyed once the Timer is created from the Bean?
    2) If the Bean object is not destroyed, then when does the bean object get destroyed?
    3) If both (1) and (2) are not true, then can anyone explain on how the above behaviour is possible?
    Thanks in advance,
    Ulrich

    Hi Ulrich,
    The ejb timer is associated with the stateless session bean component, not with a particular bean instance. There is no formal relationship between the bean instance that called createTimer() and the bean instance on which the timer callback happens. If they're the same in your test run that's just a coincidence and not something your application should be depending on.
    In the stateless session bean model, the container can create and destroy stateless session bean instances at any time. The container is free to pick any stateless session bean instance to service any client invocation or timer callback. If you need to pass context into a timer callback, one way to do it is via the timer "info" object. However, the info object is immutable so it wouldn't be a good match for a counter. You could of course always just use a database for any necessary coordinated state.
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Method Scope variables controls Multi-Threading !

    Hye there Experts !
    First, let me thank you all for such a brain-stuff sharing around; feel nice to be a part here.
    While browsing through the below article, found something confusing...kindly clarify.
    http://www.javaworld.com/javaworld/jw-07-2004/jw-0712-threadsafe.html?page=1
    Extract from the above discussion I understand :
    when a variable is moved to method scope instead of instance scope, synchronization is achieved.
    How is this true for servlets ???
    Method scope variables are available only during method call I think...here, since this is a servlet, there will be only one instance and if many (lets say 10) requests hits this servlet object, all these threads will read same counter as all of them enter into this only one method of this object,
    so...this should be still not thread safe I guess.
    I didn't want to execute and see results of this code, but I am trying to understand the key at first.
    Please guide me before brain blows... :-)
    Would also appreciate any references that really says true things about
    'synchronization for enterprize (handle huge requests) web apps - technques for servlets and any other stuff'
    Thanks again guys, have a wonderful time.

    feel nice to be a part here.Welcome to the mad-house ;-)
    Method scope variables are available only during method callWARNING: I'm no guru, so this may be misleading or just plain wrong.. but as I understand it:
    Yep a "local" variable exists only the context of the execution of it's containing method... so a local variable is implicitly bound to the thread that created it (by invoking the method in which the local is declared)... a local variable can't be accessed directly by another thread simply because the other thread has no access-path to the variable (you can't expose a local through getters & setters)... hence locals are thread safe.
    The important bit is that it's the thread which "owns" the local variable... not the declaring method... if the method is executed concurrently by two threads, each thread will have its own private copy of all the local variables.
    One other question though: are locals in static methods still thread safe? I'm not sure.
    package forums;
    class NonfinalLocalVariableInThreadTest
      public static void main(String[] args) {
        try {
          new Thread(new Runnable() {
            public void run() {
              System.out.println(args[0]);
          }).start();
        } catch (Exception e) {
          e.printStackTrace();
    compiler error
    C:\Java\home\src\forums>"C:\Program Files\Java\jdk1.6.0_07\bin\javac.exe" -Xlint -d c:\java\home\classes -cp c:\java\home\src;.;c:\java\home\classes c:\java\home\src\forums\NonfinalLocalVariableInThreadTest.java
    C:\Java\home\src\forums\NonfinalLocalVariableInThreadTest.java:9: local variable args is accessed from within inner class; needs to be declared final
              System.out.println(args[0]);
                                 ^
    1 error
    Output completed (0 sec consumed)

  • Instance is IDLE , please help

    Hi,
    Our junior DBA execute this command “alter system set sga_max_size=2000M scope=spfile;”
    Now instance is in idle state, how we can manually change this parameter in order to start our instance again .
    Thanks

    Faheem,
    With "idle" state, do you mean by that you are getting the message, "connected to idle instance" is it? if this is the case,there may be two things. One , your database is down means that your you have your db shutdown and needs to be restarted. The other reason could be that you are setting and trying to start a wrong instance. You may need to check back that whether a corrected sid is used or not?
    To change this parameter, while being on the idle state, you can create the pfile from the spfile and in that, you can edit this parameter manually.
    Issue this command while being inthe idle state,
    create pfile from spfile;This would create a pfile in the $OH/dbs folder(in unix) or $OH/database(in windows). Edit that file for the said parameter and restart db with this pfile.
    HTH
    Aman....

  • Adding a panel to an open GUI with a background image

    Dear java programmers,
    I want to add a JPanel with some components on an open(visible) GUI whenever a button is clicked. That JPanel carries a button, a progress bar, a label, and a textarea inside a scrollpane. Whenever the button of the panel is clicked a program starts working, and the progress and output of that program is reflected on the progress bar and textfield respectively. I 'put the code to generate and add the panel in a so called "Progress" class, which is different from the GUI class that contains the code to create and display the main gui.
    My gui also has a background image to make is look fancy, which is added by the following way:
    GUI mygui = new GUI();
    mygui.getContentPane().add(new ImagePanel(new ImageIcon("/home/thomas/Documents/external_placement/Report/presentation4_transp.png").getImage()));
    My problem is that the background image is hiding the panel (whenever added) and only when the cursor passes above the button inside the panel it becomes visible (just the button). However when I click the button and the program starts I can see everything inside the panel.
    Is there an efficient way of making the panel visible at once?
    thanks in advance,
    Tom

    Ok now that I'm certain about how to use code tags I'll try to make myself clear.
    First of all I made it work by removing the ImagePanel , adding the JPanel and re-adding ImagePanel, all from within the Progress.class. But I'm not sure if this is the right way.
    Below I'll make an attempt to provide some SSCCE--code. First of all the classes I'm using are 2, the GUI.class which contains all the components of the gui, and the Progress.class which has the additional panel and adds it to the gui whenever the "submit" button is clicked.
    The code from GUI.class which is relevant to this question is:
    public class GUI extends javax.swing.JFrame{
    //the following are declared as "protected" because they are also used elsewhere
                protected static GUI mygui = new GUI();
                protected static ImagePanel backgroundImagePanel = new ImagePanel(new ImageIcon("/home/thomas/Documents/external_placement/Report/presentation4_transp.png").getImage());
                /* The constructor */
                public GUI() {
            initComponents(); //this method initializes all the components, puts the in a JTabbedPane and packs them the JFrame
            setLayout(new BorderLayout());
        /* the eventlistener of the "submit" button */
        private void submitButtonActionPerformed(java.awt.event.ActionEvent evt) {
            ProgressBarTest pbt = new ProgressBarTest(mygui);
            pbt.StartProgress();
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    mygui.getContentPane().add(backgroundImagePanel);
                    mygui.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                    mygui.pack();
                    mygui.setVisible(true);
    } And then I have my Progress.class:
    public class Progress implements ActionListener, Runnable {
    //the following are declared as "private" because they are also used elsewhere inside the class
        private static javax.swing.JProgressBar progressBar = new JProgressBar(0, 100);
        private static javax.swing.JTextArea progressTextArea = new javax.swing.JTextArea(5,20);
        private static ProgressBarTest _this;
        {color:#0000ff}private static GUI mygui;{color}
        /* the constructor */
        public Progress(GUI gui){
            _this = this;
            {color:#0000ff}mygui = gui;{color}
        private static void createAndShowPanel(){
            javax.swing.JScrollPane progressScrollPane = new JScrollPane(progressTextArea);
            javax.swing.JLabel progressLabel = new JLabel("Progress");
            javax.swing.JButton progressButton = new JButton("Do something");
            progressButton.addActionListener(_this);
            javax.swing.JPanel progressPanel = new JPanel();
            javax.swing.GroupLayout progressPanelLayout = new javax.swing.GroupLayout(progressPanel);
            progressPanel.setLayout(progressPanelLayout);
            progressPanelLayout.setAutoCreateGaps(true);
            progressPanelLayout.setAutoCreateContainerGaps(true);
            progressPanelLayout.setHorizontalGroup(
                    progressPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(progressPanelLayout.createSequentialGroup()
                    .addContainerGap()
                    .addGroup(progressPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(progressScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 872, Short.MAX_VALUE)
                    .addComponent(progressBar, javax.swing.GroupLayout.DEFAULT_SIZE, 872, Short.MAX_VALUE)
                    .addComponent(progressLabel)
                    .addComponent(progressButton, javax.swing.GroupLayout.Alignment.TRAILING))
                    .addContainerGap())
            progressPanelLayout.setVerticalGroup(
                    progressPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, progressPanelLayout.createSequentialGroup()
                    .addContainerGap(25, Short.MAX_VALUE)
                    .addComponent(progressButton)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(progressLabel)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(progressBar, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(19, 19, 19)
                    .addComponent(progressScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 161, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap())
            javax.swing.GroupLayout layout = new javax.swing.GroupLayout({color:#0000ff}mygui.getContentPane(){color});
            {color:#0000ff}mygui.getContentPane().setLayout(layout);{color}
            layout.setHorizontalGroup(
                    layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                    .addContainerGap()
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(progressPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent{color:#0000ff}(mygui.jTabbedPane1{color}, javax.swing.GroupLayout.PREFERRED_SIZE, 496, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addContainerGap(100, Short.MAX_VALUE))
            layout.setVerticalGroup(
                    layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent({color:#0000ff}mygui.jTabbedPane1{color}, javax.swing.GroupLayout.PREFERRED_SIZE, 362, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(progressPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addContainerGap())
           {color:#0000ff} mygui.getContentPane().remove(mygui.backgroundImagePanel);
            mygui.getContentPane().add(progressPanel, BorderLayout.SOUTH);
            mygui.getContentPane().add(mygui.backgroundImagePanel);
            mygui.pack();{color}
        public static void StartProgress(){
            ProgressBarTest t = new ProgressBarTest({color:#0000ff}mygui{color});
            new Thread(t).start();
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    createAndShowPanel();
        public void actionPerformed(ActionEvent ae){
    // signal the worker thread to get crackin
            synchronized(this){notifyAll();}
    // worker thread
        public void run(){
            while(true){
    // wait for the signal from the GUI
                try{synchronized(this){wait();}} catch (InterruptedException e){}
                Dock dock = new Dock();
                int chainArrayLength = dock.PrepareDockEnvironment();
    // start a long-running process -this is a task performed by "Dock.class"
                for (int i = 0; i <= 100; i++){
                    progressBar.setValue(i*100/chainArrayLength);
                    progressTextArea.append("Docking chain No "i".\n");
                    System.out.println("actionPerformed sets progressBar value to: "+i);
                    dock.StartDocking(i);
    }Please notice how I use the GUI object (named "mygui") inside the Progress.class to retrieve components from the main gui (particularly the jTabbedPane1), align them with the additional panel (progressPanel) and add them to the main gui again. I tried to color blue the lines where the GUI instance is used but I'm not sure if they will be visible.
    My questions are:
    1. Is this the right way to add a new panel to a jFrame from an external class? Do I add jTabedPane twice in the above code?
    2. Is this the most efficient way of making the additional panel visible at once, meaning by removing the ImagePanel (backgroundImagePanel) adding the panel (progressPanel) and finally adding again the ImagePanel (backgroundImagePanel)?
    Hope I was perspicuous.
    Tom

  • Toolkit for CreateJS instance name conflicts

    The toolkit seems to assign unique suffixes to like-named instances of the same symbol. Unfortunately it seems to ignore the local scope of the instance, and enforces uniqueness globally. So if I have a Wing named wing1 and a Wing named wing2, and each Wing instance has feather1 (a Feather), feather2, feather3.....  the toolkit will rename feathers in wing2 to feather1_2, feather2_2, feather3_3. 
    Any thoughts?
    Thanks
    Aemon

    for simple cases I run this function against the offending display objects, feel free to modify/expand.
    class.prototype.enforcePropertyToolkitFix= function(object,property){
                if(!object.hasOwnProperty(property))
                    var i=0;
                        while(!(object.hasOwnProperty(property + "_" +String(i))) && ( i < 100))
                            i++;
                     if(!object.hasOwnProperty(property + "_" + String(i)))
                         throw (new Error("AbstractView::enforcePropertyToolkitFix - unable to resolve property"));
                    object[property] = object[property + "_" +String(i)];

  • Set preference in configuration scope

    Hi all, I have just started using oomph and have the following questions.
    Is it possible to set a preference in configuration scope? For instance I would like to be able to set org.jboss.tools.usage.prefs. ask_user_for_usage_report_preference
    Is it possible to read stream names from an external file? Using xinclude or something similar. Available streams are known by another tool chain and I would like to update the setup automatically.
    Is it possible to create a Working set from a Maven import? I.e. from all nested projects.
    It would be nice to be able to prepend an existing preference value not just set it. For example org.eclipse.ant.core/additional_entries is a comma separated list of jar-files. The JDK tools.jar location is the default value and I would like to add a entry.

    Am 07.08.2015 um 14:20 schrieb Mattias Andersson:
    > Hi all, I have just started using oomph and have the following questions.
    >
    > Is it possible to set a preference in configuration scope?
    I don't recall anything that should hold you from writing /configuration/xyz... into the preference task key. Just the
    preference recorder ignores those.
    > For instance I would like to be able to set org.jboss.tools.usage.prefs. ask_user_for_usage_report_preference
    >
    > Is it possible to read stream names from an external file? Using xinclude or something similar. Available streams are
    > known by another tool chain and I would like to update the setup automatically.
    I don't think that oomph has something specifically useful for that. To me it sounds more promising to generate your
    setup file from your external toolchain data.
    > Is it possible to create a Working set from a Maven import? I.e. from all nested projects.
    There are all sorts of predicates that you can use to define your working set. Please let us know if you're missing a
    specific one, then we can discuss if and how we can provide it.
    > It would be nice to be able to prepend an existing preference value not just set it. For example
    > org.eclipse.ant.core/additional_entries is a comma separated list of jar-files. The JDK tools.jar location is the
    > default value and I would like to add a entry.
    That's currently not possible. It's on the list of things we want to enhance w.r.t. the entire preference recording and
    management story. I hoped to get much of that into Mars SR1, but it seems unlikely right now.
    Cheers
    /Eike
    http://www.esc-net.de
    http://thegordian.blogspot.com
    http://twitter.com/eikestepper

  • Control File issue

    Hi All,
    11.2.0.1 on AIX 7.1 and Level 0 happens on every SATURDAY and L1 backup run every day.
    We are using following script for level0 RMAN backup:
    RUN {
    SHOW ALL;
    CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET PARALLELISM 4;
    CONFIGURE RETENTION POLICY TO REDUNDANCY 1;
    ALLOCATE CHANNEL ch1 TYPE DISK;
    ALLOCATE CHANNEL ch2 TYPE DISK;
    ALLOCATE CHANNEL ch3 TYPE DISK;
    ALLOCATE CHANNEL ch4 TYPE DISK;
    BACKUP FORMAT '/oraclebackup/HFM11PROD/DF_L0_%d_%D%M%Y_%u_%s_%p' INCREMENTAL LEVEL 0 AS COMPRESSED BACKUPSET DATABASE TAG='LEVEL0';
    BACKUP FORMAT '/oraclebackup/HFM11PROD/ARC_L0_%d_%D%M%Y_%u_%s_%p'   ARCHIVELOG ALL NOT BACKED UP 2 TIMES TAG='LEVEL0';
    BACKUP FORMAT '/oraclebackup/HFM11PROD/CF_L0_%d_%D%M%Y_%u_%s_%p' CURRENT CONTROLFILE TAG='LEVEL0';
    BACKUP FORMAT '/oraclebackup/HFM11PROD/SP_L0_%d_%D%M%Y_%u_%s_%p' SPFILE TAG='LEVEL0';
    CROSSCHECK ARCHIVELOG ALL;
    DELETE NOPROMPT OBSOLETE;
    RELEASE CHANNEL ch1;
    RELEASE CHANNEL ch2;
    RELEASE CHANNEL ch3;
    RELEASE CHANNEL ch4;
    }Now backup logs shows that we have backup of control file in two backup pieces : One implicitly in a backup piece DF_L0_HFM11PRD_10112012_l8npv5b6_13992_1
    and other one is explicitly in CF_L0_HFM11PRD_10112012_lhnpv62e_14001_1 .
    RMAN> RUN {
    2> SHOW ALL;
    3> CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET PARALLELISM 4;
    4> CONFIGURE RETENTION POLICY TO REDUNDANCY 1;
    5> ALLOCATE CHANNEL ch1 TYPE DISK;
    6> ALLOCATE CHANNEL ch2 TYPE DISK;
    7> ALLOCATE CHANNEL ch3 TYPE DISK;
    8> ALLOCATE CHANNEL ch4 TYPE DISK;
    9> BACKUP FORMAT '/oraclebackup/HFM11PROD/DF_L0_%d_%D%M%Y_%u_%s_%p' INCREMENTAL LEVEL 0 AS COMPRESSED BACKUPSET DATABASE TAG='LEVEL0';
    10> BACKUP FORMAT '/oraclebackup/HFM11PROD/ARC_L0_%d_%D%M%Y_%u_%s_%p'   ARCHIVELOG ALL NOT BACKED UP 2 TIMES TAG='LEVEL0';
    11> BACKUP FORMAT '/oraclebackup/HFM11PROD/CF_L0_%d_%D%M%Y_%u_%s_%p' CURRENT CONTROLFILE TAG='LEVEL0';
    12> BACKUP FORMAT '/oraclebackup/HFM11PROD/SP_L0_%d_%D%M%Y_%u_%s_%p' SPFILE TAG='LEVEL0';
    13> CROSSCHECK ARCHIVELOG ALL;
    14> DELETE NOPROMPT OBSOLETE;
    15> RELEASE CHANNEL ch1;
    16> RELEASE CHANNEL ch2;
    17> RELEASE CHANNEL ch3;
    18> RELEASE CHANNEL ch4;
    19> }
    RMAN configuration parameters for database with db_unique_name HFM11PRD are:
    CONFIGURE RETENTION POLICY TO REDUNDANCY 1;
    CONFIGURE BACKUP OPTIMIZATION OFF; # default
    CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
    CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
    CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET PARALLELISM 4;
    CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
    CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
    CONFIGURE MAXSETSIZE TO UNLIMITED; # default
    CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
    CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
    CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
    CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
    CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/orahyp_p/product/11.2/dbs/snapcf_HFM11PRD.f'; # default
    old RMAN configuration parameters:
    CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET PARALLELISM 4;
    new RMAN configuration parameters:
    CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET PARALLELISM 4;
    new RMAN configuration parameters are successfully stored
    starting full resync of recovery catalog
    full resync complete
    old RMAN configuration parameters:
    CONFIGURE RETENTION POLICY TO REDUNDANCY 1;
    new RMAN configuration parameters:
    CONFIGURE RETENTION POLICY TO REDUNDANCY 1;
    new RMAN configuration parameters are successfully stored
    starting full resync of recovery catalog
    full resync complete
    allocated channel: ch1
    channel ch1: SID=1210 device type=DISK
    allocated channel: ch2
    channel ch2: SID=1477 device type=DISK
    allocated channel: ch3
    channel ch3: SID=66 device type=DISK
    allocated channel: ch4
    channel ch4: SID=1156 device type=DISK
    Starting backup at 10-NOV-12
    channel ch1: starting compressed incremental level 0 datafile backup set
    channel ch1: specifying datafile(s) in backup set
    input datafile file number=00001 name=/u04/oradata/HFM11PRD/system01.dbf
    input datafile file number=00008 name=/u04/oradata/HFM11PRD/EPM_HFM4.DBF
    input datafile file number=00012 name=/u04/oradata/HFM11PRD/EPM_HFM8.DBF
    input datafile file number=00017 name=/u04/oradata/HFM11PRD/EPM_HFM12.DBF
    input datafile file number=00004 name=/u04/oradata/HFM11PRD/EPM_HSS1.DBF
    input datafile file number=00020 name=/u04/oradata/HFM11PRD/EPM_HFM3.DBF
    channel ch1: starting piece 1 at 10-NOV-12
    channel ch2: starting compressed incremental level 0 datafile backup set
    channel ch2: specifying datafile(s) in backup set
    input datafile file number=00003 name=/u04/oradata/HFM11PRD/undots01.dbf
    input datafile file number=00009 name=/u04/oradata/HFM11PRD/EPM_HFM5.DBF
    input datafile file number=00013 name=/u04/oradata/HFM11PRD/EPM_HFM9.DBF
    input datafile file number=00018 name=/u04/oradata/HFM11PRD/EPM_HFM13.DBF
    input datafile file number=00005 name=/u04/oradata/HFM11PRD/EPM_BI1.DBF
    input datafile file number=00021 name=/u04/oradata/HFM11PRD/EPM_HFM15.DBF
    channel ch2: starting piece 1 at 10-NOV-12
    channel ch3: starting compressed incremental level 0 datafile backup set
    channel ch3: specifying datafile(s) in backup set
    input datafile file number=00007 name=/u04/oradata/HFM11PRD/EPM_HFM2.DBF
    input datafile file number=00011 name=/u04/oradata/HFM11PRD/EPM_HFM7.DBF
    input datafile file number=00016 name=/u04/oradata/HFM11PRD/EPM_HFM11.DBF
    input datafile file number=00002 name=/u04/oradata/HFM11PRD/sysaux01.dbf
    input datafile file number=00022 name=/u04/oradata/HFM11PRD/EPM_HSS_new1.DBF
    channel ch3: starting piece 1 at 10-NOV-12
    channel ch4: starting compressed incremental level 0 datafile backup set
    channel ch4: specifying datafile(s) in backup set
    input datafile file number=00006 name=/u04/oradata/HFM11PRD/EPM_HFM1.DBF
    input datafile file number=00010 name=/u04/oradata/HFM11PRD/EPM_HFM6.DBF
    input datafile file number=00015 name=/u04/oradata/HFM11PRD/EPM_HFM10.DBF
    input datafile file number=00019 name=/u04/oradata/HFM11PRD/EPM_HFM14.DBF
    input datafile file number=00014 name=/u04/oradata/HFM11PRD/userdata01.dbf
    channel ch4: starting piece 1 at 10-NOV-12
    channel ch2: finished piece 1 at 10-NOV-12
    _*piece handle=/oraclebackup/HFM11PROD/DF_L0_HFM11PRD_10112012_l8npv5b6_13992_1 tag=LEVEL0 comment=NONE*_
    channel ch2: backup set complete, elapsed time: 00:10:46
    channel ch2: starting compressed incremental level 0 datafile backup set
    channel ch2: specifying datafile(s) in backup set
    _*including current control file in backup set*channel ch2: starting piece 1 at 10-NOV-12_
    channel ch2: finished piece 1 at 10-NOV-12
    piece handle=/oraclebackup/HFM11PROD/DF_L0_HFM11PRD_10112012_lbnpv5vc_13995_1 tag=LEVEL0 comment=NONE
    channel ch2: backup set complete, elapsed time: 00:00:01
    channel ch2: starting compressed incremental level 0 datafile backup set
    channel ch2: specifying datafile(s) in backup set
    including current SPFILE in backup set
    channel ch2: starting piece 1 at 10-NOV-12
    channel ch2: finished piece 1 at 10-NOV-12
    piece handle=/oraclebackup/HFM11PROD/DF_L0_HFM11PRD_10112012_lcnpv5ve_13996_1 tag=LEVEL0 comment=NONE
    channel ch2: backup set complete, elapsed time: 00:00:01
    channel ch1: finished piece 1 at 10-NOV-12
    piece handle=/oraclebackup/HFM11PROD/DF_L0_HFM11PRD_10112012_l7npv5b6_13991_1 tag=LEVEL0 comment=NONE
    channel ch1: backup set complete, elapsed time: 00:11:03
    channel ch4: finished piece 1 at 10-NOV-12
    piece handle=/oraclebackup/HFM11PROD/DF_L0_HFM11PRD_10112012_lanpv5b7_13994_1 tag=LEVEL0 comment=NONE
    channel ch4: backup set complete, elapsed time: 00:11:32
    channel ch3: finished piece 1 at 10-NOV-12
    piece handle=/oraclebackup/HFM11PROD/DF_L0_HFM11PRD_10112012_l9npv5b6_13993_1 tag=LEVEL0 comment=NONE
    channel ch3: backup set complete, elapsed time: 00:11:52
    Finished backup at 10-NOV-12
    Starting backup at 10-NOV-12
    current log archived
    channel ch1: starting compressed archived log backup set
    channel ch1: specifying archived log(s) in backup set
    input archived log thread=1 sequence=40007 RECID=40001 STAMP=798971664
    input archived log thread=1 sequence=40008 RECID=40002 STAMP=798972711
    input archived log thread=1 sequence=40009 RECID=40003 STAMP=798973470
    input archived log thread=1 sequence=40010 RECID=40004 STAMP=798974835
    input archived log thread=1 sequence=40011 RECID=40005 STAMP=798975943
    channel ch1: starting piece 1 at 10-NOV-12
    channel ch2: starting compressed archived log backup set
    channel ch2: specifying archived log(s) in backup set
    input archived log thread=1 sequence=40012 RECID=40006 STAMP=798976804
    input archived log thread=1 sequence=40013 RECID=40007 STAMP=798977866
    input archived log thread=1 sequence=40014 RECID=40008 STAMP=798978754
    input archived log thread=1 sequence=40015 RECID=40009 STAMP=798980083
    input archived log thread=1 sequence=40016 RECID=40010 STAMP=798981194
    channel ch2: starting piece 1 at 10-NOV-12
    channel ch3: starting compressed archived log backup set
    channel ch3: specifying archived log(s) in backup set
    input archived log thread=1 sequence=40017 RECID=40011 STAMP=798982283
    input archived log thread=1 sequence=40018 RECID=40012 STAMP=798983171
    input archived log thread=1 sequence=40019 RECID=40013 STAMP=798984077
    input archived log thread=1 sequence=40020 RECID=40014 STAMP=798985146
    input archived log thread=1 sequence=40021 RECID=40015 STAMP=798985212
    channel ch3: starting piece 1 at 10-NOV-12
    channel ch4: starting compressed archived log backup set
    channel ch4: specifying archived log(s) in backup set
    input archived log thread=1 sequence=40022 RECID=40016 STAMP=798985214
    input archived log thread=1 sequence=40023 RECID=40017 STAMP=798985992
    input archived log thread=1 sequence=40024 RECID=40018 STAMP=798987561
    input archived log thread=1 sequence=40025 RECID=40019 STAMP=798988338
    channel ch4: starting piece 1 at 10-NOV-12
    channel ch4: finished piece 1 at 10-NOV-12
    piece handle=/oraclebackup/HFM11PROD/ARC_L0_HFM11PRD_10112012_lgnpv61k_14000_1 tag=LEVEL0 comment=NONE
    channel ch4: backup set complete, elapsed time: 00:00:15
    channel ch1: finished piece 1 at 10-NOV-12
    piece handle=/oraclebackup/HFM11PROD/ARC_L0_HFM11PRD_10112012_ldnpv61j_13997_1 tag=LEVEL0 comment=NONE
    channel ch1: backup set complete, elapsed time: 00:00:26
    channel ch2: finished piece 1 at 10-NOV-12
    piece handle=/oraclebackup/HFM11PROD/ARC_L0_HFM11PRD_10112012_lenpv61j_13998_1 tag=LEVEL0 comment=NONE
    channel ch2: backup set complete, elapsed time: 00:00:26
    channel ch3: finished piece 1 at 10-NOV-12
    piece handle=/oraclebackup/HFM11PROD/ARC_L0_HFM11PRD_10112012_lfnpv61j_13999_1 tag=LEVEL0 comment=NONE
    channel ch3: backup set complete, elapsed time: 00:00:25
    Finished backup at 10-NOV-12
    Starting backup at 10-NOV-12
    channel ch1: starting compressed full datafile backup set
    channel ch1: specifying datafile(s) in backup set
    _*including current control file in backup set*_
    channel ch1: starting piece 1 at 10-NOV-12
    channel ch1: finished piece 1 at 10-NOV-12
    _*piece handle=/oraclebackup/HFM11PROD/CF_L0_HFM11PRD_10112012_lhnpv62e_14001_1 tag=LEVEL0 comment=NONE*_channel ch1: backup set complete, elapsed time: 00:00:01
    Finished backup at 10-NOV-12
    Starting backup at 10-NOV-12
    channel ch1: starting compressed full datafile backup set
    channel ch1: specifying datafile(s) in backup set
    including current SPFILE in backup set
    channel ch1: starting piece 1 at 10-NOV-12
    channel ch1: finished piece 1 at 10-NOV-12
    piece handle=/oraclebackup/HFM11PROD/SP_L0_HFM11PRD_10112012_linpv62i_14002_1 tag=LEVEL0 comment=NONE
    channel ch1: backup set complete, elapsed time: 00:00:01
    Finished backup at 10-NOV-12Following is the script of Leve 1 RMAN backup.
    RUN {
    SHOW ALL;
    CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET PARALLELISM 4;
    ALLOCATE CHANNEL ch1 TYPE DISK;
    ALLOCATE CHANNEL ch2 TYPE DISK;
    ALLOCATE CHANNEL ch3 TYPE DISK;
    ALLOCATE CHANNEL ch4 TYPE DISK;
    BACKUP FORMAT '/oraclebackup/HFM11PROD/DF_L1_%d_%D%M%Y_%u_%s_%p' INCREMENTAL LEVEL 1 AS COMPRESSED BACKUPSET DATABASE TAG='LEVEL1';
    BACKUP FORMAT '/oraclebackup/HFM11PROD/ARC_L1_%d_%D%M%Y_%u_%s_%p'   ARCHIVELOG ALL NOT BACKED UP 2 TIMES TAG='LEVEL1';
    CROSSCHECK ARCHIVELOG ALL;
    DELETE NOPROMPT OBSOLETE;
    RELEASE CHANNEL ch1;
    RELEASE CHANNEL ch2;
    RELEASE CHANNEL ch3;
    RELEASE CHANNEL ch4;
    }Following is the log from Level 1 backup which shows that it has marked the backup of control file in backup piece CF_L0_HFM11PRD_10112012_lhnpv62e_14001_1 as obsolete and deleted.
    RMAN> RUN {
    2> SHOW ALL;
    3> CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET PARALLELISM 4;
    4> ALLOCATE CHANNEL ch1 TYPE DISK;
    5> ALLOCATE CHANNEL ch2 TYPE DISK;
    6> ALLOCATE CHANNEL ch3 TYPE DISK;
    7> ALLOCATE CHANNEL ch4 TYPE DISK;
    8> BACKUP FORMAT '/oraclebackup/HFM11PROD/DF_L1_%d_%D%M%Y_%u_%s_%p' INCREMENTAL LEVEL 1 AS COMPRESSED BACKUPSET DATABASE TAG='LEVEL1';
    9> BACKUP FORMAT '/oraclebackup/HFM11PROD/ARC_L1_%d_%D%M%Y_%u_%s_%p'   ARCHIVELOG ALL NOT BACKED UP 2 TIMES TAG='LEVEL1';
    10> CROSSCHECK ARCHIVELOG ALL;
    11> DELETE NOPROMPT OBSOLETE;
    12> RELEASE CHANNEL ch1;
    13> RELEASE CHANNEL ch2;
    14> RELEASE CHANNEL ch3;
    15> RELEASE CHANNEL ch4;
    16> }
    RMAN configuration parameters for database with db_unique_name HFM11PRD are:
    CONFIGURE RETENTION POLICY TO REDUNDANCY 1;
    CONFIGURE BACKUP OPTIMIZATION OFF; # default
    CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
    CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
    CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET PARALLELISM 4;
    CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
    CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
    CONFIGURE MAXSETSIZE TO UNLIMITED; # default
    CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
    CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
    CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
    CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
    CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/orahyp_p/product/11.2/dbs/snapcf_HFM11PRD.f'; # default
    old RMAN configuration parameters:
    CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET PARALLELISM 4;
    new RMAN configuration parameters:
    CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET PARALLELISM 4;
    new RMAN configuration parameters are successfully stored
    starting full resync of recovery catalog
    full resync complete
    allocated channel: ch1
    channel ch1: SID=1718 device type=DISK
    allocated channel: ch2
    channel ch2: SID=1499 device type=DISK
    allocated channel: ch3
    channel ch3: SID=119 device type=DISK
    allocated channel: ch4
    channel ch4: SID=1166 device type=DISK
    Starting backup at 12-NOV-12
    channel ch1: starting compressed incremental level 1 datafile backup set
    channel ch1: specifying datafile(s) in backup set
    input datafile file number=00001 name=/u04/oradata/HFM11PRD/system01.dbf
    input datafile file number=00008 name=/u04/oradata/HFM11PRD/EPM_HFM4.DBF
    input datafile file number=00012 name=/u04/oradata/HFM11PRD/EPM_HFM8.DBF
    input datafile file number=00017 name=/u04/oradata/HFM11PRD/EPM_HFM12.DBF
    input datafile file number=00004 name=/u04/oradata/HFM11PRD/EPM_HSS1.DBF
    input datafile file number=00020 name=/u04/oradata/HFM11PRD/EPM_HFM3.DBF
    channel ch1: starting piece 1 at 12-NOV-12
    channel ch2: starting compressed incremental level 1 datafile backup set
    channel ch2: specifying datafile(s) in backup set
    input datafile file number=00003 name=/u04/oradata/HFM11PRD/undots01.dbf
    input datafile file number=00009 name=/u04/oradata/HFM11PRD/EPM_HFM5.DBF
    input datafile file number=00013 name=/u04/oradata/HFM11PRD/EPM_HFM9.DBF
    input datafile file number=00018 name=/u04/oradata/HFM11PRD/EPM_HFM13.DBF
    input datafile file number=00005 name=/u04/oradata/HFM11PRD/EPM_BI1.DBF
    input datafile file number=00021 name=/u04/oradata/HFM11PRD/EPM_HFM15.DBF
    channel ch2: starting piece 1 at 12-NOV-12
    channel ch3: starting compressed incremental level 1 datafile backup set
    channel ch3: specifying datafile(s) in backup set
    input datafile file number=00007 name=/u04/oradata/HFM11PRD/EPM_HFM2.DBF
    input datafile file number=00011 name=/u04/oradata/HFM11PRD/EPM_HFM7.DBF
    input datafile file number=00016 name=/u04/oradata/HFM11PRD/EPM_HFM11.DBF
    input datafile file number=00002 name=/u04/oradata/HFM11PRD/sysaux01.dbf
    input datafile file number=00022 name=/u04/oradata/HFM11PRD/EPM_HSS_new1.DBF
    channel ch3: starting piece 1 at 12-NOV-12
    channel ch4: starting compressed incremental level 1 datafile backup set
    channel ch4: specifying datafile(s) in backup set
    input datafile file number=00006 name=/u04/oradata/HFM11PRD/EPM_HFM1.DBF
    input datafile file number=00010 name=/u04/oradata/HFM11PRD/EPM_HFM6.DBF
    input datafile file number=00015 name=/u04/oradata/HFM11PRD/EPM_HFM10.DBF
    input datafile file number=00019 name=/u04/oradata/HFM11PRD/EPM_HFM14.DBF
    input datafile file number=00014 name=/u04/oradata/HFM11PRD/userdata01.dbf
    channel ch4: starting piece 1 at 12-NOV-12
    channel ch1: finished piece 1 at 12-NOV-12
    piece handle=/oraclebackup/HFM11PROD/DF_L1_HFM11PRD_12112012_lvnq4e3a_14015_1 tag=LEVEL1 comment=NONE
    channel ch1: backup set complete, elapsed time: 00:01:36
    channel ch1: starting compressed incremental level 1 datafile backup set
    channel ch1: specifying datafile(s) in backup set
    channel ch4: finished piece 1 at 12-NOV-12
    piece handle=/oraclebackup/HFM11PROD/DF_L1_HFM11PRD_12112012_m2nq4e3a_14018_1 tag=LEVEL1 comment=NONE
    channel ch4: backup set complete, elapsed time: 00:01:35
    channel ch4: starting compressed incremental level 1 datafile backup set
    channel ch4: specifying datafile(s) in backup set
    including current SPFILE in backup set
    channel ch4: starting piece 1 at 12-NOV-12
    including current control file in backup set
    channel ch1: starting piece 1 at 12-NOV-12
    channel ch1: finished piece 1 at 12-NOV-12
    piece handle=/oraclebackup/HFM11PROD/DF_L1_HFM11PRD_12112012_m3nq4e6a_14019_1 tag=LEVEL1 comment=NONE
    channel ch1: backup set complete, elapsed time: 00:00:01
    channel ch4: finished piece 1 at 12-NOV-12
    piece handle=/oraclebackup/HFM11PROD/DF_L1_HFM11PRD_12112012_m4nq4e6a_14020_1 tag=LEVEL1 comment=NONE
    channel ch4: backup set complete, elapsed time: 00:00:01
    channel ch3: finished piece 1 at 12-NOV-12
    piece handle=/oraclebackup/HFM11PROD/DF_L1_HFM11PRD_12112012_m1nq4e3a_14017_1 tag=LEVEL1 comment=NONE
    channel ch3: backup set complete, elapsed time: 00:01:39
    channel ch2: finished piece 1 at 12-NOV-12
    piece handle=/oraclebackup/HFM11PROD/DF_L1_HFM11PRD_12112012_m0nq4e3a_14016_1 tag=LEVEL1 comment=NONE
    channel ch2: backup set complete, elapsed time: 00:02:41
    Finished backup at 12-NOV-12
    Starting backup at 12-NOV-12
    current log archived
    channel ch1: starting compressed archived log backup set
    channel ch1: specifying archived log(s) in backup set
    input archived log thread=1 sequence=40201 RECID=40195 STAMP=799144567
    input archived log thread=1 sequence=40202 RECID=40196 STAMP=799145383
    input archived log thread=1 sequence=40203 RECID=40197 STAMP=799146296
    input archived log thread=1 sequence=40204 RECID=40198 STAMP=799147040
    input archived log thread=1 sequence=40205 RECID=40199 STAMP=799147640
    input archived log thread=1 sequence=40206 RECID=40200 STAMP=799148271
    channel ch1: starting piece 1 at 12-NOV-12
    channel ch2: starting compressed archived log backup set
    channel ch2: specifying archived log(s) in backup set
    input archived log thread=1 sequence=40207 RECID=40201 STAMP=799149018
    input archived log thread=1 sequence=40208 RECID=40202 STAMP=799150009
    input archived log thread=1 sequence=40209 RECID=40203 STAMP=799150549
    input archived log thread=1 sequence=40210 RECID=40204 STAMP=799151041
    input archived log thread=1 sequence=40211 RECID=40205 STAMP=799151860
    input archived log thread=1 sequence=40212 RECID=40206 STAMP=799152535
    channel ch2: starting piece 1 at 12-NOV-12
    channel ch3: starting compressed archived log backup set
    channel ch3: specifying archived log(s) in backup set
    input archived log thread=1 sequence=40213 RECID=40207 STAMP=799153553
    input archived log thread=1 sequence=40214 RECID=40208 STAMP=799153980
    input archived log thread=1 sequence=40215 RECID=40209 STAMP=799154283
    input archived log thread=1 sequence=40216 RECID=40210 STAMP=799155243
    input archived log thread=1 sequence=40217 RECID=40211 STAMP=799155964
    input archived log thread=1 sequence=40218 RECID=40212 STAMP=799156899
    channel ch3: starting piece 1 at 12-NOV-12
    channel ch4: starting compressed archived log backup set
    channel ch4: specifying archived log(s) in backup set
    input archived log thread=1 sequence=40219 RECID=40213 STAMP=799157722
    input archived log thread=1 sequence=40220 RECID=40214 STAMP=799158015
    input archived log thread=1 sequence=40221 RECID=40215 STAMP=799158018
    input archived log thread=1 sequence=40222 RECID=40216 STAMP=799158847
    input archived log thread=1 sequence=40223 RECID=40217 STAMP=799159640
    input archived log thread=1 sequence=40224 RECID=40218 STAMP=799160590
    channel ch4: starting piece 1 at 12-NOV-12
    channel ch4: finished piece 1 at 12-NOV-12
    piece handle=/oraclebackup/HFM11PROD/ARC_L1_HFM11PRD_12112012_m8nq4e8h_14024_1 tag=LEVEL1 comment=NONE
    channel ch4: backup set complete, elapsed time: 00:00:25
    channel ch1: finished piece 1 at 12-NOV-12
    piece handle=/oraclebackup/HFM11PROD/ARC_L1_HFM11PRD_12112012_m5nq4e8g_14021_1 tag=LEVEL1 comment=NONE
    channel ch1: backup set complete, elapsed time: 00:00:36
    channel ch2: finished piece 1 at 12-NOV-12
    piece handle=/oraclebackup/HFM11PROD/ARC_L1_HFM11PRD_12112012_m6nq4e8g_14022_1 tag=LEVEL1 comment=NONE
    channel ch2: backup set complete, elapsed time: 00:00:36
    channel ch3: finished piece 1 at 12-NOV-12
    piece handle=/oraclebackup/HFM11PROD/ARC_L1_HFM11PRD_12112012_m7nq4e8g_14023_1 tag=LEVEL1 comment=NONE
    channel ch3: backup set complete, elapsed time: 00:00:35
    Finished backup at 12-NOV-12
    validation succeeded for archived log
    archived log file name=/u05/oradata/HFM11PRD/HFM11PRD_402011737949656.ARC RECID=40195 STAMP=799144567
    validation succeeded for archived log
    archived log file name=/u05/oradata/HFM11PRD/HFM11PRD_402021737949656.ARC RECID=40196 STAMP=799145383
    validation succeeded for archived log
    archived log file name=/u05/oradata/HFM11PRD/HFM11PRD_402031737949656.ARC RECID=40197 STAMP=799146296
    validation succeeded for archived log
    archived log file name=/u05/oradata/HFM11PRD/HFM11PRD_402041737949656.ARC RECID=40198 STAMP=799147040
    validation succeeded for archived log
    archived log file name=/u05/oradata/HFM11PRD/HFM11PRD_402051737949656.ARC RECID=40199 STAMP=799147640
    validation succeeded for archived log
    archived log file name=/u05/oradata/HFM11PRD/HFM11PRD_402061737949656.ARC RECID=40200 STAMP=799148271
    validation succeeded for archived log
    archived log file name=/u05/oradata/HFM11PRD/HFM11PRD_402071737949656.ARC RECID=40201 STAMP=799149018
    validation succeeded for archived log
    archived log file name=/u05/oradata/HFM11PRD/HFM11PRD_402081737949656.ARC RECID=40202 STAMP=799150009
    validation succeeded for archived log
    archived log file name=/u05/oradata/HFM11PRD/HFM11PRD_402091737949656.ARC RECID=40203 STAMP=799150549
    validation succeeded for archived log
    archived log file name=/u05/oradata/HFM11PRD/HFM11PRD_402101737949656.ARC RECID=40204 STAMP=799151041
    validation succeeded for archived log
    archived log file name=/u05/oradata/HFM11PRD/HFM11PRD_402111737949656.ARC RECID=40205 STAMP=799151860
    validation succeeded for archived log
    archived log file name=/u05/oradata/HFM11PRD/HFM11PRD_402121737949656.ARC RECID=40206 STAMP=799152535
    validation succeeded for archived log
    archived log file name=/u05/oradata/HFM11PRD/HFM11PRD_402131737949656.ARC RECID=40207 STAMP=799153553
    validation succeeded for archived log
    archived log file name=/u05/oradata/HFM11PRD/HFM11PRD_402141737949656.ARC RECID=40208 STAMP=799153980
    validation succeeded for archived log
    archived log file name=/u05/oradata/HFM11PRD/HFM11PRD_402151737949656.ARC RECID=40209 STAMP=799154283
    validation succeeded for archived log
    archived log file name=/u05/oradata/HFM11PRD/HFM11PRD_402161737949656.ARC RECID=40210 STAMP=799155243
    validation succeeded for archived log
    archived log file name=/u05/oradata/HFM11PRD/HFM11PRD_402171737949656.ARC RECID=40211 STAMP=799155964
    validation succeeded for archived log
    archived log file name=/u05/oradata/HFM11PRD/HFM11PRD_402181737949656.ARC RECID=40212 STAMP=799156899
    validation succeeded for archived log
    archived log file name=/u05/oradata/HFM11PRD/HFM11PRD_402191737949656.ARC RECID=40213 STAMP=799157722
    validation succeeded for archived log
    archived log file name=/u05/oradata/HFM11PRD/HFM11PRD_402201737949656.ARC RECID=40214 STAMP=799158015
    validation succeeded for archived log
    archived log file name=/u05/oradata/HFM11PRD/HFM11PRD_402211737949656.ARC RECID=40215 STAMP=799158018
    validation succeeded for archived log
    archived log file name=/u05/oradata/HFM11PRD/HFM11PRD_402221737949656.ARC RECID=40216 STAMP=799158847
    validation succeeded for archived log
    archived log file name=/u05/oradata/HFM11PRD/HFM11PRD_402231737949656.ARC RECID=40217 STAMP=799159640
    validation succeeded for archived log
    archived log file name=/u05/oradata/HFM11PRD/HFM11PRD_402241737949656.ARC RECID=40218 STAMP=799160590
    Crosschecked 24 objects
    RMAN retention policy will be applied to the command
    RMAN retention policy is set to redundancy 1
    Deleting the following obsolete backups and copies:
    Type                 Key    Completion Time    Filename/Handle
    Backup Set           18521832 10-NOV-12        
      Backup Piece       18521838 10-NOV-12          /oraclebackup/HFM11PROD/CF_L0_HFM11PRD_10112012_lhnpv62e_14001_1
    Backup Set           18521846 10-NOV-12        
      Backup Piece       18521848 10-NOV-12          /oraclebackup/HFM11PROD/SP_L0_HFM11PRD_10112012_linpv62i_14002_1
    deleted backup piece
    backup piece handle=/oraclebackup/HFM11PROD/CF_L0_HFM11PRD_10112012_lhnpv62e_14001_1 RECID=14000 STAMP=798988367
    deleted backup piece
    backup piece handle=/oraclebackup/HFM11PROD/SP_L0_HFM11PRD_10112012_linpv62i_14002_1 RECID=14001 STAMP=798988370
    Deleted 2 objects
    released channel: ch1
    released channel: ch2
    released channel: ch3
    released channel: ch4
    RMAN> exit;Now, on Friday when i am trying to do a restore for this database on another server i am getting error as below. Restore script is as below.
    run
    allocate AUXILIARY channel c1 device type disk;
    allocate AUXILIARY channel c2 device type disk;
    allocate AUXILIARY channel c3 device type disk;
    allocate AUXILIARY channel c4 device type disk;
    set until scn 699575816;
    duplicate target database to HFM11TMP;
    release channel c1;
    release channel c2;
    release channel c3;
    release channel c4;
    }Error is as:
       sql clone "alter system set  db_unique_name =
    ''HFM11TMP'' comment=
    ''Modified by RMAN duplicate'' scope=spfile";
       shutdown clone immediate;
       startup clone force nomount
       restore clone primary controlfile;
       alter clone database mount;
    executing Memory Script
    executing command: SET until clause
    sql statement: alter system set  db_name =  ''HFM11PRD'' comment= ''Modified by RMAN duplicate'' scope=spfile
    sql statement: alter system set  db_unique_name =  ''HFM11TMP'' comment= ''Modified by RMAN duplicate'' scope=spfile
    Oracle instance shut down
    Oracle instance started
    Total System Global Area    4275781632 bytes
    Fixed Size                     2213632 bytes
    Variable Size               2298480896 bytes
    Database Buffers            1962934272 bytes
    Redo Buffers                  12152832 bytes
    allocated channel: c1
    channel c1: SID=112 device type=DISK
    Starting restore at 06-NOV-12
    released channel: c1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of Duplicate Db command at 11/06/2012 15:13:32
    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 restoreRMAN is searching for backup of controlfile in backup piece CF_L0_HFM11PRD_10112012_lhnpv62e_14001_1. But this has been already obsolete.
    Now, if it not possible to get above backup piece back, then how to proceed with restore with backup piece DF_L0_HFM11PRD_10112012_l8npv5b6_13992_1 as it also has control file backup and available on disk, not obsolete. I can understand the reason for marking CF* file as obsolete because of redundency 1. But how to proceed with restore with available backup ?

    Hello;
    I would change my configure for one :
    RMAN>CONFIGURE CONTROLFILE AUTOBACKUP ON;Would use this to check :
    list backup of controlfile completed before <date>And would catalog everything again just to be sure before starting the restore.
    You may have to catalog use the control file piece to avoid the error.
    RMAN> catalog backuppiece ...Another idea is to test the restore using something like this :
    RMAN> run {
            set until time "to_date('2012 NOV 17 07:00','YYYY MON DD HH24:MI')";
            restore controlfile preview;
          }Best Regards
    mseberg
    Edited by: mseberg on Nov 16, 2012 10:12 AM
    Edited by: mseberg on Nov 16, 2012 11:13 AM

  • Help Educate Me on an RMAN Recovery Question

    Perhaps I am not understanding how recovery should work, so, let me lay out my situation:
    First things first:
    Oracle 11.2.0.2.5 on AIX 6.1
    Source database: POR02P on a 4 node cluster
    Auxiliary database: POR02x (single instance)
    I want to duplicate my source database to my auxiliary database as of 02-APR-2013 at 3:00PM
    Here are how my backups run:
    LEVEL0 On Sunday at 8:00 AM
    LEVEL1 Differential all other days at 8:00 AM
    Intermediate Archivelogs backups run at the following times daily: 00:45, 11:45, 19:45
    March 31 is my LEVEL0.
    So, the way I understand things, to do this duplicate:
    I need my LEVEL0 from Sunday
    I need my LEVEL1 from Monday
    I need my LEVEL1 from Tuesday
    I need all my archivelogs from just before the LEVEL1 on Tuesday started all the way to after 3:00PM on Tuesday:
    Restore archive backups from:
    4/2 11:45
    4/2 19:45
    All my backups include a controlfile.
    According to my above analysis, I made sure the required files were on disk.
    After making sure my files were on disk, I went to my source database and ran the following to make sure Oracle had all the files it needs:
    RMAN> run {
    2> set until time = "to_date('02-APR-2013 15:00:00','DD-MON-YYYY HH24:MI:SS')";
    3> restore database preview summary;
    4> }
    This above command succeeds and I can verify all the files it mentions are on disk.
    Here is the problem, the restore of the LEVEL0 and LEVEL1's succeed.  When it starts recovery, it fails asking for an archive log that both:
    *1. Was not listed as part of the PREVIEW command*
    *2. Is from a time between my LEVEL0 and first LEVEL1.*
    I was under the impression that RMAN does not need archivelogs from BETWEEN incremental backups.
    Am I wrong about this?
    Doesn't an incremental LEVEL1 differential go back to the last incremental and get all the needed blocks thereby making the "in between" archivelogs obsolete?
    If I am wrong about this, that solves part of my confusion...
    The other part of my confusion is why does the PREVIEW command not specify the archivelogs it asks for during recovery?
    If you can answer my question now, you can skip the rest.
    Else, here are all the dirty details.
    Here is mt PREVIEW command as run on the source database. The output supports how I think this should work:
    RMAN> run {
    2> set until time = "to_date('02-APR-2013 15:00:00','DD-MON-YYYY HH24:MI:SS')";
    3> restore database preview;
    4> }
    executing command: SET until clause
    Starting restore at 23-APR-2013 13:47:30
    using channel ORA_DISK_1
    using channel ORA_DISK_2
    List of Backup Sets
    ===================
    BS Key Type LV Size Device Type Elapsed Time Completion Time
    11386312 Incr 0 105.12M DISK 00:00:23 31-MAR-2013 08:00:29
    BP Key: 11386324 Status: AVAILABLE Compressed: YES Tag: LEVEL0
    Piece Name: /backup_rman/backupset/por02p/POR02P_20130331_e6o5su46_1_1.BAK
    List of Datafiles in backup set 11386312
    File LV Type Ckp SCN Ckp Time Name
    1 0 Incr 15658251 31-MAR-2013 08:00:06 +POR02P_DATA/por02p/datafile/system.258.810123295
    3 0 Incr 15658251 31-MAR-2013 08:00:06 +POR02P_DATA/por02p/datafile/undotbs1.260.810123303
    4 0 Incr 15658251 31-MAR-2013 08:00:06 +POR02P_DATA/por02p/datafile/undotbs2.261.810123315
    5 0 Incr 15658251 31-MAR-2013 08:00:06 +POR02P_DATA/por02p/datafile/undotbs3.262.810123315
    6 0 Incr 15658251 31-MAR-2013 08:00:06 +POR02P_DATA/por02p/datafile/undotbs4.263.810123317
    9 0 Incr 15658251 31-MAR-2013 08:00:06 +POR02P_DATA/por02p/datafile/lfgprod_ias_orasdpm.274.810135793
    14 0 Incr 15658251 31-MAR-2013 08:00:06 +POR02P_DATA/por02p/datafile/lfgprod_oim_lob.281.810135799
    BS Key Type LV Size Device Type Elapsed Time Completion Time
    11613131 Incr 1 122.93M DISK 00:00:21 01-APR-2013 08:00:19
    BP Key: 11613143 Status: AVAILABLE Compressed: YES Tag: LEVEL1D
    Piece Name: /backup_rman/backupset/por02p/POR02P_20130401_f2o5vig5_1_1.BAK
    List of Datafiles in backup set 11613131
    File LV Type Ckp SCN Ckp Time Name
    1 1 Incr 16624714 01-APR-2013 08:00:06 +POR02P_DATA/por02p/datafile/system.258.810123295
    3 1 Incr 16624714 01-APR-2013 08:00:06 +POR02P_DATA/por02p/datafile/undotbs1.260.810123303
    4 1 Incr 16624714 01-APR-2013 08:00:06 +POR02P_DATA/por02p/datafile/undotbs2.261.810123315
    5 1 Incr 16624714 01-APR-2013 08:00:06 +POR02P_DATA/por02p/datafile/undotbs3.262.810123315
    6 1 Incr 16624714 01-APR-2013 08:00:06 +POR02P_DATA/por02p/datafile/undotbs4.263.810123317
    9 1 Incr 16624714 01-APR-2013 08:00:06 +POR02P_DATA/por02p/datafile/lfgprod_ias_orasdpm.274.810135793
    14 1 Incr 16624714 01-APR-2013 08:00:06 +POR02P_DATA/por02p/datafile/lfgprod_oim_lob.281.810135799
    BS Key Type LV Size Device Type Elapsed Time Completion Time
    11784495 Incr 1 119.81M DISK 00:00:20 02-APR-2013 08:00:19
    BP Key: 11784507 Status: AVAILABLE Compressed: YES Tag: LEVEL1D
    Piece Name: /backup_rman/backupset/por02p/POR02P_20130402_fuo626s5_1_1.BAK
    List of Datafiles in backup set 11784495
    File LV Type Ckp SCN Ckp Time Name
    1 1 Incr 17547965 02-APR-2013 08:00:06 +POR02P_DATA/por02p/datafile/system.258.810123295
    3 1 Incr 17547965 02-APR-2013 08:00:06 +POR02P_DATA/por02p/datafile/undotbs1.260.810123303
    4 1 Incr 17547965 02-APR-2013 08:00:06 +POR02P_DATA/por02p/datafile/undotbs2.261.810123315
    5 1 Incr 17547965 02-APR-2013 08:00:06 +POR02P_DATA/por02p/datafile/undotbs3.262.810123315
    6 1 Incr 17547965 02-APR-2013 08:00:06 +POR02P_DATA/por02p/datafile/undotbs4.263.810123317
    9 1 Incr 17547965 02-APR-2013 08:00:06 +POR02P_DATA/por02p/datafile/lfgprod_ias_orasdpm.274.810135793
    14 1 Incr 17547965 02-APR-2013 08:00:06 +POR02P_DATA/por02p/datafile/lfgprod_oim_lob.281.810135799
    BS Key Type LV Size Device Type Elapsed Time Completion Time
    11386314 Incr 0 901.41M DISK 00:03:33 31-MAR-2013 08:03:38
    BP Key: 11386326 Status: AVAILABLE Compressed: YES Tag: LEVEL0
    Piece Name: /backup_rman/backupset/por02p/POR02P_20130331_e5o5su45_1_1.BAK
    List of Datafiles in backup set 11386314
    File LV Type Ckp SCN Ckp Time Name
    2 0 Incr 15658225 31-MAR-2013 08:00:06 +POR02P_DATA/por02p/datafile/sysaux.259.810123299
    7 0 Incr 15658225 31-MAR-2013 08:00:06 +POR02P_DATA/por02p/datafile/users.264.810123317
    8 0 Incr 15658225 31-MAR-2013 08:00:06 +POR02P_DATA/por02p/datafile/lfgprod_mds.273.810135793
    10 0 Incr 15658225 31-MAR-2013 08:00:06 +POR02P_DATA/por02p/datafile/lfgprod_soainfra.275.810135795
    11 0 Incr 15658225 31-MAR-2013 08:00:06 +POR02P_DATA/por02p/datafile/lfgprod_oim.276.810135797
    12 0 Incr 15658225 31-MAR-2013 08:00:06 +POR02P_DATA/por02p/datafile/lfgprod_biplatform.277.810135797
    13 0 Incr 15658225 31-MAR-2013 08:00:06 +POR02P_DATA/por02p/datafile/lfgprod_ias_opss.278.810135797
    BS Key Type LV Size Device Type Elapsed Time Completion Time
    11613133 Incr 1 77.77M DISK 00:00:36 01-APR-2013 08:00:41
    BP Key: 11613145 Status: AVAILABLE Compressed: YES Tag: LEVEL1D
    Piece Name: /backup_rman/backupset/por02p/POR02P_20130401_f1o5vig5_1_1.BAK
    List of Datafiles in backup set 11613133
    File LV Type Ckp SCN Ckp Time Name
    2 1 Incr 16624711 01-APR-2013 08:00:06 +POR02P_DATA/por02p/datafile/sysaux.259.810123299
    7 1 Incr 16624711 01-APR-2013 08:00:06 +POR02P_DATA/por02p/datafile/users.264.810123317
    8 1 Incr 16624711 01-APR-2013 08:00:06 +POR02P_DATA/por02p/datafile/lfgprod_mds.273.810135793
    10 1 Incr 16624711 01-APR-2013 08:00:06 +POR02P_DATA/por02p/datafile/lfgprod_soainfra.275.810135795
    11 1 Incr 16624711 01-APR-2013 08:00:06 +POR02P_DATA/por02p/datafile/lfgprod_oim.276.810135797
    12 1 Incr 16624711 01-APR-2013 08:00:06 +POR02P_DATA/por02p/datafile/lfgprod_biplatform.277.810135797
    13 1 Incr 16624711 01-APR-2013 08:00:06 +POR02P_DATA/por02p/datafile/lfgprod_ias_opss.278.810135797
    BS Key Type LV Size Device Type Elapsed Time Completion Time
    11784497 Incr 1 71.67M DISK 00:00:27 02-APR-2013 08:00:32
    BP Key: 11784509 Status: AVAILABLE Compressed: YES Tag: LEVEL1D
    Piece Name: /backup_rman/backupset/por02p/POR02P_20130402_fto626s5_1_1.BAK
    List of Datafiles in backup set 11784497
    File LV Type Ckp SCN Ckp Time Name
    2 1 Incr 17547912 02-APR-2013 08:00:06 +POR02P_DATA/por02p/datafile/sysaux.259.810123299
    7 1 Incr 17547912 02-APR-2013 08:00:06 +POR02P_DATA/por02p/datafile/users.264.810123317
    8 1 Incr 17547912 02-APR-2013 08:00:06 +POR02P_DATA/por02p/datafile/lfgprod_mds.273.810135793
    10 1 Incr 17547912 02-APR-2013 08:00:06 +POR02P_DATA/por02p/datafile/lfgprod_soainfra.275.810135795
    11 1 Incr 17547912 02-APR-2013 08:00:06 +POR02P_DATA/por02p/datafile/lfgprod_oim.276.810135797
    12 1 Incr 17547912 02-APR-2013 08:00:06 +POR02P_DATA/por02p/datafile/lfgprod_biplatform.277.810135797
    13 1 Incr 17547912 02-APR-2013 08:00:06 +POR02P_DATA/por02p/datafile/lfgprod_ias_opss.278.810135797
    List of Backup Sets
    ===================
    BS Key Size Device Type Elapsed Time Completion Time
    11784501 60.89M DISK 00:00:09 02-APR-2013 08:00:53
    BP Key: 11784513 Status: AVAILABLE Compressed: YES Tag: ARCHIVE_BAK
    Piece Name: /backup_rman/backupset/por02p/POR02P_20130402_g1o626tc_1_1.BAK
    List of Archived Logs in backup set 11784501
    Thrd Seq Low SCN Low Time Next SCN Next Time
    2 147 17279219 02-APR-2013 00:45:13 17549976 02-APR-2013 08:00:35
    4 149 17279360 02-APR-2013 00:45:13 17549980 02-APR-2013 08:00:35
    1 179 17279579 02-APR-2013 00:45:15 17549968 02-APR-2013 08:00:34
    BS Key Size Device Type Elapsed Time Completion Time
    11784499 26.99M DISK 00:00:04 02-APR-2013 08:00:48
    BP Key: 11784511 Status: AVAILABLE Compressed: YES Tag: ARCHIVE_BAK
    Piece Name: /backup_rman/backupset/por02p/POR02P_20130402_g2o626tc_1_1.BAK
    List of Archived Logs in backup set 11784499
    Thrd Seq Low SCN Low Time Next SCN Next Time
    3 149 17279600 02-APR-2013 00:45:15 17549971 02-APR-2013 08:00:34
    1 180 17549968 02-APR-2013 08:00:34 17549996 02-APR-2013 08:00:40
    3 150 17549971 02-APR-2013 08:00:34 17549999 02-APR-2013 08:00:40
    2 148 17549976 02-APR-2013 08:00:35 17550003 02-APR-2013 08:00:41
    BS Key Size Device Type Elapsed Time Completion Time
    11784500 2.00K DISK 00:00:01 02-APR-2013 08:00:52
    BP Key: 11784512 Status: AVAILABLE Compressed: YES Tag: ARCHIVE_BAK
    Piece Name: /backup_rman/backupset/por02p/POR02P_20130402_g3o626tj_1_1.BAK
    List of Archived Logs in backup set 11784500
    Thrd Seq Low SCN Low Time Next SCN Next Time
    4 150 17549980 02-APR-2013 08:00:35 17550007 02-APR-2013 08:00:41
    BS Key Size Device Type Elapsed Time Completion Time
    11798434 28.77M DISK 00:00:05 02-APR-2013 11:45:28
    BP Key: 11798442 Status: AVAILABLE Compressed: YES Tag: ARCHIVE_BAK
    Piece Name: /backup_rman/backupset/por02p/POR02P_20130402_g7o62k2j_1_1.BAK
    List of Archived Logs in backup set 11798434
    Thrd Seq Low SCN Low Time Next SCN Next Time
    1 181 17549996 02-APR-2013 08:00:40 17687415 02-APR-2013 11:45:05
    3 151 17549999 02-APR-2013 08:00:40 17687418 02-APR-2013 11:45:05
    BS Key Size Device Type Elapsed Time Completion Time
    11798432 20.40M DISK 00:00:03 02-APR-2013 11:45:27
    BP Key: 11798440 Status: AVAILABLE Compressed: YES Tag: ARCHIVE_BAK
    Piece Name: /backup_rman/backupset/por02p/POR02P_20130402_g8o62k2k_1_1.BAK
    List of Archived Logs in backup set 11798432
    Thrd Seq Low SCN Low Time Next SCN Next Time
    2 149 17550003 02-APR-2013 08:00:41 17687399 02-APR-2013 11:45:03
    4 151 17550007 02-APR-2013 08:00:41 17687403 02-APR-2013 11:45:03
    2 150 17687399 02-APR-2013 11:45:03 17688884 02-APR-2013 11:45:15
    4 152 17687403 02-APR-2013 11:45:03 17688895 02-APR-2013 11:45:15
    BS Key Size Device Type Elapsed Time Completion Time
    11798433 66.00K DISK 00:00:00 02-APR-2013 11:45:27
    BP Key: 11798441 Status: AVAILABLE Compressed: YES Tag: ARCHIVE_BAK
    Piece Name: /backup_rman/backupset/por02p/POR02P_20130402_g9o62k2n_1_1.BAK
    List of Archived Logs in backup set 11798433
    Thrd Seq Low SCN Low Time Next SCN Next Time
    1 182 17687415 02-APR-2013 11:45:05 17688871 02-APR-2013 11:45:14
    3 152 17687418 02-APR-2013 11:45:05 17688875 02-APR-2013 11:45:14
    BS Key Size Device Type Elapsed Time Completion Time
    11834701 54.22M DISK 00:00:08 02-APR-2013 19:45:32
    BP Key: 11834709 Status: AVAILABLE Compressed: YES Tag: ARCHIVE_BAK
    Piece Name: /backup_rman/backupset/por02p/POR02P_20130402_gdo63g6k_1_1.BAK
    List of Archived Logs in backup set 11834701
    Thrd Seq Low SCN Low Time Next SCN Next Time
    1 183 17688871 02-APR-2013 11:45:14 17982647 02-APR-2013 19:45:04
    3 153 17688875 02-APR-2013 11:45:14 17982641 02-APR-2013 19:45:04
    BS Key Size Device Type Elapsed Time Completion Time
    11834699 44.18M DISK 00:00:07 02-APR-2013 19:45:31
    BP Key: 11834707 Status: AVAILABLE Compressed: YES Tag: ARCHIVE_BAK
    Piece Name: /backup_rman/backupset/por02p/POR02P_20130402_geo63g6k_1_1.BAK
    List of Archived Logs in backup set 11834699
    Thrd Seq Low SCN Low Time Next SCN Next Time
    2 151 17688884 02-APR-2013 11:45:15 17982650 02-APR-2013 19:45:04
    4 153 17688895 02-APR-2013 11:45:15 17982653 02-APR-2013 19:45:04
    Media recovery start SCN is 17547912
    Recovery must be done beyond SCN 17548424 to clear datafile fuzziness
    Finished restore at 23-APR-2013 13:47:32
    Here is a summary of the files it lists:
    Piece Name: /backup_rman/backupset/por02p/POR02P_20130331_e6o5su46_1_1.BAK
    Piece Name: /backup_rman/backupset/por02p/POR02P_20130401_f2o5vig5_1_1.BAK
    Piece Name: /backup_rman/backupset/por02p/POR02P_20130402_fuo626s5_1_1.BAK
    Piece Name: /backup_rman/backupset/por02p/POR02P_20130331_e5o5su45_1_1.BAK
    Piece Name: /backup_rman/backupset/por02p/POR02P_20130401_f1o5vig5_1_1.BAK
    Piece Name: /backup_rman/backupset/por02p/POR02P_20130402_fto626s5_1_1.BAK
    Piece Name: /backup_rman/backupset/por02p/POR02P_20130402_g1o626tc_1_1.BAK
    Piece Name: /backup_rman/backupset/por02p/POR02P_20130402_g2o626tc_1_1.BAK
    Piece Name: /backup_rman/backupset/por02p/POR02P_20130402_g3o626tj_1_1.BAK
    Piece Name: /backup_rman/backupset/por02p/POR02P_20130402_g7o62k2j_1_1.BAK
    Piece Name: /backup_rman/backupset/por02p/POR02P_20130402_g8o62k2k_1_1.BAK
    Piece Name: /backup_rman/backupset/por02p/POR02P_20130402_g9o62k2n_1_1.BAK
    Piece Name: /backup_rman/backupset/por02p/POR02P_20130402_gdo63g6k_1_1.BAK
    Piece Name: /backup_rman/backupset/por02p/POR02P_20130402_geo63g6k_1_1.BAK
    Here is my list of files on disk. There are actually
    more files listed here because the PREVIEW command does
    not show pieces with Control/SPFILE backups:
    -rw-r----- 1 oracle oinstall 945201152 Mar 31 08:03 POR02P_20130331_e5o5su45_1_1.BAK
    -rw-r----- 1 oracle oinstall 110231552 Mar 31 08:00 POR02P_20130331_e6o5su46_1_1.BAK
    -rw-r----- 1 oracle oinstall 1261568 Mar 31 08:00 POR02P_20130331_e7o5su4v_1_1.BAK
    -rw-r----- 1 oracle oinstall 81559552 Apr 1 08:00 POR02P_20130401_f1o5vig5_1_1.BAK
    -rw-r----- 1 oracle oinstall 128909312 Apr 1 08:00 POR02P_20130401_f2o5vig5_1_1.BAK
    -rw-r----- 1 oracle oinstall 1277952 Apr 1 08:00 POR02P_20130401_f3o5vigv_1_1.BAK
    -rw-r----- 1 oracle oinstall 75161600 Apr 2 08:00 POR02P_20130402_fto626s5_1_1.BAK
    -rw-r----- 1 oracle oinstall 125640704 Apr 2 08:00 POR02P_20130402_fuo626s5_1_1.BAK
    -rw-r----- 1 oracle oinstall 1294336 Apr 2 08:00 POR02P_20130402_fvo626su_1_1.BAK
    -rw-r----- 1 oracle oinstall 63847936 Apr 2 08:00 POR02P_20130402_g1o626tc_1_1.BAK
    -rw-r----- 1 oracle oinstall 28300800 Apr 2 08:00 POR02P_20130402_g2o626tc_1_1.BAK
    -rw-r----- 1 oracle oinstall 2560 Apr 2 08:00 POR02P_20130402_g3o626tj_1_1.BAK
    -rw-r----- 1 oracle oinstall 30164480 Apr 2 11:45 POR02P_20130402_g7o62k2j_1_1.BAK
    -rw-r----- 1 oracle oinstall 21393920 Apr 2 11:45 POR02P_20130402_g8o62k2k_1_1.BAK
    -rw-r----- 1 oracle oinstall 68096 Apr 2 11:45 POR02P_20130402_g9o62k2n_1_1.BAK
    -rw-r----- 1 oracle oinstall 56855552 Apr 2 19:45 POR02P_20130402_gdo63g6k_1_1.BAK
    -rw-r----- 1 oracle oinstall 46324224 Apr 2 19:45 POR02P_20130402_geo63g6k_1_1.BAK
    -rw-r----- 1 oracle oinstall 3072 Apr 2 19:45 POR02P_20130402_gfo63g6r_1_1.BAK
    Okay, so at this point, I think I have everything I need.
    Here is my RMAN command:
    # start up auxiliary in nomount
    run {
    allocate auxiliary channel a1 type disk;
    allocate auxiliary channel a2 type disk;
    allocate auxiliary channel a3 type disk;
    allocate auxiliary channel a4 type disk;
    set until time = "to_date('02-APR-2013:15:00:00','DD-MON-YYYY:HH24:MI:SS')";
    DUPLICATE DATABASE TO por02x
    BACKUP LOCATION '/backup_rman/backupset/por02p'
    NOFILENAMECHECK
    LOGFILE
    GROUP 1 ('+DB_REDO') SIZE 512M,
    GROUP 2 ('+DB_REDO') SIZE 512M,
    GROUP 3 ('+DB_REDO') SIZE 512M,
    GROUP 4 ('+DB_REDO') SIZE 512M,
    GROUP 5 ('+DB_REDO') SIZE 512M,
    GROUP 6 ('+DB_REDO') SIZE 512M,
    GROUP 7 ('+DB_REDO') SIZE 512M,
    GROUP 8 ('+DB_REDO') SIZE 512M;
    For now, I won't paste in the entire output of the log,
    just enough to see that it works fine through the restore,
    then fails at an archivelog. If someone wants the whole
    thing, I can add it in:
    RMAN> run {
    2> allocate auxiliary channel a1 type disk;
    3> allocate auxiliary channel a2 type disk;
    4> allocate auxiliary channel a3 type disk;
    5> allocate auxiliary channel a4 type disk;
    6> set until time = "to_date('02-APR-2013:15:00:00','DD-MON-YYYY:HH24:MI:SS')";
    7> DUPLICATE DATABASE TO por02x
    8> BACKUP LOCATION '/backup_rman/backupset/por02p'
    9> NOFILENAMECHECK
    10> LOGFILE
    11> GROUP 1 ('+DB_REDO') SIZE 512M,
    12> GROUP 2 ('+DB_REDO') SIZE 512M,
    13> GROUP 3 ('+DB_REDO') SIZE 512M,
    14> GROUP 4 ('+DB_REDO') SIZE 512M,
    15> GROUP 5 ('+DB_REDO') SIZE 512M,
    16> GROUP 6 ('+DB_REDO') SIZE 512M,
    17> GROUP 7 ('+DB_REDO') SIZE 512M,
    18> GROUP 8 ('+DB_REDO') SIZE 512M;
    19> }
    allocated channel: a1
    channel a1: SID=49 device type=DISK
    allocated channel: a2
    channel a2: SID=98 device type=DISK
    allocated channel: a3
    channel a3: SID=146 device type=DISK
    allocated channel: a4
    channel a4: SID=194 device type=DISK
    executing command: SET until clause
    Starting Duplicate Db at 23-APR-2013 14:22:07
    contents of Memory Script:
    sql clone "create spfile from memory";
    executing Memory Script
    sql statement: create spfile from memory
    contents of Memory Script:
    shutdown clone immediate;
    startup clone nomount;
    executing Memory Script
    Oracle instance shut down
    connected to auxiliary database (not started)
    Oracle instance started
    Total System Global Area 2137886720 bytes
    Fixed Size 2221336 bytes
    Variable Size 503319272 bytes
    Database Buffers 1610612736 bytes
    Redo Buffers 21733376 bytes
    allocated channel: a1
    channel a1: SID=98 device type=DISK
    allocated channel: a2
    channel a2: SID=146 device type=DISK
    allocated channel: a3
    channel a3: SID=194 device type=DISK
    allocated channel: a4
    channel a4: SID=242 device type=DISK
    contents of Memory Script:
    sql clone "alter system set db_name =
    ''POR02P'' comment=
    ''Modified by RMAN duplicate'' scope=spfile";
    sql clone "alter system set db_unique_name =
    ''POR02X'' comment=
    ''Modified by RMAN duplicate'' scope=spfile";
    shutdown clone immediate;
    startup clone force nomount
    restore clone primary controlfile from '/backup_rman/backupset/por02p/POR02P_20130331_e7o5su4v_1_1.BAK';
    alter clone database mount;
    executing Memory Script
    sql statement: alter system set db_name = ''POR02P'' comment= ''Modified by RMAN duplicate'' scope=spfile
    sql statement: alter system set db_unique_name = ''POR02X'' comment= ''Modified by RMAN duplicate'' scope=spfile
    Oracle instance shut down
    Oracle instance started
    Total System Global Area 2137886720 bytes
    Fixed Size 2221336 bytes
    Variable Size 503319272 bytes
    Database Buffers 1610612736 bytes
    Redo Buffers 21733376 bytes
    allocated channel: a1
    channel a1: SID=98 device type=DISK
    allocated channel: a2
    channel a2: SID=146 device type=DISK
    allocated channel: a3
    channel a3: SID=194 device type=DISK
    allocated channel: a4
    channel a4: SID=242 device type=DISK
    Starting restore at 23-APR-2013 14:23:02
    channel a2: skipped, AUTOBACKUP already found
    channel a3: skipped, AUTOBACKUP already found
    channel a4: skipped, AUTOBACKUP already found
    channel a1: restoring control file
    channel a1: restore complete, elapsed time: 00:00:10
    output file name=+POR02U_CTL/por02x/control01.ctl
    Finished restore at 23-APR-2013 14:23:12
    database mounted
    channel a1: starting datafile backup set restore
    channel a1: specifying datafile(s) to restore from backup set
    channel a1: restoring datafile 00001 to +por02u_data
    channel a1: restoring datafile 00003 to +por02u_data
    channel a1: restoring datafile 00004 to +por02u_data
    channel a1: restoring datafile 00005 to +por02u_data
    channel a1: restoring datafile 00006 to +por02u_data
    channel a1: restoring datafile 00009 to +por02u_data
    channel a1: restoring datafile 00014 to +por02u_data
    channel a1: reading from backup piece /backup_rman/backupset/por02p/POR02P_20130331_e6o5su46_1_1.BAK
    channel a2: starting datafile backup set restore
    channel a2: specifying datafile(s) to restore from backup set
    channel a2: restoring datafile 00002 to +por02u_data
    channel a2: restoring datafile 00007 to +por02u_data
    channel a2: restoring datafile 00008 to +por02u_data
    channel a2: restoring datafile 00010 to +por02u_data
    channel a2: restoring datafile 00011 to +por02u_data
    channel a2: restoring datafile 00012 to +por02u_data
    channel a2: restoring datafile 00013 to +por02u_data
    channel a2: reading from backup piece /backup_rman/backupset/por02p/POR02P_20130331_e5o5su45_1_1.BAK
    channel a1: piece handle=/backup_rman/backupset/por02p/POR02P_20130331_e6o5su46_1_1.BAK tag=LEVEL0
    channel a1: restored backup piece 1
    channel a1: restore complete, elapsed time: 00:00:55
    channel a2: piece handle=/backup_rman/backupset/por02p/POR02P_20130331_e5o5su45_1_1.BAK tag=LEVEL0
    channel a2: restored backup piece 1
    channel a2: restore complete, elapsed time: 00:05:05
    Finished restore at 23-APR-2013 14:28:24
    channel a2: reading from backup piece /backup_rman/backupset/por02p/POR02P_20130402_fto626s5_1_1.BAK
    channel a1: piece handle=/backup_rman/backupset/por02p/POR02P_20130402_fuo626s5_1_1.BAK tag=LEVEL1D
    channel a1: restored backup piece 1
    channel a1: restore complete, elapsed time: 00:00:35
    channel a2: piece handle=/backup_rman/backupset/por02p/POR02P_20130402_fto626s5_1_1.BAK tag=LEVEL1D
    channel a2: restored backup piece 1
    channel a2: restore complete, elapsed time: 00:00:35
    starting media recovery
    unable to find archived log
    archived log thread=1 sequence=163
    released channel: a1
    released channel: a2
    released channel: a3
    released channel: a4
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of Duplicate Db command at 04/23/2013 14:29:41
    RMAN-05501: aborting duplication of target database
    RMAN-03015: error occurred in stored script Memory Script
    RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 163 and starting SCN of 15660537
    RMAN> **end-of-file**
    So, if I go back to my source:
    RMAN> list backup of archivelog sequence 163 thread 1;
    List of Backup Sets
    ===================
    BS Key Size Device Type Elapsed Time Completion Time
    11386318 66.51M DISK 00:00:09 31-MAR-2013 08:04:08
    BP Key: 11386330 Status: EXPIRED Compressed: YES Tag: ARCHIVE_BAK
    Piece Name: /backup_rman/backupset/por02p/POR02P_20130331_e9o5subf_1_1.BAK
    List of Archived Logs in backup set 11386318
    Thrd Seq Low SCN Low Time Next SCN Next Time
    1 163 15336390 31-MAR-2013 00:45:14 15661283 31-MAR-2013 08:03:51
    The archivelog is not reported as part of the preview
    command. Also, shouldn't it's changes be included in
    the next day's LEVEL1?
    Thanks for anyone's time. Would be happy to provide
    more info.

    Levi,
    Thank you very much for your insight.
    However, I may have found something. I have not fully tested and found a solution so I have not posted an update yet...I want to make sure I have a complete answer. However, I will provide some details.
    I decided to go ahead and restore ALL my archivelogs just to see if I could get the recovery to work.
    It still did not work!
    So, I happened to look at my alert log (can't believe I did not check it before) and I saw this:
    Wed Apr 24 13:34:20 2013
    Errors with log +DB_ARCH/por02x/archivelog/2013_04_24/thread_4_seq_151.7352.813591241
    Recovery interrupted!
    Recovered data files to a consistent state at change 17574527
    Media Recovery failed with error 19755
    Errors in file /opt/app/oracle/diag/rdbms/por02x/por02x/trace/por02x_pr00_2973744.trc:
    ORA-00283: recovery session canceled due to errors
    ORA-19755: could not open change tracking file
    ORA-19750: change tracking file: '+POR02P_DATA/por02p/changetracking/ctf.272.810127579'
    ORA-17503: ksfdopn:2 Failed to open file +POR02P_DATA/por02p/changetracking/ctf.272.810127579
    ORA-15001: diskgroup "POR02P_DATA" does not exist or is not mounted
    ORA-15001: diskgroup "POR02P_DATA" does not exist or is not mounted
    Slave exiting with ORA-283 exception
    Errors in file /opt/app/oracle/diag/rdbms/por02x/por02x/trace/por02x_pr00_2973744.trc:
    ORA-00283: recovery session canceled due to errors
    ORA-19755: could not open change tracking file
    ORA-19750: change tracking file: '+POR02P_DATA/por02p/changetracking/ctf.272.810127579'
    ORA-17503: ksfdopn:2 Failed to open file +POR02P_DATA/por02p/changetracking/ctf.272.810127579
    ORA-15001: diskgroup "POR02P_DATA" does not exist or is not mounted
    ORA-15001: diskgroup "POR02P_DATA" does not exist or is not mounted
    ORA-10877 signalled during: alter database recover logfile '+DB_ARCH/por02x/archivelog/2013_04_24/thread_4_seq_151.7352.813591241'...
    Then, I looked on Metalink and found this:
    Oracle Support Document 1098638.1 (Rman Duplicate fail ORA-19755, Tries Open The Block Change Tracking File of Source DB) can be found at: https://support.oracle.com/epmos/faces/DocumentDisplay?id=1098638.1
    [https://support.oracle.com/epmos/faces/DocumentDisplay?id=1098638.1]
    Now, this document is very interesting within the context of the problem I am having.  However, it says a few things:
    1. This is fixed in the oracle patchset 11.2.0.2 as part of Bug 7500916.
    ---I am on patchset 11.2.0.2!
    2. The workaround is to disable change tracking before duplicate.
    ---this is not really an option for me...we like having this turned on...it considerably speeds up our backups
    3. Workaround is to set DB_FILE_NAME_CONVERT in the SET-clause of duplicate, instead of using DB_FILE_NAME_CONVERT setting in an init.ora or spfile.
    ---tried this...did not work
    4. Workaround is to create a dummy file in the location where the error ORA-19755 is signalled.
    ---have not tried this yet
    Another interesting thing to note:
    My database is left in mounted state when it fails.  After seeing this document, just for fun I:
    SQL> alter database disable block change tracking;
    Database altered.
    And Then:
    RMAN> run {
    2> set until time = "to_date('02-APR-2013:15:00:00','DD-MON-YYYY:HH24:MI:SS')";
    3> recover database;
    4> }
    executing command: SET until clause
    Starting recover at 24-APR-2013 14:20:20
    using target database control file instead of recovery catalog
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=98 device type=DISK
    allocated channel: ORA_DISK_2
    channel ORA_DISK_2: SID=146 device type=DISK
    starting media recovery
    archived log for thread 1 with sequence 181 is already on disk as file +DB_ARCH/por02x/archivelog/2013_04_24/thread_1_seq_181.7864.813591241
    archived log for thread 1 with sequence 182 is already on disk as file +DB_ARCH/por02x/archivelog/2013_04_24/thread_1_seq_182.2358.813591247
    archived log for thread 1 with sequence 183 is already on disk as file +DB_ARCH/por02x/archivelog/2013_04_24/thread_1_seq_183.3637.813591249
    archived log for thread 2 with sequence 149 is already on disk as file +DB_ARCH/por02x/archivelog/2013_04_24/thread_2_seq_149.9547.813591241
    archived log for thread 2 with sequence 150 is already on disk as file +DB_ARCH/por02x/archivelog/2013_04_24/thread_2_seq_150.9570.813591241
    archived log for thread 2 with sequence 151 is already on disk as file +DB_ARCH/por02x/archivelog/2013_04_24/thread_2_seq_151.6148.813591247
    archived log for thread 3 with sequence 151 is already on disk as file +DB_ARCH/por02x/archivelog/2013_04_24/thread_3_seq_151.9630.813591239
    archived log for thread 3 with sequence 152 is already on disk as file +DB_ARCH/por02x/archivelog/2013_04_24/thread_3_seq_152.4418.813591247
    archived log for thread 3 with sequence 153 is already on disk as file +DB_ARCH/por02x/archivelog/2013_04_24/thread_3_seq_153.9782.813591247
    archived log for thread 4 with sequence 151 is already on disk as file +DB_ARCH/por02x/archivelog/2013_04_24/thread_4_seq_151.7352.813591241
    archived log for thread 4 with sequence 152 is already on disk as file +DB_ARCH/por02x/archivelog/2013_04_24/thread_4_seq_152.6936.813591241
    archived log for thread 4 with sequence 153 is already on disk as file +DB_ARCH/por02x/archivelog/2013_04_24/thread_4_seq_153.9610.813591249
    archived log file name=+DB_ARCH/por02x/archivelog/2013_04_24/thread_4_seq_151.7352.813591241 thread=4 sequence=151
    archived log file name=+DB_ARCH/por02x/archivelog/2013_04_24/thread_1_seq_181.7864.813591241 thread=1 sequence=181
    archived log file name=+DB_ARCH/por02x/archivelog/2013_04_24/thread_2_seq_149.9547.813591241 thread=2 sequence=149
    archived log file name=+DB_ARCH/por02x/archivelog/2013_04_24/thread_3_seq_151.9630.813591239 thread=3 sequence=151
    archived log file name=+DB_ARCH/por02x/archivelog/2013_04_24/thread_2_seq_150.9570.813591241 thread=2 sequence=150
    archived log file name=+DB_ARCH/por02x/archivelog/2013_04_24/thread_4_seq_152.6936.813591241 thread=4 sequence=152
    archived log file name=+DB_ARCH/por02x/archivelog/2013_04_24/thread_1_seq_182.2358.813591247 thread=1 sequence=182
    archived log file name=+DB_ARCH/por02x/archivelog/2013_04_24/thread_3_seq_152.4418.813591247 thread=3 sequence=152
    archived log file name=+DB_ARCH/por02x/archivelog/2013_04_24/thread_1_seq_183.3637.813591249 thread=1 sequence=183
    archived log file name=+DB_ARCH/por02x/archivelog/2013_04_24/thread_3_seq_153.9782.813591247 thread=3 sequence=153
    archived log file name=+DB_ARCH/por02x/archivelog/2013_04_24/thread_2_seq_151.6148.813591247 thread=2 sequence=151
    archived log file name=+DB_ARCH/por02x/archivelog/2013_04_24/thread_4_seq_153.9610.813591249 thread=4 sequence=153
    media recovery complete, elapsed time: 00:00:08
    Finished recover at 24-APR-2013 14:20:36
    So, it finishes the recovery. However, I did not yet try to open resetlogs because this was originally a duplicate and doing an open resetlogs would not complete all the post-duplicate operations.
    Also, looking at the logs applied when running the above recover, now it only uses logs that were specified in the original PREVIEW command.
    I am going to play around some more and I promise I will post back with whatever results I happen across.
    Chris..

  • C#: Building a SOFTWARE SOLUTION from scratch to finish

    Hello good people of MSDN. I have a VERY SIMPLE REQUEST... (Here goes)
    I'm trying to build an Application (from scratch, custom specs) that allows the user to manage, organize and keep track of books that are available in a library. This system is to be made use of in environments such as personal library, public library, any
    situation that requires/involves the constant movement of BOOKS.
    Now, I have presented a solution to the client which works OKAY but there has been a SUDDEN CHANGE of heart, now the client wants the solution to be implemented quite differently. The solution that I BUILT is basically an ASP.NET C# Application that runs LOCALLY
    so it opens up in the browser (IIS installed and all that) for the user to make use of the Application. Now when I want to have the entire Application to FUNCTION on another system I simply copy the Database, the Application folder (that has all the files
    in it) place it in the IIS Directory... ... (So as not to waste your PRECIOUS TIME). To access the Application we simply open up the BROWSER enter localhost/the Application's URL...
    The client, first of all does NOT want the BROWSER in the mix of things (ANYMORE !!!); secondly, does not want to have to go through all of this process of COPYING FILES INTO LOCATIONS, IIS etc etc in order to get the solution to WORK/OPERATE on another/several
    other computers. The client wants to be able to have an EXECUTABLE INSTALLATION file that when clicked installs a SOFTWARE APPLICATION that opens up in its own WINDOW ENVIRONMENT without the help/assistance of the BROWSER !
    This is my PREDICAMENT there's NO TIME... I need to AT LEAST present a working prototype in less than 24hrs!
    So my questions are:
    1.) Is there anyway for me to convert my ASP.NET C# Web Application into an installable client software without losing any of the components that make it work?
    2.) If I have to build the ENTIRE Application into a WinForms PROJECT (I'm using VS 2010) can I STILL MAKE USE of the DATABASE I used for the ASP.NET C# Application?
    3.) I don't want to have to DUMP my SQL SERVER DATABASE (as it is) to start creating a DB using something else like MS Access. Do I have a choice?
    I have included with this post a Notepad doc that details the sketch of what I am HOPING to ACHIEVE. I would Appreciate it if anyone can (KINDLY) take it up and create according to the SPECIFICATIONS included in the doc. I have tried to be very DETAILED and
    DESCRIPTIVE in the doc to make it easy for  the DEVELOPER to FOLLOW THROUGH. Can it be done?
    (If ANYONE can take it up and provide the solution it would be a good thing because it would ALWAYS be available to other DEVELOPERS who can read through the CODE and become better C# PROGRAMMERS and better at using Visual Studio. As this is a VERY REAL
    LIFE SCENARIO coders can LEARN from the SITUATION).
    At the end of the whole CODING PROCESS I intend to BUILD the Source to become a SINGLE EXECUTABLE FILE that will INSTALL the Application on the clients system. If anyone can PROFFER (and MAYBE RENDER) a SOLUTION that's ACCURATE, SPEEDY, RELIABLE to me, I would
    be grateful!
    The Software is to be used in a school. Students are only going to REQUEST for books, RETURN the books that they collected. They are NOT BUYING books!
    Working/Functional Prototype
    (The PROTOTYPE I hope to present REALLY SOON should be CAPABLE of the FOLLOWING)
    1. Navigate/Move through the different Forms/GUI Screens when the appropriate buttons are clicked
    2. Interact with the DB (to some extent) and carry out (for now)TRANSACTIONS like adding books, viewing list of books, delete book, Register Student (other DB operations can be included much later)
    3. When the Application is LAUNCHED a Splash Screen is displayed introducing the Application (while the Application is loading), then when it's done Loading, the Application opens to present the Start Screen
    4. An EXECUTABLE INSTALLATION FILE that can be used to conveniently INSTALL the Application on multiple systems... Just in-case it is to be installed on a computer system that's not Windows OS, I'd like for it to carter to dependencies appropriately.
    PLEASE ANYONE that chooses to ASSIST (based on the SPECIFICATIONS) should KINDLY include the DETAILS of how the result was ACHIEVED so at least I can read through and understand the Application and conveniently make suitable/any necessary modifications (should
    the CLIENT require that I do so). eg Step by step instructions on how to get the whole SOURCE CODE into INSTALLATION FILE, Setting up the Splash Screen, how the DB is made to connect to the front end GUI (eg ODBC, OLE DB that type of stuff)... etc etc
    I'm trying to keep the prototype VERY SIMPLE so I can ACHIEVE something TANGIBLE in this short space of time then LATER any SOPHISTICATION can be included.
    PS: I have done MY VERY BEST to plan out the Application Logic. So it should be easy to just READ over the Notepad docs I'm including here... As a pointer (should YOU decide to ASSIST) it would be FASTER to START with the WinForms, then MOVE to CREATING
    the DB, afterwards LINK THEM...
    Thank YOU ALL.
    BELOW IS INFO ABOUT THE DATABASE STRUCTURE *
    BookStore Database (Tables)
    Books
    Students
    UsersRequest
    BooksReturned
    Information and instructions about the diff tables in the database
    Books: this holds information about all the books available in the store
    Students: this holds info about the students that come in to request for books
    UsersRequest: for the admin to see at one glance requests from every student
    BooksReturned: for the admin to look at info about the different books returned by the students.
    Books table (attributes/colomns)
    BookTitle
    Author
    Edition
    ISBN
    CategoryName
    Students table (attributes/columns)
    reg no
    FName
    LName
    MName
    UsersRequest table (attributes/columns)
    reg no
    FName
    LName
    BookTitle
    Author
    Edition
    ISBN
    CategoryName
    BooksReturned (attributes/columns)
    reg no
    FName
    LName
    BookTitle
    Author
    Edition
    ISBN
    CategoryName
    INTERPRETATIONS OF DB COLUMN NAMES
    FName = First Name of the student
    LName = Last Name of the student
    reg no = Registration Number of the student at the school
    Author = The authorn of a book
    Edition = EG 1st Edition, 2nd Edition that kinda thing
    ISBN = The Standard Book Number of the book
    CategoryName = EG Computer Science, Applied Robotics
    BELOW IS WINFORMS PLAN: FRONT END
    There are just gonna be 5 GUI Components (FOR NOW). The ENTIRE APPLICATION WINDOWS should be in the range 700px by 700px (width by height).
    Forms/GUI Instances
    1. Start/Welcome Screen
    2. List of books
    3. Administration
    4. Relase Notes
    5. Splash screen
    Start/Welcome Screen
    When the Software Application is launched and the Software is done loading this is the FIRST screen that the user sees. This Screen presents the users with options to carry out certain actions. Also it presents some brief/summary information to the user in
    a presentable manner.
    Options include: Administration, View list of books, Relase Notes
    Brief/Summary of information include: Total no of books in store, Total no of new books added
    List of books Screen
    When the user clicks on this action link from any where in the Software Application this page comes up. It displays a complete list of the books that are available in the store and also relevant info about the books. It reads DIRECTLY from the Books table inside
    the Database and presents the info in a tabular format. It also provides the user with certain options to carry out some actions.
    Options include: Request book (button beside every book item)
    Administration Screen
    The Administration Screen is segmented into several Areas that allow the operator to carry out individual/independent tasks. On this Screen the operator of the system has options to carry out many vital tasks as regards the Application. Rather than having to
    present many different Screens, all the control/Administrative tasks of this Aplication are included here on this ONE Screen.
    Options/Segments include: Add book(s), Delete book(s), View list of books, View books requests, View books returned, View all Students, Request for book(s), Register Student, Return books
    (All of these Options can be done/carried out on this one screen without having to bring many different screens to do the different tasks)
    >>Add book(s) Area
    This area FEEDS info DIRECTLY INTO the Books DB. To accept Data input into the Application this has following text boxes: Book Title, Author, Edition, ISBN, Category Name
    >>Delete book(s) Area
    Presents the options for deleting a book. It also relates DIRECTLY with the Books table in the DB. It presents the list of books as they are available in the Books DB and places a DELETE action button for EVERY book so that when this button is clicked it removes
    the book from the Books DB.
    >>View list of books
    This will simply bring up the list of books Screen since already we have a screen for this.
    >>View books requests
    This reads DIRECTLY from the UsersRequest table and just presents the info to the user in a tabular form.
    >>View books returned
    This reads DIRECTLY from the BooksReturned table and just presents the info to the user in a tabular form.
    >>View all Students
    Lists out all the students that are registered in the Application System. It READS DIRECTLY from the Students table. This area is used by the Admin/Operator of the Application to view a List of all the Students that have had transactions with the Application.
    >>Request for book(s) Area
    This area relates DIRECTLY with the UsersRequest table in the DB. It FEEDS in Data into the UsersRequest table. This area allows the admin to collect info of the student that's requesting for the book. It provides texboxes such as: First Name, Middle Name,
    Surname, RegNo, BookTitle
    >>Register Student Area
    This area relates DIRECTLY with the Students table in the DB. It FEEDS in Data into the Students table. This are allows the admin to input info of students that are new to the system.
    In other for the Admin to keep track of NEW students who are coming in to request for books this area is very important. It allows the Admin to register a new student so that the student can now request for books.
    There are text input fields on this Screen that allow the Admin to collect certain infomation about the student and feed it into the Students table of the DB. Textboxes inculde: First Name, Middle Name, Last Name, RegNo
    >>Return books Area
    This area relates DIRECTLY with the BooksReturned table. It FEEDS Data into the BooksReturned table. Textboxes include: Book Title, Author, ISBN, First Name of student, Last Name of student
    Release Notes Screen
    This Screen has three tabs that contain their own individual MESSAGES. The tabs are: Version, Known Issues
    Version
    Refers to the version of the Application. This tab provides info about the version of the Application
    Known Issues
    Known problems with the Software Application
    Splash Screen
    A very simple/ moderate graphic (nothing fancy)to introduce the Application

    Hello,
    Welcome to MSDN forum.
    I am afraid that the issue is out of support range of VS General Question forum which mainly discusses
    the usage of Visual Studio IDE such as WPF & SL designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System
    and Visual Studio Editor.
    Because your issue is about ASP.NET web application development, I suggest that you can consult your issue on ASP.NET forum:
    http://forums.asp.net/
     for better solution and support.
    Best regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Invalid Argument Exception on Java API's DB Close

    When closing the database via the Java API's close method, I am getting an invalid argument exception... how can this be fixed... subsequent access to the DB causes the JVM to crash??
    ERROR: An exception has occurred: java.lang.IllegalArgumentException: Invalid argument
    java.lang.IllegalArgumentException: Invalid argument
    at com.sleepycat.db.internal.db_javaJNI.DbEnv_close0(Native Method)
    at com.sleepycat.db.internal.DbEnv.close0(DbEnv.java:217)
    at com.sleepycat.db.internal.DbEnv.close(DbEnv.java:77)
    at com.sleepycat.db.Environment.close(Environment.java:39)
    at com.sleepycat.dbxml.XmlManager.closeInternal(XmlManager.java:301)
    at com.sleepycat.dbxml.XmlManager.delete(XmlManager.java:33)
    at com.sleepycat.dbxml.XmlManager.close(XmlManager.java:310)
    at com.iconnect.data.adapters.BerkleyXMLDBImpl.insert(BerkleyXMLDBImpl.java:827)
    at com.iconnect.data.DataManagerFactory.insert(DataManagerFactory.java:182)
    at Xindice2Berkley.main(Xindice2Berkley.java:99)

    I had the same problem. I could fix it by carefully calling the delete() function on all those DBXML Xml..xyz objects that you create when you perform queries etc. It seems that those Java objects have some 'shadow' object in the underlying DLL and by calling delete() you free resources that remain otherwise assigned (maybe somebody with a C++ background who programmed this stuff?). Call delete() before the Java object gets out of scope. For instance:
    results = mgr.query(collection,context,null);
    XmlValue value;
    try {
    while ((value = results.next()) != null) {
    XmlValue c = value.getFirstChild();
    String ref = c.getNodeValue();
    c.delete(); c = null;
    value.delete(); value = null;
    catch (Exception e) {
    finally {
    if (results != null) {
    results.delete();
    results = null;
    Once i did this on all possible dbxml objects i used in my code, the java.lang.IllegalArgumentException: Invalid argument disappeared.
    Message was edited by:
    user562374

  • Need some OO design pointers for a Java card game I wrote for uni

    Hi,
    I hope a few of you Java sifus can help me understand I dilemma I keep finding myself in.
    I created a card game for a university assignment which works great but its not very OO at the moment.
    I only have 3 classes; a Card class, a Deck class and a Game class which contains all my GUI, AI, Game Controller, Player and Hand code.
    The assignment is over but I feel like enhancing the game, adding animation, multiplayer, several AI agents etc.
    The first thing I have attempted is animation and I've hit a brick wall. I am trying to create animation for my card game whereby I have an animation showing the cards being shuffled and then an animation which shows the cards being dealt to the players. The game then commences. The cards on the GUI then need to be clickable (MouseListeners?) to play the game. If you're running Windows 7, load up 'Hearts' and you'll know what I'm trying to achieve.
    I don't understand how the GUI, and Card class need to be seperated so that its good OO.
    If I give you a few snippets of code, it might explain the situation:
    A snippet of my card class is as follows:
    import javax.swing.*;
    public class Card extends JLabel //Each card is a JLabel
         private int value;                    //variable for the value of the card
         private int suit;                         //variable for the suit of the card
         private ImageIcon frontOfCard;     //Displays the image of the front of the cards
         private ImageIcon backOfCard;          //displays the image of the back of the cards
         public Card (int Value, int Suit, ImageIcon front, ImageIcon back)
              value = Value;               
              suit = Suit;               
              frontOfCard = front;     
              backOfCard = back;
              setIcon(backOfCard);     //To make it non-visible when dealt
         }As you can see, each card is a JPanel. I've been told by some I shouldn't extend JPanel but rather that I should have a BufferedImage/Image instance variable for each card as the image of the card. The thing is that I need each card displayed on the GUI which can then be clickable. When it is clicked, it is moved from the players hand, into the players move. - There needs to be an animation showing this.
    I've got the animation code figured out in terms of how to move 'images' around a screen to make a pleasing animation. The problem is there are no clickable listeners for images, so the Images needs to be inside some container; a widget which can fire events - Hence the reason I have chosen to extend JPanel for my Cards.
    and a Deck class, snippet is as follows:
    public class Deck extends JLabel //The deck will be shown on the GUI as a JLabel
         private ArrayList<Card> standardDeck;
         public Deck()
              standardDeck = new ArrayList<Card>();
              ImageIcon cardBack = new ImageIcon("CardBack.png");
              setPreferredSize(new Dimension(90, 135));
              setIcon(cardBack);
              int cardCount = 0;     //This variable counts the cards. Is used to assist in the name generation of the imageicon filename
              String str; //the imageIcon constructor accepts filenames as strings so this string holds the filename of the corresponding card image file.
              for (int a=0; a<4; a++) //putting the cards into the deck with the specifed parameters
                   for (int b=2; b<15; b++)
                        cardCount+=1;     //incrementing the card count (the card files are named 1-52 as integers)
                        str = Integer.toString(cardCount); //Integer is converted to string type before being added to string str variable
                        str += ".png"; //To complete the image filename, ".png" has to be concatenated to the string.
                        standardDeck.add(new Card(b, a, new ImageIcon(str), cardBack)); //creating and then adding the cards
         }This is how I envisage a new class diagram for my game:
    Card class
    Game Class <--- Holds a Deck instance, Players instances, and the GUI instance
    Player Class <-- Will contains hand 'instances' , but I will not create a seperate 'Hand' Class, I will use an ArrayList.
    AI Class extends Player Class
    GUI Class
    Deck Class <-- contains 52 cards
    My question is, how do I show the Cards on the GUI if my Cards are in a Deck and the Deck is held in the Game class?
    Please note that there are 52 cards, so potentially 52 images on the GUI, each of which needs to be clickable. When clicked, the cards are moved about, e.g. from the deck to a players hand, from a players hand back to the deck, from a players hand to a players current move hand.
    etc
    I've read that GUI, program control, and logic should be seperated. If thats the case, what do I have in my GUI class if the Cards (which are JPanels) are held in the Deck class which in turn is held in the Game class?
    Any help on this would be greatly appreciated!
    I know what I have written may not be fully clear. I find it hard sometimes to fully convey a problem at hand. Please let me know if you don't understand what I've written and I'll do my best to explain further.

    Faz_86 wrote:
    Hi,
    I hope a few of you Java sifus can help me understand I dilemma I keep finding myself in.
    I created a card game for a university assignment which works great but its not very OO at the moment.
    I only have 3 classes; a Card class, a Deck class and a Game class which contains all my GUI, AI, Game Controller, Player and Hand code.
    The assignment is over but I feel like enhancing the game, adding animation, multiplayer, several AI agents etc.
    Admirable, and the best way to learn, doing something that interests you.
    The first thing I have attempted is animation and I've hit a brick wall. I am trying to create animation for my card game whereby I have an animation showing the cards being shuffled and then an animation which shows the cards being dealt to the players. The game then commences. The cards on the GUI then need to be clickable (MouseListeners?) to play the game. If you're running Windows 7, load up 'Hearts' and you'll know what I'm trying to achieve.
    I don't understand how the GUI, and Card class need to be seperated so that its good OO.
    If I give you a few snippets of code, it might explain the situation:
    A snippet of my card class is as follows:
    Do a quick Google on the model view controller pattern. Your listeners are your controllers. Your JPanel, JButton, etc. are your view. The AI, Player, Card and Deck (and presumably something like Score) are your model. Your model should be completely testable and not dependent on either the controller or the view. Imagine you could play the game from the command line. Get that working first. Then you can add all the bells and whistles for the UI.
    import javax.swing.*;
    public class Card extends JLabel //Each card is a JLabel
    (redacted)
    As you can see, each card is a JPanel. I've been told by some I shouldn't extend JPanel but rather that I should have a BufferedImage/Image instance variable for each card as the image of the card. The thing is that I need each card displayed on the GUI which can then be clickable. When it is clicked, it is moved from the players hand, into the players move. - There needs to be an animation showing this.Extending JPanel is fine. As you noted, you need something to add listeners to. However, I would separate things a bit. First, a card really only has a rank and suit (and perhaps an association to either the deck or a player holding the card). The notion of setIcon() is where you are tripping up. The card itself exists in memory. You should be able to test a card without using a UI. Create a separate class (CardPanel or something similar) that has a reference to a Card and the additional methods needed for your UI.
    I've got the animation code figured out in terms of how to move 'images' around a screen to make a pleasing animation. The problem is there are no clickable listeners for images, so the Images needs to be inside some container; a widget which can fire events - Hence the reason I have chosen to extend JPanel for my Cards.
    and a Deck class, snippet is as follows:
    public class Deck extends JLabel //The deck will be shown on the GUI as a JLabel
         private ArrayList<Card> standardDeck;
         public Deck()
              standardDeck = new ArrayList<Card>();
              ImageIcon cardBack = new ImageIcon("CardBack.png");
              setPreferredSize(new Dimension(90, 135));
              setIcon(cardBack);
              int cardCount = 0;     //This variable counts the cards. Is used to assist in the name generation of the imageicon filename
              String str; //the imageIcon constructor accepts filenames as strings so this string holds the filename of the corresponding card image file.
              for (int a=0; a<4; a++) //putting the cards into the deck with the specifed parameters
                   for (int b=2; b<15; b++)
                        cardCount+=1;     //incrementing the card count (the card files are named 1-52 as integers)
                        str = Integer.toString(cardCount); //Integer is converted to string type before being added to string str variable
                        str += ".png"; //To complete the image filename, ".png" has to be concatenated to the string.
                        standardDeck.add(new Card(b, a, new ImageIcon(str), cardBack)); //creating and then adding the cards
         }This is how I envisage a new class diagram for my game:
    I am not an animation buff, so I will assume the above works.
    Card classRemove the UI aspects to this class, and I think you are all set here.
    Game Class <--- Holds a Deck instance, Players instances, and the GUI instancePresumably this is where main() resides. It will certainly have a reference to model classes (player, game, deck, etc.) and likely the master JFrame (or a controller class you create yourself).
    Player Class <-- Will contains hand 'instances' , but I will not create a seperate 'Hand' Class, I will use an ArrayList.Does a player really have multiple hands? It seems to me more of a one-to-one relationship (or a player has a one-to-many relationship to Card).
    AI Class extends Player ClassWhy extend Player? Create a Player interface, then have a HumanPlayer and AIPlayer implementation. Common parts could be refactored out into either a helper class (delegation) or AbstractPlayer (inheritance).
    GUI ClassMy assumption is that this class has a reference to the master JFrame.
    Deck Class <-- contains 52 cards
    Yes. You may end up recycling this class such that a Deck can also function as a Hand for a given player. If there are differences between the two, create an interface and have a Hand and a Deck implementation. Coding to interfaces is a good thing.
    My question is, how do I show the Cards on the GUI if my Cards are in a Deck and the Deck is held in the Game class?You need to pass a reference to the appropriate view class. That is how MVC works. The controller receives a request from the view, dispatches to some model functionality you write (such as GameRulesEngine, Deck, etc.) and returns a result to the view (which could be the same view or a different one, imagine someone clicking 'high scores').
    Please note that there are 52 cards, so potentially 52 images on the GUI, each of which needs to be clickable. When clicked, the cards are moved about, e.g. from the deck to a players hand, from a players hand back to the deck, from a players hand to a players current move hand.
    etc
    That is up to you to write the animation code. In principle, you have a mouse listener, and then you take the appropriate rendering steps.
    I've read that GUI, program control, and logic should be seperated. If thats the case, what do I have in my GUI class if the Cards (which are JPanels) are held in the Deck class which in turn is held in the Game class?
    See above.
    Any help on this would be greatly appreciated!
    You are welcome.
    I know what I have written may not be fully clear. I find it hard sometimes to fully convey a problem at hand. Please let me know if you don't understand what I've written and I'll do my best to explain further.No, you have been doing fine.
    - Saish

  • Error while duplicate database from one server to another server

    Hi there,
    I am practicing duplicate database from one single database server to another server. Hardware and driver path on 2 machines is the same. Here are my steps:
    --------------------- Clone site:
    1. modify listener.ora with content:
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost.localdomain)(PORT = 1521))
    ADR_BASE_LISTENER = /u01/app/oracle
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (GLOBAL_DBNAME = orcl)
    (ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1)
    (SID_NAME= orcl)
    ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER = ON
    2. stop and start listener again, message show like :
    Service “orcl” has 1 instance(s).
    Instance “orcl”, status UNKNOWN, has 1 handler(s) for this service…
    The command completed successfully
    3. create pfile from spfile.
    4. shutdown and startup nomount with pfile is new pfile create from step 3.
    --------------------------------------- Source site
    1. modify tnsnames.ora with content like:
    VVCOREDB =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost.localdomain)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = vvcoredb)
    ORCL =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP) (HOST = 10.254.1.235) (PORT=1521))
    (CONNECT_DATA =
         (SERVER = DEDICATED)
         (SERVICE_NAME = orcl)
    2. run command from rman like these:
    rman> connect target sys@vvcoredb
    rman> target database Password:
    rman> connect auxiliary sys@orcl
    rman> auxiliary database Password:
    rman> DUPLICATE TARGET DATABASE to orcl from active database spfile nofilenamecheck;
    Then the result show below:
    Starting Duplicate Db at 24-SEP-12
    using target database control file instead of recovery catalog
    allocated channel: ORA_AUX_DISK_1
    channel ORA_AUX_DISK_1: SID=63 device type=DISK
    contents of Memory Script:
    backup as copy reuse
    targetfile '/u01/app/oracle/product/11.2.0/db_1/dbs/spfilevvcoredb.ora' auxiliary format
    '/u01/app/oracle/product/11.2.0/db_1/dbs/spfileorcl.ora' ;
    sql clone "alter system set spfile= ''/u01/app/oracle/product/11.2.0/db_1/dbs/spfileorcl.ora''";
    executing Memory Script
    Starting backup at 24-SEP-12
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=74 device type=DISK
    Finished backup at 24-SEP-12
    sql statement: alter system set spfile= ''/u01/app/oracle/product/11.2.0/db_1/dbs/spfileorcl.ora''
    contents of Memory Script:
    sql clone "alter system set db_name =
    ''ORCL'' comment=
    ''duplicate'' scope=spfile";
    shutdown clone immediate;
    startup clone nomount;
    executing Memory Script
    sql statement: alter system set db_name = ''ORCL'' comment= ''duplicate'' scope=spfile
    Oracle instance shut down
    connected to auxiliary database (not started)
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of Duplicate Db command at 09/24/2012 17:44:12
    RMAN-03015: error occurred in stored script Memory Script
    RMAN-04014: startup failed: ORA-01261: Parameter db_recovery_file_dest destination string cannot be translated
    ORA-01262: Stat failed on a file destination directory
    Linux-x86_64 Error: 2: No such file or directory
    I don't know what wrong with my pfile? I specify correct my pfile on clone site like this:
    orcl.__db_cache_size=1476395008
    orcl.__java_pool_size=16777216
    orcl.__large_pool_size=16777216
    orcl.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
    orcl.__pga_aggregate_target=1342177280
    orcl.__sga_target=1979711488
    orcl.__shared_io_pool_size=0
    orcl.__shared_pool_size=436207616
    orcl.__streams_pool_size=0
    *.audit_file_dest='/u01/app/oracle/admin/orcl/adump'
    *.audit_trail='db'
    *.compatible='11.2.0.0.0'
    *.control_files='/u01/app/oracle/oradata/orcl/control01.ctl','/u01/app/oracle/flash_recovery_area/orcl/control02.ctl'
    *.db_block_size=8192
    *.db_domain=''
    *.db_name='orcl'
    *.db_recovery_file_dest='/u01/app/oracle/flash_recovery_area/vvcoredb'
    *.db_recovery_file_dest_size=4070572032
    *.diagnostic_dest='/u01/app/oracle'
    *.dispatchers='(PROTOCOL=TCP) (SERVICE=orclXDB)'
    *.memory_target=3313500160
    *.open_cursors=300
    *.processes=150
    *.remote_login_passwordfile='EXCLUSIVE'
    *.undo_tablespace='UNDOTBS1'
    Please suggest me do i miss some steps when try to duplicate database?
    Any suggestions are welcome.
    Thanks in advance!
    P/s: Sorry for my bad English.

    Oh god, it worked. Thank you. But i got another problem like this:
    duplicate target database to orcl from active database spfile set "db_recovery_file_dest" = "/u01/app/oracle/flash_recovery_area/vvcoredb" nofilenamecheck;
    Starting Duplicate Db at 24-SEP-12
    using target database control file instead of recovery catalog
    allocated channel: ORA_AUX_DISK_1
    channel ORA_AUX_DISK_1: SID=63 device type=DISK
    contents of Memory Script:
    backup as copy reuse
    targetfile '/u01/app/oracle/product/11.2.0/db_1/dbs/spfilevvcoredb.ora' auxiliary format
    '/u01/app/oracle/product/11.2.0/db_1/dbs/spfileorcl.ora' ;
    sql clone "alter system set spfile= ''/u01/app/oracle/product/11.2.0/db_1/dbs/spfileorcl.ora''";
    executing Memory Script
    Starting backup at 24-SEP-12
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=74 device type=DISK
    Finished backup at 24-SEP-12
    sql statement: alter system set spfile= ''/u01/app/oracle/product/11.2.0/db_1/dbs/spfileorcl.ora''
    contents of Memory Script:
    sql clone "alter system set db_name =
    ''ORCL'' comment=
    ''duplicate'' scope=spfile";
    sql clone "alter system set db_recovery_file_dest =
    ''/u01/app/oracle/flash_recovery_area/vvcoredb'' comment=
    '''' scope=spfile";
    shutdown clone immediate;
    startup clone nomount;
    executing Memory Script
    sql statement: alter system set db_name = ''ORCL'' comment= ''duplicate'' scope=spfile
    sql statement: alter system set db_recovery_file_dest = ''/u01/app/oracle/flash_recovery_area/vvcoredb'' comment= '''' scope=spfile
    Oracle instance shut down
    connected to auxiliary database (not started)
    Oracle instance started
    Total System Global Area 3307048960 bytes
    Fixed Size 2217872 bytes
    Variable Size 1811941488 bytes
    Database Buffers 1476395008 bytes
    Redo Buffers 16494592 bytes
    contents of Memory Script:
    sql clone "alter system set db_name =
    ''VVCOREDB'' comment=
    ''Modified by RMAN duplicate'' scope=spfile";
    sql clone "alter system set db_unique_name =
    ''ORCL'' comment=
    ''Modified by RMAN duplicate'' scope=spfile";
    shutdown clone immediate;
    startup clone force nomount
    backup as copy current controlfile auxiliary format '/u01/app/oracle/oradata/vvcoredb/control01.ctl';
    restore clone controlfile to '/u01/app/oracle/recovery_area/vvcoredb/control02.ctl' from
    '/u01/app/oracle/oradata/vvcoredb/control01.ctl';
    alter clone database mount;
    executing Memory Script
    sql statement: alter system set db_name = ''VVCOREDB'' comment= ''Modified by RMAN duplicate'' scope=spfile
    sql statement: alter system set db_unique_name = ''ORCL'' comment= ''Modified by RMAN duplicate'' scope=spfile
    Oracle instance shut down
    Oracle instance started
    Total System Global Area 3307048960 bytes
    Fixed Size 2217872 bytes
    Variable Size 1811941488 bytes
    Database Buffers 1476395008 bytes
    Redo Buffers 16494592 bytes
    Starting backup at 24-SEP-12
    using channel ORA_DISK_1
    channel ORA_DISK_1: starting datafile copy
    copying current control file
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of Duplicate Db command at 09/24/2012 18:42:09
    RMAN-03015: error occurred in stored script Memory Script
    RMAN-03009: failure of backup command on ORA_DISK_1 channel at 09/24/2012 18:42:09
    ORA-17628: Oracle error 19505 returned by remote Oracle server
    I have a comment that source site doesn't have flash_recovery_area, instead it's name is recovery_area, is it problem?
    Edited by: 788420 on Sep 24, 2012 4:44 AM

  • Setting up new dbname/sid while creating oracle db from rman backups in 11g

    Hi all,
    I have rman backups and need to create another database from rman backups with different name... but it is unsuccessful..
    created instance with new db...
    running create new db connecting rman auxiliary sys/password@newdb
    run {
    SET NEWNAME FOR DATAFILE 1 TO 'F:\app\HOME\oradata\clonedb1\SYSTEM01.DBF';
    SET NEWNAME FOR DATAFILE 2 TO 'F:\app\HOME\oradata\clonedb1\SYSAUX01.DBF';
    SET NEWNAME FOR DATAFILE 3 TO 'F:\app\HOME\oradata\clonedb1\UNDOTBS01.DBF';
    SET NEWNAME FOR DATAFILE 4 TO 'F:\app\HOME\oradata\clonedb1\USERS01.DBF';
    SET NEWNAME FOR DATAFILE 5 TO 'F:\app\HOME\oradata\clonedb1\EXAMPLE01.DBF';
    SET NEWNAME FOR TEMPFILE 1 TO 'F:\app\HOME\oradata\clonedb1\TEMP01.DBF';
    DUPLICATE DATABASE TO clonedb
    pfile 'D:\TESTDELETE\initclonedb1.ora'
    BACKUP LOCATION 'F:\app\HOME\flash_recovery_area\orcl\'
    LOGFILE GROUP 1 ('F:\APP\HOME\ORADATA\ORCL\REDO01.LOG') SIZE 60M REUSE,
    GROUP 2 ('F:\APP\HOME\ORADATA\ORCL\REDO02.LOG.rdo') SIZE 60M REUSE,
    GROUP 3 ('F:\APP\HOME\ORADATA\ORCL\REDO03.LOG') SIZE 60M REUSE;
    Error it shown is in rman backup creation is as follows
    <part>>
    sql statement: alter system set db_name = ''ORCL'' comment= ''Modified by RMAN
    duplicate'' scope=spfile
    Oracle instance shut down
    Oracle instance started
    Total System Global Area 640286720 bytes
    Fixed Size 1376492 bytes
    Variable Size 314576660 bytes
    Database Buffers 318767104 bytes
    Redo Buffers 5566464 bytes
    Starting restore at 20-DEC-11
    allocated channel: ORA_AUX_DISK_1
    channel ORA_AUX_DISK_1: SID=133 device type=DISK
    channel ORA_AUX_DISK_1: restoring control file
    channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:07
    output file name=F:\APP\HOME\ORADATA\CLONEDB1\CONTROL01.CTL
    output file name=F:\APP\HOME\FLASH_RECOVERY_AREA\CLONEDB1\CONTROL02.CTL
    Finished restore at 20-DEC-11
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of Duplicate Db command at 12/20/2011 07:07:11
    RMAN-03015: error occurred in stored script Memory Script
    RMAN-06136: ORACLE error from auxiliary database: ORA-01102: cannot mount databa
    se in EXCLUSIVE mode
    RMAN> EXIT
    how can i prevent rman setting db_name=orcl which is already exists in the db.. i need to create db from rman backups with different dbname...
    whould someone help me out, how can i create database from another database rman backups with different dbname/sid on same host..
    My pfile has new db_name , but while db creation rman setting to db_name to source dbname.. it should be new db name that i want create with new db name...
    is there any RMAN command to specify new DB name it should set while running
    sql statement: alter system set db_name = newdbname -- as part rman script execution...
    it appears to be i should not touch the soruce db.. i have access to only source db rman backups and need to create another db with different dbname/sid.. please do help...

    When you performing RMAN duplicate why you making your script so complicated?
    Your instance name and DB name can be different, But what is the contents in your pfile "D:\TESTDELETE\initclonedb1.ora" ? please do post
    Have you started any other services related to ORACLE? check in start --> run --> services.msc any other active oracles services, Make sure you have clonedb1.
    Startup in nomount
    check the connectivity to target server.
    SET NEWNAME FOR TEMPFILE 1 TO 'F:\app\HOME\oradata\clonedb1\TEMP01.DBF';Why you mentioning SET NEWNAME FOR DATAFILE ? You have option of db_file_name_convert/log_file_name_convert in case if your file system different in Target & auxiliary.
    BACKUP LOCATION 'F:\app\HOME\flash_recovery_area\orcl\'When you have backup in same location why you are mentioning this clause?
    First run duplicate from auxiliary server as
    rman target sys/*****@prod auxiliary /
    RMAN> duplicate target database to "db_name";
    Am not sure what you are trying to do. is it 11gR1 or 11gR2?
    You have option of duplicate from active database without having backup also..
    here some links please check it.
    http://docs.oracle.com/cd/E14072_01/backup.112/e10642/rcmdupdb.htm#BGBFDJHB
    RMAN 11GR2 : DUPLICATE WITHOUT CONNECTING TO TARGET DATABASE [ID 874352.1]
    knowledgespring      
         Newbie
    Handle:      knowledgespring
    Status Level:      Newbie (10)
    Registered:      Dec 26, 2007
    Total Posts:      243
    Total Questions:      77 (75 unresolved)
    So sad that forum was able to help only in two answers out of your 77 questions :(
    Edited by: CKPT on Dec 21, 2011 5:12 PM

  • RMAN 11gr2 ORA-00308 when dulplicate database from active

    Hi,
    I'm trying to clone a production database (Oracle 11.2.0.3) from HP-UX IA64 to Solaris 10 (Sparc 64) (source on Filesystem, target on ASM)
    the previous steps was done (same oracle software installation, same patches, sqlnet comunication, etc.)
    but the RMAN fails at end of the process:
    Recovery Manager: Release 11.2.0.3.0 - Production on Wed Aug 22 09:44:34 2012
    Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
    connected to target database: SIN (DBID=634625013)
    connected to recovery catalog database
    connected to auxiliary database: SIN (not mounted)
    RMAN> run
    +2> {+
    +3> allocate channel c1 type disk;+
    +4> allocate channel c2 type disk;+
    +5> allocate channel c3 type disk;+
    +6> allocate channel c4 type disk;+
    +7> allocate auxiliary channel a1 type disk;+
    +8> allocate auxiliary channel a2 type disk;+
    +9> set newname for datafile 1 to '+DG_DATA';+
    +10> set newname for datafile 2 to '+DG_DATA';+
    +11> set newname for datafile 3 to '+DG_DATA';+
    +12> set newname for datafile 4 to '+DG_DATA';+
    +13> set newname for datafile 5 to '+DG_DATA';+
    +14> set newname for datafile 6 to '+DG_DATA';+
    +15> set newname for datafile 7 to '+DG_DATA';+
    +16> set newname for datafile 8 to '+DG_DATA';+
    +17> set newname for datafile 9 to '+DG_DATA';+
    +18> set newname for datafile 10 to '+DG_DATA';+
    +... to...+
    +398> set newname for datafile 390 to '+DG_DATA';+
    +399> set newname for datafile 391 to '+DG_DATA';+
    +400> duplicate target database to "sin" from active database nofilenamecheck+
    +401> DB_FILE_NAME_CONVERT=('/u10/oradata/sin/','+DG_DATA/',+
    +402> '/u11/oradata/sin/','+DG_DATA/',+
    +403> '/u07/oradata/sin/','+DG_DATA/',+
    +404> '/u08/oradata/sin/','+DG_DATA/',+
    +405> '/u09/oradata/sin/','+DG_DATA/');+
    +406> }+
    +407>+
    starting full resync of recovery catalog
    full resync complete
    allocated channel: c1
    channel c1: SID=1787 device type=DISK
    allocated channel: c2
    channel c2: SID=2406 device type=DISK
    allocated channel: c3
    channel c3: SID=850 device type=DISK
    allocated channel: c4
    channel c4: SID=1146 device type=DISK
    allocated channel: a1
    channel a1: SID=1325 device type=DISK
    allocated channel: a2
    channel a2: SID=1514 device type=DISK
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    +...+
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    Starting Duplicate Db at 22-AUG-12
    contents of Memory Script:
    +{+
    sql clone "create spfile from memory";
    +}+
    executing Memory Script
    sql statement: create spfile from memory
    contents of Memory Script:
    +{+
    shutdown clone immediate;
    startup clone nomount;
    +}+
    executing Memory Script
    Oracle instance shut down
    connected to auxiliary database (not started)
    Oracle instance started
    Total System Global Area    7317790720 bytes
    Fixed Size                     2173456 bytes
    Variable Size               3808433648 bytes
    Database Buffers            3489660928 bytes
    Redo Buffers                  17522688 bytes
    allocated channel: a1
    channel a1: SID=1325 device type=DISK
    allocated channel: a2
    channel a2: SID=758 device type=DISK
    contents of Memory Script:
    +{+
    sql clone "alter system set  control_files =
    +''+DG_DATA/sin/controlfile/current.511.791978153'', ''+DG_DATA/sin/controlfile/current.562.791978153'' comment=+
    +''Set by RMAN'' scope=spfile";+
    +''+DG_DATA/sin/controlfile/current.511.791978153'', ''+DG_DATA/sin/controlfile/current.562.791978153'' comment=+
    +''Set by RMAN'' scope=spfile";+
    sql clone "alter system set  db_name =
    +''SIN'' comment=+
    +''Modified by RMAN duplicate'' scope=spfile";+
    +sql clone "alter system set db_unique_name =+
    +''SIN'' comment=+
    +''Modified by RMAN duplicate'' scope=spfile";+
    +shutdown clone immediate;+
    +startup clone force nomount+
    +backup as copy current controlfile auxiliary format '+DG_DATA/sin/controlfile/current.512.791978153';+
    +restore clone controlfile to '+DG_DATA/sin/controlfile/current.625.791978153' from+
    +'+DG_DATA/sin/controlfile/current.512.791978153';+
    +sql clone "alter system set control_files =+
    +''+DG_DATA/sin/controlfile/current.512.791978153'', ''+DG_DATA/sin/controlfile/current.625.791978153'' comment=+
    +''Set by RMAN'' scope=spfile";+
    +shutdown clone immediate;+
    +startup clone nomount;+
    +alter clone database mount;+
    +}+
    +executing Memory Script+
    +sql statement: alter system set control_files = ''+DG_DATA/sin/controlfile/current.511.791978153'', ''+DG_DATA/sin/controlfile/cu+
    +rrent.562.791978153'' comment= ''Set by RMAN'' scope=spfile+
    +sql statement: alter system set db_name = ''SIN'' comment= ''Modified by RMAN duplicate'' scope=spfile+
    +sql statement: alter system set db_unique_name = ''SIN'' comment= ''Modified by RMAN duplicate'' scope=spfile+
    +Oracle instance shut down+
    +Oracle instance started+
    +Total System Global Area 7317790720 bytes+
    +Fixed Size 2173456 bytes+
    +Variable Size 3808433648 bytes+
    +Database Buffers 3489660928 bytes+
    +Redo Buffers 17522688 bytes+
    +allocated channel: a1+
    +channel a1: SID=1514 device type=DISK+
    +allocated channel: a2+
    +channel a2: SID=2081 device type=DISK+
    +Starting backup at 22-AUG-12+
    +channel c1: starting datafile copy+
    +copying current control file+
    +output file name=/u06/tmpapp/rmanbkps/snapcf_sin.f tag=TAG20120822T094657 RECID=49 STAMP=791977621+
    +channel c1: datafile copy complete, elapsed time: 00:00:01+
    +Finished backup at 22-AUG-12+
    +Starting restore at 22-AUG-12+
    +channel a2: skipped, AUTOBACKUP already found+
    +channel a1: copied control file copy+
    +Finished restore at 22-AUG-12+
    +sql statement: alter system set control_files = ''+DG_DATA/sin/controlfile/current.512.791978153'', ''+DG_DATA/sin/controlfile/cu+
    +rrent.625.791978153'' comment= ''Set by RMAN'' scope=spfile+
    +Oracle instance shut down+
    +connected to auxiliary database (not started)+
    +Oracle instance started+
    +Total System Global Area 7317790720 bytes+
    +Fixed Size 2173456 bytes+
    +Variable Size 3808433648 bytes+
    +Database Buffers 3489660928 bytes+
    +Redo Buffers 17522688 bytes+
    +allocated channel: a1+
    +channel a1: SID=1514 device type=DISK+
    +allocated channel: a2+
    +channel a2: SID=2081 device type=DISK+
    +database mounted+
    +Using previous duplicated file +DG_DATA/sin/datafile/system.666.791914845 for datafile 1 with checkpoint SCN of 46164275052+
    +Using previous duplicated file +DG_DATA/sin/datafile/undotbs1.678.791913821 for datafile 2 with checkpoint SCN of 46164227408+
    +...+
    +Using previous duplicated file +DG_DATA/sin/datafile/med_dat.498.791939115 for datafile 389 with checkpoint SCN of 46165353395+
    +Using previous duplicated file +DG_DATA/sin/datafile/mytablespace.674.791914359 for datafile 390 with checkpoint SCN of 46164253329+
    +Using previous duplicated file +DG_DATA/sin/datafile/med_dat.499.791939115 for datafile 391 with checkpoint SCN of 46165353396+
    +contents of Memory Script:+
    +{+
    +sql 'alter system archive log current';+
    +}+
    +executing Memory Script+
    +sql statement: alter system archive log current+
    +contents of Memory Script:+
    +{+
    +backup as copy reuse+
    +archivelog like "/u06/app/oracle/admin/sin/arch/SIN_0544862197_0001_0000065832.ARC" auxiliary format+
    +"+DG_DATA" archivelog like+
    +"/u06/app/oracle/admin/sin/arch/SIN_0544862197_0001_0000065833.ARC" auxiliary format+
    +"+DG_DATA" archivelog like+
    +"/u06/app/oracle/admin/sin/arch/SIN_0544862197_0001_0000065834.ARC" auxiliary format+
    +"+DG_DATA" archivelog like+
    +"/u06/app/oracle/admin/sin/arch/SIN_0544862197_0001_0000065835.ARC" auxiliary format+
    +"+DG_DATA" archivelog like+
    +"/u06/app/oracle/admin/sin/arch/SIN_0544862197_0001_0000065836.ARC" auxiliary format+
    +"+DG_DATA" ;+
    +catalog clone start with "+DG_DATA";+
    +catalog clone datafilecopy "+DG_DATA/sin/datafile/system.666.791914845",+
    +"+DG_DATA/sin/datafile/undotbs1.678.791913821",+
    +"+DG_DATA/sin/datafile/undotbs1.679.791913821",+
    +"+DG_DATA/sin/datafile/undotbs1.689.791913821",+
    +"+DG_DATA/sin/datafile/undotbs1.690.791913821",+
    +"+DG_DATA/sin/datafile/undotbs1.677.791914357",+
    +"+DG_DATA/sin/datafile/drsys.621.791939555",+
    +"+DG_DATA/sin/datafile/high_idx.663.791914889",+
    +"+DG_DATA/sin/datafile/tools.507.791939555",+
    +...+
    +"+DG_DATA/sin/datafile/bkptemp.497.791939113",+
    +"+DG_DATA/sin/datafile/med_dat.498.791939115",+
    +"+DG_DATA/sin/datafile/mytablespace.674.791914359",+
    +"+DG_DATA/sin/datafile/med_dat.499.791939115";+
    +switch clone datafile 1 to datafilecopy+
    +"+DG_DATA/sin/datafile/system.666.791914845";+
    +switch clone datafile 2 to datafilecopy+
    +"+DG_DATA/sin/datafile/undotbs1.678.791913821";+
    +switch clone datafile 3 to datafilecopy+
    +...+
    +"+DG_DATA/sin/datafile/med_dat.498.791939115";+
    +switch clone datafile 390 to datafilecopy+
    +"+DG_DATA/sin/datafile/mytablespace.674.791914359";+
    +switch clone datafile 391 to datafilecopy+
    +"+DG_DATA/sin/datafile/med_dat.499.791939115";+
    +}+
    +executing Memory Script+
    +Starting backup at 22-AUG-12+
    +channel c1: starting archived log copy+
    +input archived log thread=1 sequence=65832 RECID=48339 STAMP=791913640+
    +channel c2: starting archived log copy+
    +input archived log thread=1 sequence=65833 RECID=48340 STAMP=791933223+
    +channel c3: starting archived log copy+
    +input archived log thread=1 sequence=65834 RECID=48341 STAMP=791939052+
    +channel c4: starting archived log copy+
    +input archived log thread=1 sequence=65835 RECID=48342 STAMP=791962351+
    +output file name=+DG_DATA/sin/archivelog/2012_08_22/thread_1_seq_65834.515.791978259 RECID=0 STAMP=0+
    +channel c3: archived log copy complete, elapsed time: 00:00:35+
    +channel c3: starting archived log copy+
    +input archived log thread=1 sequence=65836 RECID=48343 STAMP=791977692+
    +output file name=+DG_DATA/sin/archivelog/2012_08_22/thread_1_seq_65832.513.791978259 RECID=0 STAMP=0+
    +channel c1: archived log copy complete, elapsed time: 00:00:51+
    +output file name=+DG_DATA/sin/archivelog/2012_08_22/thread_1_seq_65833.514.791978259 RECID=0 STAMP=0+
    +channel c2: archived log copy complete, elapsed time: 00:01:41+
    +output file name=+DG_DATA/sin/archivelog/2012_08_22/thread_1_seq_65836.581.791978295 RECID=0 STAMP=0+
    +channel c3: archived log copy complete, elapsed time: 00:01:06+
    +output file name=+DG_DATA/sin/archivelog/2012_08_22/thread_1_seq_65835.516.791978259 RECID=0 STAMP=0+
    +channel c4: archived log copy complete, elapsed time: 00:01:41+
    +Finished backup at 22-AUG-12+
    +searching for all files that match the pattern +DG_DATA+
    +List of Files Unknown to the Database+
    +=====================================+
    +File Name: +dg_data/SIN/ARCHIVELOG/2012_08_22/thread_1_seq_65832.513.791978259+
    +File Name: +dg_data/SIN/ARCHIVELOG/2012_08_22/thread_1_seq_65833.514.791978259+
    +File Name: +dg_data/SIN/ARCHIVELOG/2012_08_22/thread_1_seq_65834.515.791978259+
    +...+
    +File Name: +dg_data/SIN/DATAFILE/XDB.508.791939555+
    +File Name: +dg_data/SIN/DATAFILE/DRSYS.621.791939555+
    +File Name: +dg_data/SIN/CONTROLFILE/Current.691.791913737+
    +File Name: +dg_data/SIN/CONTROLFILE/Current.692.791913737+
    +File Name: +dg_data/SIN/CONTROLFILE/Current.703.791913737+
    +File Name: +dg_data/SIN/CONTROLFILE/Current.704.791913737+
    +File Name: +dg_data/SIN/CONTROLFILE/Current.511.791978153+
    +File Name: +dg_data/SIN/CONTROLFILE/Current.562.791978153+
    +File Name: +dg_data/ASM/ASMPARAMETERFILE/REGISTRY.253.790861037+
    +cataloging files...+
    +cataloging done+
    +List of Cataloged Files+
    +=======================+
    +File Name: +dg_data/SIN/ARCHIVELOG/2012_08_22/thread_1_seq_65832.513.791978259+
    +File Name: +dg_data/SIN/ARCHIVELOG/2012_08_22/thread_1_seq_65833.514.791978259+
    +File Name: +dg_data/SIN/ARCHIVELOG/2012_08_22/thread_1_seq_65834.515.791978259+
    +File Name: +dg_data/SIN/ARCHIVELOG/2012_08_22/thread_1_seq_65835.516.791978259+
    +...+
    +File Name: +dg_data/SIN/DATAFILE/XDB.508.791939555+
    +File Name: +dg_data/SIN/DATAFILE/DRSYS.621.791939555+
    +File Name: +dg_data/SIN/CONTROLFILE/Current.703.791913737+
    +File Name: +dg_data/SIN/CONTROLFILE/Current.704.791913737+
    +List of Files Which Where Not Cataloged+
    +=======================================+
    +File Name: +dg_data/SIN/CONTROLFILE/Current.691.791913737+
    +RMAN-07517: Reason: The file header is corrupted+
    +File Name: +dg_data/SIN/CONTROLFILE/Current.692.791913737+
    +RMAN-07517: Reason: The file header is corrupted+
    +File Name: +dg_data/SIN/CONTROLFILE/Current.511.791978153+
    +RMAN-07517: Reason: The file header is corrupted+
    +File Name: +dg_data/SIN/CONTROLFILE/Current.562.791978153+
    +RMAN-07517: Reason: The file header is corrupted+
    +File Name: +dg_data/ASM/ASMPARAMETERFILE/REGISTRY.253.790861037+
    +RMAN-07518: Reason: Foreign database file DBID: 0 Database Name:+
    +cataloged datafile copy+
    +datafile copy file name=+DG_DATA/sin/datafile/system.666.791914845 RECID=442 STAMP=791978374+
    +cataloged datafile copy+
    +datafile copy file name=+DG_DATA/sin/datafile/undotbs1.678.791913821 RECID=443 STAMP=791978375+
    +cataloged datafile copy+
    +datafile copy file name=+DG_DATA/sin/datafile/undotbs1.679.791913821 RECID=444 STAMP=791978375+
    +cataloged datafile copy+
    +datafile copy file name=+DG_DATA/sin/datafile/undotbs1.689.791913821 RECID=445 STAMP=791978375+
    +cataloged datafile copy+
    +...+
    +datafile copy file name=+DG_DATA/sin/datafile/med_dat.498.791939115 RECID=830 STAMP=791978408+
    +cataloged datafile copy+
    +datafile copy file name=+DG_DATA/sin/datafile/mytablespace.674.791914359 RECID=831 STAMP=791978408+
    +cataloged datafile copy+
    +datafile copy file name=+DG_DATA/sin/datafile/med_dat.499.791939115 RECID=832 STAMP=791978408+
    +datafile 1 switched to datafile copy+
    +input datafile copy RECID=442 STAMP=791978374 file name=+DG_DATA/sin/datafile/system.666.791914845+
    +datafile 2 switched to datafile copy+
    +input datafile copy RECID=443 STAMP=791978375 file name=+DG_DATA/sin/datafile/undotbs1.678.791913821+
    +datafile 3 switched to datafile copy+
    +input datafile copy RECID=444 STAMP=791978375 file name=+DG_DATA/sin/datafile/undotbs1.679.791913821+
    +datafile 4 switched to datafile copy+
    +input datafile copy RECID=445 STAMP=791978375 file name=+DG_DATA/sin/datafile/undotbs1.689.791913821+
    +...+
    +datafile 389 switched to datafile copy+
    +input datafile copy RECID=830 STAMP=791978408 file name=+DG_DATA/sin/datafile/med_dat.498.791939115+
    +datafile 390 switched to datafile copy+
    +input datafile copy RECID=831 STAMP=791978408 file name=+DG_DATA/sin/datafile/mytablespace.674.791914359+
    +datafile 391 switched to datafile copy+
    +input datafile copy RECID=832 STAMP=791978408 file name=+DG_DATA/sin/datafile/med_dat.499.791939115+
    +contents of Memory Script:+
    +{+
    +set until scn 46167049411;+
    +recover+
    +clone database+
    +delete archivelog+
    +;+
    +}+
    +executing Memory Script+
    +executing command: SET until clause+
    +Starting recover at 22-AUG-12+
    +starting media recovery+
    +archived log for thread 1 with sequence 65832 is already on disk as file +DG_DATA/sin/archivelog/2012_08_22/thread_1_seq_65832.513.7+
    +91978259+
    +archived log for thread 1 with sequence 65833 is already on disk as file +DG_DATA/sin/archivelog/2012_08_22/thread_1_seq_65833.514.7+
    +91978259+
    +archived log for thread 1 with sequence 65834 is already on disk as file +DG_DATA/sin/archivelog/2012_08_22/thread_1_seq_65834.515.7+
    +91978259+
    +archived log for thread 1 with sequence 65835 is already on disk as file +DG_DATA/sin/archivelog/2012_08_22/thread_1_seq_65835.516.7+
    +91978259+
    +archived log for thread 1 with sequence 65836 is already on disk as file +DG_DATA/sin/archivelog/2012_08_22/thread_1_seq_65836.581.7+
    +91978295+
    +archived log file name=+DG_DATA/sin/archivelog/2012_08_22/thread_1_seq_65832.513.791978259 thread=1 sequence=65832+
    +released channel: c1+
    +released channel: c2+
    +released channel: c3+
    +released channel: c4+
    +Oracle Error:+
    +ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below+
    +ORA-01194: file 1 needs more recovery to be consistent+
    +ORA-01110: data file 1: '+DG_DATA/sin/datafile/system.666.791914845'+
    *+released channel: a1+*
    *+released channel: a2+*
    *+RMAN-00571: ===========================================================+*
    *+RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============+*
    *+RMAN-00571: ===========================================================+*
    *+RMAN-03002: failure of Duplicate Db command at 08/22/2012 09:52:27+*
    *+RMAN-05501: aborting duplication of target database+*
    *+RMAN-03015: error occurred in stored script Memory Script+*
    *+RMAN-11003: failure during parse/execution of SQL statement: alter database recover logfile '+DG_DATA/sin/archivelog/2012_08_22/thre+*
    *+ad_1_seq_65832.513.791978259'+*
    *+ORA-00308: cannot open archived log '+DG_DATA/sin/archivelog/2012_08_22/thread_1_seq_65832.513.791978259'+*
    +Recovery Manager complete.+
    the error is always the same, a previous backup with RMAN was taken on tape on the source database (production).
    Please help me to find what is wrong here!!

    Hi mseberg
    that's exactly i'm doing:
    1. Create an Oracle Password File for the Auxiliary Database
    a. done, passwd file created*
    2. Create the Directory Structure on the remote server
    a. done, all the admin structure wa created.*
    3. Oracle Net Setup ( you need an entry for the CLONE in your TNSNAMES.ORA on both servers ) ( I use SID_LIST_LISTENER entry for static )
    a. done, i have the entries working on my tnsnames.ora (source and target with static listeners)*
    4. Create an Initialization Parameter File for the Auxiliary Instance ( I use Parameters DB_FILE_NAME_CONVERT and LOG_FILE_NAME_CONVERT to change locations)
    a. done, this is my initialization file:*
    *.audit_file_dest='/u01/app/oracle/admin/sin/adump'*
    *.audit_trail='db'*
    *.compatible='11.2.0.0.0'*
    *.db_block_size=8192*
    *.db_create_file_dest='DG_DATA'+*
    *.db_domain=''*
    *.db_files=2048*
    *.db_name='sin'*
    *.db_recovery_file_dest='DG_DATA'+*
    *.db_recovery_file_dest_size=20G*
    *.diagnostic_dest='/u01/app/oracle'*
    *.dispatchers='(PROTOCOL=TCP) (SERVICE=sinXDB)'*
    *.log_archive_format='%t_%s_%r.dbf'*
    *.memory_target=7340032000*
    *.open_cursors=300*
    *.processes=2000*
    *.remote_login_passwordfile='EXCLUSIVE'*
    *.sessions=2205*
    *.undo_tablespace='UNDOTBS1'*
    DB_FILE_NAME_CONVERT=('/u10/oradata/sin/','DG_DATA/',+*
    +'/u11/oradata/sin/','+DG_DATA/',+
    +'/u07/oradata/sin/','+DG_DATA/',+
    +'/u08/oradata/sin/','+DG_DATA/',+
    +'/u09/oradata/sin/','+DG_DATA/')+
    LOG_FILE_NAME_CONVERT=('/u04/oradata/sin/','DG_DATA/',+*
    +'/u05/oradata/sin/','+DG_DATA/',+
    +'/u03/oradata/sin/','+DG_DATA/',+
    +'/u02/oradata/sin/','+DG_DATA/')+
    and this is my command from RMAN:
    run*
    *+{+*
    allocate channel c1 type disk;*
    allocate channel c2 type disk;*
    allocate channel c3 type disk;*
    allocate channel c4 type disk;*
    allocate auxiliary channel a1 type disk;*
    allocate auxiliary channel a2 type disk;*
    set newname for datafile 1 to 'DG_DATA';+*
    set newname for datafile 2 to 'DG_DATA';+*
    set newname for datafile 3 to 'DG_DATA';+*
    set newname for datafile 4 to 'DG_DATA';+*
    set newname for datafile 5 to 'DG_DATA';+*
    set newname for datafile 6 to 'DG_DATA';+*
    set newname for datafile 7 to 'DG_DATA';+*
    set newname for datafile 8 to 'DG_DATA';+*
    set newname for datafile 9 to 'DG_DATA';+*
    set newname for datafile 10 to 'DG_DATA';+*
    +...+
    set newname for datafile 390 to 'DG_DATA';+*
    set newname for datafile 391 to 'DG_DATA';+*
    duplicate target database to "sin" from active database nofilenamecheck*
    DB_FILE_NAME_CONVERT=('/u10/oradata/sin/','DG_DATA/',+*
    +'/u11/oradata/sin/','+DG_DATA/',+
    +'/u07/oradata/sin/','+DG_DATA/',+
    +'/u08/oradata/sin/','+DG_DATA/',+
    +'/u09/oradata/sin/','+DG_DATA/');+
    +}+
    do you think the problem may be in the name of the database?, I am using the same name in the auxiliary
    and when I get the error, I have the same dbid in both databases (source and destination)
    Thanks
    MM

Maybe you are looking for

  • Plz help! trying to copy everything I have on my ipod to my new computer!

    hi everyone! I am in a deseprate state, and have been trying to figure out what to do for hours... so here's the situatuion: I have an ipod (full of stuff) and a new computer (I don't have the old one anymore). I am trying to copy everything I have o

  • Bootcamp is not able to download windows-support software

    So I want to install windows using bootcamp. But what happens when I open Bootcamp assistant, is that I am told that I need to download the windows-support files. Or put in the CD that followed with my purchase for my MacBook Pro (I dont have this cd

  • How to start oracle 10g?

    i installed oracle10g but oracle10g is not starting?why its not started?

  • Stuttered scrolling and size changing

    If I use the thumbnail size slide bar at the bottom right corner of iPhoto to change the view of either events or faces or photos within albums it is incredibly slow and stuttered, to the point of it taking several attempts to grab and slide the bar.

  • IPhone 5 + Alpine INE-S920HD

    I can't get my bluetooth to work on my new iPhone 5 and my Alpine INE-S920HD.  It will find it, sync/pair, and I can get audio for about a second and then it disconnects, reconnects, disconnects, reconnects.  I can't seem to get it to remain stable f