Archive for April, 2010

Setting up rsync on Solaris 10 Sparc

April 22, 2010 Leave a comment

Down the following packages from




Install the packages using

Pkgadd -d

To check the packages installed

pkginfo -l SMCliconv

pkginfo -l SMCrsync

To remove packages

pkgrm SMCrsync

once the packages are installed

Create a  rsyncd.conf  and  rsync.passwd file in /etc


gid = users
read only = true
use chroot = true
transfer logging = true
log format = %h %o %f %l %b
log file = /var/log/rsyncd.log
hosts allow =
auth users = root,suroot
motd file = /etc/rsyncd.motd
secrets file = /etc/rsyncd.secrets

path = /opt/sysman/control
comment = sysman control
read only = false
uid = 0
gid = 0




Start the rsync daemon

# rsync --daemon

Categories: Uncategorized

crash or media recovery needed ?

April 21, 2010 Leave a comment
--crash recovery needed
a.thread#, b.open_mode, a.status,
WHEN ((b.open_mode='MOUNTED') AND (a.status='OPEN')) THEN 'Crash Recovery req.'
WHEN ((b.open_mode='MOUNTED') AND (a.status='CLOSED')) THEN 'No Crash Rec. req.'
WHEN ((b.open_mode='READ WRITE') AND (a.status='OPEN')) THEN 'Inst. already open'
ELSE 'huh?'
FROM v$thread a,
v$database b,
v$instance c
WHERE a.thread# = c.thread#;
--Media recovery needed
WHEN ((a.checkpoint_change# - b.checkpoint_change#) = 0) THEN 'Startup Normal'
WHEN ((a.checkpoint_change# - b.checkpoint_change#) > 0) THEN 'Media Recovery'
WHEN ((a.checkpoint_change# - b.checkpoint_change#) < 0) THEN 'Old Control File'
ELSE 'what the ?'
FROM v$datafile a, -- control file SCN for datafile
v$datafile_header b -- datafile header SCN
WHERE a.file# = b.file#;
Categories: Oracle

How to delete IWR reports from queue in cancelled state

April 20, 2010 Leave a comment

Open Configuration Manager
Click Cognos Impromptu Web Reports
From the toolbar stop the service
Open Windows Explorer
Locate your \Cognos\cerx\iwr\database directory
Rename the files iwr73Job.db and iwr73Msg.db too iwr73Job.old and
Locate your :\Program Files\Cognos\cerx\Logs
– iwr.log
– iwrmessage.log
– iwrmessage*.uld

Open Configuration Manager
Expand Cognos Impromptu Web Reports
Expand Data Store
Click Create Data Store
From the Actions menu, Click Apply Selection
Verify that iwr73Job.db and iwr73Msg.db have been recreated
Expand Cognos Impromptu Web Reports
Expand Server
Click Register Services
From the Actions menu, Click Apply Selection
Restart the Cognos Impromptu Web Reports service

These steps recreate the database where the job processes are stored. This
should remove the cancelling job from the queue.

Categories: Oracle

Timestamp datapump dump and logfile

April 16, 2010 Leave a comment
expdp system/********* full=Y directory=DATA_PUMP_DIR dumpfile=stripepr_`date "+%Y%m%d%H%M%S"`.dmp logfile=stripepr_`date "+%Y%m%d%H%M%S"`.log

gzip /dbbackup/exports/stripepr_`date "+%Y%m%d%H%M%S"`.dmp
gzip /dbbackup/exports/stripepr_`date "+%Y%m%d%H%M%S"`.log
Categories: Oracle


April 14, 2010 Leave a comment
#mkdir -p /mnt/win

#mount -t cifs //winserveradd/c$ -o username=mdesouza,password=Starbust /mnt/win
#cd /mnt/win
# ls -l

For the share //windowsserver/sharename to be automatically mounted at every system start (after reboot), insert an option in the file /etc/fstab:
# vi /etc/fstab

Append following line (written in a single line):
//windowserver/share /mnt/win smbfs
auto,gid=users,fmask=0664,dmask=0775,iocharset=iso8859-15, credentials=/etc/sambapasswords 0 0

Next create the password file /etc/sambapasswords
# vi /etc/sambapasswords

Now add following content:
username = mdesouza
password = Starbust

Save and close the file. Make sure only root can access your file:
# chown 0.0 /etc/sambapasswords
# chmod 600 /etc/sambapasswords
Categories: Flying


April 13, 2010 Leave a comment
run {
   allocate channel prmy1 type disk;
   	allocate channel prmy2 type disk;
   	allocate channel prmy3 type disk;
   	allocate channel prmy4 type disk;
   	allocate auxiliary channel stby type disk;
   	duplicate target database for standby from active database
   		parameter_value_convert 'testorac','standby1'
   		set db_unique_name='standby1'
   		set db_file_name_convert='/testorac/','/standby1/'
   		set log_file_name_convert='/testorac/','/standby1/'
   		set control_files='+DATA'
   		set log_archive_max_processes='5'
   		set fal_client='standby1'
   		set fal_server='testorac	'
   		set standby_file_management='AUTO'
   		set log_archive_config='dg_config=(testorac,standby1)'
   		set log_archive_dest_1='service=testorac ASYNC
	valid_for=(ONLINE_LOGFILE,PRIMARY_ROLE) db_unique_name=testorac';

On primary

SELECT sequence#, first_time, next_time
FROM v$archived_log
ORDER BY sequence#

On standby

select sequence#,applied from v$archived_log
order by sequence#;
Categories: Oracle

making rman backups available to standby server

April 12, 2010 Leave a comment

primary server: linuxdbpr

dr server: linuxdbdr

Create an NFS mount from the target (primary) server to the standby (auxiliary) database server

Logged in as root on the primary server

edit /etc/exports

Add the following for themachine you want to be able to mount

/dbbackup/dbpr01    linuxdbpr(rw,no_root_squash)

After making chages to the /etc/export file , you need to restart the NFS daemon  on the primary server

[root@linuxdbpr init.d]# /etc/init.d/nfs restart
Shutting down NFS mountd:                                  [FAILED]
Shutting down NFS daemon:                                  [FAILED]
Shutting down NFS quotas:                                  [FAILED]
Shutting down NFS services:                                [FAILED]
Starting NFS services:                                     [  OK  ]
Starting NFS quotas:                                       [  OK  ]
Starting NFS daemon:                                       [  OK  ]
Starting NFS mountd:                                       [  OK  ]

log on to the standby server as the root user

#mkdir -p /dbbackup/dbpr01

[root@linuxdbdr dbpr01]# /etc/init.d/nfs start
Starting NFS services:                                     [  OK  ]
Starting NFS quotas:                                       [  OK  ]
Starting NFS daemon:                                       [  OK  ]
Starting NFS mountd:                                       [  OK  ]

[root@linuxdbpr init.d]# mount -t nfs linuxdbpr:/dbbackup/dbpr01  /dbbackup/dbpr01

[root@linuxdbdr dbpr01]# ls -lrt
total 1497016
-rw-rw---- 1 10617 dba 1401839616 Apr 11 21:00 53laspf4_1_1
-rw-rw---- 1 10617 dba   99670016 Apr 11 21:00 56laspgb_1_1
-rw-rw---- 1 10617 dba    9994240 Apr 11 21:01 c-757662351-20100411-01
-rw-r----- 1 10617 dba    9912320 Apr 12 09:31 snapcf_STRIPEPR.f
-rw-r----- 1 10617 dba    9994240 Apr 12 09:31 c-757662351-20100412-00
Categories: Linux