Showing posts with label DB Parameter. Show all posts
Showing posts with label DB Parameter. Show all posts

Tuesday, September 26, 2017

ORA-00600: internal error code, arguments: [ktbdchk1: bad dscn]

Cause: This Errors May Occur after a switchover Physical Standby database, and it is due to Oracle Bug 8895202. 

Solution:  Apply the patch where this issue is fixed , Patch 8895202 or Patch Sets >= 11.2.0.2 or Patch Bundles >= 11.1.0.7. If Your database version is >=11.2.0.2 then just change the parameter _ktb_debug_flags to 8. There is no danger in keeping _ktb_debug_flags=8. It gets only activated by invalid scn in itl.

After change the parameter analyze the object which has been affected.

bash-4.3$ sqlplus "/as sysdba"

SQL*Plus: Release 11.2.0.4.0 Production on Tue Sep 26 14:31:11 2017

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, Oracle Label Security,
OLAP, Data Mining, Oracle Database Vault and Real Application Testing options

SQL> alter system set "_ktb_debug_flags"=8 scope=both sid='*';

System altered.

SQL> EXIT
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, Oracle Label Security,
OLAP, Data Mining, Oracle Database Vault and Real Application Testing options
bash-4.3$
bash-4.3$



ORA-01555 caused by SQL statement below (SQL ID: 89w0nk4mvs89k, Query Duration=0 sec, SCN: 0x0b0e.183c53aa):

Dump continued from file: /u01/app/oracle/diag/rdbms/erpdcdb/erpdcdb1/trace/erpdcdb1_ora_7798850.trc
ORA-00600: internal error code, arguments: [ktbdchk1: bad dscn], [], [], [], [], [], [], [], [], [], [], []

========= Dump for incident 5041023 (ORA 600 [ktbdchk1: bad dscn]) ========
----- Beginning of Customized Incident Dump(s) -----
[ktbdchk] -- ktbgcl4 -- bad dscn
dependent scn: 0x0b0e.6ada21f5 recent scn: 0x0b0e.183bdd5c current scn: 0x0b0e.183bdd5c
----- End of Customized Incident Dump(s) -----

ANALYZE TABLE TABLE_NAME VALIDATE STRUCTURE CASCADE;

Dump continued from file: /u01/app/oracle/diag/rdbms/erpdcdb/erpdcdb2/trace/erpdcdb2_ora_5767956.trc
ORA-00600: internal error code, arguments: [2663], [2830], [698760342], [2830], [1792623805], [], [], [], [], [], [], []

========= Dump for incident 2720876 (ORA 600 [2663]) ========

*** 2017-09-26 13:52:19.908
dbkedDefDump(): Starting incident default dumps (flags=0x2, level=3, mask=0x0)
----- Current SQL Statement for this session (sql_id=2pbup9vshvk0u) -----
ANALYZE TABLE TABLE_NAME VALIDATE STRUCTURE CASCADE;

Tuesday, August 9, 2016

How to check NLS parameter value of Oracle Database.

SQL> SELECT * FROM NLS_DATABASE_PARAMETERS;

PARAMETER                      VALUE
------------------------------ ----------------------------------------
NLS_LANGUAGE                   AMERICAN
NLS_TERRITORY                  AMERICA
NLS_CURRENCY                   $
NLS_ISO_CURRENCY               AMERICA
NLS_NUMERIC_CHARACTERS         .,
NLS_CHARACTERSET               WE8ISO8859P15
NLS_CALENDAR                   GREGORIAN
NLS_DATE_FORMAT                DD-MON-RR
NLS_DATE_LANGUAGE              AMERICAN
NLS_SORT                       BINARY
NLS_TIME_FORMAT                HH.MI.SSXFF AM

PARAMETER                      VALUE
------------------------------ ----------------------------------------
NLS_TIMESTAMP_FORMAT           DD-MON-RR HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT             HH.MI.SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMAT        DD-MON-RR HH.MI.SSXFF AM TZR
NLS_DUAL_CURRENCY              $
NLS_COMP                       BINARY
NLS_LENGTH_SEMANTICS           BYTE
NLS_NCHAR_CONV_EXCP            FALSE
NLS_NCHAR_CHARACTERSET         AL16UTF16
NLS_RDBMS_VERSION              11.2.0.4.0

20 rows selected.

SQL>

Saturday, April 2, 2016

ORA-32000: write to SPFILE requested but SPFILE is not modifiable

You can see the spfile location are showing in your $ORACLE_HOME/dbs location but spfile are exist in ASM. Database by default use this location. Move the spfile from $ORACLE_HOME/dbs  to another destination.


SQL>  alter system set db_recovery_file_dest='+FRA' scope=spfile sid='*';
 alter system set db_recovery_file_dest='+FRA' scope=spfile sid='*'
*
ERROR at line 1:
ORA-32000: write to SPFILE requested but SPFILE is not modifiable
SQL> show parameter spfile

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                               string      /u01/app/oracle/product/11.2.4
                                                 /db_1/dbs/spfileracdb2.ora
SQL>
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
[oracle@racn2 ~]$ mv /u01/app/oracle/product/11.2.4/db_1/dbs/spfileracdb2.ora /u01/app/oracle/product/11.2.4/db_1/dbs/bkpspfileracdb2.ora
[oracle@racn2 ~]$
[oracle@racn2 ~]$ sqlplus "/as sysdba"

SQL*Plus: Release 11.2.0.4.0 Production on Sat Apr 2 09:20:08 2016

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options

SQL> shut immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup;
ORACLE instance started.

Total System Global Area 1653518336 bytes
Fixed Size                  2253784 bytes
Variable Size            1073744936 bytes
Database Buffers          570425344 bytes
Redo Buffers                7094272 bytes
Database mounted.
Database opened.
SQL> alter system set db_recovery_file_dest='+FRA' scope=spfile sid='*';

System altered.

SQL>

Move spfile form disk to ASM


SQL> create spfile='+DATA/RACDB/spfileracdb.ora' from pfile='/u01/app/oracle/pfile.ora';

File created.

SQL> shut immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup;
ORACLE instance started.

Total System Global Area 1653518336 bytes
Fixed Size                  2253784 bytes
Variable Size            1073744936 bytes
Database Buffers          570425344 bytes
Redo Buffers                7094272 bytes
Database mounted.
Database opened.
SQL>

Friday, August 14, 2015

ORA-00845: MEMORY_TARGET not supported on this system

Cause : This error comes up because of  Automatic Memory Management (AMM) feature of Oracle 11g R2 seems that shared memory file system (shmfs) is not big enough.

Solution : Increase the size of that file system by issuing the following command.

mount -t tmpfs shmfs -o size=12g /dev/shm

[oracle@OEL64N2 workshops]$ sqlplus /nolog
SQL*Plus: Release 11.2.0.3.0 Production on Sat Aug 15 01:04:51 2015
Copyright (c) 1982, 2011, Oracle.  All rights reserved.
SQL> conn /as sysdba
Connected to an idle instance.
SQL> startup
ORA-00845: MEMORY_TARGET not supported on this system
SQL> exit
Disconnected
[oracle@OEL64N2 workshops]$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda5             9.9G  3.1G  6.4G  33% /
tmpfs                 1.2G  695M  434M  62% /dev/shm
/dev/sda2             4.0G  139M  3.7G   4% /tmp
/dev/sda1              12G  6.4G  4.9G  57% /u01
[oracle@OEL64N2 workshops]$ mount -t tmpfs shmfs -o size=12g /dev/shm
mount: only root can do that
[oracle@OEL64N2 workshops]$ su root
Password:
[root@OEL64N2 workshops]#
[root@OEL64N2 workshops]#
[root@OEL64N2 workshops]# mount -t tmpfs shmfs -o size=12g /dev/shm
[root@OEL64N2 workshops]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda5             9.9G  3.1G  6.4G  33% /
tmpfs                  12G     0   12G   0% /dev/shm
/dev/sda2             4.0G  139M  3.7G   4% /tmp
/dev/sda1              12G  6.4G  4.9G  57% /u01
shmfs                  12G     0   12G   0% /dev/shm
[root@OEL64N2 workshops]# su oracle
[oracle@OEL64N2 workshops]$ sqlplus /nolog
SQL*Plus: Release 11.2.0.3.0 Production on Sat Aug 15 01:08:30 2015
Copyright (c) 1982, 2011, Oracle.  All rights reserved.
SQL> conn /as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area  835104768 bytes
Fixed Size                  2232960 bytes
Variable Size             805309824 bytes
Database Buffers           25165824 bytes
Redo Buffers                2396160 bytes
Database mounted.
Database opened.
SQL>

Tuesday, July 1, 2014

How to null log_archive_dest parameter

==================================================================
In this case if database are archive log mode database will send archive log file in DB_RECOVERY_FILE_DEST (Value of this Parameter).
==================================================================

SQL> ALTER SYSTEM SET log_archive_dest_2='' SCOPE=BOTH;

System altered.

SQL> ALTER SYSTEM SET log_archive_dest_3='' SCOPE=BOTH;

System altered.

SQL> ALTER SYSTEM SET log_archive_dest_4='' SCOPE=BOTH;

System altered.

Monday, June 16, 2014

ORA-16179: INCREMENTAL CHANGES TO "log_archive_dest_2" NOT ALLOWED WITH SPFILE

Cause :- Modifying log_archive_dest_2 will return this error for invalid syntax. This parameter is dynamic and can be changed using the ALTER SYSTEM/ALTER SESSION statement.

SQL> ALTER SYSTEM SET LOG_ARCHIVE_DEST_2='D:\app\oradata\ARCHIVE2' SCOPE=BOTH;
ALTER SYSTEM SET LOG_ARCHIVE_DEST_2='D:\app\oradata\ARCHIVE2' SCOPE=BOTH
*
ERROR AT LINE 1:
ORA-32017: FAILURE IN UPDATING SPFILE
ORA-16179: INCREMENTAL CHANGES TO "log_archive_dest_2" NOT ALLOWED WITH SPFILE

Correct Syntax is

SQL> ALTER SYSTEM SET LOG_ARCHIVE_DEST_2='LOCATION=D:\app\oradata\ARCHIVE2' SCOPE=BOTH;

SYSTEM ALTERED.