Category Archives: Oracle DBA Interview Questions
Explain the relationship among database, tablespace, and datafile.
The database is logically divided into one or more tablespaces. For each tablespace we explicitly create one or more datafiles.
How to recover if we delete a data file at OS level no backup for that?
bring the database to the mount state sql>alter database create datafile ; sql>recover datafile ; sql>alter database open;
How do you see how many instances are running?
In Linux, Unix the command: ps -ef|grep pmon In Windows: services.msc
You lost some datafiles and you don’t have any full backup and the database was running in NOARCHIVELOG mode. What you can do now?
You have lost datafiles and you dont have backup and database is not running in archive log mode…… So we need to recreate the datafiles which will be empty….. you can not recover, becuase you dont have backup and database not in archive log mode
You loss one datafile and DB is running in ARCHIVELOG mode. You have full database backup of 1 week old and partial backup of this datafile which is just 1 day old. From which backup should you restore this file?
Restore it from Full backup and recover that data file using archive log files which are after Full backup to till date
The current logfile gets damaged. What you can do now?
Once current redolog file is damaged, instance is aborted and it needs recovery upto undamaged part. Only undamaged part can be recovered. Here DBA must apply time based recovery, means it can be a point in time or specified by SCN. It leads to incomplete recovery
You want to retain only last 3 backups of datafiles. How do you go for it in RMAN?
CONFIGURE RETENTION POLICY TO REDUNDANCY 3
Can you Redefine a table Online?
Yes. We can perform online table redefinition with the Enterprise Manager Reorganize Objects wizard or with the DBMS_REDEFINITION package.
Command to check how much hard disk space is free in Linux?
# df -h The output will be Filesystem Size Used Avail Use% Mounted on /dev/hda3 75G 17G 54G 24% / /dev/hda1 99M 17M 78M 18% /boot none 505M 0 505M 0% /dev/shm /tmp 243M 7.2M 223M 4% /tmp Here the size is represented by megabytes and gigabytes. Now let’s create an executable file to show [...]
I have attended Ask Tom Live seminar about 11g Rel2 at Tokyo, Japan. Do you believe it I have got an opportunity to take a snap with him. I am very happy to share with you.