DBAsupport.com Forums - Powered by vBulletin
Results 1 to 6 of 6

Thread: standby on same machine - db_file_name_convert

  1. #1
    Join Date
    Nov 2000
    Posts
    245
    I have 3 PATHs for datafile
    /ora/dat1/oradata/DB1/system.dbf, index.dbf
    /ora/dat2/oradata/DB1/rbs.dbf, user.dbf
    /ora/dat3/oradata/DB1/data.dbf,temp.dbf

    does anyone know when create a standby db on the primary database machine.
    what is the syntax to add db_file_name_convert into init file.

    db_file_name_convert="/ora/dat1/oradata/DB1","/ora/stby/oradata/DB1"

    how about dat2, and dat3?????

    thanks in advance


  2. #2
    Join Date
    Feb 2000
    Location
    Washington DC
    Posts
    1,843
    SYNTAX: db_file_name_convert = [(] 'string1','string2'[)]

    Where
    string1 is pattern of primary db filenames
    string1 is pattern of standby db filenames


    You can use single/double quotation marks. The parenthesis are optional.

    Seems, what you mentioned is Right.



  3. #3
    Join Date
    May 2000
    Location
    OHIO
    Posts
    20

    Read

    when create a standby db on the primary database machine.
    what is the syntax to add db_file_name_convert into init file.

    What is Standby DB?
    what is primary database machine

    could some one explain to this to me, this is something new to me?
    Rahul Khana

  4. #4
    Join Date
    Nov 2000
    Posts
    245

    to sreddy,

    hi, sreddy,

    I have 3 path for those data files, the snytax only for the first one, how about dat2 and dat3?

    I tried to add 3 entries in init.ora

    db_file_name_convert="/ora/dat1/oradata/DB1","/ora/stby1/oradata/DB1"
    db_file_name_convert="/ora/dat2/oradata/DB1","/ora/stby2/oradata/DB1"
    db_file_name_convert="/ora/dat3/oradata/DB1","/ora/stby3/oradata/DB1"

    and

    db_file_name_convert="/ora/dat1/oradata/DB1","/ora/stby1/oradata/DB1" ; "/ora/dat2/oradata/DB1","/ora/stby2/oradata/DB1" ; "/ora/dat3/oradata/DB1","/ora/stby3/oradata/DB1"

    neither works





  5. #5
    Join Date
    Apr 2000
    Posts
    126

    Wink

    Problem Summary:
    ================
    CREATING PRIMARY AND STANDBY DATABASE ON THE SAME MACHINE


    Problem Description:
    ====================
    You are setting up a Standby database environment in the same machine
    as the primary database.

    1. You issue.....
    alter database create standby controlfile as '$HOME/standby.ctl';
    alter system archive log current;

    2. copy this generated controlfile to directory where you intend to place
    the standby database

    3. Make a copy of the init.ora file to be used by the standby database
    and include the appropriate initialization parameters to point to
    where where the primary database files reside, followed by the
    directory path where the (test) standby database will reside:

    Oracle7 -- db_file_standby_name_convert and log_file_standby_name_convert
    Oracle8 -- db_file_name_convert and log_file_name_convert

    Also edit the control_files parameter to point to the standby
    controlfile

    4. With the primary database shutdown, copy the redo log files
    and database files to the standby directory

    5. With the primary database now up, you try to mount the standby:
    you receive:

    SVRMGR> alter database mount standby database;
    alter database mount standby database
    *
    ORA-01102: cannot mount database in EXCLUSIVE mode


    6. If you shut the primary database down, the command succeeds but then
    you get the same error when trying to open the primary database.

    7. Deleting the lk<dbname> file made no difference - but maybe that was
    because it was not really deleted as it was being held open by some
    process.


    Problem Explanation:
    ====================
    The failure is because shared memory has already been
    created for this ORACLE SID, and you are attempting to create the same
    shared memory for the same ORACLE SID.

    Solution: SET INIT.ORA PARAMETER ON STANDBY DATABASE

    Solution Description:
    =====================
    1. Shutdown the standby database

    2. Starting with Oracle Release 7.3.3:
    add _standby_lock_name_space=<new_name> in the init.ora of standby database

    Starting with Oracle Release 8.0.X:
    add lock_name_space=<new_name> in the init.ora of standby database


    where <new_name> is a name other than the primary's database name,
    up to 8 characters long
    .
    You can use a naming convention like:
    If Primary db_name = DB1
    set lock_name_space = DB1s

    3. startup nomount standby database

    4. alter database mount standby database


    Solution Explanation:
    =====================
    The above solution works for TESTING standby databases on the
    same machine as the Primary Database.

    Do not, however, use the same machine to keep an actual standby
    database. This defeats the purpose of a standby if your entire
    machine were to crash.

  6. #6
    Join Date
    Oct 2000
    Location
    Cambridge, MA (Boston)
    Posts
    144
    I think this will answer your question:
    db_file_name_convert="/ora/dat","/ora/stby"

    you are just doing a generic string substitution, not renaming every file. you only get one shot at it, as you have discovered.

    if your filesystems are not similar --on our primary we have 7 logical file systems and the standby has 2 logical filesystems [*note: not by *my* design ;) ]-- you have to rename the files in the controlfile (normal methodolgy except this is done after ALTER DATABASE MOUNT STANDBY DATABASE ) or as they are added
    CREATE DATABASE CREATE DATAFILE 'primaryname' AS 'standbyname';

    hth, d.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width