Technological recipes that I've held to prepare some solutions DBA environment. (by Felipe Donoso Bastias)

Oct 31, 2007

ORacle: cambiar de ubicación los control files


Muchas veces se ha tratado de modificar los control files a través del famoso comando ALTER SYSTEM SET .... etc. Y este ha dado más de algún problema. Aquí les adjunto un método que hasta ahora no me ha fallado ni siquiera en la versión 11g de esta plataforma.

oracle@felipitux:~> sqlplus "/as sysdba"

SQL*Plus: Release 11.1.0.6.0 - Production on Wed Oct 31 10:50:15 2007

Copyright (c) 1982, 2007, Oracle. All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

- Se recrea el PFILE a partir del SPFILE

SQL> create pfile from spfile;

File created.

- Se baja la instancia

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

- Se mueven de ubicación los control files a las particiones deseadas

oracle@felipitux:~> mv /u02/oradata/newton/control02.ctl /u03/oradata/newton/
oracle@felipitux:~> mv /u02/oradata/newton/control03.ctl /u04/oradata/newton/

- Luego se busca el PFILE creado y se edita con las ubicaciones nuevas
- Generalmente este archivo se ubica en $ORACLE_HOME/dbs/init.ora

oracle@felipitux:~> cd /u01/app/oracle/product/11.1.0/db_1/dbs/
oracle@felipitux:/u01/app/oracle/product/11.1.0/db_1/dbs>vi initnewton.ora

- Luego de Editar levantamos la instancia en modo nomount indicando que vamos a utilizar un PFILE

oracle@felipitux:~> sqlplus "/as sysdba"

SQL*Plus: Release 11.1.0.6.0 - Production on Wed Oct 31 10:53:06 2007

Copyright (c) 1982, 2007, Oracle. All rights reserved.

Connected to an idle instance.

SQL> startup nomount pfile=/u01/app/oracle/product/11.1.0/db_1/dbs/initnewton.ora;
ORACLE instance started.

Total System Global Area 439418880 bytes
Fixed Size 1300436 bytes
Variable Size 201328684 bytes
Database Buffers 230686720 bytes
Redo Buffers

- Luego recreamos el SPFILE a partir del PFILE modificado

SQL> create spfile from pfile;

File created.

- Luego realizamos los pasos para levantar la instancia completa y revisar las nuevas ubicaciones

SQL> alter database mount;

Database altered.

SQL> alter database open;

Database altered.

SQL> show parameter control_files

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_files string /u02/oradata/newton/control01.
ctl, /u03/oradata/newton/contr
ol02.ctl, /u04/oradata/newton/
control03.ctl
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
oracle@felipitux:/u01/app/oracle/product/11.1.0/db_1/dbs>

Felipitux.
Share:

3 comments:

  1. Muy util, lo he probado en 11.2.0.1 y ha salido perfecto.

    ReplyDelete
  2. I do not know whether it's just me or if perhaps everyone else encountering issues with your website. It looks like some of the written text in your content are running off the screen. Can somebody else please provide feedback and let me know if this is happening to them as well? This may be a problem with my internet browser because I've
    had this happen previously. Kudos

    Also visit my website; ルイヴィトン公式

    ReplyDelete
  3. Esto funciona 100%

    ReplyDelete

Copyright © DBA TIPS | Powered by Blogger
Design by SimpleWpThemes | Blogger Theme by NewBloggerThemes.com | Free Blogger Templates