Yasar MORAN | Oracle Blog

11.2.0.1 GRID INFRASTRUCTURE DEINSTALLATION STEPS FOR RAC ON SOLARIS 10 CONTAINER

Posted by yasarmoran on September 8, 2011

This post is includes real world grid infrastructure deinstallation example.

platform summary:

OS:  Oracle Solaris 10 SPARC container

Grid version: 11gR2(11.2.0.1) Grid infrastructure cluster(2-node RAC).

11.2.0.1 GRID INFRASTRUCTURE DEINSTALLATION STEPS FOR RAC ON SOLARIS 10 CONTAINER

Posted in RAC | Leave a Comment »

FLASHBACK RAC DATABASE TO GUARANTEED RESTORE POINT

Posted by yasarmoran on March 20, 2011

Test paltform information:

OS:    HP-UX IA64

DB version:10gR2 2-node RAC database.

DB Name: RACTEST

node1 name :rcnode1

node2 name:rcnode2

I want to share my experiances with you. you can find the workshop’s file below.

FLASHBACK RAC DATABASE TO GUARANTEED RESTORE POINT

Posted in RAC | Tagged: | Leave a Comment »

ASM Installation and ASM Instance Creation

Posted by yasarmoran on June 16, 2010

This post,  includes ASM installation and ASM instance creation steps, and installation video.

I will share creation stepss also.

(Testing OS:OEL 5,1)

(This post is testing purpose only)

Posted in RAC | Tagged: , , , | Leave a Comment »

Adding New Disk to OEL and Using This Disk to Extend Logical Volume

Posted by yasarmoran on June 15, 2010

you can review the .pdf file.

Adding New Disk to OEL and Using This Disk to Extend Logical Volume

Posted in Linux | Tagged: , , , , , , , , , , , , , | Leave a Comment »

Adding New Disk to Oracle Enterprise Linux Server and To Make The Disk Ready For Use.

Posted by yasarmoran on June 14, 2010

you can review the link.

Adding New Disk to Oracle Enterprise Linux Server and To Make The Disk Ready For Use

Posted in Linux | Tagged: , , , , , , | Leave a Comment »

Oracle Clusterware Installation

Posted by yasarmoran on June 12, 2010

This post describes, installation of  Oracle Clusterware for 11gR1 RAC installation.

Also, I will post the pre installation task and clusterware  installation steps.

This video shows second installation attempt of clusterware. The first attempt failed due to lack of disk space.

Also I will post, “cleaning up the failed clusterware installation” in another post.

(Testing OS:OEL 5.1)

Posted in RAC | Tagged: , , , , , , , | Leave a Comment »

Configuring ssh & User equivalence on Oracle RAC Nodes

Posted by yasarmoran on June 12, 2010

This post describes how to configure ssh on all Oracle RAC Nodes from one node.

(Testing OS is Oracle Enterprise Linux 5,1)

export HOME=/home/oracle # oracle user’s home directory

  • if you have .ssh directory, previously created ssh files are deleted.

[oracle@rac1 database]$ ssh rac2 rm -rf /home/oracle/.ssh

The authenticity of host ‘rac2 (192.168.2.102)’ can’t be established.
RSA key fingerprint is 80:95:d0:51:dc:9c:92:04:a9:c9:6a:a5:22:89:a6:65.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ‘rac2,192.168.2.102′ (RSA) to the list of known hosts.
oracle@rac2′s password:
[oracle@rac1 database]$ rm -rf /home/oracle/.ssh

  • if you do not have ssh directory, The following command creates the necessary directories and files.

[oracle@rac1 database]$ ssh-keygen -t rsa  -f $HOME/.ssh/id_rsa -N ” -q
[oracle@rac1 database]$ touch $HOME/.ssh/authorized_keys
[oracle@rac1 database]$ chmod 600  $HOME/.ssh/authorized_keys
[oracle@rac1 database]$ cat $HOME/.ssh/id_rsa.pub >> $HOME/.ssh/authorized_keys
[oracle@rac1 database]$ chmod 400  $HOME/.ssh/authorized_keys
[oracle@rac1 database]$ ssh -o StrictHostKeyChecking=no -q rac1 /bin/true
[oracle@rac1 database]$ scp -o StrictHostKeyChecking=no -q -r $HOME/.ssh rac2:
oracle@rac2′s password:
[oracle@rac1 database]$ ssh -o StrictHostKeyChecking=no -q rac1 /bin/true
[oracle@rac1 database]$ ssh -o StrictHostKeyChecking=no -q rac2 /bin/true
[oracle@rac1 database]$ ssh -o StrictHostKeyChecking=no -q rac1.localdomain /bin/true
[oracle@rac1 database]$ ssh -o StrictHostKeyChecking=no -q rac2.localdomain /bin/true
[oracle@rac1 database]$ scp -q $HOME/.ssh/known_hosts rac2:$HOME/.ssh/known_hosts

  • Testing  ssh

[oracle@rac1 database]$ ssh rac2 date
Tue Jun  8 22:20:17 EEST 2010
[oracle@rac1 database]$ ssh rac2
Last login: Tue Jun  8 22:02:47 2010 from 192.168.2.2
[oracle@rac2 ~]$ ssh rac1 date
Tue Jun  8 21:55:55 EEST 2010
[oracle@rac2 ~]$ ssh rac1.localdomain date
Tue Jun  8 21:56:34 EEST 2010

  • User equivalence setting

[oracle@rac1 .ssh]$ exec /usr/bin/ssh-agent $SHELL
[oracle@rac1 .ssh]$ /usr/bin/ssh-add
Identity added: /home/oracle/.ssh/id_rsa (/home/oracle/.ssh/id_rsa)

(Note that user equivalence is established for the current session only.If you switch to a different session or log out and log in,
 you will have to run above commands again to re-establish user  equivalence.This commands running as oracle user where the oracle
 software will be installed.)

Posted in Linux, RAC | Tagged: , , , , , , , , , , | Leave a Comment »

Flashback Technology

Posted by yasarmoran on January 2, 2010

In this post i’m going to try to explain flasback Technologies.

Flashback technologies are applicable such as, Erroneous update, delete or insert transactions, Erroneous transactions affecting one table or a set of tables, DROP TABLE statements, Series of database-wide malicious transactions, Erroneous running code affecting many tables or an unknown set of tables, Drop tablespace without removing the physical datafiles. Flashback technologies cannot be used for media failure.

Flashback Table

Flashback Table can be used for quickly recover a table to a point in time in the past without restoring a backup. The time which the table can be flashed back is dependent on undo data in the system.

For using Flashback table, you must have FLASHBACK ANY TABLE system privilege or FLASHBACK object privilege on the table. Also you must have SELECT, INSERT, DELETE, and ALTER object privileges on the table. Row movement must be enabled for all tables in the Flashback list.

During an Flashback Table operation, Oracle acquires exclusive DML locks on all the tables specified in the Flashback list. When you use flashback table list, either all of the tables revert to the earlier state or none of them do. FLASHBACK TABLE TO SCN or TIMESTAMP does not preserve rowids, and FLASHBACK TABLE TO BEFORE DROP does not recover referential constraints.

Flashback table operation not revert statistics associated with table to their earlier form. Indexes on table that exist currently are reverted and reflect the state of the table at the Flashback point. If the index exists now but did not yet exist at the Flashback point, then the database updates the index to reflect the state of the table at the Flashback point. However, indexes that were dropped during the interval between the Flashback point and the current time are not restored. Oracle Database cannot restore a table to an earlier state across any DDL operations that change the structure of the table. You cannot roll back a FLASHBACK TABLE statement. Flashback table changes are propagated to physical and logical standby databases.

Flashback to SCN

Flashback SCN is used to return the table to valid SCN.

ex:

SQL> alter table deneme.deneme enable row movement;
Table altered.

SQL> select * from deneme.deneme;

AD SOYAD
——————— ——————————
b b
a a

SQL> select dbms_flashback.get_system_change_number from dual;

GET_SYSTEM_CHANGE_NUMBER
————————
2903015

SQL> insert into deneme.deneme select * from deneme.deneme;

2 rows created.

SQL> commit;

SQL> select dbms_flashback.get_system_change_number from dual;

GET_SYSTEM_CHANGE_NUMBER
————————
2903114

SQL> select * from deneme.deneme;

AD SOYAD
———————- ——————————
b b
a a
b b
a a

SQL> flashback table deneme.deneme to scn 2903015;

Flashback complete.

SQL> select * from deneme.deneme;

AD SOYAD
——————— ——————————
b b
a a

Flashback to TIMESTAMP

Flashed back table to valid time.

SQL> select * from deneme.deneme;

AD SOYAD
——————— ——————————
b b
a a

SQL> SELECT SYSTIMESTAMP from v$database;

SYSTIMESTAMP
—————————————————————————
02-JAN-10 08.23.31.625000 PM +02:00

SQL> insert into deneme.deneme select * from deneme.deneme;

2 rows created.

SQL> commit;

Commit complete.

SQL> select * from deneme.deneme;

AD SOYAD
—————————— ——————————
b b
a a
b b
a a

SQL> SELECT SYSTIMESTAMP from v$database;

SYSTIMESTAMP
—————————————————————————
02-JAN-10 08.28.40.312000 PM +02:00

SQL> FLASHBACK TABLE deneme.deneme TO TIMESTAMP (SYSTIMESTAMP – INTERVAL ’10′ minute);

Flashback complete.

SQL> select * from deneme.deneme;

AD SOYAD
—————————— ——————————
b b
a a

now flashback to another format example

SQL> FLASHBACK TABLE deneme.deneme TO TIMESTAMP TO_DATE(’02.01.10 20.28.40′,’dd.mm.yy h24:mi:ss’);

Flashback complete.

SQL> select * from deneme.deneme;

AD SOYAD
—————————— ——————————
b b
a a
b b
a a

Flashback To Restore Point
Flashed back table to user defined point.

SQL> select * from deneme.deneme;

AD SOYAD
—————————— ——————————
b b
a a

SQL> CREATE RESTORE POINT baslangic;

Restore point created.

SQL> insert into deneme.deneme select * from deneme.deneme;

2 rows created.

SQL> commit;

Commit complete.

SQL> select * from deneme.deneme;

AD SOYAD
—————————— ——————————
b b
a a
b b
a a

SQL> flashback table deneme.deneme TO RESTORE POINT baslangic;

Flashback complete.

SQL> select * from deneme.deneme;

AD SOYAD
—————————— ——————————
b b
a a

References
1- Oracle® Database SQL Reference 10g Release 2 (10.2)
2- http://www.psoug.org
3- Oracle® Database High Availability Architecture and Best Practices 10g Release 1 (10.1)
4- Note 270535.1 – Restrictions on Flashback Table Feature

Posted in Uncategorized | Leave a Comment »

How to delete old backup on Oracle 8i (with catalog)

Posted by yasarmoran on December 28, 2009

First of all, excuse me for my english.
As you know, there isn’t retention notion on Oracle 8i. So, if you want to delete old backup you have to deal. i will explain how to delete old backup on 8i. Following case tested on oracle 8i.

1- To find old backup, login catalog database using catalog owner user.
rman: catalog owner
BCK : Catalog database alias
dbid : DBID of the database which will be deleted. to find dbid you can use v$database.
completion_time: backup completion time. following code deletes backup older than 31 days.

$ sqlplus rman/rman@BCK

select ‘change backuppiece ‘||bp.bp_key||’ delete;’
from rc_backup_piece bp,rc_database db
where db.dbid=’1234567890′
and bp.db_id = db.dbid
and bp.completion_time < (sysdate-31) order by bp.COMPLETION_TIME desc;

2- to delete old backup, we must login target and catalog.

$ rman target sys/sys@TEST rcvcat rman/rman@BCK

3- Now, after allocating delete channel, we can use output of step1 .

rman> allocate channel for delete type ‘SBT_TAPE’;
rman> change backuppiece 4360762 delete;

Regards,

Posted in Uncategorized | Leave a Comment »

How to find current voting disk location, How to Backup Voting Disk

Posted by yasarmoran on September 9, 2009

Below commands tested on Oracle Enterprise Linux 5.1 – 10gR2 2-node RAC cluster.

[oracle@linux1 ~]$ crsctl query css votedisk

0. 0 /u02/oradata/ractest/CSSFile

1. 0 /u02/oradata/ractest/CSSFile_mirror1

2. 0 /u02/oradata/ractest/CSSFile_mirror2

located 3 votedisk(s).

when we should take backup voting disks:

– After RAC installation
– After adding nodes to or deleting nodes from the RAC
– After performing voting disk add or delete operations

To make a backup of the voting disk:

– I use the Linux dd command,
voting_disk_name is the name of the active voting disk.
backup_file_name is the name of the file to which you want to back up the voting disk contents.

dd if=voting_disk_name of=backup_file_name

Perform this operation on every voting disk as needed.
– If the voting disk is stored on a raw device, you can use the device name in place of voting_disk_name.

Example:
[oracle@linux1 ~]$ dd if=/u02/oradata/ractest/CSSFile of=CSSFile_bck

20000+0 records in

20000+0 records out

10240000 bytes (10 MB) copied, 1.13288 seconds, 9.0 MB/s

“the backup can be performed while the Cluster Ready Services (CRS) process is active”.

Best Regards

Referances:
Oracle® Database 2 Day + Real Application Clusters Guide 10g Release 2 (10.2) Part Number B28759-03
Oracle® Database Oracle Clusterware and Oracle Real Application Clusters Administration and Deployment Guide 10g Release 2 (10.2)

Posted in RAC | Tagged: | Comments Off

 
Follow

Get every new post delivered to your Inbox.