Larry’s Keynote

 

I have watched the key note from Larry Ellision. He announce the new database version 18c and introduce the self-driving ┬áconcept where database is “full automated”. Is the DBA in risk of extinction?. He use many buzzwords like machine learning too.

 

HTH – Antonio NAVARRO

Advertisements

ORA-25408 Error

Last morning I get the next error

 
ORA-25408: can not safely replay call

I was taking a snapshot with the follow command;

 
EXEC DBMS_WORKLOAD_REPOSITORY.create_snapshot; 

Looking for the error using the oerr utility

 
jupiter> oerr ora  25408
25408, 00000, "can not safely replay call"
// *Cause:  The connection was lost while doing this call. It may not be
//          safe to replay it after failover.
// *Action: Check to see if the results of the call have taken place, and then
//          replay it if desired.

In this case the core problem is because of I have disable the commit in procedure. It can be enable by using the next command.

 
alter session enable commit in procedure;

The error ORA-25408 is get because of the error ORA-00034. This is a RAC and I suppose it fails and try again in other node in the RAC.

HTH – Antonio NAVARRO

How To Trace DDL Sentences

Last day someone drop a import table in a database. The app get crazy and nothing work fine. The solution was recreate the table but the problem was who deleted it?.

In this case there weren’t any audit. You can activate audit (it is powerfull) but in this case I want talk about trace only DDL SQL (Data Definition Language) by using the enable_ddl_logging parameter.

 

How to check;

BBDD*ANR> show parameter enable_ddl_logging

NAME                                 TYPE                             VALUE
____________________________________ ________________________________ _________________________
enable_ddl_logging                   boolean                          FALSE

How to enable;

ALTER SYSTEM SET ENABLE_DDL_LOGGING=TRUE;

Hot to disable;

ALTER SYSTEM SET ENABLE_DDL_LOGGING=FALSE;

The audit will be write to (version 12c) a file with format show below into the diagnostic_dest;

ddl_${ORACLE_SID}.log

 

HTH – Antonio NAVARRO

RMAN-11003 ORA-32001 Errors When Duplicate Database

Last day I was performing a duplicate from production enviroment to developmente enviroment, when I received the next error;

 
channel: aux3 released channel: aux4 released channel: aux5 released channel: aux6 released channel: aux7 released channel: aux8
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 09/11/2017 17:09:24
RMAN-05501: aborting duplication of target database
RMAN-03015: error occurred in stored script Memory Script
RMAN-03009: failure of sql command on clone_default channel at 09/11/2017 17:09:24
RMAN-11003: failure during parse/execution of SQL statement: alter system set  db_name =  'SAPP' comment= 'Modified by RMAN duplicate' scope=spfile
ORA-32001: write to SPFILE requested but no SPFILE is in use

In this case the problem was the SPFILE, like the error show. I remove the previus clone of database before to duplicate again, but when I removed the previous image it not remove the service,
It is a RAC and I need remove from CRS. Remove the service and repeat the duplicate command again solve the problem.

HTH – Antonio NAVARRO

 

Copy Password File From ASM To Filesystem

In Oracle 121, password file can be store into the ASM. I think it is a good idea but the problem is when you want to copy or reply to another system. You need perform a copy of this file. In this case I goint to show the pwcopy command from asmcmd. Using pwcopy you can perform a copy of a password file, for asm or database instance, to another path into the asm or out to the filesystem.

Please look the below example;

 
ASMCMD [+DB12C_PROD_DATOS_DG/db12c/PASSWORD] > pwcopy pwddb12c.299.956724623 /export/home/grid2/pwdfile_anr
copying +DB12C_PROD_DATOS_DG/db12c/PASSWORD/pwdwebp.299.956724623 -> /export/home/grid2/pwdfile_anr
ASMCMD [+DB12C_PROD_DATOS_DG/db12c/PASSWORD] > exit
grid2@/export/home/grid2 $ ls -rlt
total 125574
drwxr-xr-x   2 grid2     oinstall       3 Feb  1  2017 Opatch
drwxr-xr-x   3 grid2     oinstall       5 Feb  2  2017 PSU
drwxr-xr-x   2 grid2     oinstall       8 Jun 14 09:00 admin
-rw-r-----   1 grid2     oinstall    7680 Aug 31 09:14 pwdfile_anr

In this case I performed a copy of a password file to the file system.

HTH – Antonio NAVARRO

RMAN-06136 ORA-17627 ORA-01017 ORA-17629 Errors When Duplicating DB

Last morning I was improving a duplicate script, from production environment to development, when I get the next error;Last morning I was improving a duplicate script, from production environment to development, when I get the next error;

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 08/31/2017 08:41:54
RMAN-05501: aborting duplication of target database
RMAN-03015: error occurred in stored script Memory Script
RMAN-06136: ORACLE error from auxiliary database: ORA-17629: Cannot connect to the remote database server
ORA-17627: ORA-01017: invalid username/password; logon denied
ORA-17629: Cannot connect to the remote database server

After many probes I have discovered that password file is wrong. I performed a scp from prod to dev. When I send the file again it works fine.

 
HTH – Antonio NAVARRO

ORA-12720, RMAN-06136 And RMAN-05501 Errors When Duplicating Database

Today I was performa a duplicate database when I got the next error.

 
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 08/30/2017 10:32:22
RMAN-05501: aborting duplication of target database
RMAN-06136: ORACLE error from auxiliary database: ORA-01503: CREATE CONTROLFILE failed
ORA-12720: operation requires database is in EXCLUSIVE mode

Okay, it is my fault, I forgot set the cluster_databsae to FALSE. It came from a RAC and have value of TRUE. It is so easy as change this parameter.

HTH – Antonio NAVARRO