Wednesday, October 7, 2026

Horizontal Scaling vs Vertical Scaling

 একটা application হঠাৎ করে অনেক বেশি user পেতে শুরু করল।

আগে যেখানে ১,০০০ জন user ছিল, এখন সেখানে ১ লাখ user!

তখন স্বাভাবিকভাবেই প্রশ্ন আসে—
“Server-এর capacity কীভাবে বাড়াবো?”

এখানেই আসে Vertical Scaling আর Horizontal Scaling।

সহজভাবে বুঝি 

🔹 Vertical Scaling (Scale Up)
Existing server-কেই আরও powerful করা।

যেমন:

➡️ 8 GB RAM → 32 GB RAM
➡️ 4 CPU → 16 CPU
➡️ আরও powerful CPU, RAM ও storage

অর্থাৎ, একটা server-এর ক্ষমতা বাড়ানো।

🏠 সহজভাবে বললে, ছোট একটা বাসাকে আরও বড় করে ফেলার মতো।

🔹 Horizontal Scaling (Scale Out)

একটা server-কে আরও powerful করার পরিবর্তে একাধিক server যোগ করা।

যেমন:

Server 1 → Server 2 → Server 3 → Server 4

তারপর Load Balancer user requests-গুলো বিভিন্ন server-এর মধ্যে distribute করবে।

অর্থাৎ, server-এর সংখ্যা বাড়ানো।

🏢 এটাকে ভাবতে পারেন একটি বড় বাসা করার পরিবর্তে আরও কয়েকটি বাসা যোগ করার মতো।

তাহলে কোনটা ভালো?

এক কথায়—এটা system-এর requirements-এর উপর নির্ভর করে।

✅ Vertical Scaling-এর সুবিধা

• তুলনামূলকভাবে সহজে implement করা যায়
• Architecture সহজ থাকে
• Distributed system-এর complexity কম থাকে
• Existing application পরিবর্তন কম লাগতে পারে

❌ Vertical Scaling-এর সীমাবদ্ধতা

• Hardware-এর একটা maximum capacity থাকে
• Upgrade-এর সময় downtime/restart প্রয়োজন হতে পারে
• Single server-এর উপর বেশি dependency থাকলে failure risk বাড়ে

✅ Horizontal Scaling-এর সুবিধা

• অনেক বেশি traffic handle করা যায়
• High Availability তৈরি করা সহজ
• Cloud environment-এ খুব effective
• প্রয়োজন অনুযায়ী server add/remove করা যায়
• Application tier সহজে scale করা যায়

❌ Horizontal Scaling-এর Challenges

• Architecture বেশি complex হয়
• Load Balancer manage করতে হয়
• Session/state management গুরুত্বপূর্ণ হয়ে যায়
• Database scaling আলাদাভাবে পরিকল্পনা করতে হয়
• Distributed system-এর নতুন challenges আসে

বাস্তব Production Environment

অনেক সময় দুটো approach একসাথেই ব্যবহার করা হয়।

যেমন:

Application Layer → Horizontal Scaling
App Server 1 + App Server 2 + App Server 3

Database Layer → Vertical Scaling + Read Replicas/HA

এখানে মনে রাখতে হবে, শুধু server বাড়ালেই হবে না—database, cache, network, storage এবং application architecture-কেও workload অনুযায়ী scale করতে হবে।

সবশেষে খুব সহজভাবে:

Vertical Scaling = Make the server stronger.
Horizontal Scaling = Add more servers.

একজন Software Engineer/IT Professional হিসেবে শুধু “কোনটা কী” জানাই যথেষ্ট নয়।

আসল বিষয় হলো—
কখন কোন approach ব্যবহার করতে হবে এবং কেন ব্যবহার করতে হবে।

এটাই architectural thinking. 

Monday, October 5, 2026

chmod 0600 .Xauthority

  All .Xauthority files must have mode 0600 or less permissive.

Overview

Finding ID Version Rule ID IA Controls Severity

V-61005 SOL-11.1-020510 SV-75473r1_rule Medium

Description

.Xauthority files ensure the user is authorized to access the specific X Windows host. 

Excessive permissions may permit unauthorized modification of these files, which could 

lead to Denial of Service to authorized access or allow unauthorized access to be obtained.

STIG Date

Solaris 11 SPARC Security Technical Implementation Guide 2018-09-05


Details

Check Text ( C-61917r1_chk )

If X Windows is not used on the system, this is not applicable.


Check the file permissions for the .Xauthority files in the home directories of users of X.


Procedure:

# cd ~

# ls -lL .Xauthority


If the file mode is more permissive than 0600, this is finding.

Fix Text (F-66737r1_fix)

Change the mode of the .Xauthority files.


Procedure:

# chmod 0600 .Xauthority



Oracle DBA Course Outline

 

  • Hands on experience for Oracle Database 11g, 12c, 19c Administration is required
  • DB parameter & Query Performance Tuning
  • Oracle RMAN Backup and Recovery
  • Efficient with Oracle Export/Import (exp/imp,expdp,impdp)
  • Experience on Oracle Single Node, RAC & ASM
  • DB Patch & Upgrade
  • Oracle DB production Environment refresh in UAT & Preprod environment
  • Database Auditing & Security hardening knowledge
  • DB Capacity Planning
  • PL-SQL, Shell scripting in Linux & Unix environment
  • Troubleshoot of Oracle DB issues
  • Knowledge of MS-SQL, MySQL, PostgreSQL (At least one) required as secondary skill.
  • Professional certification will be added advantage


- 8+ Years experience of working as Database Administrator.
- Experience of Oracle Database License Optimization
- Experience of Working on Exadata X5-2 Quarter Rack implementation project.
- Experience of Oracle 11g, 12c, 19C RAC deployment on Linux, Unix(AIX) environment.
- Experience of Oracle 11g, 12c Active Dataguard (ADG) configuring specially both on RAC to Single Instance and RAC to RAC db.
- Experience of Database design & Oracle Database installation and maintenance on various platform like as IBM AIX, HP-UX, Sun Solaris, Linux (RHEL, OEL)
- Experience of PL/SQL.
- Advanced Deployment Experience on Oracle Enterprise Manager 12c, 13c (OEM 12c, OEM 13c).
- Oracle Database Replay
- Indexing & Partitioning
- Oracle ASM 11g, 12c, 19C
- Advanced RMAN Backup, Restore & Recovery with disk & tape technology.
- Experience of working on RAC deployment at FUSION CUBE
- Experience of Patching on production environment like RAC, Single Instance and Linux, AIX etc.
- Experience of working on IBM TSM and Semantic Net backup as oracle backup solution.
- Experience of oracle database administration for release 10g, 11g, 12C, 19C.
- Experience of Oracle Audit Vault & Database Firwall (AVDF)
- Experience of shell scripting
- Experience of working on various CBS(Core Banking System) like Finacle, T24(Temenos), Ababil, Bank Ultimus, iSteler etc.
- Experience of Oracle Database Security 12c
- Experience of database migration among same & cross platforms(e.g: Windows to Linux, AIX to Linux).
- Experience of oracle database Up-gradation from 10g/11g/12c to 11g/12c/19c.
- Experience of scaling up database like moving from non-cluster to clustered environment.
- Experience of Oracle Goldengate.
- Experience of Tranzware(C+) Master Card System.
- Experience of working on 24/7 support service environment.
- Experience of Tape Library


Certification:
- Oracle Autonomous Database Cloud 2019 Certified Specialis
- Oracle Database 12c Administrator Certified Professional (OCP)
- Oracle Certified Expert, Oracle RAC 11g and GI Administrator (OCE)
- Oracle Database 11g Administrator Certified Professional (OCP)
- ITIL Foundation Certificate in IT Service Management

Course Outline:

Introduction to SQL/Fundamental SQL
Introduction
Tools used for Develop query: PL/SQL Developer, SQL Developer, Command Line
Install and Configure Standalone Database in Linux and Windows both.
Brief Directory Structure of Oracle Database.
Network Infrastructure
Retrieving Data using the SQL SELECT Statement
Restricting and Sorting Data
Using Single-Row Functions to Customize Output
Using Conversion Functions and Conditional Expressions
Reporting Aggregated Data Using the Group Functions
Displaying Data from Multiple Tables Using Joins
Using Subqueries to Solve Queries
Using the SET Operators
Managing Tables using DML statements
Introduction to Data Definition Language
Introduction to Data Dictionary Views
Creating Sequences, Synonyms, Indexes
Creating Views
Managing Schema Objects
Retrieving Data by Using Subqueries
Manipulating Data by Using Subqueries
Controlling User Access
Manipulating Data
Managing Data in Different Time Zones

Course Objectives: Oracle 12c Administration Workshop I

By the end of this course students will be able to:
Installing Oracle Software
Creating an Oracle Database Using DBCA
Managing Database instances and ASM instances
Managing and controlling database network environment
Define and devise transaction management, concurrency control, crash recovery components
Managing storage structures
Controlling user security
Designing Database backup and recovery procedures
Take Decisions related with Database Maintenance

Course Outline Short: Oracle 12c Administration Workshop II
Oracle Database Architecture
Database installation and creation. (use DBCA)
Managing Database instances and ASM instances
Oracle Network environment
Database storage structures
User security
Concurrency control
Database auditing
Database maintenance
Crash Recovery

Detailed Course Outline: Administration I
Oracle Linux, Environment Variables and Partitions
Install Oracle Linux
Set Environment Variables
Configure Network
Multipath Configuration
Create user, group and permissions
Installing Oracle Software
Installing Configure Grid
Configure ASM Disk
Install and Configure Database using ASM Disks


Creating an Oracle Database Using DBA
Exploring the Oracle Database Architecture
Connecting to a server
Oracle Database Server Architecture
Instance: Database Configurations
Memory Structures – SGA
Memory structures – Shared Pool
Memory Structures – Buffer Cache
Memory Structures – Redo Log Buffer
Memory Structures – Large Pool
Memory Structures – Java Pool/Streams Pool
Memory Structures – PGA
Memory Structures – Streams Pool
Process Structures
Background Processes – Database Writer Process (DBWn)
Background Processes – Log Writer Process (LGR)
Background Processes – Checkpoint Process (CKPT)
Background Processes – System Monitor Process (SMON)
Background Processes – Process Monitor Process (PMON)
Background Processes – Recoverer Process
Background Processes – Archiver Process (ARCn)
Process Startup Sequence
Database Storage Architecture
Logical and Physical Storage Structures
Segments, Extents and Blocks
Table Space and Data Files
SYSTEM and SYSAUX Table Space
ASM storage components
Interacting with an Oracle Database


Managing Database Instance
Database initialization parameters modification
Stages of database startup
Database shutdown modes and options
Alert log
Using Trace Files
Dynamic performance views
Data Dictionary views
Data dictionary from SQL Expert


Managing ASM instances
Benefits of using ASM
ASM instance processes and parameters
Interaction between database instances and ASM
ASM instance dynamic performance views
ASM system privileges
ASM disk groups
ASM disks
Allocation units
ASM files
Extent Maps
Striping granularity
Fine-Grained Striping
ASM Failure groups
Stripe and mirror example
Failure example
Managing disk groups
Adding disk to disk groups
Alter commands
ASM disk group compatibility
Disk Group Attributes
ASM Fast Mirror Resync Overview


Managing and Controlling Database Network Environment
Creating additional listeners
Creating Oracle Net Service aliases
Configuring connect-time failover
Controlling the Oracle Net Listener
Using tnsping to test Oracle Net connectivity
Shared servers versus dedicated servers


Define and Devise Transaction Management, Concurrency Control, Crash Recovery Components


Transactions
Properties (ACID Rules)
Life Cycle
Concurrency Control
Why do we need concurrency control?
Types of concurrency control mechanisms
Basic samples
Crash Recovery Components
Undo and Redo Operations
Examples for different component behaviors
Deadlocks


Managing Data Concurrency
Locking Mechanism
Oracle data concurrency management
Enque Mechanism
Monitoring and Resolving Locking conflicts Managing Undo Data
DML and Undo data generation
Monitoring and administer undo data and redo data
Configuring undo retention
Undo retention guarantee
Undo advisor


Managing Storage Structures
Storage of table row data in blocks
Oracle-Managed Files (OMF)
Enlarging the database


Controlling User Security
Create and Manage database user accounts:
Authenticate Users
Assign default storage areas (tablespaces)
Administer Authentication
Grant and revoke privileges (system and object privileges)
Create and manage roles
Predefined roles
Create and manage profiles:
Implement standard password security features
Control resource usage by users
Supplied password verification function
Assigning quotas to users
Principle of least privilege
Protect privileged accounts


Implementing Oracle Database Auditing
DBA responsibilities for security and auditing
Standard database auditing
DBA responsibilities for security and auditing
Standard database auditing
Specifying audit options
Audit information
Value-based auditing
Fine-Grained Auditing
FGA Guidelines
SYSDBA Auditing
Maintaining the audit trail
Oracle Audit Vault


Performance Management
Use Enterprise Manager to monitor performance
Use Automatic Memory Management (AMM)
Use the Memory Advisor to size memory buffers
View performance-related dynamic views
Troubleshoot invalid and unusable objects


Designing Database Backup and Recovery Procedures
Backup and Recovery Concepts
Types of failure that can occur in an Oracle database (statement/user process/network/User/Instance failures)
Flashback Technology
Ways to tune instance recovery (Redo Log files/Log Writer)
Using MTTR Advisor
Media failure
Configuring recoverability
Configuring the fast recovery area
Checkpoints, redo log files, and archive log files
Achiever process
Configuring ARCHIVELOG mode
Performing Database Backups
Consistent database backups
Oracle Secure Backup
User Managed Backup
Recovery Manager (RMAN)
Backing Up the Control File to a Trace File
Performing Database Recovery
Opening a Database
Keeping a Database Open
Loss of Control file/Redo Log file/data file /noncritical data file /system _critical data file
Data failure examples
Data recovery advisor
Recovery:
Control File
Redo log File
Data File
Moving Data
Ways to move data
Directory Objects
Using SQL*Loader to load data from a non-Oracle Database (user files)
Using external tables to move data via platform-independent files
General architecture of Oracle Data Pump
Using Data Pump Export and Import to move data between Oracle Databases
Take Decisions Related with Database maintenance
Managing optimizer statistics
Preferences for Gathering Statistics
Managing the Automatic Workload Repository (AWR)
Statistic Levels
Automatic Database Diagnostic Monitor (ADDM)
Advisory framework
Automated Maintenance Tasks
Server-generated alerts
Setting alert thresholds
Reacting to alerts
Alert types and clearing Alerts
Enterprise Manager Support Workbench
My Oracle Support
Log Service Requests (SR)
Manage Patches
Apply a patch
Stage a patch
Oracle Restart

Course Objectives: Administration II

By the end of this course students will be able to:
Advance RMAN Backup and Recovery
Oracle Flashback Technologies
Hands on Advance Performance Tuning
Oracle High Availability Technologies
Oracle Supported Application Servers and REST Data Services
Oracle Replication and Duplication

Course Outline Short: Administration II
Core Concepts and Tools of the Oracle Database
Configuring for Recoverability
Using the RMAN Recovery Catalog
Configuring Backup Settings
Creating Backups with RMAN
Restore and Recovery Task
Using RMAN to Perform Recovery
Monitoring and Tuning RMAN
Diagnosing the Database
Using Flashback Technology I
Using Flashback Technology II
Performing Flashback Database
Managing Memory
Managing Database Performance
Managing Performance by SQL Tuning
Managing Resources
Automating Tasks with the Scheduler
Managing Space in Blocks
Managing Space in Segments
Managing Space for the Database
Duplicating a Database

To set password limit Unlimited in Oracle 11G

 When You  tried login your user(TEST) it is showing password will expired with 7 Days.



[oracle@k44-db1]$ sqlplus test/test


SQL*Plus: Release 11.2.0.2.0 Production on Mon Mar 11 22:34:42 2013

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

Enter password: 

ERROR:

ORA-28002: the password will expire within 7 days

Connected to:

Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production

SQL> 



Get to know which profile the test user is using from dba_users view,


SQL> SELECT profile FROM dba_users WHERE username='TEST';


USERNAME PROFILE

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

TEST     DEFAULT


Now check the password lifetime of the default profile from dba_profiles


SQL> SELECT resource_name,limit FROM dba_profiles WHERE profile='DEFAULT' AND resource_name='PASSWORD_LIFE_TIME';


and than set default profile limit to unlimited for below query,


SQL> ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;


Profile altered.


after profile limit changed  and Alter user(TEST) password for the below statement,


SQL> alter user test identified by test;


User altered.


after that alter username  and try to connect test user,


[oracle@k44-db1]$ sqlplus test/test


SQL*Plus: Release 11.2.0.3.0 Production on Fri Jul 25 11:50:15 2014

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


Connected to:


Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

With the Partitioning, Real Application Clusters, OLAP, Data Mining

and Real Application Testing options

The database is down. Please specify the host credentials to access database restart and diagnostics tools

 The database is down. Please specify the host credentials to access database restart and diagnostics tools.

Enterprise manager shows that database is down but in real it is not.

[oracle@grhldb01 trace]$ sqldba


SQL*Plus: Release 11.2.0.3.0 Production on Fri Sep 13 10:38:01 2013


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


Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

With the Partitioning, Automatic Storage Management, OLAP, Data Mining

and Real Application Testing options


SQL> select name,open_mode from v$database;


NAME    OPEN_MODE

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

TCHDB   READ WRITE

check the listener status.


[oracle@grhldb01 ~]$ lsnrctl status


LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 26-AUG-2014 13:16:23


Copyright (c) 1991, 2011, Oracle.  All rights reserved.


Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))

STATUS of the LISTENER

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

Alias                     LISTENER

Version                   TNSLSNR for Linux: Version 11.2.0.3.0 - Production

Start Date                13-MAR-2014 12:53:12

Uptime                    165 days 23 hr. 23 min. 10 sec

Trace Level               off

Security                  ON: Local OS Authentication

SNMP                      ON

Listener Parameter File   /orabin/grid11gR2/grid/network/admin/listener.ora

Listener Log File         /orabin/grid11gR2/base/diag/tnslsnr/grhldb01/listener/alert/log.xml

Listening Endpoints Summary...

  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))

  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))

  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.128.0.42)(PORT=1521)))

Services Summary...

Service "+ASM" has 1 instance(s).

  Instance "+ASM1", status READY, has 1 handler(s) for this service...

Service "TCHDB" has 2 instance(s).

  Instance "TCHDB1", status READY, has 2 handler(s) for this service...

  Instance "TCHDB2", status READY, has 1 handler(s) for this service...

Service "TCHDB1_RAC" has 1 instance(s).

  Instance "TCHDB2", status READY, has 1 handler(s) for this service...

Service "TCHDB2_RAC" has 1 instance(s).

  Instance "TCHDB2", status READY, has 1 handler(s) for this service...

Service "TCHDBXDB" has 2 instance(s).

  Instance "TCHDB1", status READY, has 1 handler(s) for this service...

  Instance "TCHDB2", status READY, has 1 handler(s) for this service...

Service "TCH_ESP_ORANGE_02_RAC" has 2 instance(s).

  Instance "TCHDB1", status READY, has 2 handler(s) for this service...

  Instance "TCHDB2", status READY, has 1 handler(s) for this service...

Service "TCH_GBR_VODA_02_RAC" has 1 instance(s).

  Instance "TCHDB2", status READY, has 1 handler(s) for this service...

Service "TCH_GBR_VODA_RAC" has 1 instance(s).

  Instance "TCHDB2", status READY, has 1 handler(s) for this service...

The command completed successfully


it’s runing.


Solution:

select username, account_status from dba_users order by 2;

shows that

DBSNMP EXPIRED

SYSMAN EXPIRED

SYSTEM EXPIRED.


if they are locked then simple unlock with commands:

alter user DBSNMP account unlock;

alter user SYSTEM account unlock;

alter user SYSMAN account unlock;

it’s all, now enjoy with enterprise manager


DBA Scripts

  /*Archive log Delete from Database*/

delete archivelog all completed before 'sysdate-3';

delete archivelog all completed before 'sysdate-14';

 

 

 

/*See what kind of files are available in the Flash Recovery Area*/

set pages 9999 lines 300

col name format a40

 

select name, to_char(space_limit, '999,999,999,999') as space_limit, to_char(space_limit - space_used + space_reclaimable,'999,999,999,999') as space_available,round((space_used - space_reclaimable)/space_limit * 100, 1) as pct_full from v$recovery_file_dest;

 

NAME                                     SPACE_LIMIT      SPACE_AVAILABLE    PCT_FULL

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

/u03/fast_recovery_area                   268,435,456,000  116,600,224,256       56.6

 

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

set pagesize 1000 line 200

col "db_recovery_file_dest" for a32;

col size_m for 999,999,999;

col used_m for 999,999,999;

col pct_used for 999;

 

select name "db_recovery_file_dest",ceil(space_limit/1024/1024) TOTAL_MB, ceil( space_used /1024/1024) USED_MB,

decode( nvl(space_used, 0),0,0,ceil(( space_used /space_limit) * 100)) "PERCENTAGE(%)"

from v$recovery_file_dest

order by 1;

 

exit;

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

 

/* Check Tablespace size and free space in oracle? */

SELECT df.tablespace_name "Tablespace",

  totalusedspace "Used MB",

  (df.totalspace - tu.totalusedspace) "Free MB",

  df.totalspace "Total MB",

  ROUND(100 * ( (df.totalspace - tu.totalusedspace)/ df.totalspace)) "% Free"

FROM

  (SELECT tablespace_name,

    ROUND(SUM(bytes) / 1048576) TotalSpace

  FROM dba_data_files

  GROUP BY tablespace_name

  ) df,

  (SELECT ROUND(SUM(bytes)/(1024*1024)) totalusedspace,

    tablespace_name

  FROM dba_segments

  GROUP BY tablespace_name

  ) tu

WHERE df.tablespace_name = tu.tablespace_name;

 

 

TEMP TABLE SPACE CHECK

select TABLESPACE_NAME "TEMP TBS NAME",bytes/(1024*1024) "SIZE(MBs)",BYTES_USED/(1024*1024) "BYTES USED(MBs)",BYTES_FREE/(1024*1024) "BYTES FREE(MBs)" from sys. V_$TEMP_SPACE_HEADER,v$tempfile

 

 

/* Tablespace file are located */

Select  File_Name, Blocks, Tablespace_Name

From Dba_Data_Files;

 

 

 

/*Listener Status*/

login as: sys-admin

sys-admin@172.16.100.12's password:       

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

This system is not registered to Red Hat Insights. See https://cloud.redhat.com/

To register this system, run: insights-client --register

Last login: Sat Apr 30 01:59:37 2022 from 172.16.100.53

[sys-admin@ifsdbdev ~]$ su - root

Password:

 [root@ifsdbdev ~]#

[root@ifsdbdev ~]# su - oracle

[oracle@ifsdbdev ~]$

[oracle@ifsdbdev ~]$

[oracle@ifsdbdev ~]$ lsnrctl status

 

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 12-MAY-2022 09:54:28

 

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

 

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))

STATUS of the LISTENER

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

Alias                     LISTENER

Version                   TNSLSNR for Linux: Version 19.0.0.0.0 - Production

Start Date                12-MAY-2022 09:15:37

Uptime                    0 days 0 hr. 38 min. 50 sec

Trace Level               off

Security                  ON: Local OS Authentication

SNMP                      OFF

Listener Parameter File   /u01/app/oracle/product/19.3.0/db_1/network/admin/list                                                                             ener.ora

Listener Log File         /u01/app/oracle/diag/tnslsnr/ifsdbdev/listener/alert/l                                                                             og.xml

Listening Endpoints Summary...

  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ifsdbdev)(PORT=1521)))

  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=ifsdbdev)(PORT=5500))(Security=(my_                                                                             wallet_directory=/u01/app/oracle/admin/ifs10cdb/xdb_wallet))(Presentation=HTTP)(                                                                             Session=RAW))

Services Summary...

Service "TEST" has 1 instance(s).

  Instance "TEST", status READY, has 1 handler(s) for this service...

Service "TESTXDB" has 1 instance(s).

  Instance "TEST", status READY, has 1 handler(s) for this service...

Service "b9b90dd9e147b39ce0530c6410ac804e" has 1 instance(s).

  Instance "ifs10cdb", status READY, has 1 handler(s) for this service...

Service "b9b9a79ac0b5d703e0530c6410ac4621" has 1 instance(s).

  Instance "ifs10cdb", status READY, has 1 handler(s) for this service...

Service "ifs10cdb" has 1 instance(s).

  Instance "ifs10cdb", status READY, has 1 handler(s) for this service...

Service "ifs10cdbXDB" has 1 instance(s).

  Instance "ifs10cdb", status READY, has 1 handler(s) for this service...

Service "pdb" has 1 instance(s).

  Instance "ifs10cdb", status READY, has 1 handler(s) for this service...

The command completed successfully

[oracle@ifsdbdev ~]$

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

/*Check the alert log if a vital error exists or not (Corruption)

Use the following script to check alert log

*/

 

set linesize 150

set pagesize 150

 

SELECT SUBSTR (MESSAGE_TEXT, 1, 300) MESSAGE_TEXT, COUNT (*) cnt

FROM X$DBGALERTEXT

WHERE (MESSAGE_TEXT LIKE '%ORA-%' OR UPPER (MESSAGE_TEXT) LIKE '%ERROR%')

AND CAST (ORIGINATING_TIMESTAMP AS DATE) > SYSDATE - 1

GROUP BY SUBSTR (MESSAGE_TEXT, 1, 300);

 

Exit

 

 

 

How To Find The Temp Tablespace Usage

Run the below scripts to get the temp tablespace usage.

 

 

select a.tablespace_name tablespace,

d.TEMP_TOTAL_MB,

sum (a.used_blocks * d.block_size) / 1024 / 1024 TEMP_USED_MB,

d.TEMP_TOTAL_MB - sum (a.used_blocks * d.block_size) / 1024 / 1024 TEMP_FREE_MB

from v$sort_segment a,

(

select b.name, c.block_size, sum (c.bytes) / 1024 / 1024 TEMP_TOTAL_MB

from v$tablespace b, v$tempfile c

where b.ts#= c.ts#

group by b.name, c.block_size

) d

where a.tablespace_name = d.name

group by a.tablespace_name, d.TEMP_TOTAL_MB;

 

 

//

SELECT A.tablespace_name tablespace, D.mb_total,
    SUM (A.used_blocks * D.block_size) / 1024 / 1024 mb_used,
    D.mb_total - SUM (A.used_blocks * D.block_size) / 1024 / 1024 mb_free
   FROM v$sort_segment A,
    (
   SELECT B.name, C.block_size, SUM (C.bytes) / 1024 / 1024 mb_total
    FROM v$tablespace B, v$tempfile C
     WHERE B.ts#= C.ts#
      GROUP BY B.name, C.block_size) D
    WHERE A.tablespace_name = D.name
    GROUP by A.tablespace_name, D.mb_total;

//

 

SELECT *

FROM

  (SELECT a.tablespace_name,

    SUM(a.bytes/1024/1024) allocated_mb

  FROM dba_temp_files a

  WHERE a.tablespace_name = 'TEMP'

  GROUP BY a.tablespace_name

  ) x,

  (SELECT SUM(b.bytes_used/1024/1024) used_mb,

    SUM(b.bytes_free      /1024/1024) free_mb

  FROM v$temp_space_header b

  WHERE b.tablespace_name = 'TEMP'

  GROUP BY b.tablespace_name

  );

 

 

 

Check Tablespace Free Space in Oracle

 

SELECT DFQ.TABLESPACE_NAME "Tablespace Name"

      ,DFQ.TOTALSPACE "Total Size MB"

      , (DFQ.TOTALSPACE - DSQ.TOTALUSEDSPACE) "Free Space MB"

      ,ROUND (100 * ( (DFQ.TOTALSPACE - DSQ.TOTALUSEDSPACE) / DFQ.TOTALSPACE)) || '%' "Free Space %"

FROM   (SELECT   TABLESPACE_NAME, ROUND (SUM (BYTES) / 1048576) TOTALSPACE

        FROM     DBA_DATA_FILES

        GROUP BY TABLESPACE_NAME) DFQ

      ,(SELECT   TABLESPACE_NAME, ROUND (SUM (BYTES) / (1024 * 1024)) TOTALUSEDSPACE

        FROM     DBA_SEGMENTS

        GROUP BY TABLESPACE_NAME) DSQ

WHERE  DFQ.TABLESPACE_NAME = DSQ.TABLESPACE_NAME(+);

 

Query to get tablespace datafile location in Oracle

SELECT TABLESPACE_NAME

      ,FILE_ID

      ,FILE_NAME

      ,STATUS

FROM   DBA_DATA_FILES;

 

 

Check Tablespace Growth in Oracle

 

 

 

 

 

 

 

/*

---------------------------------------------------- Error --------------------------------

unable to extend lob segment SYS.SYS_LOB0000000357C00040$$ by 1024 in tablespace SYSAUX

Failed executing query (ORA-01691: unable to extend lob segment SYS.SYS_LOB0000000357C00040$$ by 1024 in tablespace SYSAUX)

*/

https://ittutorial.org/ora-01691-unable-to-extend-lob-segment/

 

https://www.oracle-dba-online.com/managing_tablespace_size.htm

 

file Location --

  Select * from dba_data_files ;

 

You can view the default location for tablespaces with

show parameter DB_CREATE_FILE_DEST;

You can change the parameter with

alter system set DB_CREATE_FILE_DEST='/ORCL/u02/app/oracle/oradata/ORCL';

 

 

create tablespace TEST datafile 'test01.dbf' size 10M;

 

Tablespace created.

 

select file_name

 from dba_data_files

 where tablespace_name = 'TEST';

 

 

alter tablespace SYSAUX add datafile '/oradata/datafile/SYSAUX02.dbf' size 1G autoextend on next 1024M;

 

alter database datafile '/u01/oracle/oradata/booktst_users_02.dbf' resize 150M;

 

alter database datafile '/u02/oradata/PROD/sysaux02.dbf' resize 8G autoextend on next 10M ;

 

 

alter tablespace SYSAUX add datafile '/u02/oradata/PROD/sysaux02.dbf' size 8G autoextend on next 10M;

 

ALTER DATABASE DATAFILE '/u02/oradata/PROD/sysaux02.dbf' AUTOEXTEND ON NEXT 10M MAXSIZE UNLIMITED;

 

 

 

Add Data Dile

alter tablespace IFSAPP_REPORT_DATA add datafile '/u02/oradata/PROD/ifsapp_report_data02.dbf' size 8G autoextend on next 10M;

 

 

 

 

 

NEXT 10M

 

ALTER DATABASE DATAFILE '/u02/oradata/PROD/ifsapp_report_data02.dbf' AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED;

 

Resize

 

alter database datafile '/u02/oradata/PROD/ifsapp_report_index01.dbf'  resize 8G;

 

 

 

 

 

 

/*IFS – CHECKING */

 

ARCHIVE LOG

TABLESPACE

DISK SPACE

INDEXING

 

TEMP FILE LOCATION

SELECT * FROM dba_temp_files;

/u02/oradata/PROD/temp01.dbf

 

ALTER TABLESPACE TEMP ADD TEMPFILE '/u02/oradata/PROD/temp02.dbf ' SIZE 10G AUTOEXTEND ON NEXT 1G MAXSIZE UNLIMITED;

 

ALTER TABLESPACE IFSAPP_DATA ADD DATAFILE '/u02/oradata/PROD/ifsapp_data02.dbf' SIZE 31G AUTOEXTEND ON NEXT 1G MAXSIZE UNLIMITED;

 

/*27-01-2023 1PM*/

ALTER TABLESPACE IFSAPP_DATA ADD DATAFILE '/u02/oradata/PROD/ifsapp_data03.dbf' SIZE 31G AUTOEXTEND ON NEXT 1G MAXSIZE UNLIMITED;

alter database datafile '/u02/oradata/PROD/ifsapp_report_index01.dbf'  resize 8G;

 

 

 

///

User Create and Table space

 

CONN / AS SYSDBA

 

CREATE TABLESPACE REPORTDB_DATA DATAFILE

  '/u01/app/oracle/oradata/ORCL/reportdb_data01.dbf' SIZE 31G AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED

LOGGING

ONLINE

EXTENT MANAGEMENT LOCAL AUTOALLOCATE

BLOCKSIZE 8K

SEGMENT SPACE MANAGEMENT AUTO;

 

 

CREATE USER REPORTDB IDENTIFIED BY r

 DEFAULT TABLESPACE REPORTDB_DATA

 TEMPORARY TABLESPACE TEMP

 QUOTA UNLIMITED ON REPORTDB_DATA;

 

 

 

GRANT DBA TO REPORTDB;

 

 

 

 

 

 

 

 

 

 

 

# Schedule

# Oracle Job Scheduler

# Linux Schedule

# Windows Schedule

 

 

# Oracle Job Scheduler

 

BEGIN

  dbms_scheduler.drop_job(job_name => 'IAL_CUSTOMER_BASIC_INFO_SCHEDULER_JOB');

END;

/

-- Procedure IAL_CUSTOMER_BASIC_INFO_PROC

BEGIN

      DBMS_SCHEDULER.CREATE_JOB (

                  job_name                   =>  'IAL_CUSTOMER_BASIC_INFO_SCHEDULER_JOB',

                  job_type                   =>  'STORED_PROCEDURE',

                  job_action                 =>  'IAL_CUSTOMER_BASIC_INFO_PROC',

                  start_date                 =>  '22-JUN-22 04.50.00 PM',

                  --repeat_interval          =>  'freq=monthly;interval=1;bymonthday=1;byhour=01;byminute=01;bysecond=01',

                  repeat_interval            =>  'freq=daily;byhour=16;byminute=55', 

                  end_date                   =>  NULL, 

                  enabled                    =>  TRUE,

                  auto_drop                  =>  FALSE,

                  comments                   =>  'Ial Customer Basic Data Info Scheduler Job');

END;

/

 

 

EXEC DBMS_SCHEDULER.ENABLE('IAL_CUSTOMER_BASIC_INFO_SCHEDULER_JOB');

 

 

BEGIN

  dbms_scheduler.drop_job(job_name => 'IAL_C_CO_COLLECTION_DETAIL_SCHEDULER_JOB');

END;

/

-- Procedure IAL_C_CO_COLLECTION_DETAIL_PROC

BEGIN

    DBMS_SCHEDULER.CREATE_JOB (

            job_name                        =>  'IAL_C_CO_COLLECTION_DETAIL_SCHEDULER_JOB',

            job_type                        =>  'STORED_PROCEDURE',

            job_action                      =>  'IAL_C_CO_COLLECTION_DETAIL_PROC',

            start_date                      =>  '23-JUN-22 02.01.00 AM',

            repeat_interval                 =>  'freq=daily;byhour=02;byminute=01',

            end_date                        =>  NULL,

            enabled                         =>  TRUE,

            auto_drop                       =>  FALSE,

            comments                        =>  'Ial Customer Collection Detail Scheduler Job');

END;

/

 

EXEC DBMS_SCHEDULER.ENABLE('IAL_C_CO_COLLECTION_DETAIL_SCHEDULER_JOB');

 

 

 

 

 

 

 

 

Use PLSQL_BLOCK instead:

begin

dbms_scheduler.create_job (

    job_name => 'myjob',

    job_type => 'PLSQL_BLOCK',

    job_action => 'BEGIN myproc(''first arg'',''second arg''); END;',

    start_date => sysdate,

    repeat_interval => 'FREQ=HOURLY',

    enabled => true   

);

end;

/

 

 

BEGIN

    DBMS_SCHEDULER.CREATE_JOB (

            job_name                   =>  'test_coll_detail_temp_data_jan2022_job',

            job_type                   =>  'PLSQL_BLOCK',

            job_action                 =>  'BEGIN test_coll_detail_temp_data_jan2022_proc(''01/01/2022'',''01/31/2022''); END; ',

            start_date                 =>  '30-JUN-22 02.30.00 AM',

            --repeat_interval          =>  'freq=monthly;interval=1;bymonthday=1;byhour=01;byminute=01;bysecond=01',

            repeat_interval            =>  'freq=daily;byhour=02;byminute=30', 

            end_date                   =>  NULL, 

            enabled                    =>  TRUE,

            auto_drop                  =>  FALSE,

            comments                   =>  'one time schedule job');

END;

/

 

//////////////////////////////////////////////////////

 

 

select owner as schema_name,

       job_name,

       job_style,

       case when job_type is null

                 then 'PROGRAM'

            else job_type end as job_type, 

       case when job_type is null

                 then program_name

                 else job_action end as job_action,

       start_date,

       case when repeat_interval is null

            then schedule_name

            else repeat_interval end as schedule,

       last_start_date,

       next_run_date,

       state

from sys.all_scheduler_jobs

order by owner,

         job_name;

 

 

 

 

 

# run duration for DBMS_SCHEDULER jobs

 

col owner for a13

col job_name for a20

col actual_start_date for a37

col status for a14

col run_duration for a18

 

 

select owner, job_name, actual_start_date, status, run_duration

from DBA_scheduler_job_run_details

where job_name = 'IAL_C_CO_COLLECTION_DETAIL_SCHEDULER_JOB'

order by actual_start_date desc;

 

 

 

 

 

 

 

 

You can see dbms_scheduler errors in the dba_scheduler_job_run_detail view:

COL log_id              FORMAT 9999   HEADING 'Log#'
COL log_date            FORMAT A32    HEADING 'Log Date'
COL owner               FORMAT A06    HEADING 'Owner'
COL job_name            FORMAT A20    HEADING 'Job'
COL status              FORMAT A10    HEADING 'Status'
COL actual_start_date   FORMAT A32    HEADING 'Actual|Start|Date'
COL error#              FORMAT 999999 HEADING 'Error|Nbr'

TTITLE 'Scheduled Tasks That Failed:'

select
   log_date,
   job_name,
   status,
   req_start_date,
   actual_start_date,
   run_duration
from
   dba_scheduler_job_run_details
where
--   job_name = 'MYJOB'

   status <> 'SUCCEEDED'
order by
   actual_start_date;

 

 

v$session

dba_scheduler_running_chains

dba_scheduler_running_jobs

v$scheduler_running_jobs

 

 

 

You can monitor dba scheduler running jobs as follows.

 

select * from dba_scheduler_running_jobs;

 

 

You can monitor dba scheduler running jobs details as follows.

 

select * from dba_scheduler_job_run_details;

 

 

 

 

 

 

 

 

 

 

 

 

For oracle table size in MB

 

select

owner as "Schema"

, segment_name as "Object Name"

, segment_type as "Object Type"

, round(bytes/1024/1024,2) as "Object Size (Mb)"

, tablespace_name as "Tablespace"

from dba_segments

where segment_name=’<table_name>’

and owner='<Table owner>';

 

For oracle table size in GB

 

select

owner as "Schema"

, segment_name as "Object Name"

, segment_type as "Object Type"

, round(bytes/1024/1024/1024,2) as "Object Size (Gb)"

, tablespace_name as "Tablespace"

from dba_segments

where segment_name=’<table_name>’

and owner='<Table owner>'

and owner='<Table owner>';

 

 

If you don’t have access to dba_segments, then you can use user_segments also

 

For the size in MB

 

 

select segment_name as "Object Name"

, segment_type as "Object Type"

, round(bytes/1024/1024,2) as "Object Size (Mb)"

, tablespace_name as "Tablespace"

from user_segments

where segment_name=’<table_name>’

 

For the size in GB

 

select

segment_name as "Object Name"

, segment_type as "Object Type"

, round(bytes/1024/1024/1024,2) as "Object Size (Gb)"

, tablespace_name as "Tablespace"

from user_segments

where segment_name=’<table_name>’;

 

 

Top 10 big tables in Particular schema

 

select * from (select

owner as "Schema"

, segment_name as "Object Name"

, segment_type as "Object Type"

, round(bytes/1024/1024/1024,2) as "Object Size (Gb)"

, tablespace_name as "Tablespace"

from dba_segments

where owner='IFSAPP'  and segment_type='TABLE' order by 4 desc)  where rownum < 11;

 

Top 10 big tables in Particular tablespace

IFSAPP_REPORT_DATA

 

select * from (select

owner as "Schema"

, segment_name as "Object Name"

, segment_type as "Object Type"

, round(bytes/1024/1024/1024,2) as "Object Size (Gb)"

, tablespace_name as "Tablespace"

from dba_segments

where tablespace_name =’<tablespace name>' and segment_name='TABLE' order by 4 desc ) where rownum <11;

 

 

Sum of the size of table for a particular schema

IFSAPP

 

select owner,sum(bytes)/1024/1024/1024 as "SIZE in GB" from dba_segments where owner='SCHEMA_NAME' and segment_type='TABLE' group by owner;

 

 

 

 

ARCHIVELOG Mode

 

select name,log_mode from v$database;

 

archive log list

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

--Script to get Tablespace total, free and used space

SELECT /* + RULE */  df.tablespace_name "Tablespace",

       df.bytes / (1024 * 1024) "Size (MB)",

       round(SUM(fs.bytes) / (1024 * 1024)) "Free (MB)",

       Nvl(Round(SUM(fs.bytes) * 100 / df.bytes),1) "% Free",

       Round((df.bytes - SUM(fs.bytes)) / 1024/1024) "Used space",

       Round((df.bytes - SUM(fs.bytes)) * 100 / df.bytes) "% Used"

  FROM dba_free_space fs,

       (SELECT tablespace_name,SUM(bytes) bytes

          FROM dba_data_files

         GROUP BY tablespace_name) df

 WHERE fs.tablespace_name (+)  = df.tablespace_name

 GROUP BY df.tablespace_name,df.bytes

 order by  "% Used" desc;

 

 

 

 

 

 

 

 

BEGIN

    DBMS_SCHEDULER.CREATE_JOB (

    job_name            =>  'C1JOB_1',

    job_type            =>  'PLSQL_BLOCK',

    job_action          =>  'BEGIN reportdb.IAL_C_LEASING_CUSTOMER_ORDER_IFS_PROC;reportdb.IAL_C_LEASING_DET_UNORD_IFS_PROC;reportdb.IAL_C_CO_COLLECTION_DETAIL_FULL_PROC; END;',

    start_date          =>  '10-SEP-22 11.58.00 PM',

    repeat_interval     =>  'FREQ=DAILY;BYHOUR=00;BYMINUTE=01', 

    end_date            =>  NULL, 

    enabled             =>  TRUE,

    auto_drop           =>  TRUE,

    comments            =>  'Present Month Collection from IFS System');

END;

/

 

 

 

BEGIN

    DBMS_SCHEDULER.CREATE_JOB (

    JOB_NAME            =>  'SALE_JOB01',

    JOB_TYPE            =>  'PLSQL_BLOCK',

    JOB_ACTION          =>  'BEGIN REPORTDB.IAL_SALE_CUSTOMER_ORDER_BASIC_PROC; END;',

    START_DATE          =>  '06-FEB-23 01.00.00 PM',

    REPEAT_INTERVAL     =>  'FREQ=HOURLY', 

    END_DATE            =>  NULL, 

    ENABLED             =>  TRUE,

    AUTO_DROP           =>  TRUE,

    COMMENTS            =>  'Sale Data - Cusotmer Order from IFS PROD');

END;

 

/

BEGIN

    DBMS_SCHEDULER.CREATE_JOB (

    job_name            =>  'C1JOB_2',

    job_type            =>  'PLSQL_BLOCK',

    job_action          =>  'BEGIN reportdb.IAL_C_CO_COLLECTION_DETAIL_FULL_PRE_MONTH_PROC; END;',

    start_date          =>  '10-SEP-22 11.58.00 PM',

    repeat_interval     =>  'FREQ=DAILY;BYHOUR=03;BYMINUTE=01', 

    end_date            =>  NULL, 

    enabled             =>  TRUE,

    auto_drop           =>  TRUE,

    comments            =>  'Previous Month Collection from IFS System');

END;

/

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

 

 

Error

 

domain index is marked loading/failed/unusable in ifs prod

 

SELECT * FROM all_indexes

WHERE DOMIDX_OPSTATUS != 'VALID' OR STATUS != 'VALID' OR DOMIDX_STATUS != 'VALID';

 

CUSTOMER_INFO_TAB

 

alter index INDEX_NAME rebuild;

alter index CUSTOMER_TIX rebuild;

 

CREATE INDEX IFSAPP.CUSTOMER_TIX ON IFSAPP.CUSTOMER_INFO_TAB

(TEXT_ID$)

INDEXTYPE IS CTXSYS.CONTEXT

PARAMETERS(' nopopulate datastore Customers section group APPLICATION_SEARCH lexer APPLICATION_SEARCH_LEXER storage APPLICATION_SEARCH_STORAGE')

NOPARALLEL;

 

 

 

INDEXING

 

alter table IAL_C_COWISE_CUSTOMER_INFO_IFS add row_id number default REPORTDB.SEQ_IAL_C_COWISE_CUSTOMER_INFO_IFS_ROW_ID.nextval

 

 

CREATE SEQUENCE REPORTDB.SEQ_IAL_C_COWISE_CUSTOMER_INFO_IFS_ROW_ID

  START WITH 1

  MAXVALUE 999999999999999999999999

  MINVALUE 1

  NOCYCLE

  NOCACHE

  NOORDER

  NOKEEP

  GLOBAL;

 

ALTER TABLE IAL_C_COWISE_CUSTOMER_INFO_IFS

  ADD CONSTRAINT IAL_C_COWISE_CUSTOMER_INFO_IFS_ROW_ID_pk

    PRIMARY KEY (ROW_ID);

 

 

    CREATE INDEX REPORTDB.IAL_C_COWISE_CUSTOMER_INFO_IFS_ORDERNO_IDX ON REPORTDB.IAL_C_COWISE_CUSTOMER_INFO_IFS

(ORDER_NO)

 

 

 

 

 

 

 

 

 

 

 

BEGIN

    DBMS_SCHEDULER.CREATE_JOB (

      job_name            =>  'C1JOB_1',

      job_type            =>  'PLSQL_BLOCK',

      job_action          =>  'BEGIN reportdb.IAL_C_LEASING_CUSTOMER_ORDER_IFS_PROC;reportdb.IAL_C_LEASING_DET_UNORD_IFS_PROC;reportdb.IAL_C_CO_COLLECTION_DETAIL_FULL_PROC;reportdb.IAL_C_CO_COLLECTION_DETAIL_FULL_PRE_MONTH_PROC; END;',

      start_date          =>  '10-SEP-22 11.58.00 PM',

      repeat_interval     =>  'FREQ=DAILY;BYHOUR=00;BYMINUTE=01', 

      end_date            =>  NULL, 

      enabled             =>  TRUE,

      auto_drop           =>  TRUE,

      comments            =>  'Two month collection from IFS System');

END;

/

 

BEGIN

    DBMS_SCHEDULER.CREATE_JOB (

    job_name            =>  'C1JOB_2',

    job_type            =>  'PLSQL_BLOCK',

    job_action          =>  'BEGIN reportdb.IAL_CUSTOMER_BASIC_INFO_PROC;reportdb.IAL_CUSTOMER_BASIC_INFO_PRE_MONTH_PROC; END;',

    start_date          =>  '11-SEP-22 11.58.00 PM',

    repeat_interval     =>  'FREQ=DAILY;BYHOUR=00;BYMINUTE=01', 

    end_date            =>  NULL, 

    enabled             =>  TRUE,

    auto_drop           =>  TRUE,

    comments            =>  'Customer Basic Data from IFS System');

END;

/

 

 

 

 

 

 

BEGIN

    DBMS_SCHEDULER.CREATE_JOB (

    job_name            =>  'C1JOB_4',

    job_type            =>  'PLSQL_BLOCK',

    job_action          =>  'BEGIN reportdb.IAL_C_LEASING_CUSTOMER_ORDER_IFS_MAN_PROC;reportdb.IAL_C_LEASING_DET_UNORD_IFS_MAN_PROC;reportdb.IAL_C_CO_COLLECTION_DETAIL_FULL_MAN_PROC; END;',

    start_date          =>  '10-SEP-22 11.58.00 PM',

    repeat_interval     =>  'FREQ=DAILY;BYHOUR=17;BYMINUTE=25', 

    end_date            =>  NULL, 

    enabled             =>  TRUE,

    auto_drop           =>  TRUE,

    comments            =>  'January to July');

END;

/

 

 

BEGIN

    DBMS_SCHEDULER.CREATE_JOB (

    job_name            =>  'C1JOB_5',

    job_type            =>  'PLSQL_BLOCK',

    job_action          =>  'BEGIN reportdb.IAL_CUSTOMER_BASIC_INFO_MAN_PROC; END;',

    start_date          =>  '10-SEP-22 11.58.00 PM',

    repeat_interval     =>  'FREQ=DAILY;BYHOUR=17;BYMINUTE=25', 

    end_date            =>  NULL, 

    enabled             =>  TRUE,

    auto_drop           =>  TRUE,

    comments            =>  'January to July');

END;

/

 

BEGIN

    DBMS_SCHEDULER.CREATE_JOB (

    job_name            =>  'C1JOB_10',

    job_type            =>  'PLSQL_BLOCK',

    job_action          =>  'BEGIN REPORTDB.IAL_GL_INTREST_VTS_PROC; END;',

    start_date          =>  '04-APR-23 01.01.01 AM',

    repeat_interval     =>  'FREQ=DAILY;BYHOUR=01;BYMINUTE=05', 

    end_date            =>  NULL, 

    enabled             =>  TRUE,

    auto_drop           =>  TRUE,

    comments            =>  'INTREST AND VTS FROM GL TWO MONTHS SCHEDULE');

END;

/

 

 

 

 

BEGIN

    DBMS_SCHEDULER.CREATE_JOB (

    job_name            =>  'C1JOB_9',

    job_type            =>  'PLSQL_BLOCK',

    job_action          =>  'BEGIN REPORTDB.IAL_MONEY_RECEIPT_SMS_PROC; END;',

    start_date          =>  '02-APR-23 10.00.00 AM',

    repeat_interval     =>  'FREQ=MINUTELY; INTERVAL=5; BYSECOND=0', 

    end_date            =>  NULL, 

    enabled             =>  TRUE,

    auto_drop           =>  TRUE,

    comments            =>  'SMS Every 5 minutes from Production');

END;

/

 

 

BEGIN

    DBMS_SCHEDULER.CREATE_JOB (

    job_name            =>  'C1JOB_9',

    job_type            =>  'PLSQL_BLOCK',

    job_action          =>  'BEGIN REPORTDB.IAL_MONEY_RECEIPT_SMS_PROC; END;',

    start_date          =>  '02-APR-23 10.00.00 AM',

    repeat_interval     =>  'FREQ=MINUTELY;INTERVAL=10;BYSECOND=0;BYHOUR=9,10,11,12,13,14,15,16,17,18,19,20,21,22,23', 

    end_date            =>  NULL, 

    enabled             =>  TRUE,

    auto_drop           =>  TRUE,

    comments            =>  'SMS Every 10 MS from Production');

END;

/

 

 

 

alter table IAL_MONEY_RECEIPT_HISTORY_TAB add ROW_ID number  default reportdb.SEQ_IAL_MONEY_RECEIPT_HISTORY_ROW_ID.nextval;

 

ALTER TABLE REPORTDB.IAL_MONEY_RECEIPT_HISTORY_BACKUP_TAB ADD CONSTRAINT IAL_MONEY_RECEIPT_HISTORY_BACKUP_ROW_ID_PK PRIMARY KEY (ROW_ID)

 

ALTER TABLE REPORTDB.IAL_C_CO_COLLECTION_DETAIL_LAST_BACKUP ADD CONSTRAINT IAL_C_CO_COLLECTION_DETAIL_LAST_BACKUP_ROW_ID_PK PRIMARY KEY (ROW_ID)

 

 

 

 

CREATE INDEX REPORTDB.IAL_C_CO_COLLECTION_DETAIL_LAST_BACKUP_ORDER_NO_IDX ON REPORTDB.IAL_C_CO_COLLECTION_DETAIL_LAST_BACKUP

(ORDER_NO)

 

 

ALTER TABLE IAL_C_CO_COLLECTION_DETAIL_LAST_BACKUP ADD ROW_ID NUMBER;

 

 

IAL_C_COWISE_CUSTOMER_INFO_LAST_BACKUP

 

ALTER TABLE REPORTDB.IAL_C_COWISE_CUSTOMER_INFO ADD CONSTRAINT IAL_C_COWISE_CUSTOMER_INFO_ROW_ID_PK PRIMARY KEY (ROW_ID)

 

 

 

 

CREATE INDEX REPORTDB.IAL_C_COWISE_CUSTOMER_INFO_ORDER_NO_IDX ON REPORTDB.IAL_C_COWISE_CUSTOMER_INFO

(ORDER_NO)

Horizontal Scaling vs Vertical Scaling

 একটা application হঠাৎ করে অনেক বেশি user পেতে শুরু করল। আগে যেখানে ১,০০০ জন user ছিল, এখন সেখানে ১ লাখ user! তখন স্বাভাবিকভাবেই প্রশ্ন আসে—...