Friday, March 26, 2010

Linux lock unlock user account

----------------------------script.sh---------------

#! /bin/sh
### BEGIN Script INFO
#
# Befor Usering it please check the user name
# file /root/users.txt
#

case "$1" in
lock)
data=`cat /root/users.txt`
for n in $data; do
usermod -L $n && echo "$n is locked"
done
;;
unlock)
data=`cat /root/users.txt`
for n in $data; do
usermod -U $n && echo "$n is unlocked"
done
;;
*)
echo "Usage: $0 {lock|unlock}" >&2
exit 1
;;
esac
exit 0

------------------
users.txt contains users id which have to be locked or unlocked

----------------------------run that script------------

/.script.sh lock

/.script.sh unlock

Wednesday, March 10, 2010

URL Rewriting - Create Search Engine Friendly URLs

URL Rewriting - Create Search Engine Friendly URLs

Add following line in web.config



url="~/Commodity.aspx"
mappedUrl="~/ProdAndServ/Commodity.aspx?id=2" />
url="~/Equity.aspx"
mappedUrl="~/ProdAndServ/InternetTrading.aspx?id=1" />



Tuesday, March 9, 2010

LD installation

@echo off

M:\3ldtransfer\oracle_10g_10.2.0.3_client\setup.exe
M:\3ldtransfer\VFP5.0\setup.exe

mkdir C:\LD
mkdir C:\ldoutput
copy M:\1SHARED\KshitijLD\LDfolder\*.* C:\LD\
copy m:\ld\ld.exe c:\ld\
copy "c:\ld\ld.exe.lnk" "C:\Documents and Settings\All Users\Desktop"

M:\3ldtransfer\idown\tv_enua.exe
M:\3ldtransfer\idown\spchapi.exe
copy M:\3ldtransfer\idown\BATANG.ttf C:\WINDOWS\Fonts\
copy M:\3ldtransfer\idown\dzc32e.exe C:\
C:\dzc32e.exe

REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v apex /t REG_SZ /d m12
REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v apexhome /t REG_SZ /d m:
REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v orahome /t REG_SZ /d m:

REG ADD HKLM\SOFTWARE\ODBC\ODBC.INI\sns0506odbc /v ConnectString /t REG_SZ /d sns0506srv
REG ADD HKLM\SOFTWARE\ODBC\ODBC.INI\sns0506odbc /v DSN /t REG_SZ /d sns0506odbc
REG ADD HKLM\SOFTWARE\ODBC\ODBC.INI\sns0506odbc /v Driver /t REG_SZ /d C:\WINDOWS\system32\MSORCL10.DLL

REG ADD HKLM\SOFTWARE\ODBC\ODBC.INI\sns0607odbc /v ConnectString /t REG_SZ /d sns0607srv
REG ADD HKLM\SOFTWARE\ODBC\ODBC.INI\sns0607odbc /v DSN /t REG_SZ /d sns0607odbc
REG ADD HKLM\SOFTWARE\ODBC\ODBC.INI\sns0607odbc /v Driver /t REG_SZ /d C:\WINDOWS\system32\MSORCL10.DLL

REG ADD HKLM\SOFTWARE\ODBC\ODBC.INI\sns0708odbc /v ConnectString /t REG_SZ /d sns0708srv
REG ADD HKLM\SOFTWARE\ODBC\ODBC.INI\sns0708odbc /v DSN /t REG_SZ /d sns0708odbc
REG ADD HKLM\SOFTWARE\ODBC\ODBC.INI\sns0708odbc /v Driver /t REG_SZ /d C:\WINDOWS\system32\MSORCL10.DLL

REG ADD HKLM\SOFTWARE\ODBC\ODBC.INI\sns0809odbc /v ConnectString /t REG_SZ /d sns0809srv
REG ADD HKLM\SOFTWARE\ODBC\ODBC.INI\sns0809odbc /v DSN /t REG_SZ /d sns0809odbc
REG ADD HKLM\SOFTWARE\ODBC\ODBC.INI\sns0809odbc /v Driver /t REG_SZ /d C:\WINDOWS\system32\MSORCL10.DLL

REG ADD HKLM\SOFTWARE\ODBC\ODBC.INI\sns0910odbc /v ConnectString /t REG_SZ /d sns0910srv
REG ADD HKLM\SOFTWARE\ODBC\ODBC.INI\sns0910odbc /v DSN /t REG_SZ /d sns0910odbc
REG ADD HKLM\SOFTWARE\ODBC\ODBC.INI\sns0910odbc /v Driver /t REG_SZ /d C:\WINDOWS\system32\MSORCL10.DLL

mkdir C:\oracle\product\10.2.0\client_1\network\ADMIN
copy M:\1SHARED\KshitijLD\tnsnames.ora C:\oracle\product\10.2.0\client_1\network\ADMIN
copy M:\1SHARED\KshitijLD\tnsnames.ora D:\oracle\product\10.2.0\client_1\network\ADMIN

Wednesday, February 24, 2010

RMAN BACKUP TO NETWORK DRIVE

RMAN BACKUP TO NETWORK DRIVE

CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT 'z:/network/backup_db_%d_S_%s_P_%p_T_%t';

CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'z:\network\%F';

RMAN> backup current controlfile;


------------------------------ERROR1
Starting backup at 22-FEB-10
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
channel ORA_DISK_1: starting piece 1 at 22-FEB-10
channel ORA_DISK_1: finished piece 1 at 22-FEB-10
piece handle=E:\SNS0910\BACKUP_DB_SNS0910_S_580_P_1_T_711634422 tag=TAG20100222T
121342 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:05
Finished backup at 22-FEB-10

Starting Control File Autobackup at 22-FEB-10
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of Control File Autobackup command on ORA_DISK_1 channel at
02/22/2010 12:13:50
ORA-19504: failed to create file "Z:\C-45805873-20100222-02"
ORA-27056: could not delete file
OSD-04029: unable to get file attributes
O/S-Error: (OS 3) The system cannot find the path specified.


--------------------SOLUTION1
Basically all you need to do is update Oracle Services (both listener and Database) to run with Domain Account which has access on both servers with Administrator Privilege.

After you update the services ;
1- Restart the services

2-Use UNC naming instead of using drive letter on your script. (UNC naming part is not mentioned in the note)

3- Run the RMAN backup

Worked fine on my case.


------------------------------ERROR2

C:\>rman target sys@sns0910srv

Recovery Manager: Release 10.2.0.4.0 - Production on Mon Feb 22 13:49:07 2010

Copyright (c) 1982, 2007, Oracle. All rights reserved.

target database Password:
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00554: initialization of internal recovery manager package failed
RMAN-04005: error from target database:
ORA-12631: Username retrieval failed


--------------------SOLUTION2

file:///C:/oracle/product/10.2.0/db_1/network/ADMIN/sqlnet.ora

set to none

SQLNET.AUTHENTICATION_SERVICES= (NONE)

------------------------------ERROR3

ERROR IS STILL SAME

provide permission that shared folder or drive for that USER(KGUPTA2)



--------------------DONOT DO ABOVE PRACTICE JUST DO FOLLOWING------------

1) change rman configuration

CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '\\ORANOUP01P.UNICON.COM\ksh\%F';
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '\\ORANOUP01P.UNICON.COM\ksh\backup_db_%d_S_%s_P_%p_T_%t';


------Error----

RMAN> backup current controlfile;

Starting backup at 24-FEB-10
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
channel ORA_DISK_1: starting piece 1 at 24-FEB-10
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 02/24/2010 13:02:
14
ORA-19504: failed to create file "\\ORANOUP01P.UNICON.COM\KSH\BACKUP_DB_SNS0910_
S_637_P_1_T_711810132"
ORA-27040: file create error, unable to create file
OSD-04002: unable to open file
O/S-Error: (OS 5) Access is denied.


-------
The problem is at the OS level, not within Oracle. To troubleshoot ORA-27040 errors, you need to test from the OS. You need to check these disk issues

------Steps for correct solution

1) give that user permission to kgupta2 user but same error

2) give folder>properites>shared>permission to kgupta2 but same error

3) give everyone to full permission but same error

4) Just do one thing: give permission for that source computer on that shared folderr>properites>shared>permission on desination server

4) Now RMAN BACKUP TO NETWORK DRIVE work fine


------------------------Final Solution-----

1) change rman configuration

CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '\\ORANOUP01P.UNICON.COM\ksh\%F';
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '\\ORANOUP01P.UNICON.COM\ksh\backup_db_%d_S_%s_P_%p_T_%t';


2) for network drive

give permission for that source computer on that shared folderr>properites>shared>permission on desination server

3) Rman backup will work fine

Monday, February 8, 2010

USB drive Disable Enable

Set deny permissions for the user/s and/or group/s to:
%SystemRoot%\Inf\Usbstor.pnf
%SystemRoot%\Inf\Usbstor.inf
It is highly recommended to rename the file names before changing
permissions.

To disable the access to USB port, in windows XP and 2000, follow the steps below
1. Click Start, and then click Run.
2. In the Open box, type regedit, and then click OK.
3. Locate, and then click the following registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\UsbStor
4. In the right pane, double-click Start.
5. In the Value data box, type 4, click Hexadecimal (if it is not already selected), and then click OK.
6. Quit Registry Editor.

To re-enable a disabled port, follow these steps below

1. Click Start, and then click Run.
2. In the Open box, type regedit, and then click OK.
3. Locate, and then click the following registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\UsbStor
4. In the right pane, double-click Start.
5. In the Value data box, type 3, click Hexadecimal (if it is not already selected), and then click OK.
6. Quit Registry Editor.

Change ORACLE SID

select name from v$database;
select instance_name from v$instance;
shutdown immediate;
C:\>set ORACLE_SID=sidorcl
C:\>net stop oracleservicesidorcl
C:\>ORADIM -DELETE -SID sidorcl
C:\>set ORACLE_SID=sidorclnew
C:\>ORAPWD FILE=c:\oracle\product\10.1.0\db_1\database\pwdsidorclnew.ora PASSWORD=oracle ENTRIES=5 FORCE=y
C:\>ORADIM -new -sid sidorclnew -startmode manual -spfile
C:\>oradim -edit -sid sidorclnew -startmode auto
C:\>rename c:\oracle\product\10.1.0\db_1\database\initSIDORCL.ORA initsidorclnew.ORA
C:\>sqlplus/nolog
conn sys as sysdba
create spfile from pfile;
startup
select name from v$database;
select instance_name from v$instance;

Oracle Patch 10.20.3 to 10.2.0.4

Oracle Patch 10.20.3 to 10.2.0.4

How to Apply the Patchset ?

Before you apply the patchset you have to check whether the Oracle Version is 32 bit or 64 bit Version, because the patchsets are different.

For 32 Bit Version, Patch no is p6810189_10204_Win32_patchset

For 64 Bit Version, Patch no is p6810189_10204_MSWIN-x86-64.

1. Shut down the database:

SQL>SHUTDOWN IMMEDIATE.

Stop all the Oracle Related Services.

Ex:- Oracle Listener, Oracle DB Console,Oracle JobScheduler, Distrubed Transaction Co-ordinator.

Run the Patch Setup.exe in the same Oracle Home.

For Example: If Existing Oracle is installed in c:\Oracle\product\10.2.0\db_1 then you have to select the same path When you run the Setup.exe. After Successful installation start the Listener & Db Console etc.,

Enter the following SQL*Plus Commands:

SQL> SET ORACLE_SID=sns5

SQL> SQLPLUS/NOLOG

SQL> CONNECT SYS/ORACLE@sns0910SRV AS SYSDBA

SQL> STARTUP UPGRADE SQL> SPOOL patch.log

SQL> @ORACLE_BASE\ORACLE_HOME\rdbms\admin\catupgrd.sql

SQL> SPOOL OFF

Review the patch.log file for errors and inspect the list of components that is displayed at the end of catupgrd.sql script.

This list provides the version and status of each SERVER component in the database.

If necessary, rerun the catupgrd.sql script after correcting any problems.

Restart the database:

SQL> SHUTDOWN IMMEDIATE SQL> STARTUP

Run the utlrp.sql script to recompile all invalid PL/SQL packages now instead of when the packages are accessed for the first time. This step is optional but recommended.

SQL> @ORACLE_BASE\ORACLE_HOME\rdbms\admin\utlrp.sql

Thursday, January 28, 2010

Disable right mouse click script

--

Friday, January 22, 2010

Regedit for Oracle

copy "c:\ld\ld.exe.lnk" "c:\documents and settings\%username%\desktop"

Set Environmental variable through regedit

For Machine

REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v apex /t REG_SZ /d m01
REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v apexhome /t REG_SZ /d m:
REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v orahome /t REG_SZ /d m:

REG ADD HKLM\SOFTWARE\ODBC\ODBC.INI\sns0506odbc /v ConnectString /t REG_SZ /d sns0506srv
REG ADD HKLM\SOFTWARE\ODBC\ODBC.INI\sns0506odbc /v DSN /t REG_SZ /d sns0506odbc
REG ADD HKLM\SOFTWARE\ODBC\ODBC.INI\sns0506odbc /v Driver /t REG_SZ /d C:\WINDOWS\system32\MSORCL10.DLL


For User

REG ADD HKCU\Environment /v apex /t REG_SZ /d m01
REG ADD HKCU\Environment /v apexhome /t REG_SZ /d m:
REG ADD HKCU\Environment /v orahome /t REG_SZ /d m:


REG ADD HKCU\SOFTWARE\ODBC\ODBC.INI\sns0506odbc /v ConnectString /t REG_SZ /d sns0506srv
REG ADD HKCU\SOFTWARE\ODBC\ODBC.INI\sns0506odbc /v DSN /t REG_SZ /d sns0506odbc
REG ADD HKCU\SOFTWARE\ODBC\ODBC.INI\sns0506odbc /v Driver /t REG_SZ /d C:\WINDOWS\system32\MSORCL10.DLL

how to recover deleted file from network drive

Issue: how to recover deleted file from network drive

Solution:
settings on Server

1. go the properties of Share Network Drive
2. Shadow Copies
3. Setting as per your requirement


settings on Client

To recover a file that was accidentally deleted

1. Locate the folder where the deleted file was stored (on the network), right-click the folder, and click Properties. The Properties dialog box will appear.

2. On the Previous Versions tab, double-click the most recent version of the folder that contains the file that you want to recover. A list of files that are stored in that previous version will appear.

3. Right-click the file that was deleted and clicks Copy and paste.

how to recover deleted file from network drive

Issue: how to recover deleted file from network drive

Solution:
settings on Server

1. go the properties of Share Network Drive
2. Shadow Copies
3. Setting as per your requirement


settings on Client

To recover a file that was accidentally deleted

1. Locate the folder where the deleted file was stored (on the network), right-click the folder, and click Properties. The Properties dialog box will appear.

2. On the Previous Versions tab, double-click the most recent version of the folder that contains the file that you want to recover. A list of files that are stored in that previous version will appear.

3. Right-click the file that was deleted and clicks Copy and paste.

Connect Sql Server in SqlDeveloper Tool

1) download net.sourceforge.jtds.jdbc.Driver
http://sourceforge.net/projects/jtds/files/jtds/1.2.1/jtds-1.2.1-src.zip/download

2) In Oracle SQL Developer open Tools -> Preferences Database -> Third Party JDBC Drivers
Add Entry
Browse the unzipped driver and add the jtds-1.2.jar file

3) Error
I/O Error SSO failed Native SSPI library not loaded
check the java.library.path.system property


Copy the file 'jtds-1.2.2-dist\x86\SSO\ntlmauth.dll' from the unzipped JTDS --> \jdk\jre\bin.


4) Then restart SQL Developer.

Unwrap Oracle plsql code

http://hz.codecheck.ch/UnwrapIt/Unwrapped.jsp

Wednesday, November 11, 2009

Oracle File Formats

-------------------Backup Format-----
1
%c The copy number of the backup piece within a set of duplexed
backup pieces. If you did not duplex a backup, then this variable
is 1 for backup sets and 0 for proxy copies.
If one of these commands is enabled, then the variable shows the
copy number. The maximum value for %c is 256.

%d The name of the database.

%D The current day of the month (in format DD)

%F Combination of DBID, day, month, year, and sequence into a unique
and repeatable generated name.

%M The month (format MM)

%n The name of the database, padded on the right with x characters
to a total length of eight characters. (AKA: Porn star alias name)
For example, if the scott is the database name, %n= scottxxx.

%p The piece number within the backup set. This value starts at 1
for each backup set and is incremented by 1 as each backup piece
is created. Note: If you specify PROXY, then the %p variable must
be included in the FORMAT string either explicitly or implicitly within %U.

%s The backup set number. This number is a counter in the control file that
is incremented for each backup set. The counter value starts at 1 and is
unique for the lifetime of the control file. If you restore a backup
control file, then duplicate values can result.
Also, CREATE CONTROLFILE initializes the counter back to 1.

%t The backup set time stamp, which is a 4-byte value derived as the
number of seconds elapsed since a fixed reference time.
The combination of %s and %t can be used to form a unique name for
the backup set.

%T The year, month, and day (YYYYMMDD)

%u An 8-character name constituted by compressed representations of
the backup set number and the time the backup set was created.

%U A convenient shorthand for %u_%p_%c that guarantees uniqueness in
generated backup filenames.
If you do not specify a format, RMAN uses %U by default.

%Y The year (YYYY)

%% Specifies the '%' character. e.g. %%Y translates to %Y.


------------ARCHIVELOG Format------

%s log sequence number

%S log sequence number, zero filled

%tthread number

%Tthread number, zero filled

%a activation ID

%d database ID

%R resetlogs ID that ensures unique names are constructed for the archived log files across multiple incarnations of the database

---------------------------

Tuesday, October 6, 2009

how to recover deleted file from network drive

Issue: how to recover deleted file from network drive

Solution:

settings on Server

1. go the properties of Share Network Drive
2. Shadow Copies
3. Setting as per your requirement


Settings on Client

1. Locate the folder where the deleted file was stored (on the network), right-click the folder, and click Properties. The Properties dialog box will appear.

2. On the Previous Versions tab, double-click the most recent version of the folder that contains the file that you want to recover. A list of files that are stored in that previous version will appear.

3. Right-click the file that was deleted and clicks Copy and paste.

Windows terminate process forcefully

Windows terminate process forcefully

taskkill /f /im process-name.exe

/f - Stands for that process be forcefully terminated.

/im - Stands for the image name of the process to be terminated

In order to kill all these process I made a batch file which contains the forcefull termination command for all these programs and then I added the batch file in windows startup.

1. open Notepad and paste the following commands one per each line by line

taskkill /f /im wmpnscfg.exe
taskkill /f /im ctfmon.exe
taskkill /f /im mobsync.exe.exe

Read more: http://www.technixupdate.com/terminate-programs-forcefully-in-windows/#ixzz0QE2O6QIR


2. Save the file as terminate.bat or with any other name but with .bat extension.

3. Now Drag and Drop terminate.bat file in All Programs >> StartUp

4. Now, restart windows all these useless programs which you used to kill manually will be automatically terminated.

Note: You can also place the terminate.bat file on desktop and run it manually and kill all the useless process.

Read more: http://www.technixupdate.com/terminate-programs-forcefully-in-windows/#ixzz0QE2POIGP

Friday, September 25, 2009

Oracle: Which user process lock the other process

SELECT pr.username "O/S Id",
ss.username "Oracle User Id",
ss.status "status",
ss.sid "Session Id",
ss.serial# "Serial No",
lpad(pr.spid,7) "Process Id",
substr(sqa.sql_text,1,900) "Sql Text",
First_load_time "Load Time"
FROM v$process pr, v$session ss, v$sqlarea sqa
WHERE pr.addr=ss.paddr
AND ss.username is not null
AND ss.sql_address=sqa.address(+)
AND ss.sql_hash_value=sqa.hash_value(+)
AND ss.status='ACTIVE'
ORDER BY 1,2,7 ;
Spool Out ;


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

set lin 132
set pages 66
column "SID" format 999
column "SER" format 99999
column "Table" format A10
column "SPID" format A5
column "CPID" format A5
column "OS User" format A7
column "Table" format A10
column "SQL Text" format A40 wor
column "Mode" format A20
column "Node" format A10
column "Terminal" format A8



rem spool /tmp/locks.lst

select
s.sid "SID",
s.serial# "SER",
o.object_name "Table",
s.osuser "OS User",
s.machine "Node",
s.terminal "Terminal",
--p.spid "SPID",
--s.process "CPID",
decode (s.lockwait, null, 'Have Lock(s)', 'Waiting for <' || b.sid || '>') "Mode",
substr (c.sql_text, 1, 150) "SQL Text"
from v$lock l,
v$lock d,
v$session s,
v$session b,
v$process p,
v$transaction t,
sys.dba_objects o,
v$open_cursor c
where l.sid = s.sid
and o.object_id (+) = l.id1
and c.hash_value (+) = s.sql_hash_value
and c.address (+) = s.sql_address
and s.paddr = p.addr
and d.kaddr (+) = s.lockwait
and d.id2 = t.xidsqn (+)
and b.taddr (+) = t.addr
and l.type = 'TM'
group by
o.object_name,
s.osuser,
s.machine,
s.terminal,
p.spid,
s.process,
s.sid,
s.serial#,
decode (s.lockwait, null, 'Have Lock(s)', 'Waiting for <' || b.sid || '>'),
substr (c.sql_text, 1, 150)
order by
decode (s.lockwait, null, 'Have Lock(s)', 'Waiting for <' || b.sid || '>') desc,
o.object_name asc,
s.sid asc;
rem spool off;

Saturday, August 8, 2009

Linux YUM: download all rpm and dependancies from Internet Automatically

COPY file rpmforge.repo to /etc/yum.repos/

#rpmforge.repo


# Name: RPMforge RPM Repository for Red Hat Enterprise 5 - dag
# URL: http://rpmforge.net/
[rpmforge]
name = Red Hat Enterprise $releasever - RPMforge.net - dag
#baseurl = http://apt.sw.be/redhat/el5/en/$basearch/dag
mirrorlist = http://apt.sw.be/redhat/el5/en/mirrors-rpmforge
#mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge
enabled = 1
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
gpgcheck = 1

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;

Followers