Wednesday, June 19, 2024

ORA-00600: INTERNAL ERROR CODE, ARGUMENTS: [KCRATR_SCAN_LASTBWR] ON 11.2.0.4

ORA-00600: INTERNAL ERROR CODE, ARGUMENTS: [KCRATR_SCAN_LASTBWR] ON 11.2.0.4

 

[oracle@TEST ~]$ export ORACLE_SID=TESTDB

 

[oracle@TEST ~]$ sqlplus

 

 

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

 

Enter user-name: /as sysdba

 

Connected to an idle instance.

 

SQL> startup

 

ORACLE instance started.

 

Total System Global Area 1486495744 bytes

 

Fixed Size 2850712 bytes

 

Variable Size 553648232 bytes

 

Database Buffers 922746880 bytes

 

Redo Buffers 7249920 bytes

 

Database mounted.

 

ORA-00600: internal error code, arguments: [kcratr_scan_lastbwr], [], [], [],

 

[], [], [], [], [], [], [], []

 

 

 

 

SOLUTION :

 

 

 

 

If you encounter this error, try to recover the database explicitly and see if it opens:

 

 

 

 

SQL> startup mount

 SQL> recover database;

 SQL> alter database open;

 

SQL> select name, open_mode from v$database;

 

NAME OPEN_MODE

 

--------- --------------------

 

TESTDB MOUNTED

 

SQL> alter database recover;

 

Database altered.

 

SQL> alter database open;

 

Database altered.

 

Monday, May 6, 2024

BITNAMI MYSQL INSTANCE INNODB CRASH

 Error:


2024-05-05T19:19:41.260401Z 0 [System] [MY-010116] [Server] /opt/bitnami/mysql/bin/mysqld (mysqld 8.0.23) starting as process 28016

2024-05-05T19:19:41.262950Z 0 [Warning] [MY-013242] [Server] --character-set-server: 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.

2024-05-05T19:19:41.262960Z 0 [Warning] [MY-013244] [Server] --collation-server: 'utf8_general_ci' is a collation of the deprecated character set UTF8MB3. Please consider using UTF8MB4 with an appropriate collation instead.

2024-05-05T19:19:41.274571Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.

2024-05-05T19:19:41.452755Z 1 [ERROR] [MY-013183] [InnoDB] Assertion failure: fil0fil.cc:10815:initial_fsize == (file->size * phy_page_size) thread 140475468232448

InnoDB: We intentionally generate a memory trap.

InnoDB: Submit a detailed bug report to http://bugs.mysql.com.

InnoDB: If you get repeated assertion failures or crashes, even

InnoDB: immediately after the mysqld startup, there may be

InnoDB: corruption in the InnoDB tablespace. Please refer to

InnoDB: http://dev.mysql.com/doc/refman/8.0/en/forcing-innodb-recovery.html

InnoDB: about forcing recovery.

19:19:41 UTC - mysqld got signal 6 ;

Most likely, you have hit a bug, but this error can also be caused by malfunctioning hardware.

Thread pointer: 0x55a7d6822eb0

Attempting backtrace. You can use the following information to find out

where mysqld died. If you see no messages after this, something went

terribly wrong...

stack_bottom = 7fc2fe622ca0 thread_stack 0x46000

/opt/bitnami/mysql/bin/mysqld(my_print_stacktrace(unsigned char const*, unsigned long)+0x2e) [0x55a7d225115e]

/opt/bitnami/mysql/bin/mysqld(handle_fatal_signal+0x31b) [0x55a7d13036eb]

/lib/x86_64-linux-gnu/libpthread.so.0(+0x12730) [0x7fc30abf4730]

/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x10b) [0x7fc30a2dc8eb]

/lib/x86_64-linux-gnu/libc.so.6(abort+0x121) [0x7fc30a2c7535]

/opt/bitnami/mysql/bin/mysqld(+0xebeff8) [0x55a7d1085ff8]

/opt/bitnami/mysql/bin/mysqld(fil_tablespace_redo_extend(unsigned char*, unsigned char const*, page_id_t const&, unsigned long, bool)+0x532) [0x55a7d2662632]

/opt/bitnami/mysql/bin/mysqld(+0x2217e34) [0x55a7d23dee34]

/opt/bitnami/mysql/bin/mysqld(+0x2219969) [0x55a7d23e0969]

/opt/bitnami/mysql/bin/mysqld(recv_recovery_from_checkpoint_start(log_t&, unsigned long)+0x2450) [0x55a7d23e5a00]

/opt/bitnami/mysql/bin/mysqld(srv_start(bool)+0x1d87) [0x55a7d24cf907]

/opt/bitnami/mysql/bin/mysqld(+0x2174476) [0x55a7d233b476]

/opt/bitnami/mysql/bin/mysqld(dd::bootstrap::DDSE_dict_init(THD*, dict_init_mode_t, unsigned int)+0x90) [0x55a7d2027770]

/opt/bitnami/mysql/bin/mysqld(dd::upgrade_57::do_pre_checks_and_initialize_dd(THD*)+0x18b) [0x55a7d221b74b]

/opt/bitnami/mysql/bin/mysqld(+0x11ed208) [0x55a7d13b4208]

/opt/bitnami/mysql/bin/mysqld(+0x25af2b4) [0x55a7d27762b4]

/lib/x86_64-linux-gnu/libpthread.so.0(+0x7fa3) [0x7fc30abe9fa3]

/lib/x86_64-linux-gnu/libc.so.6(clone+0x3f) [0x7fc30a39e06f]


Trying to get some variables.

Some pointers may be invalid and cause the dump to abort.

Query (0): Connection ID (thread ID): 1

Status: NOT_KILLED


The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains

information that should help you find out what is causing the crash.


Solution:

1)Stop all bitnami process.

2)edit "/opt/bitnami/mysql/conf/my.cnf" and add "innodb_force_recovery=6" in [mysqld] block.

3)Comment "innodb_tempdir=/bitnami/mysql/data" and save the file.

4)Start MySQL instance [/opt/bitnami/ctlscript.sh start MySQL] and check the status [/opt/bitnami/ctlscript.sh status]. If MySQL instance running, then start all other process.

Tuesday, January 24, 2023

Patch 34935010 - DATABASE MRP 19.17.0.0.230117

 

Issues while applying Oracle 19.17.0 MRP [34935010]

#################################################################

 

Error:

[oracle@localhost 34935010]$ opatch apply /home/oracle/34935010/ -oh /opt/oracle/product/19c/dbhome_1

Oracle Interim Patch Installer version 12.2.0.1.36

Copyright (c) 2023, Oracle Corporation.  All rights reserved.

 

 

ZOP-51: The patch location is not valid for apply, because it doesn't have correct metadata, or it points to a patch directory.

Argument(s) Error... Patch location is not valid for apply

 

Please check the arguments and try again.

 

OPatch failed with error code 135

 

Reason For this Error:

 

Instead of “opatch”, We should use “opatchauto” to apply the patch.

 

Command:

 opatchauto apply -binary /home/oracle/34935010/ -oh /opt/oracle/product/19c/dbhome_1 -target_type oracle_database

 

Sample Upgrade Output:

[oracle@localhost 34935010]$ opatchauto apply -binary /home/oracle/34935010/ -oh /opt/oracle/product/19c/dbhome_1 -target_type oracle_database

Oracle Home : /opt/oracle/product/19c/dbhome_1

 

OPatchAuto binary patching Tool

Copyright (c)2014, Oracle Corporation. All rights reserved.

 

OPatchauto Version : 13.9.5.0.0

Running from       : /opt/oracle/product/19c/dbhome_1

 

opatchauto log file: /opt/oracle/product/19c/dbhome_1/cfgtoollogs/opatchauto/opatchauto_2023-01-24_03-18-28_binary.log

 

Target type : oracle_database

 

Patch selected: /home/oracle/34935010

 

 

Analysing this list of patches :

[/home/oracle/34935010/33838019, /home/oracle/34935010/34938232, /home/oracle/34935010/34545238, /home/oracle/34935010/34724125, /home/oracle/34935010/34366627, /home/oracle/34935010/34538232, /home/oracle/34935010/34333986, /home/oracle/34935010/34715072, /home/oracle/34935010/32295794, /home/oracle/34935010/34816203, /home/oracle/34935010/34574048, /home/oracle/34935010/34953559] ...

 

Analysis completed.

 

Applying the patches ...

 

 

Patches successfully applied.

 

 

 

 

==Following patches were SUCCESSFULLY applied:

 

Patch: /home/oracle/34935010/32295794

Log: /opt/oracle/product/19c/dbhome_1/cfgtoollogs/opatchauto/core/opatch/opatch2023-01-24_03-18-30AM_1.log

 

Patch: /home/oracle/34935010/33838019

Log: /opt/oracle/product/19c/dbhome_1/cfgtoollogs/opatchauto/core/opatch/opatch2023-01-24_03-18-30AM_1.log

 

Patch: /home/oracle/34935010/34333986

Log: /opt/oracle/product/19c/dbhome_1/cfgtoollogs/opatchauto/core/opatch/opatch2023-01-24_03-18-30AM_1.log

 

Patch: /home/oracle/34935010/34366627

Log: /opt/oracle/product/19c/dbhome_1/cfgtoollogs/opatchauto/core/opatch/opatch2023-01-24_03-18-30AM_1.log

 

Patch: /home/oracle/34935010/34538232

Log: /opt/oracle/product/19c/dbhome_1/cfgtoollogs/opatchauto/core/opatch/opatch2023-01-24_03-18-30AM_1.log

 

Patch: /home/oracle/34935010/34545238

Log: /opt/oracle/product/19c/dbhome_1/cfgtoollogs/opatchauto/core/opatch/opatch2023-01-24_03-18-30AM_1.log

 

Patch: /home/oracle/34935010/34574048

Log: /opt/oracle/product/19c/dbhome_1/cfgtoollogs/opatchauto/core/opatch/opatch2023-01-24_03-18-30AM_1.log

 

Patch: /home/oracle/34935010/34715072

Log: /opt/oracle/product/19c/dbhome_1/cfgtoollogs/opatchauto/core/opatch/opatch2023-01-24_03-18-30AM_1.log

 

Patch: /home/oracle/34935010/34724125

Log: /opt/oracle/product/19c/dbhome_1/cfgtoollogs/opatchauto/core/opatch/opatch2023-01-24_03-18-30AM_1.log

 

Patch: /home/oracle/34935010/34816203

Log: /opt/oracle/product/19c/dbhome_1/cfgtoollogs/opatchauto/core/opatch/opatch2023-01-24_03-18-30AM_1.log

 

Patch: /home/oracle/34935010/34938232

Log: /opt/oracle/product/19c/dbhome_1/cfgtoollogs/opatchauto/core/opatch/opatch2023-01-24_03-18-30AM_1.log

 

Patch: /home/oracle/34935010/34953559

Log: /opt/oracle/product/19c/dbhome_1/cfgtoollogs/opatchauto/core/opatch/opatch2023-01-24_03-18-30AM_1.log

 

 

opatchauto SUCCEEDED.

 

 

[oracle@localhost 34935010]$

[oracle@localhost 34935010]$ datapatch

SQL Patching tool version 19.17.0.0.0 Production on Tue Jan 24 03:30:01 2023

Copyright (c) 2012, 2022, Oracle.  All rights reserved.

 

Log file for this invocation: /opt/oracle/cfgtoollogs/sqlpatch/sqlpatch_12121_2023_01_24_03_30_01/sqlpatch_invocation.log

 

Connecting to database...OK

Gathering database info...done

 

Note:  Datapatch will only apply or rollback SQL fixes for PDBs

       that are in an open state, no patches will be applied to closed PDBs.

       Please refer to Note: Datapatch: Database 12c Post Patch SQL Automation

       (Doc ID 1585822.1)

 

Bootstrapping registry and package to current versions...done

Determining current state...done

 

Current state of interim SQL patches:

  No interim patches found

 

Current state of release update SQL patches:

  Binary registry:

    19.17.0.0.0 Release_Update 220924224051: Installed

  PDB CDB$ROOT:

    Applied 19.17.0.0.0 Release_Update 220924224051 successfully on 19-JAN-23 04.56.50.910268 AM

  PDB ORCLPDB1:

    Applied 19.17.0.0.0 Release_Update 220924224051 successfully on 23-JAN-23 07.19.12.154816 AM

  PDB PDB$SEED:

    Applied 19.17.0.0.0 Release_Update 220924224051 successfully on 19-JAN-23 04.56.55.596701 AM

 

Adding patches to installation queue and performing prereq checks...done

Installation queue:

  For the following PDBs: CDB$ROOT PDB$SEED ORCLPDB1

    No interim patches need to be rolled back

    No release update patches need to be installed

    No interim patches need to be applied

 



 



Monday, December 26, 2022

Postgres Database Backup & Restore Script

Backup

======

[postgres@prod log]$ cat /u01/database_backup/db_backup.sh

PATH=/u01/opt/PostgreSQL/11/bin/pg_dump:.:$PATH; export PATH

PATH=/u01/opt/PostgreSQL/11/bin:$PATH:$HOME/.local/bin:$HOME/bin


export PATH

~

export PGDATA=/u01/opt/PostgreSQL/11/data

export PGUSER=postgres

export PGDATABASE=postgres


MYDB=postgresql://postgres:postgres@127.0.0.1:5432/appdb; export MYDB

pg_dump -v -Fc --dbname=$MYDB --file /u01/database_backup/appdb_$(date +%Y-%m-%d).dump 2> /u01/database_backup/log/appdb_export_log_$(date +%Y-%m-%d).log


Restore

========

[postgres@uat log]$ cat /u01/database_backup/database_restore.sh

PATH=/u01/opt/PostgreSQL/11/bin/pg_dump:.:$PATH; export PATH

PATH=/u01/opt/PostgreSQL/11/bin:$PATH:$HOME/.local/bin:$HOME/bin


export PATH

~

export PGDATA=/u01/opt/PostgreSQL/11/data

export PGUSER=postgres

export PGDATABASE=postgres

PGPASSWORD=postgres; export PGPASSWORD


psql -h db.uat -U postgres -d postgres  -c "SELECT pg_terminate_backend (pg_stat_activity.pid) FROM pg_stat_activity WHERE pg_stat_activity.datname = 'appdb';"

psql -h db.uat -U postgres -d postgres  -c "drop  DATABASE appdb;"

psql -h db.uat -U postgres -d postgres  -c "CREATE DATABASE appdb WITH OWNER = appusr ENCODING = 'UTF8' LC_COLLATE = 'C' LC_CTYPE = 'C' TABLESPACE = appdb_data CONNECTION LIMIT = -1;"

pg_restore -c -C -v -j 4 -Fc -d postgres /u01/database_backup/appdb_$(date +%Y-%m-%d).dump > /u01/database_backup/log/appdbRestore_$(date +%Y-%m-%d).txt 2>&1


Sunday, December 25, 2022

pg_restore: [archiver] did not find magic string in file header

Error:

pg_restore: [archiver] did not find magic string in file header

 

Solution:

If the database backup "pg_dump" has been taken with -Fc or -Fd parameter, we must “pg_restore” command to restore the data.


Wednesday, August 31, 2022

Update patch information in redhat portal

 If the redhat operating system servers are registered in redhat portal with subscription, It Periodically scans  the server and updates the information in the portal. 

Once the patches are applied in the server, to sync the report forcelly, Execute the below command.


service rhsmcertd stop

rhsmcertd --now

service rhsmcertd start

Wednesday, August 17, 2022

Alternative tool for xming

 xming started charging to use xming tool. Hence, We use the below tool with free of cost. There are so many tools available in market. But, this tool is so easy to configure.

Link :-

How do I set up X11 forwarding? (upenn.edu)


Download [Portable Format ]: 

MobaXterm Xserver with SSH, telnet, RDP, VNC and X11 - Home Edition (mobatek.net)



Unzip the folder and run "MobaXterm_Personal_22.1" tool.


Login to the linux server and execute the below command.


export DISPLAY="<Desktop IP>:0.0"

Example:

export DISPLAY="192.24.40.2:0.0"


run "xclock" command to confirm whether you can see the GUI.

Monday, August 15, 2022

connection timeout with smtp server

Issue: 


 I have faced this issue after I did inplace upgrade from OEL 6 to OEL 7. I am not able to send email and the maillog [/var/log/] updated with below error. 


 node-02 sendmail[27436]: 27E5KQWW098928: to=, ctladdr= (1001/1001), delay=00:20:52, xdelay=00:00:00, mailer=esmtp, pri=480584, relay=test.com., dsn=4.0.0, stat=Deferred: Connection timed out with test.com. 
node-02 sendmail[27544]: 27E5eOXd027538: to=, ctladdr= (1001/1001), delay=00:01:00, xdelay=00:01:00, mailer=esmtp, pri=120584, relay=test.com. [192.23.6.77], dsn=4.0.0, stat=Deferred: Connection timed out with test.com.



Reason For this issue: 

In our infra, our mail server dns name is “mail.test.com” and there is separate server for hosting one website called “test.com”. Due to that, If I use “mail.test.com”, The linux server resolves “test.com” instead of “mail.test.com” and ended with timeout error.



Solution: 
Update the IP instead of dns in the configuration. 
• systemctl stop sendmail 
• vi /etc/mail/sendmail.mc 
• Add the below entry [replace the hostname with IP] 
            o define(`SMART_HOST', `192.168.10.111')dnl 
• m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf 
• systemctl restart sendmail 

 If the same issue happens, do the below steps and restart sendmail services.
 • grep DS /etc/mail/sendmail.cf 

Sample output: DS192.168.10.111 If there is no IP, add mail server IP.

Sunday, June 12, 2022

Undo Retention and undo tablespace size calculation [To Resolve ora-0555 issues]

SQL Query find the current actual undo size and undo retention ================================================================ SELECT d.undo_size/(1024*1024) "ACTUAL UNDO SIZE [MByte]", SUBSTR(e.value,1,25) "UNDO RETENTION [Sec]", ROUND((d.undo_size / (to_number(f.value) * g.undo_block_per_sec))) "OPTIMAL UNDO RETENTION [Sec]" FROM ( SELECT SUM(a.bytes) undo_size FROM v$datafile a, v$tablespace b, dba_tablespaces c WHERE c.contents = 'UNDO' AND c.status = 'ONLINE' AND b.name = c.tablespace_name AND a.ts# = b.ts# ) d, v$parameter e, v$parameter f, ( SELECT MAX(undoblks/((end_time-begin_time)*3600*24)) undo_block_per_sec FROM v$undostat 21 ) g WHERE e.name = 'undo_retention' AND f.name = 'db_block_size' / Sample output ============== ACTUAL UNDO SIZE [MByte] UNDO RETENTION [Sec] OPTIMAL UNDO RETENTION [Sec] ------------------------ ---------------------------------------------------------------------------------------------------- ---------------------------- 180812.922 3600 69354 SQL Query to find the required undo size and undo retention ================================================================ SELECT d.undo_size/(1024*1024) "ACTUAL UNDO SIZE [MByte]", SUBSTR(e.value,1,25) "UNDO RETENTION [Sec]", (TO_NUMBER(e.value) * TO_NUMBER(f.value) * g.undo_block_per_sec) / (1024*1024) "NEEDED UNDO SIZE [MByte]" 6 FROM ( SELECT SUM(a.bytes) undo_size FROM v$datafile a, v$tablespace b, dba_tablespaces c WHERE c.contents = 'UNDO' AND c.status = 'ONLINE' AND b.name = c.tablespace_name AND a.ts# = b.ts# ) d, v$parameter e, v$parameter f, ( SELECT MAX(undoblks/((end_time-begin_time)*3600*24)) undo_block_per_sec FROM v$undostat ) g WHERE e.name = 'undo_retention' AND f.name = 'db_block_size' / Sample output ============== ACTUAL UNDO SIZE [MByte] UNDO RETENTION [Sec] NEEDED UNDO SIZE [MByte] ------------------------ ---------------------------------------------------------------------------------------------------- ------------------------ 180812.922 3600 9385.5

Thursday, April 28, 2022

Sql Server 2019 Cumulative patching [CV] [KB5011644] [15.0.4223.1] is failed with following error.

Error:

     The User Data directory in the registry is not valid. Verify DefaultData key under the instance hive points to a valid directory

 



Reason:-

Check the parameters of “DefaultLog” in the below path in the server registry.

Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL15.EFTS\MSSQLServer

 


Update the correct path in the registry and retry the patching.


Wednesday, April 27, 2022

Always on database creation failed

 

Always on Database creation failed while adding the database in availability databases using "Full database and log backup" data synchronization preference.


Error:

The following required directories do not exist on replica test11\DRtest : D:\ Data\testdb,L:\ Data\testdb_logs. (Microsoft.SqlServer.Management.HadrModel)

 

------------------------------

Program Location:

 

   at Microsoft.SqlServer.Management.HadrModel.Validator.Validate(IExecutionPolicy policy, ScenarioValidatorHandler validationDelegate)

   at Microsoft.SqlServer.Management.Hadr.TestDatabaseFileLocationCompatibility.DoWork()

   at Microsoft.SqlServer.Management.TaskForms.SimpleWorkItem.Run()

 



 

Reason:

Incorrect database default datafile & logfile location mentioned in the configuration. Change it in database default locations in “server properties”

 

Monday, April 25, 2022

ORA-27370 ORA-27300 ORA-27301 ORA-27302 ORA-27303

 Issue:- 

 Execute windows shell script[bat file] from oracle scheduler.


Error Code:-

ORA-27370: job slave failed to launch a job of type EXECUTABLE

ORA-27300: OS system dependent operation:accessing job scheduler service failed with status: 2

ORA-27301: OS failure message: The system cannot find the file specified.

ORA-27302: failure occurred at: sjsec 6a

ORA-27303: additional information: The system cannot find the file specified.



Reason for the issue:-


The scheduler job [OracleJobScheduler<dbname>] down and it should be up and running to run jobs in the database


Monday, October 4, 2021

Oracle Database Appliance [ODA] patching from 18.8.0.0.0 to 19.8.0.0.0 [patch 31481822]

 Oracle Database Appliance [ODA] patching from 18.8.0.0.0 to 19.8.0.0.0 [patch 31481822]

 Pre-requisite:-

1)      Take the backup of ODA_BASE. It is mandatory before proceeding with upgrade process.

2)      Follow Doc ID 1633166.1 to take backup of ODA_BASE server. Else,

a.       Shutdown the oda_base from dom server [oakcli stop oda_base]

b.       Execute the below command. Do not execute it without shutdown oda_base

                                                    i.      tar -cvzf node1.tar.gz /OVS/Repositories/odabaseRepo/VirtualMachines/oakDom1/

c.       Start the oda_base from dom server [oakcli start oda_base]

3)      Perform the same for another ODA_BASE node.

4)      Deregister the ODA_BASE nodes from ULN repository if it is registered. It is mandatory else the ODA_BASE will be corrupted after upgrade and ended with below error in boot screen.

Error 15: File not found

5)      Download the below packages and unpack it.

p31481822_198000_Linux-x86-64_3of3.zip

p31481822_198000_Linux-x86-64_1of3.zip

p31481822_198000_Linux-x86-64_2of3.zip è It is for Database patching. We can download it later.

6)      Keep minimum 7GB of free space in “/” location after unpack all packages.

7)      Execute the below command to unpack the package.

a.       oakcli unpack -package /u01/app/patch/p31481822_198000_Linux-x86-64_1of3.zip

b.       oakcli unpack -package /u01/app/patch/p31481822_198000_Linux-x86-64_3of3.zip

8)      Execute the below command to generate the pre-patch report.

a.       oakcli update -patch 19.8.0.0.0 --pre-patchreport –local

                                                    i.      Check the report  and fix the issues.

                                                   ii.      The report generation only one time and we cannot generate it multiple times if there is no issues and server ready for upgrade

Upgrade ODA_BASE 

9)      Execute the below command

a.       oakcli update -patch 19.8.0.0.0 --pre-patchreport –local

b.    oakcli update -patch 19.8.0.0.0 --pre-osupgrade --local

c.       oakcli update -patch 19.8.0.0.0 --osupgrade –local

d.       Perform above 2 steps in second node and then execute “oakcli update -patch 19.8.0.0.0 --post-osupgrade –local”

After Upgrade completed, execute "uname -a" or "cat /etc/oracle-release" to check the new version. It should be like below,

[root@test-01 patch]# uname -a

Linux test-01 4.14.35-1902.303.4.1.el7uek.x86_64 #2 SMP Fri May 29 14:56:41 PDT 2020 x86_64 x86_64 x86_64 GNU/Linux

[root@test-01 patch]# cat /etc/oracle-release

Oracle Linux Server release 7.8

[root@test-01 patch]#


File id xx was expected but xx was read from Verify that files are mapped correctly in sys.master_files. ALTER DATABASE can be used to correct the mappings.

 

Error:-

An unexpected file id was encountered.

 File id xx was expected but xx was read from 

Verify that files are mapped correctly in sys.master_files. ALTER DATABASE can be used to correct the mappings.

Database:-SQL Server any version.

Reason: - While relocating the database file, mentioned the incorrect the data files name.

Solution:- Start the database in emergency mode and execute the database file relocation with correct name and path and restart the database with multi user access.

Wednesday, October 23, 2019

Logical standby sync stopped with error ORA-07445 kxsFrameAllocate()+416 SIGSEGV


Issue:-

Logical standby sync operation has been failed with below error.

Exception [type: SIGSEGV, Address not mapped to object] [ADDR:0x7FE4AE512D94] [PC:0x10DAB5D0, kxsFrameAllocate()+416] [flags: 0x0, count: 1]
Errors in file /u01/app/oracle/diag/rdbms/xxxx/xxxx/trace/xxxxx_as01_13493.trc  (incident=23523):
ORA-07445: exception encountered: core dump [kxsFrameAllocate()+416] [SIGSEGV] [ADDR:0x7FE4AE512D94] [PC:0x10DAB5D0] [Address not mapped to object] []
Use ADRCI or Support Workbench to package the incident.
ORA-26808: Apply process AS01 died unexpectedly.
ORA-00447: fatal error in background process


Fix:-


Follow the metalink id:-
Logical Standby Apply Process Aborts with ORA-7445[kxsEphemeralFramePush] (Doc ID 1332064.1)

Temporary Fix:-

Execute the below command and restart apply process.

 exec dbms_logstdby.apply_set('_DATA_LAYER','FALSE')

Permanent Fix:-
Apply the patch the oneoff patch 28777050 

Sunday, September 22, 2019

Oracle DBCA hanging and not creating database


Oracle DBCA hanging and not creating database

Error:-
Database creation hung database after 56% in windows server in oracle 12c.

Reason:-
DBCA should be triggered by the user who is member of ORA_DBA group. Add the user in this group and run DBCA console. Without adding in the group, dbca hungs at 56% Even, if the user try to run dbca as administrator

Tuesday, October 23, 2018

[FATAL] [DBT-06103] The port (5,500) is already in use in oracle 18c xe


Error :- 

[FATAL] [DBT-06103] The port (5,500) is already in use


Database Release:-
Oracle 18c Express Edition (XE)

Reason:-
Not adding the Hostname entries in /etc/hosts

Wednesday, April 25, 2018

Patch 27338041 - Oracle Database Patch Set Update 12.1.0.2.180417


Patch 27338041 - Oracle Database Patch Set Update 12.1.0.2.180417

[oracle@testpc patch]$ export PATH=$PATH:$ORACLE_HOME/OPatch
[oracle@testpc patch]$ which opatch
/u01/app/oracle/product/12.1.0/dbhome_1/OPatch/opatch
[oracle@testpc patch]$ opatch lsinventory
Oracle Interim Patch Installer version 12.2.0.1.8
Copyright (c) 2018, Oracle Corporation.  All rights reserved.
Oracle Home       : /u01/app/oracle/product/12.1.0/dbhome_1
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/12.1.0/dbhome_1/oraInst.loc
OPatch version    : 12.2.0.1.8
OUI version       : 12.1.0.2.0
Log file location : /u01/app/oracle/product/12.1.0/dbhome_1/cfgtoollogs/opatch/opatch2018-04-25_19-01-41PM_1.log
Lsinventory Output file location : /u01/app/oracle/product/12.1.0/dbhome_1/cfgtoollogs/opatch/lsinv/lsinventory2018-04-25_19-01-41PM.txt
--------------------------------------------------------------------------------
Local Machine Information::
Hostname: testpc
ARU platform id: 226
ARU platform description:: Linux x86-64
Installed Top-level Products (1):
Oracle Database 12c                                                  12.1.0.2.0
There are 1 products installed in this Oracle Home.
Interim patches (1) :
Patch  24006101     : applied on Wed Nov 16 14:04:48 AST 2016
Unique Patch ID:  20683584
Patch description:  "Database Patch Set Update : 12.1.0.2.161018 (24006101)"
   Created on 1 Oct 2016, 12:33:50 hrs PST8PDT
Sub-patch  23054246; "Database Patch Set Update : 12.1.0.2.160719 (23054246)"
Sub-patch  22291127; "Database Patch Set Update : 12.1.0.2.160419 (22291127)"
Sub-patch  21948354; "Database Patch Set Update : 12.1.0.2.160119 (21948354)"
Sub-patch  21359755; "Database Patch Set Update : 12.1.0.2.5 (21359755)"
Sub-patch  20831110; "Database Patch Set Update : 12.1.0.2.4 (20831110)"
Sub-patch  20299023; "Database Patch Set Update : 12.1.0.2.3 (20299023)"
Sub-patch  19769480; "Database Patch Set Update : 12.1.0.2.2 (19769480)"
   Bugs fixed:
     21099555, 22175564, 19141838, 22083366, 20842388, 20117253, 19865345
     19791273, 19243521, 20951038, 19908836, 21281532, 19238590, 24577566
     21184223, 19134173, 20387265, 19149990, 21263635, 18886413, 17551063
     22160989, 22507210, 19703301, 19366375, 19001390, 18202441, 20267166
     19358317, 19706965, 18549238, 19068970, 18797519, 22148226, 20825533
     19649152, 19670108, 18940497, 18948177, 18964978, 19035573, 19176326
     20413820, 19176223, 20904530, 20134339, 19074147, 20868862, 18411216
     21322887, 22507234, 20425790, 18966843, 21329301, 19333670, 19468991
     20124446, 19883092, 19658708, 19591608, 19402853, 20618595, 21787056
     22380919, 21266085, 17835294, 19721304, 19791377, 19068610, 22178855
     22173980, 20746251, 20048359, 20898391, 19185876, 20281121, 20907061
     6599380, 19577410, 22092979, 20603378, 19001359, 19490948, 21387964
     20832516, 17532734, 19309466, 19081128, 20627866, 20844426, 21188532
     18791688, 21442094, 20890311, 20596234, 18973548, 21296029, 19303936
     19461270, 21479753, 20936905, 20235511, 21220620, 18964939, 19430401
     22296366, 21153266, 19409212, 22657942, 20657441, 19879746, 19684504
     20528052, 19024808, 20977794, 18799993, 20466322, 18740837, 19662635
     20228093, 19065556, 20212067, 19524384, 17722075, 20446883, 18952989
     16870214, 19928926, 19835133, 21629064, 20466628, 24386767, 19931709
     19730508, 18819908, 23124895, 19188927, 20074391, 20356733, 14643995
     19547370, 19065677, 21960504, 21225209, 20397490, 18967382, 19174430
     21241829, 19536415, 19171086, 22465352, 22168163, 19335438, 20447445
     18856999, 20471920, 19869255, 21620471, 18990693, 17890099, 18990023
     20101006, 21300341, 20848335, 21744290, 20897759, 21668627, 19304354
     19052488, 20794034, 23260854, 18681056, 20952966, 19896336, 18618122
     20328248, 20440930, 18456643, 19699191, 19201867, 22865673, 18743542
     20798891, 20347562, 22551446, 19777862, 19687159, 21373076, 19174942
     20424899, 21899588, 18899974, 20598042, 19032777, 19058490, 22815955
     19399918, 19434529, 21273804, 19018447, 22757364, 18851894, 19284031
     19022470, 18043064, 20173897, 22062026, 20475845, 17274537, 19440586
     16887946, 22374754, 17319928, 20708701, 17655240, 16439813, 19805359
     19155797, 20859910, 19393542, 22024071, 17210525, 21847223, 19189525
     21649497, 19075256, 22762046, 22075064, 19280225, 18845653, 20560611
     19248799, 21756699, 18988834, 20245930, 18921743, 18799063, 20373598
     20476175, 19571367, 20925795, 19018206, 20509482, 20711718, 20588502
     18849537, 19183343, 21917884, 19189317, 19644859, 19390567, 19279273
     20669434, 16863642, 22528741, 19619732, 18607546, 20348653, 19315691
     19676905, 20165574, 17867700, 20558005, 20734332, 19532017, 20922010
     19450314, 22353346, 20361671, 20009833, 22366558, 20294666, 18191823
     19307662, 19371175, 19195895, 20043616, 19154375, 18914624, 20139391
     21291274, 19174521, 19520602, 19382851, 21875360, 19676012, 19326908
     20217801, 20093776, 21097043, 21246723, 21665897, 19143550, 20428621
     19627012, 14283239, 19518079, 18610915, 18674024, 18306996, 19524158
     19915271, 20122715, 20284155, 20017509, 19363645, 19597439, 21239530
     19888853, 20880215, 21756677, 19534363, 19354335, 19044962, 19639483
     22353199, 22243719, 22916353, 20378086, 21756661, 21260431, 22923409
     20877664, 19028800, 20879889, 19723336, 19077215, 21421886, 19604659
     19308965, 19048007, 18288842, 19689979, 21526048, 19180770, 19197175
     19902195, 20318889, 19013183, 19012119, 20464614, 19067244, 21632821
     19512341, 19841800, 20331945, 19587324, 24316947, 19578350, 19637186
     18674047, 19054077, 20898997, 19708632, 21091431, 19289642, 20869721
     19258504, 17365043, 19468347, 21373473, 16359751, 19439759, 19769480
     19272708, 19978542, 20402832, 19329654, 19873610, 23229229, 21517440
     13542050, 19291380, 21915719, 19076343, 19561643, 19990037, 19487147
     18909599, 20831538, 18250893, 19016730, 16619249, 18354830, 21188584
     19989009, 17414008, 20688221, 20704450, 20441797, 19157754, 18885870
     21785691, 21450666, 18893947, 18705806, 22223463, 16923858, 18417036
     20919320, 20474192, 22046677, 19385656, 19501299, 20920911, 20899461
     21387128, 21315084, 18122373, 20581111, 19606174, 18436647, 19023822
     19178851, 19124589, 19597583, 18499088, 19050649



--------------------------------------------------------------------------------

OPatch succeeded.
 [oracle@testpc 27338041]$ opatch apply -local
Oracle Interim Patch Installer version 12.2.0.1.8
Copyright (c) 2018, Oracle Corporation.  All rights reserved.
Oracle Home       : /u01/app/oracle/product/12.1.0/dbhome_1
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/12.1.0/dbhome_1/oraInst.loc
OPatch version    : 12.2.0.1.8
OUI version       : 12.1.0.2.0
Log file location : /u01/app/oracle/product/12.1.0/dbhome_1/cfgtoollogs/opatch/opatch2018-04-25_19-03-55PM_1.log

Verifying environment and performing prerequisite checks...
OPatch continues with these patches:   24732082  25171037  25755742  26609783  26713565  26925311  27338041

Do you want to proceed? [y|n]
y
User Responded with: Y
All checks passed.

Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/oracle/product/12.1.0/dbhome_1')


Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...
Applying sub-patch '24732082' to OH '/u01/app/oracle/product/12.1.0/dbhome_1'

Patching component oracle.rdbms.install.plugins, 12.1.0.2.0...

Patching component oracle.rdbms.rsf, 12.1.0.2.0...
Skip copying to "/u01/app/oracle/product/12.1.0/dbhome_1/rdbms/mesg/oraus.msb" because it is the same as
the file in incoming patch "/backup/patch/27338041/24732082/files/rdbms/mesg/oraus.msb"

Patching component oracle.tfa, 12.1.0.2.0...

Patching component oracle.rdbms.rman, 12.1.0.2.0...

Patching component oracle.rdbms, 12.1.0.2.0...

Patching component oracle.rdbms.dbscripts, 12.1.0.2.0...
Applying sub-patch '25171037' to OH '/u01/app/oracle/product/12.1.0/dbhome_1'

Patching component oracle.sqlplus.ic, 12.1.0.2.0...

Patching component oracle.sqlplus, 12.1.0.2.0...

Patching component oracle.tfa, 12.1.0.2.0...

Patching component oracle.ordim.client, 12.1.0.2.0...

Patching component oracle.ordim.client, 12.1.0.2.0...
Skip copying to "/u01/app/oracle/product/12.1.0/dbhome_1/ord/jlib/OrdDicomLibrary.ear" because it is the same as
the file in incoming patch "/backup/patch/27338041/25171037/files/ord/jlib/OrdDicomLibrary.ear"

Patching component oracle.ordim.jai, 12.1.0.2.0...
Skip copying to "/u01/app/oracle/product/12.1.0/dbhome_1/ord/jlib/ordimdcm.jar" because it is the same as
the file in incoming patch "/backup/patch/27338041/25171037/files/ord/jlib/ordimdcm.jar"

Patching component oracle.ordim.server, 12.1.0.2.0...

Patching component oracle.rdbms, 12.1.0.2.0...

Patching component oracle.rdbms.rsf, 12.1.0.2.0...

Patching component oracle.rdbms.rman, 12.1.0.2.0...

Patching component oracle.rdbms.install.plugins, 12.1.0.2.0...

Patching component oracle.javavm.containers, 12.1.0.2.0...
Applying sub-patch '25755742' to OH '/u01/app/oracle/product/12.1.0/dbhome_1'
ApplySession: Optional component(s) [ oracle.oid.client, 12.1.0.2.0 ] , [ oracle.has.crs, 12.1.0.2.0 ]  not present in the Oracle Home or a higher version is found.

Patching component oracle.network.rsf, 12.1.0.2.0...

Patching component oracle.ldap.rsf, 12.1.0.2.0...

Patching component oracle.ldap.client, 12.1.0.2.0...

Patching component oracle.oracore.rsf, 12.1.0.2.0...

Patching component oracle.rdbms.deconfig, 12.1.0.2.0...

Patching component oracle.tfa, 12.1.0.2.0...

Patching component oracle.network.listener, 12.1.0.2.0...

Patching component oracle.rdbms, 12.1.0.2.0...

Patching component oracle.rdbms.dbscripts, 12.1.0.2.0...
Skip copying to "/u01/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/dbmsrman.sql" because it is the same as
the file in incoming patch "/backup/patch/27338041/25755742/files/rdbms/admin/dbmsrman.sql"

Patching component oracle.rdbms.rsf, 12.1.0.2.0...

Patching component oracle.rdbms.rman, 12.1.0.2.0...
Applying sub-patch '26609783' to OH '/u01/app/oracle/product/12.1.0/dbhome_1'

Patching component oracle.rdbms, 12.1.0.2.0...

Patching component oracle.rdbms.rsf, 12.1.0.2.0...

Patching component oracle.oracore.rsf, 12.1.0.2.0...
Applying sub-patch '26713565' to OH '/u01/app/oracle/product/12.1.0/dbhome_1'
ApplySession: Optional component(s) [ oracle.oid.client, 12.1.0.2.0 ] , [ oracle.has.crs, 12.1.0.2.0 ]  not present in the Oracle Home or a higher version is found.

Patching component oracle.ldap.client, 12.1.0.2.0...

Patching component oracle.rdbms.crs, 12.1.0.2.0...

Patching component oracle.rdbms.deconfig, 12.1.0.2.0...

Patching component oracle.xdk, 12.1.0.2.0...

Patching component oracle.tfa, 12.1.0.2.0...

Patching component oracle.rdbms, 12.1.0.2.0...

Patching component oracle.rdbms.dbscripts, 12.1.0.2.0...

Patching component oracle.xdk.parser.java, 12.1.0.2.0...

Patching component oracle.xdk.rsf, 12.1.0.2.0...

Patching component oracle.rdbms.rsf, 12.1.0.2.0...

Patching component oracle.rdbms.rman, 12.1.0.2.0...
Applying sub-patch '26925311' to OH '/u01/app/oracle/product/12.1.0/dbhome_1'

Patching component oracle.network.rsf, 12.1.0.2.0...

Patching component oracle.rdbms.rsf, 12.1.0.2.0...

Patching component oracle.rdbms.rman, 12.1.0.2.0...

Patching component oracle.rdbms, 12.1.0.2.0...

Patching component oracle.rdbms.dbscripts, 12.1.0.2.0...
Skip copying to "/u01/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/dbmsrman.sql" because it is the same as
the file in incoming patch "/backup/patch/27338041/26925311/files/rdbms/admin/dbmsrman.sql"
Applying sub-patch '27338041' to OH '/u01/app/oracle/product/12.1.0/dbhome_1'
ApplySession: Optional component(s) [ oracle.assistants.asm, 12.1.0.2.0 ]  not present in the Oracle Home or a higher version is found.

Patching component oracle.network.rsf, 12.1.0.2.0...

Patching component oracle.assistants.server, 12.1.0.2.0...

Patching component oracle.rdbms.rsf, 12.1.0.2.0...

Patching component oracle.rdbms.rman, 12.1.0.2.0...

Patching component oracle.rdbms, 12.1.0.2.0...

Patching component oracle.rdbms.dbscripts, 12.1.0.2.0...
Skip copying to "/u01/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/dbmsrman.sql" because it is the same as
the file in incoming patch "/backup/patch/27338041/27338041/files/rdbms/admin/dbmsrman.sql"

Patching component oracle.sqlplus.rsf, 12.1.0.2.0...
Composite patch 27338041 successfully applied.
Log file location: /u01/app/oracle/product/12.1.0/dbhome_1/cfgtoollogs/opatch/opatch2018-04-25_19-03-55PM_1.log

OPatch succeeded.
[oracle@testpc 27338041]$



[oracle@testpc 27338041]$ datapatch -verbose
SQL Patching tool version 12.1.0.2.0 Production on Wed Apr 25 19:12:31 2018
Copyright (c) 2012, 2016, Oracle.  All rights reserved.

Log file for this invocation: /u01/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_41499_2018_04_25_19_12_31/sqlpatch_invocation.log

Connecting to database...OK
Note:  Datapatch will only apply or rollback SQL fixes for PDBs
       that are in an open state, no patches will be applied to closed PDBs.
       Please refer to Note: Datapatch: Database 12c Post Patch SQL Automation
       (Doc ID 1585822.1)
Bootstrapping registry and package to current versions...done
Determining current state...done

Current state of SQL patches:
Bundle series PSU:
  ID 180417 in the binary registry and not installed in any PDB

Adding patches to installation queue and performing prereq checks...
Installation queue:
  For the following PDBs: CDB$ROOT PDB$SEED 1UATDB 2UATDB 3UATDB 4UAT
    Nothing to roll back
    The following patches will be applied:
      27338041 (DATABASE PATCH SET UPDATE 12.1.0.2.180417)

Installing patches...
Installing patches...
Patch installation complete.  Total patches installed: 10

Validating logfiles...
Patch 27338041 apply (pdb CDB$ROOT): SUCCESS
  logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/27338041/22036385/27338041_apply_UAT_CDBROOT_2018Apr25_19_13_22.log (no errors)
Patch 27338041 apply (pdb PDB$SEED): SUCCESS
  logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/27338041/22036385/27338041_apply_UAT_PDBSEED_2018Apr25_19_14_37.log (no errors)
Patch 27338041 apply (pdb 1UAT): SUCCESS
  logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/27338041/22036385/27338041_apply_UAT_1UATDB _2018Apr25_19_14_37.log (no errors)
Patch 27338041 apply (pdb 2UAT): SUCCESS
  logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/27338041/22036385/27338041_apply_UAT_2UATDB _2018Apr25_19_14_37.log (no errors)
Patch 27338041 apply (pdb 3UAT): SUCCESS
  logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/27338041/22036385/27338041_apply_UAT_3UATDB _2018Apr25_19_14_37.log (no errors)
Patch 27338041 apply (pdb 4UAT): SUCCESS
  logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/27338041/22036385/27338041_apply_UAT_4UAT_2018Apr25_19_15_56.log (no errors)
SQL Patching tool complete on Wed Apr 25 19:18:14 2018