Archive

Archive for the ‘Oracle in general’ Category

How to corrupt a oracle block within a datafile

December 21st, 2010 No comments

For corrupting a block dd can be used. Just adjust the “ibs” argument to match your database block size and adjust “count” to specify the amount of blocks to be corrupted. “Seek” specifies how many blocks are skipped (counted from the beginning of the file) before writing the corrupted data.

dd ibs=8192 seek=100 count=110 if=/dev/zero of=test01.dbf conv=notrunc

Caution: This command WILL corrupt your data file. Use it ONLY on test systems and with a valid backup!


			
Categories: Oracle in general Tags:

I am now certified as MCITP MS DBA for SQL Server 2008

December 12th, 2010 No comments

Altough not oracle related i successfully completed my certification as an MS SQL Server DBA. In most companies MS SQL is used for smaller databases in addition to oracle. So from my point of view it is a plus.

I am allowed to wear the title mentioned above from now on. But i guess i wont print it on my business cards…. Way too long :-)

Categories: Oracle in general Tags:

Do you know “chopt” ?

November 6th, 2010 No comments

Starting with Oracle 11g Release 2 there is a new tool called “chopt” which lets you enable or disable database features such as partitioning, olap and so on without the need to re-install the bianries.

You can read about the utility here.

How to restore an rman backup without any existing control files

November 3rd, 2010 2 comments

This week a came across the following very interesting scenario:

The customer made an RMAN online backup and saved it to an NFS location. Controlfile autobackup was on. During backup the backupset was written to that NFS location. The control file however was written to the controlfile autobackup location (i.e. a different location).

After that the customer destroyed all disk groups and re-installed the database servers.

Afterwards he tried to restore the database which failed because there was no controlfile in the backups at all. In order to make it worse the customer had no log files from the RMAN backup session, no DBID and no trace files whatever – including the alert.log. This leaved us with the following situation:

  • no autobackup anywhere
  • no older controlfile available
  • no snapshot controlfile available
  • no redo log available
  • no backup logfiles
  • no “backup controlfile to trace” information
  • no DBID
  • no alert.log

Under normal circumstances restoring the database from an rman backup without having any control file is impossible. In this article i will show you an approach you might use to restore the datafile anyway.

Read more…

Categories: Oracle in general Tags:

Less known helpers: Linux sg3_utils

October 21st, 2010 No comments

The linux sg3_utils are small tools intended for working with FC / SCSI / SATA / SAS hard driv.es. They can be used to send SCSI commands (for instance INQUIRY, LOG SENSE, …) to these devices.

sg3_utils can be found on freshmeat.

An in-depth description can be found here.

Categories: Oracle in general Tags:

ASM witth Oracle 11g Release 2 – Best Practises revisited

October 20th, 2010 2 comments

Starting with 11g Release 2 it is possible to store voting disks and OCR in ASM. But how does this affect ASM best practises?

Martin Decker found the updated Oracle document about this issue.

.

Categories: Oracle in general Tags:

Using Large Pages for Oracle on Windows 64-bit (ORA_LPENABLE)

October 19th, 2010 No comments

For using Large Pages on Windows some settings are needed:

1.  Start > Settings > Control Panel
2.  click Administrative Tools.
3.  click Local Security Policy.
4.  Expand Local Policies and select User Rights Assignment.
5.  Select Lock pages in memory and choose Action > Security...
6.  Click Add...
7.  Select the username that was used to install Oracle and the ora_dba group from the Name list.
8.  Click Add.
9.  Close Select Users or Groups dialog by pressing OK
10. Click OK to close the Local Security Policy Setting dialog.
11. Open Regedit
12. Navigate to: HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_OraDb10g_home1
13. Create a registry key (REG_SZ) named ORA_LPENABLE  and set the value to 1
14. Reboot the server.
Categories: Oracle in general Tags:

How to determine FC HBA WWN on Oracle Enterprise Linux 5

October 18th, 2010 No comments

To determine the FC HBA WWN on Oracle Enterprise Linux (OEL) use:

cat /sys/class/fc_host/host<number>/port_name

For example:

[root@host sys]# cat /sys/class/fc_host/host6/port_name
0x2100001b329308df
[root@host sys]# cat /sys/class/fc_host/host5/port_name
0x2100001b329388d9
Categories: Oracle in general Tags:

Less know features: Alternate Archive Log Destination

October 5th, 2010 No comments

Oracle offers the ability to specify so called ‘alternative’ archive log destinations in case the primary archive log destination gets full. You can enable this feature by setting:

log_archive_dest_1='location=+FRA REOPEN=0 MANDATORY alternate=log_archive_dest_2'
log_archive_dest_2='location=/some_path MANDATORY'
log_archive_dest_state_1=ENABLE
log_archive_dest_state_2=ALTERNATE

A configuration often used involved using the flash recovery area as primary destination and a nfs destination as alternative archive log destination.

Categories: Oracle in general Tags:

Oracle 11.2.0.2.0 released

October 4th, 2010 No comments

Few weeks ago Oracle released the first patchset for 11g Release 2 database. This is a summaization of other blog posts regarding upgrading or installating 11.2.0.2.0.

At the moment (4th November 2011) 11.2.0.2.0 is available for the following platforms:

  • Linux 32-bit
  • Linux 64-bit
  • AIX 5 64-bit
  • Solaris SPARC 64-bit
  • Solaris Intel 64-bit

 

Upgrading

Upgrading Grid Infrastructure to 11.2.0.2.0 on RHEL 4

Upgrading RAC database to 11.2.0.2.0

Problems

Upgrade to 11.2.0.2.0 failed due to errors in HA IP stack

Categories: Oracle in general Tags: