Дерево страниц

Сравнение версий

Ключ

  • Эта строка добавлена.
  • Эта строка удалена.
  • Изменено форматирование.
Комментарий: Published by Scroll Versions from space TMAG and version 7.0
Sv translation
languageru

Для обеспечения возможности восстановления из резервной копии, помимо самих файлов данных, вам потребуются вспомогательные файлы: trace–файл контрольного файла и копия файла init.ora.
Trace–файл контрольного файла содержит имена и пути для всех файлов данных и дополнительных файлов данных, добавленных в БД. Также содержит файлы redo log и команды, которые можно использовать для восстановления структуры БД.
Файл init.ora содержит инициализационные параметры Oracle, в частности, имена и пути для контрольных файлов базы данных.
Чтобы создать trace-файл для контрольного файла, spfile-файл и скопировать их:

  1. На компьютере, где установлена БД Oracle, войдите в систему от имени пользователя oracle.
  2. Откройте Oracle SQL*Plus и подключитесь как пользователь sysdba:
    OS> sqlplus / as sysdba
    Если система была установлена с помощью kickstart IWTMинсталлятора, для удобства Вы можете использовать команду wsqlplus.

    Информация
    titleПримечание:

    Команда wsqlplus является алиасом команды sqlplus:
    alias wsqlplus='rlwrap -b "" -f ~/sql.dict sqlplus'

    Дождитесь подключения – об успешном подключении будет свидетельствовать сообщение Connected.

  3. Скопируйте (или введите) в командную строку и выполните следующий SQL запрос:
    SQL> alter database backup controlfile to trace;

  4. Найдите путь к директории, в которой был создан trace-файл, выполнив команду:
    SQL> show parameter user_dump;
    В данной директории находятся файлы trc и alert_iwtm.log (alert_INSTANCE_NAME). В log-файле указано имя созданного trace-файла.
    Выйдите из Oracle SQL*Plus:
    SQL> exit
  5. Если система была установлена с помощью kickstart IWTM инсталлятора и были оставлены параметры по умолчанию, Вы можете проверить последние записи в файле журнала alert_iwtm.log с помощью команды:
    OS> tail -f /u01/app/oracle/diag/rdbms/iwtm/iwtm/trace/alert_iwtm.log
    Чтобы выйти из режима просмотра, нажмите CTRL+C
  6. Создайте копию файла параметров spfile (pfile):
    OS> sqlplus / as sysdba 
    SQL> CREATE PFILE from SPFILE;
  7. Найдите путь к директории, в которой был создан pfile-файл. Для этого выполните команду:
    SQL> show parameter PFILE
    Будет возвращен путь к директории, в которой был создан pfile (по умолчанию /u01/app/oracle/product/db_1/dbs/).
    В этой же директории находится файл initiwtm.ora, для которого нужно также создать резервную копию.
    Выйдите из Oracle SQL*Plus:
    SQL> exit
  8. Скопируйте файлы trace и spfile на компьютер с резервной копией, в ранее созданную поддиректорию /opt/IWTM_Backup_Files/Recovery_Aid.
  9. Вам нужно скопировать самые актуальные файлы. Чтобы найти файлы с самой поздней датой и временем изменения, выполните:
    OS> ll
  10. Переименуйте файл так, чтобы впоследствии его можно было легко найти, например:
    controlfilebackupMMDDYY.trc

 

Sv translation
languageen

To provide database restoring, besides data files, you need recovery aid files: a trace file of the control file and a copy of the init.ora file.

The trace file of the control file contains the names and locations of all of the data files and additional data files that have been added to the database. It also contains the redo logs and the commands that can be used to recreate the database structure.

The init.ora file contains Oracle initializing parameters, including the names and locations of the database control files.

To create trace file of the control file, spfile file and to backup them:

  1. Log on to the computer that hosts the Oracle database as the oracle user.
  2. Open Oracle SQL*Plus and log as sysdba user:
    OS> sqlplus / as sysdba
    If the system was installed using kickstartthe installer, you can use wsqlplus command.

    Информация
    titleNote:

    wsqlplus command is an alias of sqlplus:

    alias wsqlplus='rlwrap -b "" -f ~/sql.dict sqlplus'

    Wait for Connected message.

  3. Copy (or enter) the following SQL queue to the command prompt:
    SQL> alter database backup controlfile to trace;
  4. To find the directory in which the trace file was created, enter:
    SQL> show parameter user_dump;
    At that folder you can find trc file and alert_iwtm.log file (alert_INSTANCE_NAME).  At log file you can find the name of the trace file which was created.
    Exit Oracle SQL*Plus:
    SQL> exit
  5. If the system was installed using kickstart installer and default parameters were left, you can check last alert_iwtm.log records by the following command:
    OS> tail -f /u01/app/oracle/diag/rdbms/iwtm/iwtm/trace/alert_iwtm.log
    Press CTRL+C to exit view.
  6. Create a copy of spfile (pfile):
    OS> sqlplus / as sysdba
    SQL> CREATE PFILE from SPFILE;
  7. To find the directory in which the pfile file was created, enter:
    SQL> show parameter PFILE
    It returns a  path to the directory where pfile was created (/u01/app/oracle/product/db_1/dbs/ by default).
    In this folder  the initiwtm.ora file is located too. Please create a backup for initiwtm.ora file.
    Exit Oracle SQL*Plus:
    SQL> exit
  8. Copy trace and spfile files to the backup storage, to previously created  /opt/IWTM_Backup_Files/Recovery_Aid subdirectory.
  9. Be sure to copy the file with the most recent date and timestamp. To check the date and the timestamps of the files in the directory, enter:
    OS> ll
  10. Rename the file so that it can be easily identified, for example:
    controlfilebackupMMDDYY.trc