This post objective is to find out the stats of running container, system information related to space used by images and containers on /var/lib/docker. 1. ‘docker stats‘ command used to check the containers stats on system like CPU usage, IO usage, Memory usage. Below example is for 2 running containers dockerweb and webserver2. # docker […]
Archives for May 2019
How to Resize the Undo Tablespace in Oracle Database
This post provides the steps to resize the Undo tablespace.ie, to add space or shrink the current Undo tablespace. Shrinking Undo Tablespace Size Undo space once allocated will be available for reuse but will not be deallocated to the OS. The best way to shrink Undo tablespace is to switch to a new Undo tablespace […]
How to Shrink the datafile of Undo Tablespace in Oracle Database
Your production database has semiannual or annual purging programs which generate huge redo. Due to this requirement, your undo tablespace grows rapidly and occupies most of the space on the file system. The purging process is run only a few times a year. So would not like to keep the huge undo datafile in your […]
How to Drop Undo Tablespace in Oracle Database
This post provides the steps to drop an Undo tablespace. The Undo tablespace can be dropped if it is not the default Undo tablespace of the database and all the Undo segments in it are OFFLINE. 1. check whether the Undo tablespace to be dropped is the default Undo tablespace: sql> show parameter undo The […]
Unable to Drop Undo tablespace Since Undo Segment is in Needs Recovery
The Problem New Undo tablespace was created and a attempt is made to drop old undo tablespace. Dropping the old Undo tablespace give message: ORA-01548: active rollback segment Or Undo segment shows status as needs recovery The Solution The issue could happen if the datafile on which the undo segments reside is offline and the […]
How to Switch to a New Undo Tablespace in Oracle Database
This post explains the steps to switch to a new Undo tablespace. 1. Check your current default Undo tablespace: SQL> show parameter undo_tablespace 2. Determine the size of the datafile(s) for your current undo tablespace: sql> select tablespace_name, file_id, file_name,round (bytes / (1024 * 1024), 0) total_space from dba_data_files where tablespace_name=[tablespace_name from the above output]; […]
When to Use Startup/Shutdown Database and Alter Database Command in Oracle 12c
Before 12c there are only few commands available for startup and shutdown but if we follow that we may end up starting and stopping the PDBs and CDB as well. shutdown normal shutdown immediate shutdown abort startup startup nomount startup mount If we use one of these traditional shutdown methods at the container database (CDB) […]
How to Startup/Shutdown PDB’s in Oracle Database 12c
Traditional startup/shutdown methods prior to 12c Traditional startup/shutdown command prior to 12c as as shown below. Shutdown Command SHUTDOWN NORMAL SHUTDOWN IMMEDIATE SHUTDOWN ABORT Startup Command STARTUP STARTUP NOMOUNT STARTUP MOUNT What happen when we execute shutdown immediate at CDB? If we use one of these traditional shutdown methods at the container database (CDB) layer, […]
How to Remove/ Disable Bash shell Command History on Linux
This post will help you to remove/ disable Bash shell commands history on Linux. 1. Disable history for a current shell. # set +o history 2. Clean command history. # history -c 3. Permanently disable bash history. # echo ‘set +o history’ >> ~/.bashrc Next time when user login to the shell it will not […]
Understanding Oracle Database Recyclebin Features and How to Disable it
About Recyclebin In order to have FLASHBACK DROP functionality a recyclebin is provided to every oracle user. SQL> desc recyclebin Name Null? Type —————————————– ——– ———— OBJECT_NAME NOT NULL VARCHAR2(30) ORIGINAL_NAME VARCHAR2(32) OPERATION VARCHAR2(9) TYPE VARCHAR2(25) TS_NAME VARCHAR2(30) CREATETIME VARCHAR2(19) DROPTIME VARCHAR2(19) DROPSCN NUMBER PARTITION_NAME VARCHAR2(32) CAN_UNDROP VARCHAR2(3) CAN_PURGE VARCHAR2(3) RELATED NOT NULL NUMBER BASE_OBJECT […]