Aug 11, 2010

HP UX CIFS (SAMBA) Mount to Windows

cd /opt/cifsclient/bin
cifsclient start

cifsmount //{Window-Server-Name}/{Shared-Folder} /{Mount-Point} -U {WINDOW-USER}

you need to set the Window-Server-Name & IP in the /etc/hosts, Window-Server-Name should be the Computer name of the Window.

Aug 4, 2010

Oracle 10g RMAN Delete archive log

export ORACLE_SID=
rman

RMAN > CONNECT TARGET /
RMAN > CROSSCHECK archivelog all;
RMAN > list archivelog all;
RMAN > delete archivelog until sequence=1236;

RMAN > Delete archivelog until time 'sysdate-1'; //Delete archive log before today

To Run RMAN in Scripts :

Prepare a sh script file & a command file :

sample script :
export ORACLE_SID={SID}
rman target / @cmdfile.txt


sample command file :
RUN {
delete archivelog until time 'sysdate-2';
}
EXIT;

Add the scripts to Crontab

Aug 3, 2010

Enabling ARCHIVELOG Mode

Lets start by checking the current archive mode.

SQL> SELECT LOG_MODE FROM SYS.V$DATABASE;

LOG_MODE
------------
NOARCHIVELOG


SQL> startup mount
ORACLE instance started.

Total System Global Area 184549376 bytes
Fixed Size 1300928 bytes
Variable Size 157820480 bytes
Database Buffers 25165824 bytes
Redo Buffers 262144 bytes
Database mounted.

SQL> alter database archivelog;
Database altered.

SQL> alter database open;
Database altered.