Wednesday, November 25, 2015

Oracle Listener Block IPs

Reference: http://www.dba-oracle.com/t_blocking_listener_ip_addresses.htm

$ cat /usr2/app/oracle/product/11.2.0.3/network/admin/sqlnet.ora

#
NAMES.DIRECTORY_PATH= (LDAP, TNSNAMES, ONAMES, HOSTNAME)

tcp.validnode_checking = yes
tcp.invited_nodes = (localhost,streaming)

Monday, November 16, 2015

Recover Oracle Database from Cold backup and new archivelogs

Recover Oracle Database from Cold backup and new archivelogs

Condition: all the new archivelog since last cold backup must be in place, otherwise, it will fail.

Copy cold Backup and layout them as product environment
Replace controlfiles with new ones
if archive logs are in new place, you can catalog them like below:
CATALOG START WITH '/path/to/archivelogs';

SQL> startup mount
ORACLE instance started.

Total System Global Area 4009738240 bytes
Fixed Size                  2165512 bytes
Variable Size            1476400376 bytes
Database Buffers         2483027968 bytes
Redo Buffers               48144384 bytes
Database mounted.

RMAN> run {
  set until time "to_date('2015-11-08:00:00:00', 'yyyy-mm-dd:hh24:mi:ss')";
  recover database;
  }

if it RMAN backup, you restore database first, then recover database like below:

RMAN> run {
  set until time "to_date('2015-11-08:00:00:00', 'yyyy-mm-dd:hh24:mi:ss')";
  restore database;
  recover database;
  }

Tuesday, November 10, 2015

Thursday, November 5, 2015

How to mount Windows Drive on Linux

Reference: https://access.redhat.com/solutions/448263
mount -t cifs -o username=administrator,password=<password> //servername/<your windows share> /mnt

mount -t cifs -o username=administrator,password=<password> //servername/c$ /mnt