Posts

Showing posts from March 15, 2020

Oracle database interview questions

Explain Logical structure of the database. Explain Physical structure of the database. What is difference between hot and cold backup. what are your day to day activity. what steps and checks will you take if application team informs you that they are getting slowness? Explain what do you understand by blocking and locking. what can cause the archive log gap issue in standby database and how do you intend to solve it? what are the different parameters required for oracle standby database? what is the enhanced feature in 12c? what is startup sequence for oracle rac? how to create grid database? how to restore database? explain in details. what are the deamon processes in rac? overview of cluster configuration. how to check long running queries?  how to take archive log backup? what is difference between L0 backup and database full backup? explain backup policy in RMAN. why OCR and voting disks are required? How to convert physical standby databa

Calculate oracle database size.

select "Reserved_Space(GB)", "Reserved_Space(GB)" - "Free_Space(GB)" "Used_Space(GB)","Free_Space(GB)" from( select (select sum(bytes/(1024*1024*1024)) from dba_data_files) "Reserved_Space(GB)", (select sum(bytes/(1024*1024*1024)) from dba_free_space) "Free_Space(GB)" from dual ); Note: Used space is the actual database size. Thanks & Regards Nikhil Kumar.

Creation of ACFS Mount points

Create ACFS mount points: 1} ASMCMD [+] > volcreate -G +DG_SOFT -s 2G 2}volinfo -G +DG_SOFT {volume_name} check: SQL> select volume_name,volume_device from v$asm_volume; 3}/sbin/mkfs -t /oracleDG/DG/sapbackup {volume_device} 4} /sbin/acfsutil registry -a  {volume_device} /oracleDG/DG/sapbackup 5}/bin/mount -t acfs {volume_device} /acfsmounts/acfs1 6}chown -R oracle:dba /oracleDG/DG/sapbackup

Restore spfile from rman backup

SPFILE RECOVERY: Take backup of spfile via rman rman target / backup spfile; Now in order to restore the same: Create a pfile with initSID.ora name and enter DB_NAME parameter in it. vi $ORACLE_HOME/dbs/initSID.ora DB_NAME=TEST ·          Start DB in nomount with force and set DBID ( It is necessary to know the DBID ). post that you can restrore spfile and then restore your controlfile and then you will be required to start your database with reset log option.              rman target /      startup force nomount;      set dbid 2943784586;      restore spfile from '/backup/backup_of_spfile.bkp';      restore controlfile from '/backup/latest_controlfile_backup.bkp';      alter database mount;      alter database open resetlogs;     Thanks & Regards     Nikhil Kumar.

ORACLE DATABASE Physical refresh from PROD to NON PROD || Restoring database from one system to another

Source db = ABC Dest db     = DEF Considering the following: 1. the OS version and db version of both the db is same. 2. the source db is running in archivelog mode. 3. Backup mount points on source is /backup and on destination is /rman_backup Taking RMAN backup on source database  Check whether the source DB is running in archivelog mode or not. run the below command su – oracle; sqlplus / as sysdba archive log list In case the source DB is running in archivelog mode, then do the below steps to take the online backup of source DB using rman: Copy the below contents into a file /tmp/archivelogdbbkp.rman RUN { CROSSCHECK BACKUPSET; CROSSCHECK BACKUP; BACKUP CURRENT CONTROLFILE FORMAT '/backup/CONTROLFILE_BACKUP_%d_%T_%t_%s_%p.rman'; CROSSCHECK COPY; CROSSCHECK ARCHIVELOG ALL; CROSSCHECK BACKUP; DELETE NOPROMPT EXPIRED BACKUPSET; DELETE NOPROMPT EXPIRED BACKUP; DELETE NOPROMPT EXPIRED COPY; DELETE NOPROMPT EXPIR