Jun 21 2010

Which is more efficient Incremental Backups using RMAN or Incremental Export?

RMAN

Jun 18 2010

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

Jun 17 2010

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

Jun 16 2010

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

Jun 15 2010

You want to retain only last 3 backups of datafiles. How do you go for it in RMAN?

CONFIGURE RETENTION POLICY TO REDUNDANCY 3

Jun 14 2010

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.

Jun 11 2010

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 the disk sizes:

#!/bin/sh

DISC=$1
PARTITION=`df -h |grep $DISC |awk ‘{print $1}’`
SIZE=`df -h|grep $DISC|awk ‘{print $2}’`
USED=`df -h|grep $DISC|awk ‘{print $3}’`
FREE=`df -h|grep $DISC|awk ‘{print $4}’`

echo “Partition: $PARTITION”
echo “Total size: $SIZE”
echo “Used space: $USED”
echo “Free space: $FREE”

Simply copy & paste this script into for example into a file named info.sh(create it with VI or JOE or even PICO). Next, you’ll need to make it executable. To do this, use the following command:

# chmod +x info.sh

Now, to execute the file, you need to run it, and pass it the correct argument. For our example, we are going to use hda3. So, to execute the file, type in the command as below….

# ./info.sh hda3

Jun 04 2010

How do you see how many memory segments are acquired by Oracle Instances?

Check on x$bh it show you what objects are in the buffer.

Try this query:

SELECT /*+ ordered use_hash(o) use_hash(bh) */
bp.NAME BUFFER_POOL u.NAME owner so.object_type segment_type
o.NAME segment_name COUNT (*) cached_blocks
FROM v$buffer_pool bp
SYS.seg$ s
SYS.sys_objects so
SYS.obj$ o
SYS.user$ u
x$bh bh
WHERE bh.obj o.dataobj#
AND o.obj# so.object_id
AND o.type# so.object_type_id
AND o.owner# u.user#
AND so.segment_type_id s.type#
AND so.ts_number s.ts#
AND so.header_file s.file#
AND so.header_block s.block#
AND DECODE (s.cachehint 0 3 s.cachehint) bp.ID
GROUP BY u.NAME so.object_type o.NAME bp.NAME
ORDER BY bp.NAME cached_blocks DESC;

Jun 02 2010

What are the views available to see the information about export.

DBA_DATAPUMP_JOBS
This view will show the active Data Pump jobs, their state, degree of parallelism, and the number of sessions attached.

DBA_DATAPUMP_SESSIONS
This view gives the SADDR that assist in determining why a Data Pump session may be having problems. Join to the V$SESSION view for further information.

V$SESSION_LONGOPS
This view helps determine how well a Data Pump export is doing. Basically gives you a progress indicator through the MESSAGE column.

Jun 01 2010

How to export a limited number of rows from a table

By using DBMS_DATAPUMP.metadata_filter, DBMS_DATAPUMP.data_filter we can export a limited number of rows from a table.

Alibi3col theme by Themocracy