Te habrás preguntado una y otra vez, como se genera el famoso error ORA-32004?
En que consiste el mismo y como se resuelve.?
En que consiste el mismo y como se resuelve.?
Bueno vamos a reproducirlo y a solucionarlo.
En una instancia de base de datos ya creada, vamos a crear un archivo PFILE con el contenido del archivo SPFILE.
A la hora de examinar el contenido del archivo PFILE, podríamos ver algo como esto:
[oracle@db02 dbs]$ more initdemo1.ora
*.audit_file_dest='/opt/oracle/admin/demo1/adump'
*.audit_trail='db'
*.compatible='11.2.0.4.0'
*.control_files='/opt/oracle/oradata/demo1/control01.ctl','/opt/oracle/fast_recovery_area/demo1/control02.ctl'
*.db_block_size=8192
demo1.db_cache_size=100M
*.db_domain=''
*.db_name='demo1'
*.db_recovery_file_dest='/opt/oracle/fast_recovery_area'
*.db_recovery_file_dest_size=8589934592
*.diagnostic_dest='/opt/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=demo1XDB)'
demo1.java_pool_size=16777216
demo1.large_pool_size=30M
*.log_archive_format='arc_demo1_%t_%s_%r.arc'
*.open_cursors=300
demo1.pga_aggregate_target=90M
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
demo1.sga_target=500M
demo1.shared_pool_size=150994944
*.undo_tablespace='UNDOTBS1'
Borramos el archivo SPFILE o lo re-nombramos.
[oracle@db02 dbs]$ rm spfiledemo1.ora
Nos conectamos a la base de datos e iniciamos la instancia con el archivo PFILE.
[oracle@db02 dbs]$ sqlplus /nolog
SQL*Plus: Release 11.2.0.4.0 Production on Fri Jul 3 10:31:27 2015
Copyright (c) 1982, 2013, Oracle. All rights reserved.
SQL> connect / as sysdba
Connected to an idle instance.
SQL> startup pfile='initdemo1.ora'
ORACLE instance started.
Total System Global Area 521936896 bytes
Fixed Size 2254824 bytes
Variable Size 201328664 bytes
Database Buffers 310378496 bytes
Redo Buffers 7974912 bytes
Database mounted.
Database opened.
SQL> show parameter spfile
NAME TYPE VALUE
------------------------------------ ----------- ----------
spfile string
SQL>
Ahora vamos a crear el archivo SPFILE con el contenido del archivo PFILE.
SQL> create spfile from pfile='initdemo1.ora';
File created.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 521936896 bytes
Fixed Size 2254824 bytes
Variable Size 201328664 bytes
Database Buffers 310378496 bytes
Redo Buffers 7974912 bytes
Database mounted.
Database opened.
SQL> host rm spfiledemo1.ora
SQL> create spfile from memory;
File created.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance
ORACLE instance started.
Total System Global Area 521936896 bytes
Fixed Size 2254824 bytes
Variable Size 205522968 bytes
Database Buffers 306184192 bytes
Redo Buffers 7974912 bytes
Database mounted.
Database opened.
SQL>
Sorpresa, aquí nos aparece el ORA-32004
SQL> select name from v$obsolete_parameter where isspecified='TRUE';
no rows selected
SQL> host
[oracle@db02 dbs]$ adrci
ADRCI: Release 11.2.0.4.0 - Production on Fri Jul 3 10:35:42 2015
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
ADR base = "/opt/oracle"
adrci> show homes
ADR Homes:
diag/rdbms/demo1/demo1
diag/tnslsnr/dbvisit01/listener
diag/tnslsnr/db02/listener
adrci> set home diag/rdbms/demo1/demo1
adrci> show alert
ADR Home = /opt/oracle/diag/rdbms/demo1/demo1:
*************************************************************************
Output the results to file: /tmp/alert_2928_14068_demo1_1.ado
2015-03-07 11:45:13.439000 -06:00
Adjusting the default value of parameter parallel_max_servers
from 160 to 120 due to the value of parameter processes (150)
Starting ORACLE instance (normal)
************************ Large Pages Information *******************
ADR Home = /opt/oracle/diag/rdbms/demo1/demo1:
*************************************************************************
Output the results to file: /tmp/alert_2928_14068_demo1_1.ado
Picked latch-free SCN scheme 3
Using LOG_ARCHIVE_DEST_1 parameter default value as USE_DB_RECOVERY_FILE_DEST
Autotune of undo retention is turned on.
IMODE=BR
ILAT =27
LICENSE_MAX_USERS = 0
SYS auditing is disabled
Starting up:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining,
Oracle Database Vault and Real Application Testing options.
ORACLE_HOME = /opt/oracle/product/11g
System name:Linux
Node name:db02.demo.com
Release:3.8.13-16.2.1.el6uek.x86_64
Version:#1 SMP Thu Nov 7 17:01:44 PST 2013
Machine:x86_64
VM name:VMWare Version: 6
Using parameter settings in server-side spfile /opt/oracle/product/11g/dbs/spfiledemo1.ora
System parameters with non-default values:
processes = 150
shared_pool_size = 144M
large_pool_size = 32M
...
_sqltune_category_parsed = "DEFAULT"
diagnostic_dest = "/opt/oracle"
Deprecated system parameters with specified values:
background_dump_dest
user_dump_dest
End of deprecated system parameter listing
PMON started with pid=2, OS id=2843
PSP0 started with pid=3, OS id=2845
ADR Home = /opt/oracle/diag/rdbms/demo1/demo1:
*************************************************************************
Output the results to file: /tmp/alert_2928_14068_demo1_1.ado
adrci> exit
SQL> alter system reset background_dump_dest scope=spfile;
System altered.
SQL> alter system reset user_dump_dest scope=spfile;
System altered.
SQL> startup force
ORACLE instance started.
Total System Global Area 521936896 bytes
Fixed Size 2254824 bytes
Variable Size 205522968 bytes
Database Buffers 306184192 bytes
Redo Buffers 7974912 bytes
Database mounted.
Database opened.
SQL>
[oracle@db02 dbs]$ more initdemo1.ora
*.audit_file_dest='/opt/oracle/admin/demo1/adump'
*.audit_trail='db'
*.compatible='11.2.0.4.0'
*.control_files='/opt/oracle/oradata/demo1/control01.ctl','/opt/oracle/fast_recovery_area/demo1/control02.ctl'
*.db_block_size=8192
demo1.db_cache_size=100M
*.db_domain=''
*.db_name='demo1'
*.db_recovery_file_dest='/opt/oracle/fast_recovery_area'
*.db_recovery_file_dest_size=8589934592
*.diagnostic_dest='/opt/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=demo1XDB)'
demo1.java_pool_size=16777216
demo1.large_pool_size=30M
*.log_archive_format='arc_demo1_%t_%s_%r.arc'
*.open_cursors=300
demo1.pga_aggregate_target=90M
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
demo1.sga_target=500M
demo1.shared_pool_size=150994944
*.undo_tablespace='UNDOTBS1'
Borramos el archivo SPFILE o lo re-nombramos.
[oracle@db02 dbs]$ rm spfiledemo1.ora
Nos conectamos a la base de datos e iniciamos la instancia con el archivo PFILE.
[oracle@db02 dbs]$ sqlplus /nolog
SQL*Plus: Release 11.2.0.4.0 Production on Fri Jul 3 10:31:27 2015
Copyright (c) 1982, 2013, Oracle. All rights reserved.
SQL> connect / as sysdba
Connected to an idle instance.
SQL> startup pfile='initdemo1.ora'
ORACLE instance started.
Total System Global Area 521936896 bytes
Fixed Size 2254824 bytes
Variable Size 201328664 bytes
Database Buffers 310378496 bytes
Redo Buffers 7974912 bytes
Database mounted.
Database opened.
Si revisamos el contenido del parámetro SPFILE veremos que esta vacío, lo que nos indica que estamos iniciando la base de datos desde un archivo PFILE.
SQL> show parameter spfile
NAME TYPE VALUE
------------------------------------ ----------- ----------
spfile string
SQL>
Ahora vamos a crear el archivo SPFILE con el contenido del archivo PFILE.
SQL> create spfile from pfile='initdemo1.ora';
File created.
Creando el archivo de parámetros SPFILE a partir del contenido del archivo PFILE y levantar la instancia de la base de datos con el mismo, no tenemos problema.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
Total System Global Area 521936896 bytes
Fixed Size 2254824 bytes
Variable Size 201328664 bytes
Database Buffers 310378496 bytes
Redo Buffers 7974912 bytes
Database mounted.
Database opened.
Pero que pasa si lo hacemos a partir de un archivo con el contenido de los parámetros configurados en memoria.?
Primero vamos a borrar el archivo de parámetros SPFILE.
SQL> host rm spfiledemo1.ora
Ahora creamos el archivo de parámetros con los parámetros de memoria.
File created.
Reiniciamos la base de datos y vemos que pasa.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance
ORACLE instance started.
Total System Global Area 521936896 bytes
Fixed Size 2254824 bytes
Variable Size 205522968 bytes
Database Buffers 306184192 bytes
Redo Buffers 7974912 bytes
Database mounted.
Database opened.
SQL>
Sorpresa, aquí nos aparece el ORA-32004
La otra sorpresa, es que si consultas directamente en el diccionario de la base de datos, aparentemente no existe ningún parámetro configurado que sea obsoleto.
SQL> select name from v$obsolete_parameter where isspecified='TRUE';
no rows selected
Si revisamos el contenido del archivo alert de la base de datos, que para efectos de nuestra demo debemos hacerlo a través de la utilidad ADRCI, por ser versión 11gR2 Patch Set 3, nos podemos enterar que efectivamente, hay dos parámetros seteados que sí son obsoletos en esta versión.
SQL> host
[oracle@db02 dbs]$ adrci
ADRCI: Release 11.2.0.4.0 - Production on Fri Jul 3 10:35:42 2015
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
ADR base = "/opt/oracle"
adrci> show homes
ADR Homes:
diag/rdbms/demo1/demo1
diag/tnslsnr/dbvisit01/listener
diag/tnslsnr/db02/listener
adrci> set home diag/rdbms/demo1/demo1
adrci> show alert
ADR Home = /opt/oracle/diag/rdbms/demo1/demo1:
*************************************************************************
Output the results to file: /tmp/alert_2928_14068_demo1_1.ado
2015-03-07 11:45:13.439000 -06:00
Adjusting the default value of parameter parallel_max_servers
from 160 to 120 due to the value of parameter processes (150)
Starting ORACLE instance (normal)
************************ Large Pages Information *******************
ADR Home = /opt/oracle/diag/rdbms/demo1/demo1:
*************************************************************************
Output the results to file: /tmp/alert_2928_14068_demo1_1.ado
Picked latch-free SCN scheme 3
Using LOG_ARCHIVE_DEST_1 parameter default value as USE_DB_RECOVERY_FILE_DEST
Autotune of undo retention is turned on.
IMODE=BR
ILAT =27
LICENSE_MAX_USERS = 0
SYS auditing is disabled
Starting up:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining,
Oracle Database Vault and Real Application Testing options.
ORACLE_HOME = /opt/oracle/product/11g
System name:Linux
Node name:db02.demo.com
Release:3.8.13-16.2.1.el6uek.x86_64
Version:#1 SMP Thu Nov 7 17:01:44 PST 2013
Machine:x86_64
VM name:VMWare Version: 6
Using parameter settings in server-side spfile /opt/oracle/product/11g/dbs/spfiledemo1.ora
System parameters with non-default values:
processes = 150
shared_pool_size = 144M
large_pool_size = 32M
...
_sqltune_category_parsed = "DEFAULT"
diagnostic_dest = "/opt/oracle"
Deprecated system parameters with specified values:
background_dump_dest
user_dump_dest
End of deprecated system parameter listing
PMON started with pid=2, OS id=2843
PSP0 started with pid=3, OS id=2845
ADR Home = /opt/oracle/diag/rdbms/demo1/demo1:
*************************************************************************
Output the results to file: /tmp/alert_2928_14068_demo1_1.ado
adrci> exit
Para solucionar el problema, debemos reiniciar los parámetros afectados.
SQL> alter system reset background_dump_dest scope=spfile;
System altered.
SQL> alter system reset user_dump_dest scope=spfile;
System altered.
Reiniciamos la base de datos y asunto resuelto.
SQL> startup force
ORACLE instance started.
Total System Global Area 521936896 bytes
Fixed Size 2254824 bytes
Variable Size 205522968 bytes
Database Buffers 306184192 bytes
Redo Buffers 7974912 bytes
Database mounted.
Database opened.
SQL>
Fin de error ORA-32004
No hay comentarios:
Publicar un comentario
Te agradezco tus comentarios. Te esperamos de vuelta.