RSS:
Publications
Comments

Migrate from 32 bit to 64 bit using RMAN

Migrate from 32 bit to 64 bit using RMAN

I have Checked it on 10g and confirmed it is working. You can use it from 9i to 11g.

Step 1 – Take a Backup on Source 32 Bit Server:
Create a full backup of the database including all archivelogs:
RMAN> run {
allocate channel c1 type disk;
allocate channel c2 type disk;
backup database plus archivelog;
backup current controlfile; }
Step 2 : Preparing target 64 bit server:
Install the OS and Oracle Software.
Step 3 : Copy RMAN backup files from Source Server:
Use simple copy command to copy the rman backup files from source server to target server.
Step 4 : Create the pfile or copy the pfile from source server:
Create the pfile or copy the pfile from source server.
Step 5 : Bring up the database
Startup nomount the new instance.
Connect to rman and set the dbid:
$ rman target / nocatalog RMAN> set dbid=;
Restore the controlfile:
RMAN> restore controlfile from /u01/backup_32bit/;
RMAN> alter database mount;
RMAN> restore database;
Identify the archivelog till you want to do the recovery and check if you have all the backups you need to do it and run:
RMAN> run {
set until sequence xxxx;
recover database;
}
RMAN> exit
Step 6 : Migrate to 64Bit:
SQL> recover database until cancel using backup controlfile;
cancel
SQL> alter database open resetlogs migrate;
SQL> @$ORACLE_HOME/rdbms/admin/utlirp.sql
SQL> @$ORACLE_HOME/rdbms/admin/utlrp.sql
SQL> shutdown immediate;
SQL> startup


chkconfig – Linux Service Auto Start/Stop

chkconfig – Linux Service Auto Start/Stop

The chkconfig command can be used to activate and deactivate services. If you use the chkconfig –list command, you will see a list of system services and whether they are started (on) or stopped (off) in runlevels 0-6

# chkconfig
chkconfig version 1.3.30.1 – Copyright (C) 1997-2000 Red Hat, Inc.
This may be freely redistributed under the terms of the GNU Public License.

usage: chkconfig –list [name]
chkconfig –add
chkconfig –del
chkconfig [--level ]

1. chkconfig –list – will query any service in /etc/rc.d with each runlevel

$ chkconfig –list anacron
anacron 0:off 1:off 2:on 3:on 4:on 5:on 6:off

2. chkconfig –level <0/1/2/3/4/5/6> – Will be used to auto start/stop the service at each run level

chkconfig can be used to set a service to be started (or not) in a specific runlevel.

For example, to turn ntpd off in runlevels 3, 4, and 5, use the command:

chkconfig –level 345 ntpd off


11g Rel2 Grid Infrastructure – INS-32026

Scenario:
when Installing Oracle 11g Rel2 Grid infrastructure we got the error message INS-32026

Solution:
CRS_HOME (CRS software installation folder) should not be part of the ORACLE_HOME


11g Rel2 – Grid Infra Clusterware Installation – INS-40922 , INS-40718

We got the following Error message when we install 11g Release 2 Grid Infrastructure
INS-40922
INS-40718

Solution:
The above error messages are related to Resolving the SCAN Name. Please make sure your /etc/hosts file have the IP address assigned to SCAN name and the same SCAN name is mentioned as the SCAN Name field during installation.


Cannot log via SQL plus on server : ORA 03113

Not sure if this is the right place to post this question.

For the last one week i haven’t been able to log on via Sql plus on the Oracle server. It gives the error ORA 03113 end-of-file on communication channel

I can log in on other work stations but cannot run sql loader batch..


VMWare Server Performance Statistics

esxtop – VMWare Server Performance Statistics

Performance related statistics information Disk(d), Memory(m) and Network (n)

10:48:29pm up 197 days, 7:50, 62 worlds; CPU load average: 0.07, 0.07, 0.07
PCPU(%): 4.94, 5.84, 6.87, 4.99 ; used total: 5.66
CCPU(%): 0 us, 0 sy, 99 id, 1 wa ; cs/sec: 93

ID GID NAME NMEM %USED %SYS %OVRLP %RUN %WAIT %BWAIT %TWAIT %CRUN %CSTP %IDLE %RDY %EXTRA %MLMTD
1 1 idle 4 361.08 0.00 0.00 0.36 0.00 0.00 0.00 0.00 0.00 0.00 383.33 0.00 0.00
2 2 system 5 0.00 0.00 0.00 0.00 479.62 0.00 479.62 0.00 0.00 0.00 0.00 0.00 0.00
6 6 console 1 0.68 0.00 0.01 0.68 63.74 31.45 95.19 0.00 0.00 95.19 0.06 0.48 0.00
7 7 helper 13 0.00 0.00 0.00 0.00 1247.01 0.00 1247.01 0.00 0.00 0.00 0.00 0.00 0.00
8 8 drivers 8 0.00 0.00 0.00 0.00 767.36 0.00 767.36 0.00 0.00 0.00 0.00 0.00 0.00
12 12 vmware-vmkauthd 1 0.00 0.00 0.00 0.00 95.92 0.00 95.92 0.00 0.00 0.00 0.00 0.00 0.00
13 13 VHOST1 5 1.03 0.00 0.01 1.03 444.17 34.34 478.51 0.00 0.00 95.08 0.07 0.66 0.00
14 14 VHOST2 5 1.57 0.00 0.01 1.57 449.37 28.58 477.95 0.00 0.00 94.54 0.08 1.14 0.00
15 15 VHOST3 5 6.97 0.00 0.06 6.97 384.12 84.94 469.06 0.00 0.00 85.57 3.57 3.49 0.00
16 16 VHOST4 5 5.98 0.00 0.05 5.98 403.08 69.04 472.12 0.00 0.00 88.60 1.50 3.04 0.00
17 17 VHOST5 5 5.56 0.00 0.05 5.56 402.71 70.20 472.91 0.00 0.00 89.34 1.14 2.81 0.00
18 18 VHOST6 5 0.62 0.00 0.01 0.62 436.57 42.37 478.94 0.00 0.00 95.41 0.04 0.32 0.00

1. press “d” to see Disk stats on “esxtop” command

10:48:07pm up 197 days, 7:49, 62 worlds; CPU load average: 0.07, 0.07, 0.07
Display ESX disk on
ADAPTR CID TID LID WID NCHNS NTGTS NLUNS NVMS AQLEN LQLEN WQLEN ACTV QUED %USD LOAD CMDS/s READS/s WRITES/s MBREAD/s MBWRTN/s
vmhba0 – – – – 1 2 2 8 238 0 0 0 0 0 0.00 0.00 0.00 0.00 0.00 0.00

2. press “n” to see Network stats on “esxtop” command

10:46:58pm up 197 days, 7:48, 62 worlds; CPU load average: 0.07, 0.07, 0.07
Display ESX nic on
PORT ID UPLINK USED BY DTYP DNAME PKTTX/s MbTX/s PKTRX/s MbRX/s %DRPTX %DRPRX
3 N 0:NCP H pps nan nan nan nan 0.00 0.00
16777217 Y vmnic0 S vSwitch0 nan nan nan nan 0.00 0.00
16777218 N 0:NCP S vSwitch0 nan nan nan nan 0.00 0.00
16777219 N 0:vswif0 S vSwitch0 nan nan nan nan 0.00 0.00
16777224 N 1067:VHOST1 S vSwitch0 nan nan nan nan 0.00 0.00
16777225 N 1072:VHOST2 S vSwitch0 nan nan nan nan 0.00 0.00
16777226 N 1077:VHOST3 S vSwitch0 nan nan nan nan 0.00 0.00
16777232 N 1089:VHOST4 S vSwitch0 nan nan nan nan 0.00 0.00
16777242 N 1095:VHOST5 S vSwitch0 nan nan nan nan 0.00 0.00
16777248 N 1082:VHOST6 S vSwitch0 nan nan nan nan 0.00 0.00

3. press “m” to see memory stats on “esxtop” command

10:45:28pm up 197 days, 7:47, 62 worlds; MEM overcommit average: 0.00, 0.00, 0.00
PMEM (MB): 17407 total: 272 cos, 232 vmk, 7851 other, 9051 free
VMKMEM (MB): 16809 managed: 1008 minfree, 1839 rsvd, 14872 ursvd, high state
COSMEM (MB): 24 free: 541 swap_t, 541 swap_f: 0.00 r/s, 0.00 w/s
PSHARE (MB): 3363 shared, 1147 common: 2216 saving
SWAP (MB): 0 curr, 0 target: 0.00 r/s, 0.00 w/s
MEMCTL (MB): 0 curr, 0 target, 6244 max

ID GID NAME NMEM MEMSZ SZTGT TCHD %ACTV %ACTVS %ACTVF %ACTVN OVHDUW OVHD OVHDMAX
12 12 vmware-vmkauthd 1 2.20 2.20 0.34 0 0 0 0 0.00 0.00 0.00
13 13 VHOST1 5 2048.00 1569.71 61.44 4 1 3 1 30.91 50.50 93.28
14 14 VHOST2 5 1024.00 745.62 20.48 3 1 2 1 22.91 39.85 85.37
15 15 VHOST3 5 2048.00 1735.33 20.48 0 0 0 1 30.91 75.44 190.14
16 16 VHOST4 5 2048.00 1907.99 20.48 1 0 1 1 30.91 75.76 190.48
17 17 VHOST5 5 2048.00 1900.98 0.00 0 0 0 0 30.91 75.65 190.43
18 18 VHOST6 5 512.00 528.86 20.48 3 0 2 1 18.91 33.04 77.58


ORA-01113 – On Renaming file Mistakenly

Incident
DBA tried to add a datafile to database, but misnamed it and issued the following command

alter database datafile ‘/opt/oracle/emtprod/u18/oradata/EMTDB/mtm_data3_03_EMTDB.dbf’ offline drop;

Copied the file to it’s new location/name and then issued the following

alter database rename file ‘/opt/oracle/emtprod/u18/oradata/EMTDB/mtm_data3_03_EMTDB.dbf’
to ‘/opt/oracle/emtprod/u20/oradata/EMTDB/mtm_data2_04_EMTDB.dbf’;

When dba made the datafile online …

alter database datafile ‘/opt/oracle/emtprod/u20/oradata/EMTDB/mtm_data2_04_EMTDB.dbf’ online;

DBA received the following error

ERROR at line 1:
ORA-01113: file 26 needs media recovery
ORA-01110: data file 26: ‘/opt/oracle/emtprod/u20/oradata/EMTDB/mtm_data2_04_EMTDB.dbf’

Solution:

If this happened just a few minutes ago, Just needed to do
SQL> alter database recover datafile ……

Brought file back into offline mode and then you will be able to online the file.


How to know Linux process Priority

We will be able to know many information about each process by doing “ps” command.

Do check the man page for “ps”

#man ps

Here is the simple information about the process

[root@TEST01 ~]# ps -ef -o user,pid,project,class,zone,pset,pri,nlwp,psr,time,args

Warning: bad syntax, perhaps a bogus ‘-’? See /usr/share/doc/procps-3.2.7/FAQ
USER PID PROJECT CLS ZONE PSET PRI NLWP PSR TIME COMMAND
root 30833 – TS – – 24 1 1 00:00:00 -bash USER=root LOGNAME=root HOME=/root PATH=/usr/local/sbin:/usr
root 30891 – TS – – 22 1 1 00:00:00 \_ ps -ef -o user,pid,project,class,zone,pset,pri,nlwp,psr,time,
root 3691 – TS – – 24 1 1 00:00:03 /usr/bin/Xorg :0 -br -audit 0 -auth /var/gdm/:0.Xauth -nolisten t
root 3627 – TS – – 16 1 0 00:00:00 /sbin/mingetty tty6 HOME=/ TERM=linux SELINUX_INIT=YES PATH=/bin:
root 3626 – TS – – 18 1 0 00:00:00 /sbin/mingetty tty5 HOME=/ TERM=linux SELINUX_INIT=YES PATH=/bin:
root 3595 – TS – – 21 1 1 00:00:00 /sbin/mingetty tty4 HOME=/ TERM=linux SELINUX_INIT=YES PATH=/bin:
root 3591 – TS – – 18 1 0 00:00:00 /sbin/mingetty tty3 HOME=/ TERM=linux SELINUX_INIT=YES PATH=/bin:
root 3585 – TS – – 21 1 1 00:00:00 /sbin/mingetty tty2 HOME=/ TERM=linux SELINUX_INIT=YES PATH=/bin:
root 3582 – TS – – 21 1 1 00:00:00 /sbin/mingetty tty1 HOME=/ TERM=linux SELINUX_INIT=YES PATH=/bin:
[root@TEST01 ~]#


Ask Tom Live Seminar

Dear DBAs,

I have attended Ask Tom Live seminar about 11g Rel2 at Tokyo, Japan. Do you believe it I have got an opportunity to take a snap with him. I am very happy to share with you.


Regards
Mudhalvan M.M


How to determine whether the datafiles are synchronized or not

select status, checkpoint_change#,
to_char(checkpoint_time, ‘DD-MON-YYYY HH24:MI:SS’) as checkpoint_time,
count(*)
from v$datafile_header
group by status, checkpoint_change#, checkpoint_time
order by status, checkpoint_change#, checkpoint_time;

Check the results of the above query If it return one and only one row for the online datafiles, means they are already synchronized in terms of their SCN. Otherwise the datafiles are still not synchronized yet.