Monday, November 3, 2025

The Five Phases of the IFS Implementation Methodology

 1.   Initiate Project – This is the initial phase once a customer selects IFS as their provider and after the sales process. Ideally, the implementation team has been engaged earlier in the sales process so the transition will be smooth.

This is also where the initial solution documents are established and presented using the Scope Tool. The implementation team begins configuring the prototype.

2.   Confirm Prototype – During this phase, a prototype of a minimum viable solution is created in the system. This is also where the foundational documents of the IFS system is refined. These documents capture the areas that are included, excluded, or postponed in the solution.

3.   Establish Solution – This phase is where end-to-end scenarios are documented and begin to be reflected in the system. This is also where Customizations, Reports, Interfaces, and Modifications (CRIMs) are recorded and planned. Planning for data migration begins.

4.    Implement Solution – This is where the system is set up and configured according to a customer’s requirements. This is also where CRIMs are created, tested, and deployed. Training users, permission sets, security, and users are created. Data migration begins.

5.    Go Live – We’ve arrived! This phase finishes any outstanding tasks, last-minute system preparation, and final testing. Once this is complete customers typically transition from the legacy system to the new IFS system. The work isn’t done yet as post-go live support is key!


...

Monday, October 6, 2025

ORA-12791: The oradism utility does not have proper permissions.

 login as: oracle

oracle@192.168.175.5's password:

Activate the web console with: systemctl enable --now cockpit.socket


Last login: Mon Oct  6 06:09:25 2025

[root@qtech bin]# su - oracle

[oracle@qtech ~]$

[oracle@qtech ~]$

[oracle@qtech ~]$ cd cd $ORACLE_HOME/bin

-bash: cd: too many arguments

[oracle@qtech ~]$ cd $ORACLE_HOME/bin

[oracle@qtech bin]$

[oracle@qtech bin]$

[oracle@qtech bin]$

[oracle@qtech bin]$ ls -l oradism

-rwsr-x---. 1 oracle oinstall 1867552 Jul 27  2021 oradism

[oracle@qtech bin]$ sqlplus / as sysdba


SQL*Plus: Release 21.0.0.0.0 - Production on Mon Oct 6 09:13:31 2025

Version 21.3.0.0.0


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


Connected to an idle instance.


SQL> startup

ORA-12791: The oradism utility does not have proper permissions.

SQL> exit

Disconnected

[oracle@qtech bin]$ su root

Password:

[root@qtech bin]#

[root@qtech bin]# ls -l /u01/app/oracle/product/21c/dbhome_1/bin/oradism

ls: cannot access '/u01/app/oracle/product/21c/dbhome_1/bin/oradism': No such file or directory

[root@qtech bin]# ls -l /u01/app/oracle/product/19.0.0/dbhome_1/bin/oradism

-rwxr-x---. 1 root oinstall 1867552 Jul 27  2021 /u01/app/oracle/product/19.0.0/dbhome_1/bin/oradism

[root@qtech bin]#

[root@qtech bin]# su - oracle

[oracle@qtech ~]$

[oracle@qtech ~]$ sqlplus / as sysdba


SQL*Plus: Release 21.0.0.0.0 - Production on Mon Oct 6 09:17:38 2025

Version 21.3.0.0.0


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


Connected to an idle instance.


SQL> startup

ORACLE instance started.


Total System Global Area 2415916664 bytes

Fixed Size                  9688696 bytes

Variable Size             520093696 bytes

Database Buffers         1879048192 bytes

Redo Buffers                7086080 bytes

Database mounted.

Database opened.

SQL>


Thursday, October 2, 2025

Employee Employment Date Filter

 /* Formatted on 10/3/2025 6:05:04 AM (QP5 v5.256.13226.35538) */

SELECT *

FROM (

  SELECT '101' emp_no, TO_DATE('01-JAN-2024','DD-MON-YYYY') date_of_employment, TO_DATE('10-JAN-2025','DD-MON-YYYY') date_of_leaving FROM DUAL

  UNION ALL

  SELECT '102', TO_DATE('01-FEB-2024','DD-MON-YYYY'), TO_DATE('10-JAN-2025','DD-MON-YYYY') FROM DUAL

  UNION ALL

  SELECT '103', TO_DATE('01-FEB-2025','DD-MON-YYYY'), TO_DATE('10-SEP-2025','DD-MON-YYYY') FROM DUAL

  UNION ALL

  SELECT '104', TO_DATE('01-JAN-2025','DD-MON-YYYY'), TO_DATE('10-SEP-2025','DD-MON-YYYY') FROM DUAL

  UNION ALL

  SELECT '105', TO_DATE('01-OCT-2025','DD-MON-YYYY'), TO_DATE('30-OCT-2025','DD-MON-YYYY') FROM DUAL

  UNION ALL

  SELECT '106', TO_DATE('01-FEB-2026','DD-MON-YYYY'), TO_DATE('01-MAY-2026','DD-MON-YYYY') FROM DUAL

  UNION ALL

  SELECT '107', TO_DATE('01-JAN-2025','DD-MON-YYYY'), NULL FROM DUAL

  UNION ALL

  SELECT '108', TO_DATE('01-OCT-2025','DD-MON-YYYY'), NULL FROM DUAL

  UNION ALL

  SELECT '109', TO_DATE('01-FEB-2026','DD-MON-YYYY'), NULL FROM DUAL

)

WHERE emp_no IN (NVL('&emp_no_', emp_no))

  AND TRUNC(date_of_employment) >= TO_DATE('&date_of_employment_','DD-MON-YYYY')

  AND (

        (date_of_leaving IS NULL AND date_of_employment <= TO_DATE('&date_of_leaving_','DD-MON-YYYY'))

        OR (TRUNC(date_of_leaving) <= TO_DATE('&date_of_leaving_','DD-MON-YYYY'))

      )

Wednesday, September 3, 2025

ORA-04091: is mutating, trigger / function / ORA-06519: active autonomous transaction detected and rolled back in IFS

--Avoid performing SELECT or DML operations on the same table or view.

The Event Action "Execute Online SQL" on "X_GPL_NEXT_PURCH_ORD_AUTH" has failed. 

Please contact your System Administrator to manage the Event Actions. 

ORA-04091: table IFSAPP.PURCHASE_ORDER_APPROVAL_TAB is mutating, trigger/function 

may not see it in IFS cust event

Wednesday, August 13, 2025

Unlock an Oracle APEX admin user (when apxchpwd.sql doesn't work)

1. Find the userId.

select user_id from APEX_240100.WWV_FLOW_FND_USER where user_name = 'ADMIN' order by last_update_date desc;

2. Set a new password.

update APEX_240100.WWV_FLOW_FND_USER

set web_password = 'Barishal2024#'

where user_name = 'ADMIN'

and user_id = 1496521242332280;

commit;

3. Unlock the Admin account.

alter session set current_schema = APEX_240100;


begin

wwv_flow_security.g_security_group_id := 10;

wwv_flow_fnd_user_api.UNLOCK_ACCOUNT('ADMIN');

commit;

end;




Friday, March 21, 2025

Incremental Backup and Restore in New Test Server

 

Incremental Backup

[oracle@db19c ~]$ env |grep ORA

ORACLE_SID=db19c

ORACLE_BASE=/u01/app/oracle

ORACLE_HOME=/u01/app/oracle/product/19.0.0/dbhome_1

ORACLE_TERM=xterm

[oracle@db19c ~]$

[oracle@db19c ~]$

[oracle@db19c ~]$

[oracle@db19c ~]$ rman

 

Recovery Manager: Release 19.0.0.0.0 - Production on Sat Mar 22 02:23:01 2025

Version 19.3.0.0.0

 

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.

 

RMAN> connect target sys/s;

 

connected to target database: DB19C (DBID=2321312598)

 

RMAN>

RMAN> backup as backupset incremental level 0 database format '/u02/backup/DB19C_LEVEL_0_%d_%T_%U' plus archivelog format '/u02/backup/DB19C_Archivelog_%d_%T_%U';

 

 

Starting backup at 22-MAR-25

current log archived

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=41 device type=DISK

channel ORA_DISK_1: starting archived log backup set

channel ORA_DISK_1: specifying archived log(s) in backup set

input archived log thread=1 sequence=17 RECID=10 STAMP=1195748696

input archived log thread=1 sequence=18 RECID=11 STAMP=1195750862

input archived log thread=1 sequence=19 RECID=12 STAMP=1195756094

input archived log thread=1 sequence=20 RECID=13 STAMP=1195834401

input archived log thread=1 sequence=21 RECID=14 STAMP=1195834529

input archived log thread=1 sequence=22 RECID=15 STAMP=1195834661

input archived log thread=1 sequence=23 RECID=16 STAMP=1195836798

input archived log thread=1 sequence=24 RECID=17 STAMP=1195836860

input archived log thread=1 sequence=25 RECID=18 STAMP=1196042469

input archived log thread=1 sequence=26 RECID=19 STAMP=1196042790

input archived log thread=1 sequence=27 RECID=20 STAMP=1196042895

input archived log thread=1 sequence=28 RECID=21 STAMP=1196042946

input archived log thread=1 sequence=29 RECID=22 STAMP=1196042989

input archived log thread=1 sequence=30 RECID=23 STAMP=1196043133

input archived log thread=1 sequence=31 RECID=24 STAMP=1196043183

input archived log thread=1 sequence=32 RECID=25 STAMP=1196043581

input archived log thread=1 sequence=33 RECID=26 STAMP=1196043614

input archived log thread=1 sequence=34 RECID=27 STAMP=1196258418

input archived log thread=1 sequence=35 RECID=28 STAMP=1196333789

input archived log thread=1 sequence=36 RECID=29 STAMP=1196336812

input archived log thread=1 sequence=37 RECID=30 STAMP=1196336894

input archived log thread=1 sequence=38 RECID=31 STAMP=1196337444

input archived log thread=1 sequence=39 RECID=32 STAMP=1196337486

input archived log thread=1 sequence=40 RECID=33 STAMP=1196337527

input archived log thread=1 sequence=41 RECID=34 STAMP=1196388782

input archived log thread=1 sequence=42 RECID=35 STAMP=1196389157

input archived log thread=1 sequence=43 RECID=36 STAMP=1196389270

input archived log thread=1 sequence=44 RECID=37 STAMP=1196389400

channel ORA_DISK_1: starting piece 1 at 22-MAR-25

channel ORA_DISK_1: finished piece 1 at 22-MAR-25

piece handle=/u02/backup/DB19C_Archivelog_DB19C_20250322_263kut0p_1_1 tag=TAG20250322T022321 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:25

Finished backup at 22-MAR-25

 

Starting backup at 22-MAR-25

using channel ORA_DISK_1

channel ORA_DISK_1: starting incremental level 0 datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

input datafile file number=00001 name=/u01/app/oracle/oradata/DB19C/system01.dbf

input datafile file number=00003 name=/u01/app/oracle/oradata/DB19C/sysaux01.dbf

input datafile file number=00004 name=/u01/app/oracle/oradata/DB19C/undotbs01.dbf

input datafile file number=00007 name=/u01/app/oracle/oradata/DB19C/users01.dbf

channel ORA_DISK_1: starting piece 1 at 22-MAR-25

channel ORA_DISK_1: finished piece 1 at 22-MAR-25

piece handle=/u02/backup/DB19C_LEVEL_0_DB19C_20250322_273kut1i_1_1 tag=TAG20250322T022346 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:01:16

Finished backup at 22-MAR-25

 

Starting backup at 22-MAR-25

current log archived

using channel ORA_DISK_1

channel ORA_DISK_1: starting archived log backup set

channel ORA_DISK_1: specifying archived log(s) in backup set

input archived log thread=1 sequence=45 RECID=38 STAMP=1196389502

channel ORA_DISK_1: starting piece 1 at 22-MAR-25

channel ORA_DISK_1: finished piece 1 at 22-MAR-25

piece handle=/u02/backup/DB19C_Archivelog_DB19C_20250322_283kut3v_1_1 tag=TAG20250322T022503 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01

Finished backup at 22-MAR-25

 

Starting Control File and SPFILE Autobackup at 22-MAR-25

piece handle=/u01/app/oracle/fast_recovery_area/DB19C/autobackup/2025_03_22/o1_mf_s_1196389504_mxvls1w0_.bkp comment=NONE

Finished Control File and SPFILE Autobackup at 22-MAR-25

 

RMAN> backup current controlfile format '/u02/backup/Controlback_%d_%T_%U';

 

Starting backup at 22-MAR-25

using channel ORA_DISK_1

channel ORA_DISK_1: starting full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

including current control file in backup set

channel ORA_DISK_1: starting piece 1 at 22-MAR-25

channel ORA_DISK_1: finished piece 1 at 22-MAR-25

piece handle=/u02/backup/Controlback_DB19C_20250322_2a3kut75_1_1 tag=TAG20250322T022645 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01

Finished backup at 22-MAR-25

 

Starting Control File and SPFILE Autobackup at 22-MAR-25

piece handle=/u01/app/oracle/fast_recovery_area/DB19C/autobackup/2025_03_22/o1_mf_s_1196389607_mxvlw80r_.bkp comment=NONE

Finished Control File and SPFILE Autobackup at 22-MAR-25

 

RMAN> backup spfile format '/u02/backup/spfile_%d_%T_%U';

 

Starting backup at 22-MAR-25

using channel ORA_DISK_1

channel ORA_DISK_1: starting full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

including current SPFILE in backup set

channel ORA_DISK_1: starting piece 1 at 22-MAR-25

channel ORA_DISK_1: finished piece 1 at 22-MAR-25

piece handle=/u02/backup/spfile_DB19C_20250322_2c3kut7h_1_1 tag=TAG20250322T022657 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01

Finished backup at 22-MAR-25

 

Starting Control File and SPFILE Autobackup at 22-MAR-25

piece handle=/u01/app/oracle/fast_recovery_area/DB19C/autobackup/2025_03_22/o1_mf_s_1196389618_mxvlwlly_.bkp comment=NONE

Finished Control File and SPFILE Autobackup at 22-MAR-25

RMAN> exit

Recovery Manager complete.

 

 

 

 

[oracle@db19c ~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Sat Mar 22 02:29:00 2025

Version 19.3.0.0.0

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

Connected to:

Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production

Version 19.3.0.0.0

SQL>

create user hrs identified by hrs;

grant connect, resource, create session,dba to hrs;

conn hrs/hrs

create table test(serial number(2),name varchar2(5));

insert into test values(1,'one');

insert into test values(2,'Two');

insert into test values(3,'Three');

insert into test values(4,'Four');

commit;

SQL> exit

 

[oracle@db19c ~]$

[oracle@db19c ~]$

[oracle@db19c ~]$ rman

 

Recovery Manager: Release 19.0.0.0.0 - Production on Sat Mar 22 02:33:24 2025

Version 19.3.0.0.0

 

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.

RMAN>

RMAN> connect target sys/s;

connected to target database: DB19C (DBID=2321312598)

RMAN>

RMAN> backup as backupset incremental level 1 database format '/u02/backup/DB19C_LEVEL_1_%d_%T_%U' plus archivelog format '/u02/backup/DB19C_Archivelog_%d_%T_%U';

 

 

Starting backup at 22-MAR-25

current log archived

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=31 device type=DISK

channel ORA_DISK_1: starting archived log backup set

channel ORA_DISK_1: specifying archived log(s) in backup set

input archived log thread=1 sequence=19 RECID=12 STAMP=1195756094

input archived log thread=1 sequence=20 RECID=13 STAMP=1195834401

input archived log thread=1 sequence=21 RECID=14 STAMP=1195834529

input archived log thread=1 sequence=22 RECID=15 STAMP=1195834661

input archived log thread=1 sequence=23 RECID=16 STAMP=1195836798

input archived log thread=1 sequence=24 RECID=17 STAMP=1195836860

input archived log thread=1 sequence=25 RECID=18 STAMP=1196042469

input archived log thread=1 sequence=26 RECID=19 STAMP=1196042790

input archived log thread=1 sequence=27 RECID=20 STAMP=1196042895

input archived log thread=1 sequence=28 RECID=21 STAMP=1196042946

input archived log thread=1 sequence=29 RECID=22 STAMP=1196042989

input archived log thread=1 sequence=30 RECID=23 STAMP=1196043133

input archived log thread=1 sequence=31 RECID=24 STAMP=1196043183

input archived log thread=1 sequence=32 RECID=25 STAMP=1196043581

input archived log thread=1 sequence=33 RECID=26 STAMP=1196043614

input archived log thread=1 sequence=34 RECID=27 STAMP=1196258418

input archived log thread=1 sequence=35 RECID=28 STAMP=1196333789

input archived log thread=1 sequence=36 RECID=29 STAMP=1196336812

input archived log thread=1 sequence=37 RECID=30 STAMP=1196336894

input archived log thread=1 sequence=38 RECID=31 STAMP=1196337444

input archived log thread=1 sequence=39 RECID=32 STAMP=1196337486

input archived log thread=1 sequence=40 RECID=33 STAMP=1196337527

input archived log thread=1 sequence=41 RECID=34 STAMP=1196388782

input archived log thread=1 sequence=42 RECID=35 STAMP=1196389157

input archived log thread=1 sequence=43 RECID=36 STAMP=1196389270

input archived log thread=1 sequence=44 RECID=37 STAMP=1196389400

input archived log thread=1 sequence=45 RECID=38 STAMP=1196389502

input archived log thread=1 sequence=46 RECID=39 STAMP=1196390031

channel ORA_DISK_1: starting piece 1 at 22-MAR-25

channel ORA_DISK_1: finished piece 1 at 22-MAR-25

piece handle=/u02/backup/DB19C_Archivelog_DB19C_20250322_2e3kutkh_1_1 tag=TAG20250322T023352 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:25

Finished backup at 22-MAR-25

 

Starting backup at 22-MAR-25

using channel ORA_DISK_1

channel ORA_DISK_1: starting incremental level 1 datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

input datafile file number=00001 name=/u01/app/oracle/oradata/DB19C/system01.dbf

input datafile file number=00003 name=/u01/app/oracle/oradata/DB19C/sysaux01.dbf

input datafile file number=00004 name=/u01/app/oracle/oradata/DB19C/undotbs01.dbf

input datafile file number=00007 name=/u01/app/oracle/oradata/DB19C/users01.dbf

channel ORA_DISK_1: starting piece 1 at 22-MAR-25

channel ORA_DISK_1: finished piece 1 at 22-MAR-25

piece handle=/u02/backup/DB19C_LEVEL_1_DB19C_20250322_2f3kutla_1_1 tag=TAG20250322T023418 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:15

Finished backup at 22-MAR-25

 

Starting backup at 22-MAR-25

current log archived

using channel ORA_DISK_1

channel ORA_DISK_1: starting archived log backup set

channel ORA_DISK_1: specifying archived log(s) in backup set

input archived log thread=1 sequence=47 RECID=40 STAMP=1196390074

channel ORA_DISK_1: starting piece 1 at 22-MAR-25

channel ORA_DISK_1: finished piece 1 at 22-MAR-25

piece handle=/u02/backup/DB19C_Archivelog_DB19C_20250322_2g3kutlq_1_1 tag=TAG20250322T023434 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01

Finished backup at 22-MAR-25

 

Starting Control File and SPFILE Autobackup at 22-MAR-25

piece handle=/u01/app/oracle/fast_recovery_area/DB19C/autobackup/2025_03_22/o1_mf_s_1196390075_mxvmbvmt_.bkp comment=NONE

Finished Control File and SPFILE Autobackup at 22-MAR-25

 

RMAN> backup current controlfile format '/u02/backup/Controlback_%d_%T_%U';

 

Starting backup at 22-MAR-25

using channel ORA_DISK_1

channel ORA_DISK_1: starting full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

including current control file in backup set

channel ORA_DISK_1: starting piece 1 at 22-MAR-25

channel ORA_DISK_1: finished piece 1 at 22-MAR-25

piece handle=/u02/backup/Controlback_DB19C_20250322_2i3kutmt_1_1 tag=TAG20250322T023509 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01

Finished backup at 22-MAR-25

 

Starting Control File and SPFILE Autobackup at 22-MAR-25

piece handle=/u01/app/oracle/fast_recovery_area/DB19C/autobackup/2025_03_22/o1_mf_s_1196390111_mxvmd038_.bkp comment=NONE

Finished Control File and SPFILE Autobackup at 22-MAR-25

 

RMAN> backup spfile format '/u02/backup/spfile_%d_%T_%U';

 

Starting backup at 22-MAR-25

using channel ORA_DISK_1

channel ORA_DISK_1: starting full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

including current SPFILE in backup set

channel ORA_DISK_1: starting piece 1 at 22-MAR-25

channel ORA_DISK_1: finished piece 1 at 22-MAR-25

piece handle=/u02/backup/spfile_DB19C_20250322_2k3kutnb_1_1 tag=TAG20250322T023523 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01

Finished backup at 22-MAR-25

 

Starting Control File and SPFILE Autobackup at 22-MAR-25

piece handle=/u01/app/oracle/fast_recovery_area/DB19C/autobackup/2025_03_22/o1_mf_s_1196390124_mxvmdf4q_.bkp comment=NONE

Finished Control File and SPFILE Autobackup at 22-MAR-25

 

RMAN>exit

[oracle@db19c ~]$ cd /u02/backup/

[oracle@db19c backup]$ ls -lrt

total 2436068

-rw-r----- 1 oracle oinstall  499270144 Mar 22 02:23 DB19C_Archivelog_DB19C_20250322_263kut0p_1_1

-rw-r----- 1 oracle oinstall 1438392320 Mar 22 02:24 DB19C_LEVEL_0_DB19C_20250322_273kut1i_1_1

-rw-r----- 1 oracle oinstall    3743744 Mar 22 02:25 DB19C_Archivelog_DB19C_20250322_283kut3v_1_1

-rw-r----- 1 oracle oinstall   18808832 Mar 22 02:26 Controlback_DB19C_20250322_2a3kut75_1_1

-rw-r----- 1 oracle oinstall     114688 Mar 22 02:26 spfile_DB19C_20250322_2c3kut7h_1_1

-rw-r----- 1 oracle oinstall  503408640 Mar 22 02:34 DB19C_Archivelog_DB19C_20250322_2e3kutkh_1_1

-rw-r----- 1 oracle oinstall   11821056 Mar 22 02:34 DB19C_LEVEL_1_DB19C_20250322_2f3kutla_1_1

-rw-r----- 1 oracle oinstall      11264 Mar 22 02:34 DB19C_Archivelog_DB19C_20250322_2g3kutlq_1_1

-rw-r----- 1 oracle oinstall   18841600 Mar 22 02:35 Controlback_DB19C_20250322_2i3kutmt_1_1

-rw-r----- 1 oracle oinstall     114688 Mar 22 02:35 spfile_DB19C_20250322_2k3kutnb_1_1

[oracle@db19c backup]$

[oracle@db19c backup]$ scp * oracle@192.168.0.204:/u02/backup/

oracle@192.168.0.204's password:

Controlback_DB19C_20250322_2a3kut75_1_1                                                                                    100%   18MB  23.8MB/s   00:00

Controlback_DB19C_20250322_2i3kutmt_1_1                                                                                    100%   18MB  41.6MB/s   00:00

DB19C_Archivelog_DB19C_20250322_263kut0p_1_1                                                                               100%  476MB  52.9MB/s   00:08

DB19C_Archivelog_DB19C_20250322_283kut3v_1_1                                                                               100% 3656KB   4.0MB/s   00:00

DB19C_Archivelog_DB19C_20250322_2e3kutkh_1_1                                                                               100%  480MB  58.3MB/s   00:08

DB19C_Archivelog_DB19C_20250322_2g3kutlq_1_1                                                                               100%   11KB  19.2KB/s   00:00

DB19C_LEVEL_0_DB19C_20250322_273kut1i_1_1                                                                                  100% 1372MB  17.5MB/s   01:18

DB19C_LEVEL_1_DB19C_20250322_2f3kutla_1_1                                                                                  100%   11MB  20.8MB/s   00:00

spfile_DB19C_20250322_2c3kut7h_1_1                                                                                         100%  112KB 549.4KB/s   00:00

spfile_DB19C_20250322_2k3kutnb_1_1                                                                                         100%  112KB 869.7KB/s   00:00

[oracle@db19c backup]$

[oracle@db19c backup]$ cd $ORACLE_HOME/dbs

[oracle@db19c dbs]$ ls -lrt

total 18340

-rw-r--r--. 1 oracle oinstall     3079 May 14  2015 init.ora

-rw-r-----  1 oracle oinstall       24 Feb 17 03:00 lkDB19C

-rw-r-----  1 oracle oinstall     2048 Mar 21 11:00 orapwdb19c

-rw-rw----  1 oracle oinstall     1544 Mar 22 02:12 hc_db19c.dat

-rw-r-----  1 oracle oinstall     3584 Mar 22 02:13 spfiledb19c.ora

-rw-r-----  1 oracle oinstall 18759680 Mar 22 02:35 snapcf_db19c.f

[oracle@db19c dbs]$ scp spfiledb19c.ora  oracle@192.168.0.204:/u01/app/oracle/product/19.0.0/dbhome_1/dbs/

oracle@192.168.0.204's password:

spfiledb19c.ora                                                                                                            100% 3584   843.8KB/s   00:00

[oracle@db19c dbs]$

 

Restoration

New Server

[root@db19c ~]# mkdir /u02/backup/

[root@db19c ~]# chmod 775 /u02/backup/

[root@db19c ~]# chown oracle:oinstall /u02/backup/

                                                                                                             

[root@db19c ~]# su - oracle

[oracle@db19c ~]$

[oracle@db19c ~]$ cd /u02/backup/

[oracle@db19c backup]$ ls -lrt

total 2436068

-rw-r----- 1 oracle oinstall   18808832 Mar 22 02:46 Controlback_DB19C_20250322_2a3kut75_1_1

-rw-r----- 1 oracle oinstall   18841600 Mar 22 02:46 Controlback_DB19C_20250322_2i3kutmt_1_1

-rw-r----- 1 oracle oinstall  499270144 Mar 22 02:46 DB19C_Archivelog_DB19C_20250322_263kut0p_1_1

-rw-r----- 1 oracle oinstall    3743744 Mar 22 02:46 DB19C_Archivelog_DB19C_20250322_283kut3v_1_1

-rw-r----- 1 oracle oinstall  503408640 Mar 22 02:46 DB19C_Archivelog_DB19C_20250322_2e3kutkh_1_1

-rw-r----- 1 oracle oinstall      11264 Mar 22 02:46 DB19C_Archivelog_DB19C_20250322_2g3kutlq_1_1

-rw-r----- 1 oracle oinstall 1438392320 Mar 22 02:47 DB19C_LEVEL_0_DB19C_20250322_273kut1i_1_1

-rw-r----- 1 oracle oinstall   11821056 Mar 22 02:47 DB19C_LEVEL_1_DB19C_20250322_2f3kutla_1_1

-rw-r----- 1 oracle oinstall     114688 Mar 22 02:47 spfile_DB19C_20250322_2c3kut7h_1_1

-rw-r----- 1 oracle oinstall     114688 Mar 22 02:47 spfile_DB19C_20250322_2k3kutnb_1_1

[oracle@db19c backup]$

 

[oracle@db19c dbs]$ sqlplus / as sysdba

 

SQL*Plus: Release 19.0.0.0.0 - Production on Sat Mar 22 02:56:33 2025

Version 19.3.0.0.0

 

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

 

Connected to an idle instance.

 

SQL> CREATE PFILE='/u02/initdb19c.ora' FROM SPFILE='/u01/app/oracle/product/19.0.0/dbhome_1/dbs/spfiledb19c.ora';

File created.

[oracle@db19c dbs]$

[oracle@db19c dbs]$ cat /u02/initdb19c.ora

db19c.__data_transfer_cache_size=0

db19c.__db_cache_size=1258291200

db19c.__inmemory_ext_roarea=0

db19c.__inmemory_ext_rwarea=0

db19c.__java_pool_size=0

db19c.__large_pool_size=16777216

db19c.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment

db19c.__pga_aggregate_target=603979776

db19c.__sga_target=1778384896

db19c.__shared_io_pool_size=83886080

db19c.__shared_pool_size=402653184

db19c.__streams_pool_size=0

db19c.__unified_pga_pool_size=0

*.audit_file_dest='/u01/app/oracle/admin/db19c/adump'

*.audit_trail='db'

*.compatible='19.0.0'

*.control_files='/u01/app/oracle/oradata/DB19C/control01.ctl','/u01/app/oracle/fast_recovery_area/DB19C/control02.ctl'

*.db_block_size=8192

*.db_name='db19c'

*.db_recovery_file_dest='/u01/app/oracle/fast_recovery_area'

*.db_recovery_file_dest_size=8256m

*.diagnostic_dest='/u01/app/oracle'

*.dispatchers='(PROTOCOL=TCP) (SERVICE=db19cXDB)'

*.nls_language='AMERICAN'

*.nls_territory='AMERICA'

*.open_cursors=300

*.pga_aggregate_target=562m

*.processes=300

*.remote_login_passwordfile='EXCLUSIVE'

*.sga_target=1686m

*.undo_tablespace='UNDOTBS1'

[oracle@db19c dbs]$

[root@db19c ~]# mkdir -p /u01/app/oracle/admin/db19c/adump

[root@db19c ~]# mkdir -p /u01/app/oracle/oradata/DB19C/

[root@db19c ~]# mkdir -p /u01/app/oracle/fast_recovery_area/DB19C/

[root@db19c ~]# chown -R oracle:oinstall /u01/app/oracle/admin/db19c/adump

[root@db19c ~]# chown -R oracle:oinstall /u01/app/oracle/oradata/DB19C

[root@db19c ~]# chown -R oracle:oinstall /u01/app/oracle/fast_recovery_area/DB19C

[root@db19c ~]# chown -R oracle:oinstall /u02/backup/

[root@db19c ~]# chmod 770 /u02/backup/

 

SQL> STARTUP PFILE='/u02/initdb19c.ora';

ORACLE instance started.

 

Total System Global Area 1778381840 bytes

Fixed Size                  8897552 bytes

Variable Size             419430400 bytes

Database Buffers         1342177280 bytes

Redo Buffers                7876608 bytes

ORA-00205: error in identifying control file, check alert log for more info

 

 

[oracle@db19c ~]$ sqlplus / as sysdba

 

SQL*Plus: Release 19.0.0.0.0 - Production on Sat Mar 22 03:05:44 2025

Version 19.3.0.0.0

 

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

 

 

Connected to:

Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production

Version 19.3.0.0.0

 

SQL>

SQL> startup nomount;

ORACLE instance started.

 

Total System Global Area 1778381840 bytes

Fixed Size                  8897552 bytes

Variable Size             419430400 bytes

Database Buffers         1342177280 bytes

Redo Buffers                7876608 bytes

SQL>

 

[oracle@db19c ~]$ rman

 

Recovery Manager: Release 19.0.0.0.0 - Production on Sat Mar 22 03:08:22 2025

Version 19.3.0.0.0

 

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.

 

RMAN>

 

RMAN> connect target sys/s;

 

connected to target database: DB19C (not mounted)

 

RMAN>

 

RMAN>

 

RMAN>

 

RMAN> restore controlfile from '/u02/backup/Controlback_DB19C_20250322_2a3kut75_1_1';

 

Starting restore at 22-MAR-25

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=21 device type=DISK

 

channel ORA_DISK_1: restoring control file

channel ORA_DISK_1: restore complete, elapsed time: 00:00:03

output file name=/u01/app/oracle/oradata/DB19C/control01.ctl

output file name=/u01/app/oracle/fast_recovery_area/DB19C/control02.ctl

Finished restore at 22-MAR-25

 

RMAN> alter database mount;

 

released channel: ORA_DISK_1

Statement processed

 

RMAN> catalog start with '/u02/backup/';

 

Starting implicit crosscheck backup at 22-MAR-25

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=25 device type=DISK

Crosschecked 61 objects

Finished implicit crosscheck backup at 22-MAR-25

 

Starting implicit crosscheck copy at 22-MAR-25

using channel ORA_DISK_1

Finished implicit crosscheck copy at 22-MAR-25

 

searching for all files in the recovery area

cataloging files...

no files cataloged

 

searching for all files that match the pattern /u02/backup/

 

List of Files Unknown to the Database

=====================================

File Name: /u02/backup/Controlback_DB19C_20250322_2a3kut75_1_1

File Name: /u02/backup/Controlback_DB19C_20250322_2i3kutmt_1_1

File Name: /u02/backup/DB19C_Archivelog_DB19C_20250322_2e3kutkh_1_1

File Name: /u02/backup/DB19C_Archivelog_DB19C_20250322_2g3kutlq_1_1

File Name: /u02/backup/DB19C_LEVEL_1_DB19C_20250322_2f3kutla_1_1

File Name: /u02/backup/spfile_DB19C_20250322_2c3kut7h_1_1

File Name: /u02/backup/spfile_DB19C_20250322_2k3kutnb_1_1

 

Do you really want to catalog the above files (enter YES or NO)? YES

cataloging files...

cataloging done

 

List of Cataloged Files

=======================

File Name: /u02/backup/Controlback_DB19C_20250322_2a3kut75_1_1

File Name: /u02/backup/Controlback_DB19C_20250322_2i3kutmt_1_1

File Name: /u02/backup/DB19C_Archivelog_DB19C_20250322_2e3kutkh_1_1

File Name: /u02/backup/DB19C_Archivelog_DB19C_20250322_2g3kutlq_1_1

File Name: /u02/backup/DB19C_LEVEL_1_DB19C_20250322_2f3kutla_1_1

File Name: /u02/backup/spfile_DB19C_20250322_2c3kut7h_1_1

File Name: /u02/backup/spfile_DB19C_20250322_2k3kutnb_1_1

 

RMAN> restore database;

 

Starting restore at 22-MAR-25

using channel ORA_DISK_1

 

channel ORA_DISK_1: starting datafile backup set restore

channel ORA_DISK_1: specifying datafile(s) to restore from backup set

channel ORA_DISK_1: restoring datafile 00001 to /u01/app/oracle/oradata/DB19C/system01.dbf

channel ORA_DISK_1: restoring datafile 00003 to /u01/app/oracle/oradata/DB19C/sysaux01.dbf

channel ORA_DISK_1: restoring datafile 00004 to /u01/app/oracle/oradata/DB19C/undotbs01.dbf

channel ORA_DISK_1: restoring datafile 00007 to /u01/app/oracle/oradata/DB19C/users01.dbf

channel ORA_DISK_1: reading from backup piece /u02/backup/DB19C_LEVEL_0_DB19C_20250322_273kut1i_1_1

channel ORA_DISK_1: piece handle=/u02/backup/DB19C_LEVEL_0_DB19C_20250322_273kut1i_1_1 tag=TAG20250322T022346

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:01:15

Finished restore at 22-MAR-25

 

RMAN> RECOVER DATABASE;

 

Starting recover at 22-MAR-25

using channel ORA_DISK_1

channel ORA_DISK_1: starting incremental datafile backup set restore

channel ORA_DISK_1: specifying datafile(s) to restore from backup set

destination for restore of datafile 00001: /u01/app/oracle/oradata/DB19C/system01.dbf

destination for restore of datafile 00003: /u01/app/oracle/oradata/DB19C/sysaux01.dbf

destination for restore of datafile 00004: /u01/app/oracle/oradata/DB19C/undotbs01.dbf

destination for restore of datafile 00007: /u01/app/oracle/oradata/DB19C/users01.dbf

channel ORA_DISK_1: reading from backup piece /u02/backup/DB19C_LEVEL_1_DB19C_20250322_2f3kutla_1_1

channel ORA_DISK_1: piece handle=/u02/backup/DB19C_LEVEL_1_DB19C_20250322_2f3kutla_1_1 tag=TAG20250322T023418

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:00:01

 

starting media recovery

 

channel ORA_DISK_1: starting archived log restore to default destination

channel ORA_DISK_1: restoring archived log

archived log thread=1 sequence=46

channel ORA_DISK_1: reading from backup piece /u02/backup/DB19C_Archivelog_DB19C_20250322_2e3kutkh_1_1

channel ORA_DISK_1: piece handle=/u02/backup/DB19C_Archivelog_DB19C_20250322_2e3kutkh_1_1 tag=TAG20250322T023352

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:00:07

archived log file name=/u01/app/oracle/fast_recovery_area/DB19C/archivelog/2025_03_22/o1_mf_1_46_mxvortxh_.arc thread=1 sequence=46

channel default: deleting archived log(s)

archived log file name=/u01/app/oracle/fast_recovery_area/DB19C/archivelog/2025_03_22/o1_mf_1_46_mxvortxh_.arc RECID=39 STAMP=1196392571

channel ORA_DISK_1: starting archived log restore to default destination

channel ORA_DISK_1: restoring archived log

archived log thread=1 sequence=47

channel ORA_DISK_1: reading from backup piece /u02/backup/DB19C_Archivelog_DB19C_20250322_2g3kutlq_1_1

channel ORA_DISK_1: piece handle=/u02/backup/DB19C_Archivelog_DB19C_20250322_2g3kutlq_1_1 tag=TAG20250322T023434

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:00:01

archived log file name=/u01/app/oracle/fast_recovery_area/DB19C/archivelog/2025_03_22/o1_mf_1_47_mxvoryl8_.arc thread=1 sequence=47

channel default: deleting archived log(s)

archived log file name=/u01/app/oracle/fast_recovery_area/DB19C/archivelog/2025_03_22/o1_mf_1_47_mxvoryl8_.arc RECID=40 STAMP=1196392574

unable to find archived log

archived log thread=1 sequence=48

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of recover command at 03/22/2025 03:16:16

RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 48 and starting SCN of 3865509

 

RMAN>

 

 

[oracle@db19c ~]$ sqlplus / as sysdba

 

SQL*Plus: Release 19.0.0.0.0 - Production on Sat Mar 22 03:18:47 2025

Version 19.3.0.0.0

 

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

 

 

Connected to:

Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production

Version 19.3.0.0.0

 

SQL>

SQL>

SQL> select open_mode from v$database;

 

OPEN_MODE

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

MOUNTED

 

SQL> alter database open resetlogs;

 

Database altered.

 

SQL> select open_mode from v$database;

 

OPEN_MODE

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

READ WRITE

 

SQL> SELECT SUM (bytes) / 1024 / 1024 / 1024 AS GB FROM dba_data_files;

 

        GB

----------

1.96777344

 

 

SQL> SELECT SUM (bytes) / 1024 / 1024 / 1024 AS GB FROM dba_data_files;

 

        GB

----------

1.96777344

 

SQL> conn hrs/hrs

Connected.

SQL>

SQL>

SQL>

SQL> select * from test;

 

    SERIAL NAME

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

         1 one

         2 Two

         3 Three

         4 Four

 

SQL>

 

SQL>

 

SQL>

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

To create a PFILE from an SPFILE on a new server, you need to follow these steps:

 

CREATE PFILE='/u02/initdb19c.ora' FROM SPFILE='/u01/app/oracle/product/19.0.0/dbhome_1/dbs/spfiledb19c.ora';

 

STARTUP PFILE='/u02/initdb19c.ora';

 

Sunday, March 2, 2025

API-গুলোর মজার পার্থক্য – হাসতে হাসতে কোডিং শিখি

১. REST API vs GraphQL API

REST API:
🔹 Client: "ভাই, ইউজারের নাম, ইমেইল, আর ফোন নাম্বার লাগবে।"
🔹 Server: "ঠিক আছে, এই নাও! তবে সঙ্গে তার জন্মতারিখ, বাড়ির ঠিকানা, দাদার নাম, আর পোষা বিড়ালের বয়সও ফ্রি!"

GraphQL API:
🔹 Client: "ভাই, শুধু ইউজারের নাম লাগবে।"
🔹 Server: "এই নাও, নাম। বাড়তি কিছু চাইলে আলাদা বলে দিস!"


২. SOAP API vs REST API

SOAP API:
🔹 Client: "ভাই, একটু পরিষ্কার JSON দাও!"
🔹 Server: "না ভাই, XML-এর বিশাল এক স্ক্রোল নিয়ে নাও, সঙ্গে জটিল স্ট্রাকচার আর কিছু অতিরিক্ত headache ফ্রি!"

REST API:
🔹 Client: "ভাই, JSON চাই, একটু ক্লিন করে দিও!"
🔹 Server: "এই নাও, সহজ, সুন্দর, ঝকঝকে JSON!"


৩. Public API vs Private API

Public API:
🔹 Client: "ভাই, কিছু ডাটা দে!"
🔹 Server: "এই নাও, যত খুশি নাও, একদম ফ্রি ফ্রি ফ্রি!"

Private API:
🔹 Client: "ভাই, একটু ডাটা লাগবে।"
🔹 Server: "API key দে, token দে, authentication দে, OAuth দে… তারপরেও যদি permission থাকে, তবে চিন্তা করবো!"


৪. WebSocket vs HTTP API

HTTP API:
🔹 Client: "ভাই, নতুন কিছু আপডেট আছে?"
🔹 Server: "দেখে আসি... (৫ সেকেন্ড পর) ... না, কিছু নেই। পরে আবার চেক করো!"

WebSocket:
🔹 Server: "ভাই, কিছু নতুন আপডেট আসলে আমি নিজেই জানিয়ে দেবো!"
🔹 Client: "বাহ! তাহলে তো জীবন সার্থক!"


৫. Django REST Framework vs FastAPI

Django REST Framework:
🔹 Client: "ভাই, API বানাইতে চাই, কেমন লাগবে?"
🔹 Server: "একটা ফুল ফ্রেমওয়ার্ক দিলাম, কিন্তু অনেক কাস্টমাইজেশন লাগবে, ধৈর্য ধরো!"

FastAPI:
🔹 Client: "ভাই, API বানাইতে চাই, সহজ কিছু আছে?"
🔹 Server: "কোড লেখার আগেই API রেডি!"


৬. AI API vs Human API (মানে মানুষ)

AI API:
🔹 Client: "ভাই, আমাকে একটা ভালো রেস্টুরেন্ট সাজেস্ট কর!"
🔹 AI API: "আপনার লোকেশন, পছন্দ, পুরাতন সার্চ হিস্টোরি বিশ্লেষণ করে বলছি... এই রেস্টুরেন্টটাই পারফেক্ট!"

Human API:
🔹 Client: "ভাই, একটা ভালো রেস্টুরেন্ট বল!"
🔹 Human API: "ওই জায়গাটা বেস্ট! তবে খাওয়ার পরে পেট খারাপ হলে আমার নাম নিস না!"

Tuesday, February 25, 2025

datapump

 Automating Oracle Data Pump Exports and Imports Using Shell Scripts

######################################################
Oracle Data Pump (expdp and impdp) is a powerful utility for high-speed data export and import operations.

1️⃣ Shell Script for Automating Data Pump Exports (expdp)
####################################################
#!/bin/bash

# Set environment variables
export ORACLE_SID=VLAX1DB
export ORACLE_HOME=/u01/app/oracle/product/19.3.0.0
export PATH=$ORACLE_HOME/bin:$PATH
export BACKUP_DIR=/home/oracle/dpump_backup
export LOG_DIR=/home/oracle/dpump_logs
export EMAIL="your_email@example.com"

# Ensure backup and log directories exist
mkdir -p $BACKUP_DIR
mkdir -p $LOG_DIR

# Generate timestamp
DATE=$(date +%Y%m%d_%H%M%S)

# Set dump file and log file names
DUMPFILE=expdp_backup_${DATE}.dmp
LOGFILE=$LOG_DIR/expdp_backup_${DATE}.log

# Run Data Pump export
expdp system/password@VLAX1DB schemas=HR directory=DPUMP_DIR dumpfile=$DUMPFILE logfile=$(basename $LOGFILE)

# Check for success or failure
if grep -q "successfully completed" "$LOGFILE"; then
SUBJECT="Oracle Data Pump Export SUCCESS - $DATE"
MESSAGE="Oracle Data Pump export completed successfully. Dump file: $DUMPFILE"
else
SUBJECT="Oracle Data Pump Export FAILED - $DATE"
MESSAGE="Oracle Data Pump export encountered an error. Check log file: $LOGFILE"
fi

# Send email notification
echo "$MESSAGE" | mailx -s "$SUBJECT" -a "$LOGFILE" "$EMAIL"

# Clean up old backups (older than 7 days)
find $BACKUP_DIR -name "expdp_backup_*.dmp" -mtime +7 -exec rm {} \;
find $LOG_DIR -name "expdp_backup_*.log" -mtime +7 -exec rm {} \;

echo "Export process completed."
#########################################################
2️⃣ Shell Script for Automating Data Pump Imports (impdp)
######################################################
#!/bin/bash

# Set environment variables
export ORACLE_SID=VLAX1DB
export ORACLE_HOME=/u01/app/oracle/product/19.3.0.0
export PATH=$ORACLE_HOME/bin:$PATH
export BACKUP_DIR=/home/oracle/dpump_backup

# Find the latest dump file
LATEST_DUMP=$(ls -t $BACKUP_DIR/expdp_backup_*.dmp | head -n 1)

# Check if a dump file exists
if [ -z "$LATEST_DUMP" ]; then
echo "No dump file found!"
exit 1
fi

# Generate log file name
LOGFILE=impdp_restore_$(date +%Y%m%d_%H%M%S).log

# Run Data Pump import
impdp system/password@VLAX1DB schemas=HR directory=DPUMP_DIR dumpfile=$(basename $LATEST_DUMP) logfile=$LOGFILE remap_schema=HR:HR_NEW

echo "Import completed successfully!"
######################################################
3️⃣ Sending Email Notifications
If your system does not have mail, install and configure mailx:
For Oracle Linux/RHEL:
sudo yum install mailx -y
####################################################


Thanks for your post it was so creative but you can managed it with Ansible so easier.

 https://www.linkedin.com/pulse/building-real-time-database-monitoring-dashboard-oracle-khaleeq-tpwxf/