Pessoal,

Precisamos migrar um datawarehouse de 1.5TB que roda na versão 8.1.7.4
64bits em um AIX 4.0, para um AIX 5.3 com Oracle 10.2.0.2 64bits, e o modo
mais "tranquilo" que vimos até então é a copia com o banco closed a
frio(baixar o banco e copiar os datafiles)

Gostaria de saber se posso utilizar do procedimento abaixo, pois um dos
pre-reqs do documento é ter o mesmo SO, porem ele não fala nada da versão do
SO.

Alguem poderia confirmar se teremos algum sucesso?

  Subject: *How to migrate from 8i to 10g to new server using cold
backup*   Doc
ID <https://metalink2.oracle.com/help/usaeng/Search/search.html#file>: *
742108.1* Type: *HOWTO*   Modified Date : *13-MAY-2009* Status: *PUBLISHED*

*In this Document*
  
Goal<https://metalink2.oracle.com/metalink/plsql/f?p=130:14:1634996785047955234::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,742108.1,1,1,1,helvetica#GOAL>
  
Solution<https://metalink2.oracle.com/metalink/plsql/f?p=130:14:1634996785047955234::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,742108.1,1,1,1,helvetica#FIX>
  
References<https://metalink2.oracle.com/metalink/plsql/f?p=130:14:1634996785047955234::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,742108.1,1,1,1,helvetica#REF>
 ------------------------------

 Applies to: Oracle Server - Enterprise Edition - Version: 8.1.7.4 to
10.2.0.5
Information in this document applies to any platform.
Goal

This is a step by step guide that explains how we can migrate a database to
a new server and database release manually using a Cold backup.

How to do a cold backup of oracle database and restore it on the new server
and then upgrade it.
Solution

1) Prerequisites
   ----------------

   - The copy of the datafiles must be done with the database closed.

   - Source Operating System and destination Operating System need to be the
same

   - Destination sever need to have the 10g installed with the same word
size
     as the 8.1.7.4. Both need to be 32 bit or both need to be 64 bit.

   - If your database contains user tables with NCHAR columns, you must
upgrade the
     NCHAR columns before they can be used .
     In the database documentation you have all the steps is detail:
       Oracle® Database Upgrade Guide 10g Release 2 (10.2) Part Number
B14238-02





2) Init.ora or spfile and controlfile
   ----------------------------------
  - You need to copy the init.ora to the target host and locate it in
    ORACLE_HOME\dbs  on UNIX platforms and in ORACLE_HOME\database on
Windows operating systems

  - Copy the controlfile and the datafiles the redologs and all the
archivelogs
    generated, to the target host,

  - You need to stop database with shutdown immediate or shutdown normal
before copying the
    files to target host,


3) Set the oracle environment on Target 10g host
   -----------------------------------------------

  C:\> set ORACLE_SID=<SID>
  C:\> sqlplus "sys/<password> as sysdba"

    - Check the init.ora  parameters that reference location

       control_files             = <target db control file(s)>
       background_dump_dest      = <target db bdump>
       core_dump_dest            = <target db cdump>
       user_dump_dest            = <target db udump>
       log_archive_dest_1        = <target db arch dump location>

    - Make sure the COMPATIBLE initialization parameter is properly
      set for the new Oracle Database 10g release.
      compatible = 10.2.0.X

    - We need to check which parameters need to be changed in the init.ora
for the new 10g
      release. We can use Pre-upgrade utility

        * Copy the file utlu102i.sql from the ORACLE_HOME/rdbms/admin
directory of the 10g
          release to a directory on the old 8.1.7 server

        * In the 8.1.7 environment, start SQL*Plus. Connect to the database
instance as SYS
            SQL> SPOOL info.log
            SQL> @utlu102i.sql
            SQL> SPOOL OFF

        * Check the spool file and examine the output of the upgrade
information tool, you
          will see the minimum parameter setting for the 10g


4) Set up a password file for the target database
   -----------------------------------------------
     orapwd file=$ORACLE_HOME/dbs/orapw$ORACLE_SID password=<...>

   The name and location of the password file on UNIX platforms, is
ORACLE_HOME/dbs/orapw<sid>.
   On Windows operating systems, the default password file is
ORACLE_HOME\database\pwd<sid>.ora.

5) Start up the database and re mane files
   -------------------------------------
    Assuming that all the files are copied to target host and that
controlfile has been located
    at location specified by init.ora parameter control_files

    - Start up the database in mount status

    SQL> startup nomount pfile=<ORACLE_HOME\dbs>\init<sid>.ora;

    You can create at this point an spfile for the 10g instance, then you
won't need to specify
    the pfile location each startup.

    SQL> create spfile from pfile=<ORACLE_HOME\dbs>\init<sid>.ora;
    SQL> shutdown immediate;
    SQL> startup mount;

    - If the datafile location is different on target server, we need to
rename the files
    Rename any of the datafiles to the new location, if necessary:

     SQL>ALTER DATABASE RENAME FILE
                 '/FULL_PATH_OF_OLD_HOST_LOCATION/AND_DATAFILE_NAME.DBF'
                 TO
                 '/FULL_PATH_OF_NEW_HOST_LOCATION/AND_DATAFILE_NAME.DBF';

     Rename the logfiles to the new location if necessary

     SQL> alter database rename file  '<host A location>' to '<host B
location>';

6) Check that all the datafiles are in the right location:
   -------------------------------------------------------
    select file#, name from v$datafile;
    Then shutdown the instance
    sql>shutdown immediate;

7) Create SYSAUX tablespace
   -------------------------
   Once you have changed the datafile names you need to start up the
instance
   by issuing the following command:

     SQL> STARTUP UPGRADE

    And create sysaux tablespace

    The following SQL statement would create a 500 MB SYSAUX tablespace for
the
    database:

    SQL> CREATE TABLESPACE sysaux DATAFILE '<directory>/sysaux01.dbf'
          SIZE 500M REUSE
         EXTENT MANAGEMENT LOCAL
         SEGMENT SPACE MANAGEMENT AUTO
         ONLINE;

8) Run catupgrd.sql to upgrade the database
   ----------------------------------------

    SQL> SPOOL upgrade.log
    SQL> @catupgrd.sql

9) Run utlu102s.sql to display the results of the upgrade:
   -------------------------------------------------------
    SQL> @utlu102s.sql
    SQL> SPOOL OFF;

   Verify the upgrade.log file to check for any errors during the upgrade
processes

10) Bounce Database
    ---------------
    Shut down and restart the instance to reinitialize the system parameters
for normal operation.

    SQL> SHUTDOWN IMMEDIATE
    SQL> STARTUP

11) Create UNDO tablespace to use AUTOMATIC UNDO MANAGEMENT
    -------------------------------------------------------

    SQL> create undo tablespace UNDOTS1
           datafile '<directory>/undots101.dbf' size 500M;
    SQL> alter system set UNDO_MANAGEMENT=AUTO scope=spfile;
    SQL> alter system set UNDO_TABLESPACE=UNDOTS1 scope=spfile;
    SQL> SHUTDOWN IMMEDIATE;
    SQL> STARTUP


12) Run olstrig.sql
    ----------------
    Run olstrig.sql to re-create DML triggers on tables with Oracle Label
Security policies.
    SQL> @olstrig.sql

13) Recompile packages
    ------------------
     Run utlrp.sql to recompile any remaining stored PL/SQL and Java code.

      SQL> @utlrp.sql


14) Check for invalid objects
    -------------------------
   Verify that all expected packages and classes are valid:

   SQL> SELECT count(*) FROM dba_objects WHERE status='INVALID';
   SQL> SELECT distinct object_name FROM dba_objects WHERE status='INVALID';
References Oracle® Database Upgrade Guide 10g Release 2 (10.2) Part Number
B14238-02



-- 
[ ]'s
Igor Laguardia
----------------------------------------------------------
"Wenn ist das Nunstück git und Slotermeyer? Ja! ... Beiherhund das Oder die
Flipperwaldt gersput."
Monty Phyton's "Funniest Joke in the World"


[As partes desta mensagem que não continham texto foram removidas]

Responder a