Forum Clubic

Dupliquer une base Oracle 10g pour Dataguard ... - Une question aux meilleurs DBA du forum!

Bonjour à tous,

Je suis actuellement en train de créer une configuration Oracle Dataguard entre 2 oracle 10g. Pour se faire, je dois dupliquer ma base primaire vers ma base secondaire. Et c’est la que le bas blesse, je ne sais pas faire… Certes je connais l’aspect “theorique”, mais pas la pratique. Je serais incapable de faire étape par étape, les différentes actions pour dupliquer ma base primaire vers ma base de secours (standby).

Pourriez-vous m’aider en me donnant le processus complet ? Existe-t-il une doc complete sur Internet, je vous avoue ne pas avoir trouvé.

Je sais qu’il existe 2 methodes : RMAN et copie à froid. Est-il possible qu’une personne m’explique comment faire le plus simplement possible ?

Merci de votre aide

https://metalink.oracle.com/

c la ou il faut chercher mais faut une license je crois je ne me souviens plus trop ça fait longtemps que je m y suis inscrit

c est une doc pour la 8i

Subject: How To Create a Standby Database

* goal: How To Create a Standby Database
* fact: Backup / Recovery (BR)
* fact: Oracle Server - Enterprise Edition 

fix:

On the Primary database:

  1. Backup datafiles on the primary system.

  2. ALTER DATABASE CREATE STANDBY CONTROLFILE AS ctlfilename
    –Note: where ctlfilename is name of the controlfile

  3. ALTER SYSTEM ARCHIVE LOG CURRENT
    (This insures consistency in backup, standby controlfile, and logfiles)

  4. Transfer all the duplicate files to the standby site.

  5. Use the same naming convention, or in the initSID.ora for the standby, use
    the following parameters:

    DB_FILE_STANDBY_NAME_CONVERT (V7)
    LOG_FILE_STANDBY_NAME_CONVERT (V7)
    or
    DB_FILE_NAME_CONVERT (V8)
    LOG_FILE_NAME_CONVERT (V8)

–Note: You must use the above parameters if the standby system is on the same
machine as the primary.

–Note: If the above initSID.ora parameters are used, you must use:
ALTER DATABASE RENAME FILE oldname TO newname
When the standby is activated, use:
ALTER DATABASE RENAME FILE oldname TO newname

If a data or log file is renamed at the standby site, or the AS clause is used
in an ALTER DATABASE CREATE DATAFILE, the conversion parameters will not apply
to that file.

  1. On the Standby database:

    Put the standby in recovery mode, using the Oracle Server Manager utility.

    STARTUP NOMOUNT PFILE=/full/path/to/initSID.ora
    ALTER DATABASE MOUNT STANDBY DATABASE
    RECOVER STANDBY DATABASE

    Then apply archive logs as appropriate.

SOME NOTES:

  • The standby database must be kept in recovery mode until it is needed (if
    ever).

  • To keep the standby current, manually copy archived redo logs as they are
    generated on the primary, then apply them to the standby. (This can be
    accomplished best by a batch job).

  • Any physical changes that occur on the primary must be accomplished on the
    standby as well. Added datafiles are added to the standby controlfile
    automatically (via redo logs). The file must be manually copied to the standby
    system. If the standby can’t find a datafile, recovery will stop. Use ALTER
    DATABASE CREATE oldname AS newname or physically copy the datafile to the
    standby system.

  • To maintain (only) a subset of the primary database, ALTER OFFLINE unneeded
    datafiles on the standby system; Oracle will just maintain the online
    files. Offlined files are not recovered.

  • You can add or drop log files on the primary without affecting the standby.

  • If an additional thread is enabled on the primary (using MTS or OPS) you must
    recreate the standby controlfile (see (2) above).

  • If ALTER DATABASE CLEAR UNARCHIVED LOGFILE is performed on the primary, the
    standby is rendered invalid. This also occurs if ALTER DATABASE OPEN RESETLOGS
    is done. This is because the standby doesn’t then have the archivelogs it needs
    to continue.

  • If you do an ALTER DATABASE CREATE CONTROLFILE on the primary, you must also
    create a new controlfile for the standby. First, shut down the standby. Then
    do an ALTER DATABASE ARCHIVE LOG CURRENT so the standby will be current on redo.
    (Then copy the files over to the standby site). Then, at the standby site,
    STARTUP NOMOUNT, then ALTER DATABASE MOUNT STANDBY DATABASE. Finally, RECOVER
    STANDBY DATABASE.

TO ACTIVATE THE STANDBY DATABASE:

To activate the standby, first try to copy the most recent archive logs over to
the standby, and apply them. Then ALTER DATABASE ACTIVATE STANDBY DATABASE

Then shutdown the standby to reset file headers and clear all buffers. You
can’t copy online redo logs from the primary to the standby.

The standby is dismounted when activated.

The standby bit in the controlfile is now set, so you can never go back - the
standby is now your primary database. Since the redo log sequence was reset
when the standby was opened, it is a good idea to take a full backup at this
point.

.
Copyright © 2005, Oracle. All rights reserved. Legal Notices and Terms of Use.

Voici une doc pour la 10g sous Linux.

Vraiment merci !

Donc en fait pour dupliquer la base primaire, je fais un "cold backup" (en fait je copie les fichiers .dbf et .ctl), je "copie colle" sur ma base standby, et ca marchera directement lorsque je ferais un startup sans meme faire de restore ou de recover sur la standby ?

si tu veux dupliquer simplement, tu prends ta sauvegarde à froid.

Par contre si tu veux mettre en oeuvre dataguard et continuer à maintenir la réplication, il faut faire comme écrit :


startup nomount
alter database mount stand by database;
recover standby database;

Avec RMAN, c’est encore plus simple mais il faut avoir mis RMAN en oeuvre…

Je pense pas que tu sois sur le bon forum pour poser ce genre de questions, clubic n’étant pas le forum de rencontres des DBAs. si tu veux plus d’infos, tu peux m’envoyer un MP…

Bonjour,

c’est quoi la méthode pour optimiser une instance oracle??

et pour optimiser du code pl/sql?

Merci d’avance