Wednesday, March 7, 2007

NTFS Partitions versus Raw Partitions

N.B.: Now Oracle fail-safe is free of cost whereas Oracle parellel server configuration needs licence

MSCS and Oracle Failsafe require that shared partitions be formatted using the NTFS file system.
Accessing shared drives requires that both nodes use the same drive letter for each shared device.

Parallel Server, on the other hand, requires that all shared devices to be used in the cluster
remain Raw(unformatted). This means that you can place only one file on a partition,
so you will likely have many more partitions in an OPS installation. You should NOT
assign drive letters to the partitions. If NT assigns drive letters, you will likely
want to unassign them. To access the RAW partitions, you must use symbolic links,
rather than drive letters. To create symbolic links, use the 'Setlinks' utility provided by Oracle.
Symbolic links find the file by using the Device Number, followed by the Partition number,
as seen in Disk Administrator.

For example: \Device\Harddisk2\Partition1 would be the first partition on the 3rd Hard Disk
(Start counting from 0) as seen in Disk Administrator. If you place your control file on this
partition, you will want to use Setlinks to define a symbolic link which acts as a shortcut to it.
Create a .tbl file with the partitions and link names you intend to use. Below are a few lines
from a sample file called OPSPRIMARY.TBL:

OPS_CTL01 \Device\Harddisk2\Partition1
OPS_log1t1 \Device\Harddisk2\Partition2
OPS_sys01 \Device\Harddisk2\Partition3
OPS_idx01 \Device\Harddisk2\Partition4

Run the .TBL file through Setlinks from a DOS Command prompt:

SETLINKS /F:OPSPRIMARY.TBL

Symbolic Links are accessed using the convention \\.\. Above, we created a
symbolic link for the control file on the first partition of the 3rd Device called OPS_CTL01.
You would reference the file in this manner:

CONTROL_FILES = \\.\OPS_CTL01

Again, keep in mind that no drive letters are used.

See the Oracle Parallel Server Getting Started Guide for Windows NT for more details on
the Setlinks utility.

HOW TO MOVE YOUR DATABASE FILES IN AN ORACLE FAILSAFE ENVIRONMENT


You want to move a datafile for some reasons, but your database is a
Failsafe one.

If the new location is on the same shared disk as other database files,
then you can use method 1 or method 2.

BUT if you want to move a datafile on another disk, that is still not used by
other database files, in this case the structure of your Oracle failsafe group
is changed and you must use method 2.

In this case, you add a new resource to your Oracle Failsafe group.


First Method:

You can only use this method when the new location of your datafile does not
affect the organization of your failover group.

For example, you have just altered your database, adding a datafile within a
tablespace, but, by mistake, you put it on the local disc of one of the nodes.
Your failsafe group is "damaged" because it cannot operate a correct failover.

in case of doubts or problems, use Method 2.


1) In the GUI Failsafe Manager, simply take your database offline:

Right click on your database name, and choose Offline Immediate.

Thus, your database will be shutdown properly and your oracle services
will be stopped .

This step is essential for a failsafe database :

If you try to shutdown a failsafe database without making it offline via
failsafe manager, your database will restart automatically .


On the node,owner of the shared disk resource (where database files reside):

2) If needed, copy the datafile to its new location.

3) Start your OracleService using control panel (where is your
database SID).

4) At MSDOS prompt, type :

C:> SET ORACLE_SID=

5) Launch Server Manager :

C:> SVRMGR30 (if your database version is v8.0.5, SVRMGRL if the
database is 8i)

SVRMGR > Connect Internal/password (NOTE: if you are using 9i you must
connect using: due to the
desupport of the internal user with 9i)

SVRMGR > STARTUP MOUNT PFILE=

SVRMGR > ALTER DATABASE RENAME FILE ' TO
<'new location and name'>;


Verify the result of your alter database command:

SVRMGR > SELECT name FROM V$DATAFILE;

SVRMGR > ALTER DATABASE OPEN;

You can now shutdown your database and exit Server Manager.

6) The last step is to make your database available throught Failsafe:
With Failsafe manager, right click on your database name and choose
Online.

Your database is now started and available.


Second Method:

You want to move a database file from a disk to another that is not part of your
Oracle failsafe group.

In this case, the structure of your failover group is changed because you add a
new resource, a disk resource to your failover group.

Be aware of the new location of the datafile:

This disk cannot be part of another failover Group, not only an Oracle
failsafe group but also a Microsoft cluster group.

You can verify that using Microsoft cluster manager.

1) Remove your database from your Oracle Failsafe group.

Using Gui Failsafe manager, right click on your database name and select
Remove from group.

This operation shutdown your database, modify virtual server configuration
for your database to regenerate a standalone database.

2) On the node owner of the shared disks resource (where reside your datafiles),
you can move your datafile on another disk.

See step 4) to 5) above to change the location of your database file.

3) Your database is a standalone one and you must add it to your Oracle
Failsafe group to apply failover policy on it.

a) In the troubleshooting menu, choose verify standalone database.

b) In the GUI Failsafe Manager, Drag and drop your database name, which
appears under Standalone Databases folder, to your Failsafe Group.

Or, select your database name in the standalone databases folder.
Click on the database menu, to choose Add to group command.

You will give the same informations you gave the first time you added
this database to the failsafe group: Dbname, Location of your init.ora,
failover policy ...

Your database is now part of Oracle Failsafe group with a new shared disk
resource.