Posts

Creation of BIGFILE TABLESPACE

===========Create a bigfile tablespace========================== CREATE BIGFILE TABLESPACE DATA82 DATAFILE    '+DATA' SIZE 10G AUTOEXTEND ON NEXT 100M MAXSIZE 300G LOGGING DEFAULT    NO INMEMORY ONLINE EXTENT MANAGEMENT LOCAL AUTOALLOCATE BLOCKSIZE 8K SEGMENT SPACE MANAGEMENT AUTO FLASHBACK ON; =======List all the tablespaces under a schema=================== SQL> SELECT DISTINCT tablespace_name FROM dba_segments WHERE owner = 'APPSUSER';  2    3 TABLESPACE_NAME ------------------------------ DATA80 APPSDATA SYSTEM DATA81 =======Verify the Default Tablespace============================== col USERNAME for a30 col DEFAULT_TABLESPACE for a30 SELECT username, default_tablespace FROM dba_users WHERE username = 'APPSUSER'; USERNAME                       DEFAULT_TABLESPACE ------------------------------ ------------------------------ APPSUSER               ...

Delete Old Trace file & Alert log older in RAC or Single Instance

  Recommended Trace File Retention Policy for Production Trace Type Suggested Retention Notes .trc / .trm        7–30 days Basic diagnostic traces. 30 days if enough disk, else 7–14 days is typical. Alert log 30–90 days Rotate or archive regularly (text or XML version). Listener logs 14–30 days Especially if logging is verbose. Audit logs 30–90 days Depends on compliance/security requirements. bash-4.3$ du -sg * 0.07    alert 0.00    cdump 0.00    hm 4.77    incident 0.00    incpkg 0.00    ir 0.00    lck 0.00    log 0.01    metadata 0.00    metadata_dgif 0.00    metadata_pv 0.00    stage 0.00    sweep 71.50   trace bash-4.3$ adrci ADRCI: Release 19.0.0.0.0 - Production on Tue Jun 24 23:01:07 2025 Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved. ADR base = "/u01/app/oracle" adrci> set hom...

Check the Oracle Database size of non CDB, CDB and PDB

Image
Queries for the non-CDB databases- on Check the Oracle Database size CDB and PDB Following Queries for NON-CDB database: Check the database physical consumed size select sum(bytes)/1024/1024/1024 size_in_gb from dba_data_files; Total space used by the data in the database. select sum(bytes)/1024/1024/1024 size_in_gb from dba_segments; Check the size of the User or Schema in Oracle database. select owner, sum(bytes)/1024/1024/1024 Size_GB from dba_segments group by owner; Find free space and used space in the Oracle database. select "Reserved_Space(MB)", "Reserved_Space(MB)" - "Free_Space(MB)" "Used_Space(MB)","Free_Space(MB)" from( select (select sum(bytes/(1014 1024)) from dba_data_files) "Reserved_Space(MB)", (select sum(bytes/(1024 1024)) from dba_free_space) "Free_Space(MB)" from dual ); Check overall size of database,temp and redo file. select ( select sum(bytes)/1024/1024/1024 data_size from dba_data_files ) + ...

Oracle Temporary Tablespace Resize

  Description:- In this article I'm going to see how to resize Temp Tablespace on PDB database level Demo:- Login in to PDB Database SQL> alter session set container=ORCLPDB; Session altered. First Check Temporary Tablespace Usage From PDB Level:- SELECT A.tablespace_name tablespace, D.GB_total,SUM (A.used_blocks * D.block_size) / 1024 / 1024 / 1024 GB_used,D.GB_total , SUM (A.used_blocks * D.block_size) / 1024 / 1024 / 1024 GB_free FROM v$sort_segment A, ( SELECT B.name, C.block_size, SUM (C.bytes) / 1024 / 1024 / 1024 GB_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.GB_total; TABLESPACE GB_TOTAL GB_USED GB_FREE —————————— ———- ———- ———- TEMP               .034179688            0             .034179688 From CDB level:- To find CDB and PDB temporary tablespace files s...

RMAN Command List

  Database The LIST command allows the backup data to be listed in the RMAN utility To list all existing backups use: RMAN> LIST BACKUP; To list all existing database backups use: RMAN> LIST BACKUP OF DATABASE; To list all existing backups of a specific datafile use: RMAN> LIST BACKUP OF DATAFILE <file#>; For example: RMAN> LIST BACKUP OF DATAFILE 4; Alternatively specify the datafile name. For example: RMAN> LIST BACKUP OF DATAFILE '/u01/app/oradata/TEST/users01.dbf'; To list all existing archivelog backups use: RMAN> LIST BACKUP OF ARCHIVELOG ALL; To list all existing controfile backups use: RMAN> LIST BACKUP OF CONTROLFILE; To list all existing SPFILE backups use: RMAN> LIST BACKUP OF SPFILE; Archive Logs To list all archive logs use: RMAN> LIST ARCHIVELOG ALL; Backup sets To list the contents of an individual backup set use: RMAN> LIST BACKUPSET <key>; For example: RMAN> LIST BACKUPSET 44; Datafile Image Copies To list all datafi...

Kill or Release PORT of LISTENER which is already in use

Port No. : 1521  sudo kill -9 $(sudo lsof -t -i :1521) OR [root@test ~]# sudo netstat -tulnp | grep 1521 tcp        0      0 127.0.0.1:1521          0.0.0.0:*               LISTEN      3168/tnslsnr [root@test ~]# sudo ss -tulnp | grep 1521 tcp   LISTEN 0      128         127.0.0.1:1521       0.0.0.0:*    users:(("tnslsnr",pid=3168,fd=8)) [root@test ~]# sudo kill -9 3168 [root@test ~]# sudo ss -tulnp | grep 1521

Installation Redis on Redhat/Rocky/Ubuntu Linux

  Installation Redis on Linux Install Redis on Ubuntu Add the repository to the APT index, update it, and install Redis: sudo apt-get install lsb-release curl gpg curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg sudo chmod 644 /usr/share/keyrings/redis-archive-keyring.gpg echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $( lsb_release -cs ) main" | sudo tee /etc/apt/sources.list.d/redis.list sudo apt-get update sudo apt-get install redis Redis will start automatically, and it should restart at boot time. If Redis doesn't start across reboots, you may need to manually enable it: sudo systemctl enable redis-server sudo systemctl start redis-server Install Redis on Red Hat/Rocky 8*/9* sudo yum install redis sudo systemctl enable redis sudo systemctl start redis Redis will restart at boot time. Install on Ubuntu using Snap To install via Snap, run: sudo apt u...