Wednesday, July 22, 2009

Linux DNS resolver

Not able to send mail to @jalindia.co.in due to jalindia.co.in DNS issue. they use their own dns to resolve jalindia.co.in.

they should use some other dns server to resove it.
Resolve it into our dns server uniconindia.in

============dns server 10.100.0.100============
create zone file for jalindia.co.in at dns server 10.100.0.10
make zone file entry into jalindia.co.in.zone /etc/named.conf


vi /var/named/chroot/etc/named.conf
zone "jalindia.co.in" IN {
type master;
file "jalindia.co.in.zone";
allow-update { none; };
};



#cd /var/named/chroot/var/named/
#copy uniconstocks.com.zone jalindia.co.in.zone

#vi jalindia.co.in.zone

jalindia.co.in. 86400 IN MX 1 jal-gate-svr1.jalindia.co.in.
jalindia.co.in. 86400 IN MX 2 jal-gate-svr2.jalindia.co.in.


jalindia.co.in. 86400 IN NS secondarydns.jalindia.co.in.
jalindia.co.in. 86400 IN NS primarydns.jalindia.co.in.


jal-gate-svr1.jalindia.co.in. 86400 IN A 115.119.16.172
jal-gate-svr2.jalindia.co.in. 86400 IN A 115.119.16.168
primarydns.jalindia.co.in. 86400 IN A 10.10.10.10
secondarydns.jalindia.co.in. 86400 IN A 10.10.10.11



===========mailserver 10.100.0.77============
host jalindia.co.in
nslookup jalindia.co.in
dig jalindia.co.in
dig mx jalindia.co.in
dig jalindia.co.in
host jal-gate-svr2.jalindia.co.in
host jal-gate-svr1.jalindia.co.in
host primarydns.jalindia.co.in
host secondarydns.jalindia.co.in
vi /etc/resolv.conf
ssh 10.100.0.100
telnet jal-gate-svr1.jalindia.co.in 25

==============================
named-checkconf /etc/named.conf
named-checkconf /etc/named.conf
host jalindia.co.in
dig mx jalindia.co.in
telnet jal-gate-svr1.jalindia.co.in.
route
telnet 59.160.230.70 25
telnet 115.119.16.172 25
telnet 115.119.16.168 25
=============

Saturday, July 18, 2009

RMAN Recovery with Previous Incarnation

rman>list incarnation of database;
sql>shutdown immediate
sql>startup mount
rman>reset database to incarnation 3;
rman>restore database until scn 4312345;
rman>recover database until scn 4312345;
rman>list incarnation;
rman> alter database open resetlogs;
rman>list incarnation;

Friday, July 17, 2009

ASP Pages Cache problem

Don't Cache ASP pages

================
LD ASP Error:
we hide the client but data is fetched from some branch.
but on LD ASp server, no data is fetched for that hidden client.

Reason
data is coming from cache.


=================IIS Settings================

iis > Http Header > http headers enable content expiration

==========
ISAPI applications (Active Server Pages Web pages) can be cached on Internet Information Server.Use these steps to disable caching:

inetmgr > iis > website >home directory > virtual directory > Configuration > cache isapi application

Now IIS Application so that it won't cache your ASP pages. But this alone is not enough. At the top of the .asp page that you do not want cached, add the following line: <% Response.Expires=0 %>

==========

stopping and restarting both the web site and the application
pool, we've also stopped and restarted IIS Admin Service and the WWW
publishing service.



====================ASP Page================
<% Response.Expires = 0 Response.Expiresabsolute = Now() - 1 Response.AddHeader "pragma","no-cache" Response.AddHeader "cache-control","private" Response.CacheControl = "no-cache" %>

===============Meta Tags===============





===================Registry Settings=================

HKLM\SYSTEM\CurrentControlSet\Services\HTTP\Parameters\UriEnabledCache=0

================

If problem is not solved then this is due to networking stack between client browser and the server. It looks like a proxy or browser-side cache.

=============Browser-side Cache===========
Retain server results in a browser-side cache. The cache holds query-result pairs; the queries are cache keys and the server results are server results. So, whenever the browser performs an XMLHttpRequest Call, it first checks the cache. If the query is held as a key in the cache, the corresponding value is used as the result, and there is no need to access the server.



==========

ipconfig /flushdns


Modify the behavior of the Microsoft Windows DNS caching algorithm by setting two registry entries in the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters registry key.

The MaxCacheTtl represents the maximum time that the results of a DNS lookup will be cached. The default value is 86,400 seconds. If you set this value to 1, DNS entries will only be cashed for a single second.

MaxNegativeCacheTtl represents the maximim time that the results of a failed DNS lookup will be cached. The default value is 900 seconds. If you set this value to 0, failed DNS lookups will not be cached.

==========



Wednesday, July 8, 2009

Recover Database with missing Archieve Logs

Recover Database witn missing Archieve Logs

I am trying the restore my old database but due to missing of one archieve log. i m not able to restore and recover from rman

Not able to open database

ora 19870 ora 19505 ora 27041 osd 04002

rman 00571 rman 00569 rman 03002 rman 06053 rman 06025


--------------A---------------------------------------
crosscheck copy of archivelog all;
crosscheck archivelog all;
resync catalog;
delete force obsolete;
delete expired archive all;


Note: not able to resync because not able to connect to recovery catalog because database is not open.

---------------B----------------------------------------
Point in time Recovery
-------------
1)
restore database UNTIL TIME "TO_DATE('03/27/09 10:05:00','MM/DD/YY = HH24:MI:SS')";
recover database UNTIL TIME "TO_DATE('03/27/09 10:05:00','MM/DD/YY = HH24:MI:SS')";

rman-03002 rman-20207

2)
restore database until scn 1000;
recover database until scn 1000;

3)
restore database until sequence 923 thread 1;
recover database until sequence 923 thread 1;


Note: not recover because of missing sequence.


---------------C----------------------------------------

list incranation
reset database to incranation inc_key;

restore database until sequence 923 thread 1;
recover database until sequence 923 thread 1;


Note: not recover because of missing sequence.

--------------D----------------------------------------
alter database backup controlfile to trace as 'c:\newcontrolfile.txt'

create new control file from above.


--------------E-FINAL SOLUTION---------------------------------------

shutdown immediate;
add into init.ora _allow_resetlogs_corruption=true
startup mount;
sql>recover database until cancel using backup controlfile;

Specify log: {=suggested | filename | AUTO | CANCEL}

CANCEL

Alter database open resetlogs








===============================================================


Followers