Archive

Archive for April, 2010

Setting up rsync on Solaris 10 Sparc

April 22, 2010 Leave a comment

Down the following packages from
http://www.sunfreeware.com/indexsparc10.html

rsync-3.0.7-sol10-sparc-local.gz

Dependencies

popt-1.14-sol10-sparc-local.gz
libiconv-1.13.1-sol10-sparc-local.gz
libgcc-3.4.6-sol10-sparc-local.gz
libintl-3.4.0-sol10-sparc-local.gz

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


#rsyncd.conf

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 = 10.2.0.0/24
auth users = root,suroot
motd file = /etc/rsyncd.motd
secrets file = /etc/rsyncd.secrets

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

 

#rsync.passwd 

sync

Start the rsync daemon


# rsync --daemon

Advertisements
Categories: Uncategorized

crash or media recovery needed ?

April 21, 2010 Leave a comment
--crash recovery needed
SELECT
a.thread#, b.open_mode, a.status,
CASE
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?'
END STATUS
FROM v$thread a,
v$database b,
v$instance c
WHERE a.thread# = c.thread#;
--Media recovery needed
SELECT
a.name,
a.checkpoint_change#,
b.checkpoint_change#,
CASE
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 ?'
END STATUS
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
iwr73Msg.old
Locate your :\Program Files\Cognos\cerx\Logs
Delete
– 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
(\Cognos\cerx\iwr\database)
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

MOUNT A WINDOWS FILE SYSTEM

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

DUPLICATE FROM ACTIVE DATABASE RMAN command

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
   	spfile
   		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