Wednesday, March 4, 2009

UNIX VI:Editor Basic Commands

i :- enter in insert mode and inserts the data before cursor position.
I :- move the cursor at the beginning of line and inserts the data before cursor position.
a :- enter in append mode and appends the data after cursor position.
A:- move the cursor at the end of the line and appends the data after cursor position.
o :- create the blank line before cursor position and allows to insert the data.
O :- creates the blank line above cursor position and allows to insert the data.
^ :- shifts the cursor at the beginning of the line (without insert mode)
$ :- shifts the cursor at the ending of the line ( without insert mode)
H :- moves the cursor to the first character of the first line of the screen.
M :- moves the cursor to the first character of the middle line of the screen
Ctrl E :- scroll up line wise.
Ctrl Y :- scroll down line wise.
Ctrl U :- scroll up half window.
Ctrl D :- scroll down half window
Ctrl F :- scroll a screen in forward direction.
Ctrl B :- scroll a screen in reverse direction.
w :- moves the cursor at the beginning of next word.
e :- moves the cursor at the ending of next word .
b :- moves the cursor at the beginning of previous word.
G :- moves the cursor at the end of file.
x :- deletes the single character.(similar to DEL).
nx :- deletes “n” no. of character from current cursor position.
X :- deletes a single character (similar to DEL)
dw :- deletes the word from current cursor position.
ndw :- deletes the “n” words from current cursor position.
dd :- deletes the line.
ndd :- deletes the “n”lines from current cursor position.
Y:- yanking or copying of lines.
p:- pastes yanked(copied)lines.
:set nu :- to set the temporary line number to the file contents.
:set nonu :- to unset the temporary line number of the file contents.
:set showmode :- it displays various modes of operation of vi editor such as insert mode append mode etc.
:set noshowmode :- it unset “set showmode” effects from VT editor.
:n:- to go to particular line no for “n” refer to specific line no.
:$:- moves the cursor at the end of file (similar to G)
/ :- to search the word in the file.
q :- to quit the file without saving the changes.
wq:- to save the changes and quit the file.
:4d:- to delete forth line
:2,4d:- to delete 2 to 4 lines.
:3 co 6:- to copy line no3 and paste after line number 6.
:2,4 co 6:- to copy lines 2 to 4 and paste after line number6.
:3 mo 6:- to move line number3 after line number6.
:2,4 mo 6:- to move lines 2 to 4 and paste after line number 6.
:4,6 w >> /:- it writes lines 4 to 6 from currently opened file and appends the data in the destination file.
:2,6 w/:- it creates new file and writes lines 2 to 6 from currently opened file to it.
r:- to replace single character.
cw:- to change single word.
:!:- to run OS command while running Vi editor.

Sunday, March 1, 2009

RMAN backup configuration settings

$ rman target sys/oracle123@ig catalog rman/rman@rcatalog

Recovery Manager: Release 10.2.0.3.0 - Production on Sun Mar 1 15:51:08 2009

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

connected to target database: IG (DBID=2494937948)
connected to recovery catalog database

RMAN> show all
2> ;

starting full resync of recovery catalog
full resync complete
RMAN configuration parameters are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE';
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE SBT_TAPE TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 2 BACKUP TYPE TO BACKUPSET;
CONFIGURE DEVICE TYPE SBT_TAPE PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/icegate/data01/ig/backup_db_%d_S_%s_P_%p_T_%t';
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/orahome/oracle/product/10.2.0/dbs/snapcf_IG1.f'; # default

Followers

About Me

My photo
N.Delhi, Delhi, India
I am an Oracle Certified Professional, Oracle 9i/10G DBA, having 4+ years of core DBA experience.