This discussion is archived
1 2 Previous Next 26 Replies Latest reply: Oct 29, 2012 2:33 AM by user522961 Go to original post RSS
  • 15. Re: Duplicate in 11g
    user522961 Newbie
    Currently Being Moderated
    Ok, but it can not explain error message in any way :
    ORA-19505: failed to identify file "M:\BASES\OLDDB\DATA\PREE.DBF"
    ORA-27086: unable to lock file - already in use

    Reagrds.
  • 16. Re: Duplicate in 11g
    Osama_Mustafa Oracle ACE
    Currently Being Moderated
    ORA-27086:unable to lock file - already in use
    Cause: the file is locked by another process, indicating that it is currently in use by a database instance.
    Action:determine which database instance legitimately owns this file.
  • 17. Re: Duplicate in 11g
    John Stegeman Oracle ACE
    Currently Being Moderated
    YES IT DOES.

    Check the link I posted for you and search for the 27086 error
  • 18. Re: Duplicate in 11g
    user522961 Newbie
    Currently Being Moderated
    John,
    I do not see in that link to say that source should not be open.
    I have that error message for all datafiles of source. And it is normal because source is open and used.

    Then I made a mistake somewhere else.

    Thank you.
  • 19. Re: Duplicate in 11g
    John Stegeman Oracle ACE
    Currently Being Moderated
    Did you read about NOFILENAMECHECK?
  • 20. Re: Duplicate in 11g
    Shivananda Rao Guru
    Currently Being Moderated
    user522961 wrote:
    Let me come back.

    I ran duplicate in ROMAN ;
     
    
    DUPLICATE DATABASE TO BASED 
    FROM ACTIVE DATABASE 
    NOFILENAMECHECK; 
    But it did not work. Because of :
     
    
    ORA-19505: failed to identify file "Mr:\BASES\OLD\DATA\PREE.DBF"; 
    ORA-27086: unable to lock file - already in use 
    Of course , source database is open and in use.
    Should it be in mount ?

    For me it means that source should not be open but in documentation I did not see that be mentioned.

    thanks.
    Do as below:
    rman target sys/<password>@<target-db> auxiliary sys/<pwd>@<aux-db>
    rman>duplicate target database to '<auxiliary db>' from active database nofilenamecheck;
    Where target is your Production database or the database from which you are trying to do the duplicate.
    Auxiliary database is your new database which you are trying to create.
  • 21. Re: Duplicate in 11g
    Osama_Mustafa Oracle ACE
    Currently Being Moderated
    You can check this document
    http://blog.bensmann.com/duplicate-an-oracle-database-with-rman
  • 22. Re: Duplicate in 11g
    user522961 Newbie
    Currently Being Moderated
    Ok, thanks to all.
    yes I should add "target" to my Command line.

    But before that let's verify something with you.

    When I connect to new database I have :
     
    
    
    SQL> show parameter db_name 
    
    NAME                                 TYPE        VALUE 
    ------------------------------------ ----------- ------------------------------ 
    db_name                              string      OLDDB 
    SQL> select * from v$instance; 
    
    INSTANCE_NUMBER INSTANCE_NAME 
    --------------- ---------------- 
    HOST_NAME 
    ---------------------------------------------------------------- 
    VERSION           STARTUP_ STATUS       PAR    THREAD# ARCHIVE LOG_SWITCH_WAIT 
    ----------------- -------- ------------ --- ---------- ------- --------------- 
    LOGINS     SHU DATABASE_STATUS   INSTANCE_ROLE      ACTIVE_ST BLO 
    ---------- --- ----------------- ------------------ --------- --- 
                  1 NEWDB 
    server 
    11.2.0.3.0 ;       09/10/12 MOUNTED      NO           1 STARTED 
    ALLOWED    NO  ACTIVE            PRIMARY_INSTANCE   NORMAL    NO 
    It means that db_name parameter is OLDDB (source database). Any explanation ?

    regards.
  • 23. Re: Duplicate in 11g
    Osama_Mustafa Oracle ACE
    Currently Being Moderated
    you duplicate database with same name , you could change the name of database
  • 24. Re: Duplicate in 11g
    user522961 Newbie
    Currently Being Moderated
    Thank you Osama.

    I connected to RMAN Like this :
    rman nocatalog target sys/*****@OLDDB auxiliary sys/oracle@NEWDB
    
    Recovery Manager: Release 11.2.0.3.0 - Production on Mon Oct 8 15:04:02 2012
    
    Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
    
    connected to target database: OLDDB (DBID=771xxxxx0)
    using target database control file instead of recovery catalog
    connected to auxiliary database: NEWDB (not mounted)
    Regards.
  • 25. Re: Duplicate in 11g
    Osama_Mustafa Oracle ACE
    Currently Being Moderated
    Check this
    How to Rename Database/Change DB_NAME or ORACLE_SID/Instance Name [ID 15390.1]
  • 26. Re: Duplicate in 11g
    user522961 Newbie
    Currently Being Moderated
    thank you.
1 2 Previous Next

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points