Monday, 13 May 2013

SOME USEFUL UNIX COMMANDS



1) To create a empty file
 
          oracle@db$touch file_name   or  oracle@db$ >file_name

in the above cmd oracle@db--> my host name , touch--> cmd to create a file and file_name-->required to file name to create.

2) To display a file contents 

          oracle@db$cat file_name  

note : cat command displays all the content of file if the file is more than the window size you can use more command

         oracle@db$more file_name 

       this more command displays as your window size within time . To see whole content press space bar


3) To search a sting with in a file 


          syntax : oracle@db$ grep sekar file_name

         oracle@db$ grep -i ora-  /oracle/proddb/bdump/alert_PROD.log 

             output :


ORA-19504: failed to create file ""
ORA-00312: online log 2 thread 1: '/data02/proddata/log02a.dbf'
ORA-00312: online log 2 thread 1: '/data02/proddata/log02b.dbf'

grep -->global regular expression print 

i --> for case sensitive

ora-  --> required to search in my file

alert_PROD.log --> input file in this i want to search 


4) To count how many lines in a file 

                 syntax :

                oracle@db$wc file_name 
   
                example : 

oracle@db$ wc alert_DEV.log
  258072  1877537 13329816 alert_DEV.log

258072-->total lines

13329816 -->total words in the file 

if u want only how many line , you can use $wc -l file_name

5)To edit a file using vi editor 

Before a open a file in vi editor , you need to check your current editor 
$echo EDITOR output of the command shows vi means it's ok , if it not returning anything means you need set editor as vi 

check current editor $ echo $EDITOR
To set ediotr            $ export EDITOR=vi

To open a file $ vi alert_ORCL.log
To open a file as read only $ vi -R  alert_ORCL.log or $ view alert_ORCL.log

after opening a file to insert ---> esc + i

to move between line ---> esc + upper arrow or esc + lower arrow 
to search a sting vi mode ---> esc + /string 
to erase a letter ---> esc + x
to erase a whole line ---> esc + dd
to save and quit ---> esc + :wq
to quit without save ---> esc + :q!
to move upper ---> esc + k
to move lower ---> esc + j
to move right side ---> esc + l
to move left side ---> esc + h

6)To list files within a directory 

syntax : oracle@db$ ls 

options :

ls -la ----> to list hidden file including 
ls -ltr  or ls -lrt  ---> for ascending order 
ls -lt ---> for descending  order


7) To make compressed zip file 

Note : In the below all gzip and tar cmd instead of file you can directory also.

To comprees 
syntax : oracle@db$ gzip file_name

To decompress 
syntax : oracle@db$ gzip -d file_name.gz

8) To make tar ( like win-rar in windows ) 


tar - Tape ARchiver

And the options:

c - create 

x - extract
v - verbose output (lists all files as they are extracted)
j - deal with bzipped file

To make tar of some files 

oracle@db$ tar cvf file_name.tar file_name1 file_name2 file_name3

The above command will create file_nam1 , file_name2 and file_name3 into a size file as file_name.tar.
after making tar also the source files will exist like file_nam1 , file_name2 and file_name3.

To make untar 

oracle@db$ tar xvf file_name.tar 

The above cmd will untar the file_name.tar into file_name1 , file_name2 and file_name3 .


9)To make compressed tar 

oracle@db$tar cjvf file_name.tar.bz2 file_name1 file_name2 file_name3

To make decompress 

oracle@db$tar xjvf  file_name.tar.bz2 

10)To check particular process is running or not 

oracle@db$ ps -ef | grep http

To check all the process of particular user process 

oracle@db$ ps -fu oracle 

  

Pls give some comments........:)

Saturday, 13 April 2013

FRM-92095 : ORACLE JInitiator Version too low


       FRM-92095: Oracle JInitiator version too low


If you facing problem when opening ORACLE APPLICATION FORMS browser says FRM-92095: Oracle JInitiator version too low.

Step 1 : download the file from

TO DOWNLOAD JINITIATOR CLICK HERE

Step 2: Install the jinit13122.exe on your Desktop

Step 3: Navigate to : Start->Settings->Control panel ->Java(icon)->Double click and open the Java icon->it will open->java control panel->in that menu open java->after clicking on java menu->u will get view button ->click on view->it will open some row of parameters ->in that double click on Runtime parameters->after clicking on that ->paste this parameter (   -Djava.vendor="Sun Microsystems Inc."    ) without bracket ->after that ->ok->apply->ok

Step 4 : after completing step 4

Step 5 : Test now Forms are opening

Note : before doing the above steps u must have  to install  the Java.

Friday, 12 April 2013

NTP Service Sync on UNIX

NTP SYNC ON LINUX


STEP 1 : STOP THE NTP SERVICE

PROD@oracledb#service ntp stop

STEP 2 : SYNC WITH NTP SERVER

PROD@oralcedb#ntpdate 197.0.0.55

STEP 3: START NTP SERVICE

PROD@oracledb#service ntp start

STEP 4 : CHECK THE STATUS OF NTP SERVICE WHETHER STARTED OR NOT

PROD@oracledb#service ntp status

NTP SYNC ON SOLARIS 5.8

STEP 1 : STOP NTP SERVICE

DEV@DB#./etc/init.d/xntpd stop

STEP 2 : SYNC WITH NTP SERVER 

DEV@DB#ntpdate 197.0.0.55

STEP 3 : START NTP SERVICE 

DEV@DB#./etc/init.d/xntpd start

STEP 4 : CHECK THE STATUS OF NTP SERVICE 

DEV@DB#ps -ef | grep ntp

NTP SYNC ON SOLARIS 5.10

STEP 1 : STOP NTP SERVICE 

TEST@APPS#svcadm disable ntp 

STEP 2 : SYNC WITH NTP SERVER

TEST@APPS#nptdate 197.0.0.55

STEP 3 : START NTP SERVICE 

TEST@APPS#svcadmenable ntp

STEP 4 : CHECK THE STATUS OF NTP SERVICE 

TEST@APPS#svcs -a | grep ntp