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.

Saturday, February 24, 2007

Listener Status Oracle 10g

I just ran a status command on a Listener, and this was the output.

Service "+ASM" has 1 instance(s).
Instance "+ASM1", status BLOCKED, has 1 handler(s) for this service...
Service "+ASM_XPT" has 1 instance(s).
Instance "+ASM1", status BLOCKED, has 1 handler(s) for this service...
Service "RACDB" has 2 instance(s).
Instance "RACDB1", status READY, has 3 handler(s) for this service...
Instance "RACDB2", status READY, has 3 handler(s) for this service...
Service "RACDBXDB" has 2 instance(s).
Instance "RACDB1", status READY, has 1 handler(s) for this service...
Instance "RACDB2", status READY, has 1 handler(s) for this service...
Service "RACDB_XPT" has 2 instance(s).
Instance "RACDB1", status READY, has 3 handler(s) for this service...
Instance "RACDB2", status READY, has 3 handler(s) for this service...

What does BLOCKED mean? I can connect to the DB just fine.

These entries refer to ASM instance, not to the database instances. Obviously we use dynamic listener registration (no static SID entries in listener.ora). Unlike a database instance an ASM instance cannot be OPENED, it is in MOUNT status and because it cannot accept connections, the instance has status BLOCKED (while the regular and open database instances have status READY).
In conclusion, Oracle 10g now we have 2 instances, one is database instance like old one, (8i , 9i) and the new one is +ASM instance.... ASM stands for automatic storage management.......... so this might be the reason..........but i am not so sure about this........

Friday, February 9, 2007

SYSAUX

Prior to Oracle9i Database, if the DEFAULT TABLESPACE was not specified when the user was created, it would default to the SYSTEM tablespace. If the user did not specify a tablespace explicitly while creating a segment, it was created in SYSTEM—provided the user had quota there, either explicitly granted or through the system privilege UNLIMITED TABLESPACE. To solve this problem we may create default tablespace in oracle 9i.

ALTER DATABASE DEFAULT TABLESPACE ;

We can verify default tablespace for a database using following command:

SELECT PROPERTY_VALUE FROM DATABASE_PROPERTIES
WHERE PROPERTY_NAME = 'DEFAULT_PERMANENT_TABLESPACE';


Several schemas such as the intelligent agent user DBSNMP, data mining user ODM are not directly related to user operations, but are important to database integrity nonetheless. Some of these schemas used to have SYSTEM as their default tablespace.
Oracle Database 10g introduces a new tablespace called SYSAUX that holds the objects of these schemas. This tablespace is created automatically during database creation and is locally managed. The only change allowed is the name of the datafile.This approach supports recovery when the corruption of SYSTEM requires a full database recovery. Objects in SYSAUX can be recovered as any normal user object while the database itself remains operational.

Friday, January 12, 2007

New features in Oracle 10g

The blog will cover all the new features added to oracle 10g. After going through these topics you will definitely say "Its really a amazing database".
I will discuss new features like(I will be regularly updating the topics, so plz keep viewing):

* What is new Oracle 10g Configuration Assistant
* SYSAUX tablespace
* Automatic Storage Management
* Statistics Collection

Flushing the Buffer Cache
Database Resource Manager New Features
Scheduler Changes
User-Configurable Default Tablespaces
Tablespace Groups and Multiple Default Temporary Tablespaces
Renaming Tablespaces
Dropping Databases
Larger LOBs
Automatic Undo Retention
Shrinking and Compacting Segments Online
Using New Online Redefinition Features
* Performance Tuning
Improvements to the Wait Interface
The Database Common Management Infrastructure
Automatic SGA Tuning
Self-Tuning Checkpointing
New Oracle Database 10g Trace Functionality
Sorted Hash Clusters
Shared Server Changes
* Security
Virtual Private Database New Features
Oracle Database 10g Auditing New Features
Directory (LDAP) Based New Features
* Availability and Recoverability
General Database Recovery Improvements
RMAN Improvements
New Flashback Features
New Transaction Recovery Monitoring Features
New Data Guard Features
* Business Intelligence
Oracle Data Pump
Bigfile Tablespaces
Cross-Platform Transportable Tablespaces
Enhanced Merge Functionality
Enhanced External Table Functionality
New Materialized View, Query Rewrite, and Summary Management DDL Features
Partitioning New Features
* Application Development
Bulk Bind Improvements
SQL and PL/SQL Regular Expressions
Case- and Accent-Insensitive Searches
User-Specified Quote Character Assignment
PL/SQL New Packages of Note
Oracle Collections
The PL/SQL Compiler
Improvements to the dbms_profiler Procedure
Table Function Enhancements
* Other Database New Features
Calling Remote Stored Procedures
Workspace Manager Enhancements
Streams Enhancements
SQL*Plus Enhancements
SQL Language New Features
Using Aggregates in the returning Clause
Grouped Table Outer Joins
Removal of Aggregate and SQL Statement Length Limitations
Calling Remote Stored Functions
* Oracle Enterprise Manager 10g
Introducing the Redesigned OEM Architecture
Changes to OEM Installation
Key New Features in OEM
Introducing the Revamped OEM Home Page
Key New Management Features
New OEM Administration and Maintenance Features
Introducing Oracle EM2Go
Other New OEM Related Features