Pages

Monday 4 August 2014

What to do if some archivelog is missing


RMAN Backup error: What to do if some archivelog is missing or datafile is offline during RMAN backup?


RMAN> crosscheck archivelog all;
and then follwoing to delete expired archivelog.
RMAN> delete expired archive log;
Also refer to the skip inaccessible clause of the backup command. for example...
RMAN> backup archivelog all skip inaccessible delete input;
RMAN> change archivelog all validate;

because without it "skip inaccessible" will be needed any time You will start backup of archs.
Moreover, it can be done with following way also:
for the missing archive logs... u can do the following
connect target /
connect catalog rman/pwd@rmancatalog
run {
change archivelog from logseq = xxx until logseq =
yyy unavailable;
}
xxx and yyy are the logseg numbers, the one's you are missing.
RMAN> RUN
{
SET MAXCORRUPT FOR DATAFILE 1 TO 10;
BACKUP DATABASE
SKIP INACCESSIBLE
SKIP READONLY
SKIP OFFLINE;
}
To back up the database while skipping offline and read-only tablespaces, you can run the following command:
RMAN> BACKUP DATABASE
SKIP READONLY
SKIP OFFLINE;
Above discussion include other file types also if they are not available during backup and backup is generating exception.

Friday 4 July 2014

Issue while trying to tnsping or connecting to database:


TNS-12543: TNS:destination host unreachable

There was a request from the client to create a new empty database for testing. We just created the database and provided
the users with the user details. He revert back with a connection error and we tried to connect tnsping the database from a different server, There was
a host unreachable error. It was strange that I can able to ping the host and also login using ssh. Checked if the port was not opened and found its opened.

The problem is with the firewall was enabled. So just disabled the firewall with the below command:


Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = ********)(PORT = 1522)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = SAM)))
TNS-12543: TNS:destination host unreachable 


Turn off the firewall:
---------------------
chkconfig iptables off (as a root) or
service iptables stop (as a root)


To check the firewall is running or not:
---------------------------------------
service iptables status