Showing posts with label Database. Show all posts
Showing posts with label Database. Show all posts

Tuesday, 20 June 2017

Datasource java.sql.SQLException ORA-28040 No matching Authentication protocol DRSA0010E

Error:

After upgrading from 11g to 12c when the application datasource trying to connect.We are getting below error

"Datasource java.sql.SQLException ORA-28040 No matching Authentication protocol DRSA0010E"

Solution:
In 12c ORACLE_HOME/network/admin/sqlnet.ora enter the below values and restart the listener.



SQLNET.ALLOWED_LOGON_VERSION_CLIENT=8
SQLNET.ALLOWED_LOGON_VERSION_SERVER=8
 
lsnrctl reload
Now try to connect from application.

DBUA : InitParamAttributes.loadInitParams java.util.NoSuchElementException java.util.StringTokenizer




Error:
DBUA : /u01/app/oracle/cfgtoollogs/dbua/logs/trace.log

[Thread-12] [ 2017-06-09 21:49:22.063 WAT ] [InitParamAttributes.loadInitParams:1984]  DBParameter created:=open_cursors = 1000
java.util.NoSuchElementException
        at java.util.StringTokenizer.nextToken(StringTokenizer.java:332)
        at oracle.sysman.assistants.util.attributes.InitParamAttributes.loadInitParams(InitParamAttributes.java:1976)
        at oracle.sysman.assistants.dbma.backend.Database.updateNonDefaultInitParams(Database.java:1188)
        at oracle.sysman.assistants.dbma.backend.CompManager.obtainGenericDbInfo(CompManager.java:2456)
        at oracle.sysman.assistants.dbma.backend.CompManager.obtainDatabaseInformation(CompManager.java:4255)
        at oracle.sysman.assistants.dbma.ui.DatabasesPage.doProcessing(DatabasesPage.java:811)
        at oracle.sysman.assistants.util.WaitDialog.run(WaitDialog.java:187)
        at java.lang.Thread.run(Thread.java:637)


Diag:

select NAME||'|'||nvl((translate(VALUE,chr(13) || chr(10),' ')), 'DBUA_NULL') from v$parameter where isdefault='FALSE' and name!='ifile'
and name!='spfile' and name!='event' and name!='_trace_events' union select NAME||'|'|| nvl((translate(VALUE,chr(13) || chr(10),' ')), 'DBUA_NULL')
from v$parameter where ismodified!='FALSE' and isdefault='FALSE' and name!='ifile' and name!='spfile' and name!='event' and name!='_trace_events';


audit_file_dest|/u01/app/oracle/admin/n013bans/adump
audit_trail|DB
compatible|11.2.0.0.0
control_files|/oradata/N013BANS/controlfile/o1_mf_8r72rt04_.ctl
db_block_size|8192
db_create_file_dest|/oradata
db_domain|DBUA_NULL
db_name|n013bans
diagnostic_dest|/u01/app/oracle
dispatchers|(PROTOCOL=TCP) (SERVICE=n013bansXDB)
local_listener|LISTENER_N013BANS
log_archive_dest_1|LOCATION=/archive/n013bans
open_cursors|500
os_authent_prefix|
pga_aggregate_target|268435456
processes|300
remote_login_passwordfile|EXCLUSIVE
remote_os_authent|TRUE
sessions|472
sga_target|805306368
undo_tablespace|UNDOTBS1

21 rows selected.

Solution:

The above error is checking the init parameters using above query,One of the parameter is having issue with DBUA like special
character.

In my case after open_cursors i get the "java.util.NoSuchElementException" ,By checking the output of the above query ,after open_cursors i see the parameter
os_authent_prefix ,So i reset the value os_authent_prefix.Then i restarted the database after that DBUA go through.


Wednesday, 31 May 2017

alter database backup controlfile ORA-01110 ORA-01187 cannot read from file because it failed verification tests

Error:

When trying to take backup of control file getting below error

SQL> alter database backup controlfile to trace as '/tmp/controltxt.trxt';
alter database backup controlfile to trace as '/tmp/controltxt.trxt'
*
ERROR at line 1:
ORA-01187: cannot read from file  because it failed verification tests
ORA-01110: data file 201: '/oradata/test/temp01.dbf'


Solution:
Drop and recreate the tempfile 'temp01.dbf'

alter database tempfile  '/oradata/test/temp01.dbf' drop;
alter tablespace temp add tempfile /oradata/test/temp01.dbf' size 4g reuse;

Then 
alter database backup controlfile to trace as '/tmp/controltxt.trxt';

Tuesday, 30 May 2017

ORA-38706 ORA-38788 ORA-38706: Cannot turn on FLASHBACK DATABASE logging.

Error:
While enabling flashback in standby getting below error.

ERROR at line 1:
ORA-38706: Cannot turn on FLASHBACK DATABASE logging.
ORA-38788: More standby database recovery is needed
ORA-38706 ORA-38788: More standby database recovery is needed


Solution:
This could be due to inconsistency in the datafile headers try to apply the archive log to the point where all the file no of datafile are in sync.
If you are missing archive logs then try below option,This is tested on Non-RAC db.

STNDBY:
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;

SELECT CURRENT_SCN FROM V$DATABASE;
select hxfil FileNo, HXONS OnlineStatus, FHSTA status, FHSCN SCN, FHTHR Thread,
FHRBA_SEQ Sequence, FHTNM TABLESPACE_NAME from x$kcvfhall where FHSTA='0';


PROD: BACKUP INCREMENTAL FROM SCN <From the above output> DATABASE FORMAT '/backup/LS_EBS_RMAN/st_bk/ForStandby_%U' tag 'FORSTANDBY';

scp PROD to DR

Stby: CATALOG START WITH '/Backup location';

Stby: RECOVER DATABASE NOREDO;

PROD: BACKUP CURRENT CONTROLFILE FOR STANDBY FORMAT '/tmp/ForStandbyCTRL.bck';

scp PROD:/tmp/ForStandbyCTRL.bck to DR:/tmp/ForStandbyCTRL.bck
Stby:

RMAN> SHUTDOWN IMMEDIATE ;
RMAN> STARTUP NOMOUNT;
RMAN> RESTORE STANDBY CONTROLFILE FROM '/tmp/ForStandbyCTRL.bck';
 
RMAN> SHUTDOWN;
RMAN> STARTUP MOUNT;
RMAN>  CATALOG START WITH '/u03/oracle/proddb/db/apps_st/data/';
RMAN> SWITCH DATABASE TO COPY;

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;

Prim:
alter system archive log current;
alter system switch logfile;
alter system switch logfile;
alter system switch logfile;
alter system switch logfile;

In standby: --> Make sure all the switch logs are recovered in DR
shut immediate
startup mount;
select log_mode,flashback_on from v$database;
alter database flashback on;
select log_mode,flashback_on from v$database;
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;

IMPDP table import ORA-31693 ORA-29913 ORA-29400 ORA-26059

Error:

While importing data of a table getting below error

Starting "SYSTEM"."SYS_IMPORT_TABLE_01":  system/********@SID directory=test_dir dumpfile=dump_25052017.dmp logfile=dump_25052017.log remap_schema=OldSchema:NewScheam tables=NewScheam.table content=data_only parallel=2
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
ORA-31693: Table data object NewScheam.table failed to load/unload and is being skipped due to error:
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
ORA-26059: Data is too large for column Col_3
Job "SYSTEM"."SYS_IMPORT_TABLE_01" completed with 1 error(s) at 11:04:14

Solution:
The error is due to Col_3 data size,So try with TABLE_EXISTS_ACTION=REPLACE to import the latest data structure and data of the table.

oracle runInstaller bash: xclock: command not found...

Error:
During installation of oracle getting below error on xclock or runInstaller

[oracle ~]$ xclock
bash: xclock: command not found...
Similar command is: 'clock'

Solution:
Look like rpm is missing or reinstall xorg-x11-apps

yum install xorg-x11-apps
yum reinstall xorg-x11-apps

ORA-00334 ORA-00353 ORA-00283 ORA-00354: corrupt redo log block header

Error:

ORA-00283: recovery session canceled due to errors
ORA-00354: corrupt redo log block header
ORA-00353: log corruption near block 510287 change 10133162989667 time
04/09/2017 22:26:33
ORA-00334: archived log: '/u02/archive/arch_1_3851_869915362.arc'


Solution:

Looks like archive log corruption,Copy the archive log from backup and restart the recover.

recover standby database ORA-01110 ORA-01194 ORA-01547 warning: RECOVER succeeded but OPEN RESETLOGS would get error below

Error:


SQL> recover standby database;
ORA-00279: change 10133160396101 generated at 04/05/2017 20:43:03 needed for
thread 1
ORA-00289: suggestion : /u02/archive/arch_1_3801_869915362.arc
ORA-00280: change 10133160396101 for thread 1 is in sequence #3801
 
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
/u02/archive/arch_1_3801_869915362.arc
ORA-16145: archival for thread# 1 sequence# 3801 in progress
 
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: '/u03/oracle/proddb/db/apps_st/data/system01.dbf'


SQL>

Solution:
Copy the archive logs from the prod to the standby then recover the database until datafile headers and controlfile are in sync.