Saturday, May 30, 2015

How to set up DNS for scan ip's

[root@vm32 ~]# nslookup abc-scan
;; connection timed out; no servers could be reached



1. check dnsmasq installed or not
[root@vm32 ~]# rpm -qa|grep -i dnsmasq
dnsmasq-2.48-4.el6.x86_64

2. create new file /etc/racdns and add below entry for  dnsmasq

[root@vm32 ~]# cat /etc/racdns
192.168.0.37   abc-scan.domain.com        abc-scan
192.168.0.38   abc-scan.domain.com        abc-scan
192.168.0.39   abc-scan.domain.com        abc-scan


cat /etc/dnsmasq.conf | grep addn-hosts
addn-hosts=/etc/racdns


3. Start dnsmasq

service dnsmasq start
chkconfig dnsmasq on


4.

# Generated by NetworkManager
search domain.com


# No nameservers found; try putting DNS servers into your
# ifcfg files in /etc/sysconfig/network-scripts like so:
#
# DNS1=xxx.xxx.xxx.xxx
# DNS2=xxx.xxx.xxx.xxx
# DOMAIN=lab.foo.com bar.foo.com
nameserver 127.0.0.1
nameserver 192.168.1.1


5.chattr +i /etc/resolv.conf

Verify:

[root@vm32 ~]# nslookup abc-scan
Server:         127.0.0.1
Address:        127.0.0.1#53

Name:   abc-scan.domain.com
Address: 192.168.0.39
Name:   abc-scan.domain.com
Address: 192.168.0.37
Name:   abc-scan.domain.com
Address: 192.168.0.38
Name:   abc-scan.domain.com
Address: 192.168.0.39
Name:   abc-scan.domain.com
Address: 192.168.0.38
Name:   abc-scan.domain.com
Address: 192.168.0.37

How to recover corrupted OCR & Voting Disk

As root user
crsctl stop crs -f => all nodes
crsctl start crs -excl -nocrs => from one node
format OCR & Voting disk
dd if=/dev/zero of=/dev/raw/raw1 count=10004 bs=1024

As grid user

sqlplus "/as sysasm"

create diskgroup ocr_vote external redundancy disk '/dev/raw/raw1' attribute 'COMPATIBLE.ASM' = '11.2';

root user
Restore OCR from the backup

$GRID_HOME/bin/ocrconfig -restore /u01/app/11.2.0.4/cdata/abc-scan/backup00.ocr

Recreate the voting Disk

crsctl replace votedisk +ocr_vote


root user

crsctl stop crs -f
crsctl start crs

Manually Configure Grid Infrastructure on standalone server

Error:

SQL> startup
ORA-01078: failure in processing system parameters
ORA-29701: unable to connect to Cluster Synchronization Service

Solution:

root@vm34:/u01/app/grid/crs/install =>perl roothas.pl
Using configuration parameter file: ./crsconfig_params
Creating trace directory
User ignored Prerequisites during installation
LOCAL ADD MODE
Creating OCR keys for user 'oracle', privgrp 'oinstall'..
Operation successful.
LOCAL ONLY MODE
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'system'..
Operation successful.
CRS-4664: Node vm34 successfully pinned.
Adding Clusterware entries to inittab
vm34 2015/05/25 01:30:30 /u01/app/grid/cdata/vm34/backup_20150525_013030.olr
Successfully configured Oracle Grid Infrastructure for a Standalone Server


[oracle@vm34]:../bin>crsctl start resource ora.cssd
CRS-2672: Attempting to start 'ora.cssd' on 'vm34'
CRS-2672: Attempting to start 'ora.diskmon' on 'vm34'
CRS-2676: Start of 'ora.diskmon' on 'vm34' succeeded
CRS-2676: Start of 'ora.cssd' on 'vm34' succeeded


Now we can start the asm instance
sqlplus "/as sysasm"
startup

Monday, May 25, 2015

DDL : initial_setup: :ORA-01031: insufficient privileges while running ddl_setup.sql

Error:

DDL : Creating DDL sequence: :ORA-01031: insufficient privileges
DDL : initial_setup: :ORA-01031: insufficient privileges
DDL : STARTING DDL REPLICATION SETUP
DDL : Instantiating new DDL replication package
DDL : Initial setup starting
DDL : Creating DDL sequence: :ORA-01031: insufficient privileges
DDL : initial_setup: :ORA-01031: insufficient privileges
DDL : STARTING DDL REPLICATION SETUP
DDL : Instantiating new DDL replication package
DDL : Initial setup starting
DDL : Creating DDL sequence: :ORA-01031: insufficient privileges
DDL : initial_setup: :ORA-01031: insufficient privileges
DDL : STARTING DDL REPLICATION SETUP
DDL : Instantiating new DDL replication package
DDL : Initial setup starting
DDL : Creating DDL sequence: :ORA-01031: insufficient privileges
DDL : initial_setup: :ORA-01031: insufficient privileges
DDL : STARTING DDL REPLICATION SETUP
DDL : Instantiating new DDL replication package



Solution:

1. Create new table space for Golden Gate schema.
2.Golden Gate schema should have below privilleges

grant connect, resource to ggs_owner;
grant select any dictionary, select any table to ggs_owner;
grant create table to ggs_owner;
grant flashback any table to ggs_owner;
grant execute on dbms_flashback to ggs_owner;
grant execute on utl_file to ggs_owner;
grant create any table to ggs_owner;
grant insert any table to ggs_owner;
grant update any table to ggs_owner;
grant delete any table to ggs_owner;
grant drop any table to ggs_owner;
grant create any table to ggs_owner;
grant create any view to ggs_owner;
grant create any procedure to ggs_owner;
grant create any sequence to ggs_owner;
grant create any index to ggs_owner;
grant create any trigger to ggs_owner;
grant create any view to ggs_owner;