ALTER TABLESPACE TDW_PROD ADD DATAFILE '+DATA_DISKGRP/bivis/datafile/bivis_28.dbf' SIZE 1024M AUTOEXTEND ON NEXT 1024M MAXSIZE UNLIMITED
queries select NAME,TOTAL_MB,FREE_MB,FREE_MB/TOTAL_MB*100 from v$ASM_DISK;
select NAME,TOTAL_MB,FREE_MB,FREE_MB/TOTAL_MB*100 from v$ASM_DISKGROUP;
select NAME,TOTAL_MB,FREE_MB,TOTAL_MB-FREE_MB,FREE_MB/TOTAL_MB*100 from v$ASM_DISK
select NAME, REDUNDANCY, FAILGROUP from V$ASM_DISK ;
select operation from v$ASM_OPERATION;
select name,path,MOUNT_STATUS,HEADER_STATUS,MODE_STATUS,STATE,total_mb,free_mb from v$asm_disk
dropping/adding/cheking diskALTER DISKGROUP CHECK ALL; ALTER DISKGROUP DROP DISK ; This command drops the disk and also initiates a REBAL operation We can monitor the status of REBAL operation from v$asm_operation Run select * from v$asm_disk and get different statuses of hdisk8. eg: ALTER DISKGROUP DATA_DISKGRP DROP DISK DATA_DISKGRP_0004;
DATA_DISKGRP_004 is alias for /dev/rhdisk8.
SQL> select OPERATION from v$asm_operation;
OPERA ----- REBAL
ALTER DISKGROUP DATA_DISKGRP ADD DISK ‘mention the disk path’ NAME DATA_DISKGRP_004 REBALANCE POWER 5;
This query will give more details about disk usage. SET LINESIZE 145 SET PAGESIZE 9999 SET VERIFY off COLUMN disk_group_name FORMAT a15 HEAD 'Disk Group Name' COLUMN disk_file_path FORMAT a17 HEAD 'Path' COLUMN disk_file_name FORMAT a20 HEAD 'File Name' COLUMN disk_file_fail_group FORMAT a20 HEAD 'Fail Group' COLUMN total_mb FORMAT 999,999,999 HEAD 'File Size (MB)' COLUMN used_mb FORMAT 999,999,999 HEAD 'Used Size (MB)' COLUMN pct_used FORMAT 999.99 HEAD 'Pct. Used' break on report on disk_group_name skip 1 compute sum label """" of total_mb used_mb on disk_group_name compute sum label ""Grand Total: "" of total_mb used_mb on report SELECT NVL(a.name, '[CANDIDATE]') disk_group_name , b.path disk_file_path , b.name disk_file_name , b.failgroup disk_file_fail_group , b.total_mb total_mb , (b.total_mb - b.free_mb) used_mb , ROUND((1- (b.free_mb / b.total_mb))*100, 2) pct_used FROM v$asm_diskgroup a RIGHT OUTER JOIN v$asm_disk b USING (group_number) ORDER BY a.name /
Fixing issues of Custom Forms in Forms Servlet using Doc id 269634.1 You need to put your CUSTOM TOP variable (where the form resides) path information into Apache/Jserv/etc/formservlet.ini file So open formservlet.ini and add this entry at the end # Begin customizations XXTAC_TOP=/d01/app/applmgr/prodappl/xxtac/11.5.0 # End customizations
Copy the specific things to ur file ls -l > s1.sh cat s1.sh |awk '{print $9}' > s2.sh
ls *.dbf|wc -l --- number of files in the PWD t ls -l /data/ora007/od08oadb01/*dbf|awk '{print $9}' > 007.txt $9 is column number column 9 is redirected to new file 007.txt
date=`date +%F` # date +%F 2010-09-19 # date Sun Sep 19 22:49:21 EDT 2010
ls -l *dbf|awk 'BEGIN {total=0} {total+=$5} END {print total/1024/1024/1024}' $5 is the column number column five size column in GB will be printed
ls -l [a-g]*dbf|awk 'BEGIN {total=0} {total+=$5} END {print total/1024/1024/1024}' gives the total size of the DBF's starting from a to g
To find out the size of the datafiles from [a-h]*dbf
du -sk [a-h]*dbf |awk 'BEGIN {total=0} {total+=$1} END {print total/1024/1024}' du -sk [i]*dbf |awk 'BEGIN {total=0} {total+=$1} END {print total/1024/1024}' du -sk [j-z]*dbf |awk 'BEGIN {total=0} {total+=$1} END {print total/1024/1024}'
ls -l | grep 'Jan 9' | awk '{print$9}' >one.sh -------in this Jan 9 is the day for which we are compressing and one.sh is the file name. Next open one.sh and do :%s,^,compress ,g OR : %s,^,rm -rf ,g save the file and run it also do a chmod 777 one.sh
To remove one month files at a time ls -l|grep 'Aug '|awk '{print$9}' > one.sh chmod 777 one.sh vi one.sh : %s,^,rm -f ,g ./one.sh
ls -l |grep 'Feb' |awk '{print$9}' > one.sh
ls -l |grep 'Feb' |grep *.req |awk '{print$9}' > one.sh
sdiff sdiff -s -w 50 tb.txt sb.txt 50 is word length
diff $IAS_ORACLE_HOME/Apache/Apache/conf/httpd.conf $HOME/httpd.conf.orig > /tmp/httpddiff.txt SIZEDIFF=`ls -lA /tmp/httpddiff.txt | awk -F' ' '{print $5}'` if [ $SIZEDIFF -gt 0 ] then mailx -s "VIS irecruitment setup is missing in PROD" emaladdress < /tmp/httpddiff.txt mailx -s "vis irecruitment setup is missing in PROD"" onemoreemailaddress < $HOME/irecmessage.txt fi
eg of mailx command: cat /tmp/mailbody | mail -s "Ignore Alerts: ABC PREPROD Apachebounce on hostname" abcd@abc.ice.com -- -r alertfromserver@abc.ice.com < a
to check any errors present in the file cat /oracle/qa/qaappl/admin/QA/log/u2819091.log |grep -i ORA-
You can kill sessions you started. $ vncserver -kill :[display number]
$ vncserver -kill :0 Wait for 5 mins and delete the file as follows: $ rm /tmp/X11-unix/X0 login as appl user for the instance refreshed and start the vnc services as follows: $ vncserver :0 -localhost $ xhost +
To set your password the first time (or reset it later) run this command: $ /usr/bin/vncpasswd
Script to delete the dump files 21 days old need to be in cron 30 20 * * * find /ORACLE/eul10g/backup \( -name '*.dmp*' \) -mtime +21 -exec rm -f {} \; ---- As oracle user cron.
To find Symbolink links and replace to corrent ones more rename_softlinks.sh #!/bin/ksh cd $ORACLE_HOME find . -type l -exec ls -l {} \; | grep prod | awk '{gsub("prod","qa",$11); print "rm "$9; print "ln -s " $11 " " $9}'
To find links under any top find . -type l -print | xargs ls -ld
How to find the symbolic links that point to the old path in your oracle_home and appl_top. This command is useful in cloning after restore from source to target that symbolic link are not pointing to source.
ls -al `find . -type l` | grep $OLD_PATH
To find all the text files that contains the old path at the UNIX level.
How to Sort files based on Size of file in a Directory Useful in finding out spaces issues ls -l | sort -nrk 5 | more
How to find a "word" or pattern in all files in a directory & subdirectories find . -name "*" -exec grep -l {} \; -print for example I want to search for word oracle find . -name "*" -exec grep -l oracle {} \; -print
How to delete files older than N number of days , Useful to delete old log files find . -name '*.*' -mtime + -exec rm {} \; for example if I want to delete all files older than 7 days find . -name '*.*' -mtime +7 -exec rm {} \;
To edit window registry regedit (on run prompt)
To view a Linux desktop remotely 1. SSH to Linux server 2. Start the VNC server by typing 'vncserver' at the command line. Remember the display number. 3. Connect to the VNC server using a VNC viewer. Enter host name, display number, and VNC password for the user who started the session. 4. When finished, don't log out of Linux, just close the VNC viewer window. 5. If you wish, kill the VNC server session when finished. Or keep it running and use it next time you need to connect.
To use VNC to control or view a computer behind a firewall The official VNC FAQ has a good explanation of using VNC through a firewall at http://www.realvnc.com/faq.html#firewall. You must either open port 5900+N where N equals the VNC port assigned when you created a connection, or you must use SSH tunneling to channel the VNC traffic through ports that normally allow traffic through a firewall. More detailed information is available at the link above.
ps command ps -fu apdev
sort, delete rows, columns ls -lrt |sort -nr -k5 |head -15 ls -lart |head -200 ls -lrt > a.sh vi a.sh esc :3000,$d -- to delete all line after 3000 use ^d for before 3000 deletion $cut -c 55-95 a.sh > b.sh vi b.sh esc :%s,compress,^,g save sh b.sh
To know port is free or not netstat -na lsof |grep
To know n/w IP netstat -iv
tar commands Simple tar commands tar -cvf directory.tar direcotry tar -xvf director.tar
tar cvfzp TEST_apps_inst_myserver.tar.gz apps inst tar cvfzp TEST_dbhome_myserver.tar.gz db/tech_st Extract each of the tar files with the command tar xvfzp tar xvfzp TEST_apps_inst_myserver.tar.gz
nohup tar -zxvf ------.gzip or .gz &
tar cf - . | ssh 192.168.100.107 "cd /path/target_directory; tar xf - "
Remote tar and untaa eg: ssh usaxsxx "cd /ORACLE/prod/9.2.0;tar cf - ." | tar xf - ssh usaxsxx "cd /ORACLE/prod/8.0.6; tar cf - ." | tar xf - ssh usaxsxx "cd /ORACLE/prod/9iAS; tar cf - ." | tar xf - ssh usaxsxx "cd /ORACLE/apps/prod; tar cf - [a-b]*" | tar xf - ssh usaxsxx "cd /ORACLE/apps/prod; tar cf - [d-s]*" | tar xf - ssh usaxsxx "cd /ORACLE/apps/prod; tar cf - [u-z]*" | tar xf - ssh usaxsxx "cd /ORACLE/apps/prod; tar cf - c[a-n]*" | tar xf - ssh usaxsxx "cd /ORACLE/apps/prod; tar cf - c[p-z]*" | tar xf - ssh usaxsxx "cd /ORACLE/apps/prod/common; tar cf - [a-j]*" | tar xf - ssh usaxsxx "cd /ORACLE/apps/prod/common; tar cf - [p-z]*" | tar xf - ssh usaxsxx "cd /ORACLE/apps/prod/common; tar cf - outbound" | tar xf -
tar cf - [a-b]* | ssh remotehost "cd /ORACLE/apps/narvis; tar xf - " tar cf - [d-s]* | ssh remotehost "cd /ORACLE/apps/narvis; tar xf - " tar cf - [u-z]* | ssh remotehost "cd /ORACLE/apps/narvis; tar xf - " tar cf - c[a-n]* | ssh remotehost "cd /ORACLE/apps/narvis; tar xf - " tar cf - c[p-z]* | ssh remotehost "cd /ORACLE/apps/narvis; tar xf - " tar cf - [a-j]* | ssh remotehost "cd /ORACLE/apps/narvis/common; tar xf - " tar cf - [p-z]* | ssh remotehost "cd /ORACLE/apps/narvis/common; tar xf - "
tar cf - . | ssh remotehost "cd /ORACLE/narvis/8.0.6.3; tar xf - " tar cf - . | ssh remotehost "cd /ORACLE/narvis/9iAS; tar xf - "
tar cf - . | ssh remotehost "cd /ORACLE/narvis_conf/8.0.6.3; tar xf - " tar cf - . | ssh remotehost "cd /ORACLE/narvis_conf/9iAS; tar xf - "
Tar split nohup tar cvf - OraHome_1 2> /11iGold/backup/OraHome_1.log | gzip | split -b 2000m - /11iGold/backup/OraHome_1.tar.gz & This can be restored using the follwing command if required: nohup cat /11iGold/backup/OraHome_1.tar.gz?? | gunzip | tar xf - &
To zip files several files at a time zip -r /tmp/`uname -n`_`date +%m%d%y.%H%M`_iAS.zip \ $IAS_ORACLE_HOME/Apache/Apache/conf/* \ $IAS_ORACLE_HOME/Apache/Apache/logs/* \ $IAS_ORACLE_HOME/Apache/Jserv/etc/* \ $IAS_ORACLE_HOME/Apache/Jserv/logs/*
rsync if refired it will pickup from where it failed “rsync –exclude=ABc/ --log-file= -avH ”
RSYNC failed and restarted it. Please monitor the rsync and restart in case of failure. Location: /d33/oravis/visdata To Monitor: tail –f nohup.out (and) ps -ef | grep rsync Command used to rsync: nohup rsync -avH /snap/oravis/visdata/ /d33/oravis/visdata/ &
Some more rsync commands nohup rsync -a -v -H /snaps/d01/applmgr/ /d01/appltst/ > /d01/appltst/rsync.log & nohup rsync -a –v -H /cosxaor0o_d02oracle/ /d02/oratst/ > /d02/oratst/rsync.log & nohup rsync -a -v -H /snaps/d03/oracle/ /d03/oratst/ > /d03/oratst/rsync.log &
One more rsync example rsync -avH /d01/applcrp2/inst/apps/* $REFRESH/inst/apps/ --exclude "CRP2_vcosxaor33/logs/" --exclude "CRP2_vcosxawo14/logs/" --exclude "CRP2_vcosxaor33/appltmp/" --exclude "CRP2_vcosxawo14/appltmp/"
some more rsync eg: rsync commands and they can be submitted as background jobs using the nohup command.
----------------------- Config file backup commands from DB side [oravis@hostname]$ more db_bkp.sh REFRESH=$HOME/REFRESH_FILES_DB.`date +%m%d%y` mkdir -p $REFRESH/ORACLE_HOME/appsutil $REFRESH/TNS_ADMIN cp -rp $ORACLE_HOME/dbs $REFRESH/ORACLE_HOME cp -rp $ORACLE_HOME/*env $REFRESH/ORACLE_HOME cp -rp $ORACLE_HOME/appsutil/*.xml $REFRESH/ORACLE_HOME/appsutil cp -rp $TNS_ADMIN $REFRESH/TNS_ADMIN
To run alert commands repeatedly while true do date sqlplus "/as sysdba" @temp_alert1.sql sleep 10 clear done
To know number of CPU's on AIX m/c lsdev -Cc processor
titles of each xterm window If we add this to $HOME/.kshrc (assuming KSH is the shell being used), the information that is constant throughout the lifetime of the shell. echo ""\033]0;${USER}@${HOST}\007"" The answer is available freely on the internet: http://www.faqs.org/docs/Linux-mini/Xterm-Title.html
How to run sibclean As any of these users rlakshmi $ /usr/local/bin/sudo /usr/sbin/slibclean This will clean up any unused modules in kernel and library memory which may cause installation or runtime problems
Setup the SSH Key between machine1 and machine2
Scp machine1:/home/applmgr/.ssh/id_dsa.pub to machine2:/home/applmgr/.ssh/authorized_keys2
Verify that the ssh key is working from usellx08 to the config/middle tiers of the cloned instance
machine1> ssh machine2
machine2>exit
Connection to machine2 closed
machine1>
We can also generate the dsa key if not working as : ssh-kegen -t dsa
Control file creation script cat create_controlfile_script_for_newdb.sh #!/bin/ksh
To check if package/rpm is installed rpm –qa grep {rpm_name} (From root) eg: rpm -q binutils To install package/rpm rpm –ivh {rpm_name} (From root)
If you execute rpm with the -qa options (q for query mode, a for all installed packages) you will see the following if it is installed:
[oravis@myserver~]$ rpm -qa | grep libstdc++-devellibstdc++-devel-3.4.6-10 If your on a 64bit OS how do you know if this is the 32bit or 64bit version. You need specify a query format in the rpm command. following example extract the name, version, release and architecture information for the libstdc++-devel package.
The minimum RAM required is 1024MB, and the minimum required swap space is 1GB. Swap space should be twice the amount of RAM for systems with 2GB of RAM or less and between one and two times the amount of RAM for systems with more than 2GB.
You also need 2.5GB of available disk space for the Oracle Database 10g Release 2 software and another 1.2GB for the database. The /tmp directory needs at least 400MB of free space. To check the available disk space on your system, run the following command:
$/sbin/sysctl -a | grep sem kernel.sem = 250 32000 100 128
Create the Oracle Groups and User Account Next, create the Linux groups and user account that will be used to install and maintain the Oracle Database 10g Release 2 software. The user account will be called oracle, and the groups will be oinstall and dba. Execute the following commands as root:
passwd oracle Ex: # passwd oracle Changing password for user oracle. New password: Retype new password: all authentication tokens updated successfully.
home_directory : Is the main directory within which the user is expected to store all his files and subdirectories. For a user named ‘neha’ the home directory generally is /home/neha expire_date : This is the date on which the user’s account expires and he/she cannot access the computer anymore unless the account is renewed. initial_group : Every user in Linux belongs to a group which affects his file permissions. The initial group must be a group which already exists. Password : This will be the user’s password to access his account login_name : This will be the user name with which the user will access his account.
Home directory for user Neha is /home/neha Expirty date is 3rd december,2009 Belongs to the ‘root’ group Password is talent123
Incase you do not enter one of the parameters group, home, expire or shell they are replaced by their default values. These default values can be viewed using the “ useradd -D” command and can also be changed.
Configuring Kernel Parameters
Check and edit the /etc/sysctl.conf file with the following lines.
The Linux kernel is a wonderful thing. Unlike most other *NIX systems, Linux allows modification of most kernel parameters while the system is up and running. There's no need to reboot the system after making kernel parameter changes. Oracle Database 10g Release 2 requires the kernel parameter settings shown below. The values given are minimums, so if your system uses a larger value, don't change it. kernel.shmall = 2097152 kernel.shmmax = 536870912 kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 fs.file-max = 65536 net.ipv4.ip_local_port_range = 1024 65000 net.core.rmem_default=262144 net.core.wmem_default=262144 net.core.rmem_max=262144 net.core.wmem_max=262144
If you're following along and have just installed Linux, the kernel parameters will all be at their default values and you can just cut and paste the following commands while logged in as root. cat /etc/sysctl.conf EOF kernel.shmall = 2097152 kernel.shmmax = 536870912 kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 fs.file-max = 65536 net.ipv4.ip_local_port_range = 1024 65000 net.core.rmem_default=262144 net.core.wmem_default=262144 net.core.rmem_max=262144 net.core.wmem_max=262144 EOF /sbin/sysctl -p
Run the following commands as root to verify your settings: /sbin/sysctl -a | grep shm /sbin/sysctl -a | grep sem /sbin/sysctl -a | grep file-max /sbin/sysctl -a | grep ip_local_port_range /sbin/sysctl -a | grep rmem_default /sbin/sysctl -a | grep rmem_max /sbin/sysctl -a | grep wmem_default /sbin/sysctl -a | grep wmem_max
Ex: # /sbin/sysctl -a | grep shm kernel.shmmni = 4096 kernel.shmall = 2097152 kernel.shmmax = 536870912 kernel.shm-use-bigpages = 0 # /sbin/sysctl -a | grep sem kernel.sem = 250 32000 100 128 # /sbin/sysctl -a | grep file-max fs.file-max = 65536 # /sbin/sysctl -a | grep ip_local_port_range net.ipv4.ip_local_port_range = 1024 65000 # /sbin/sysctl -a | grep rmem_default net.core.rmem_default = 262144 # /sbin/sysctl -a | grep rmem_max net.core.rmem_max = 262144 # /sbin/sysctl -a | grep wmem_default net.core.wmem_default = 262144 # /sbin/sysctl -a | grep wmem_max net.core.wmem_max = 262144
For Novell SUSE Linux releases, use the following to ensure that the system reads the /etc/sysctl.conf file at boot time: /sbin/chkconfig boot.sysctl on
Setting Shell Limits for the oracle User Oracle recommends setting limits on the number of processes and open files each Linux account may use. To make these changes, cut and paste the following commands as root: cat /etc/security/limits.conf EOF oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536 EOF
cat /etc/pam.d/login EOF session required /lib/security/pam_limits.so EOF For RHEL4, use the following: cat /etc/profile EOF if [ \$USER = ""oracle"" ]; then if [ \$SHELL = ""/bin/ksh"" ]; then ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fi umask 022 fi EOF
cat /etc/csh.login EOF if ( \$USER == ""oracle"" ) then limit maxproc 16384 limit descriptors 65536 umask 022 endif EOF For SLES 9, use the following: cat /etc/profile.local EOF if [ \$USER = ""oracle"" ]; then if [ \$SHELL = ""/bin/ksh"" ]; then ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fi umask 022 fi EOF
cat /etc/csh.login.local EOF if ( \$USER == ""oracle"" ) then limit maxproc 16384 limit descriptors 65536 umask 022 endif EOF
Enable Trace on any Executable to find out whats happening at O.S. Level truss -eafl -o output.trc -o truss.txt for example for Apache truss -eafl -o output.trc -o truss.txt apachectl
This command will trace any system calls and will help you to find out errors.
How to schedule a Job in Unix Use cronjob crontab -l ( list current jobs in cron) crontab -e ( edit current jobs in cron ) _1_ _2_ _3_ _4_ _5_ $Job_Name 1 - Minutes (0-59) 2 - Hours ( 0-24) 3 - day of month ( 1- 31 ) 4 - Month ( 1-12) 5 - A day of week ( 0- 6 ) 0 -> sunday 1-> monday e.g. 0 0 1 * 5 Means run job at Midnight on 1st of month & every friday crontabs are in /var/spool/cron. The date/time of the users file is the last time they modified /var/cron/log
How to extract cpio file cpio -idmv < file_name (Don’t forget to use sign < before file name)
How to find CPU & Memory detail of linux cat /proc/cpuinfo (CPU) cat /proc/meminfo (Memory)
How to find if Operating system in 32 bit or 64 bit ? For solaris use command isainfo -v If you see out put like 32-bit sparc applications That means your O.S. is only 32 bit but if you see output like 64-bit sparcv9 applications 32-bit sparc applications above means your o.s. is 64 bit & can support both 32 & 64 bit applications
How to find Process ID (PID) associated with any port ? This command is useful if any service is running on a particular port (389, 1521..) and that is run away process which you wish to terminate using kill command lsof | grep {port no.} (lsof should be installed and in path)
How to change a particular pattern in a file ? Open file using vi or any other editor, go in escape mode (by pressing escape) and use
:1,$s/old_pattern/new_parameter/gc ( g will change globally, c will ask for confirmation before changing )
How to create symbolic link to a file ? ln -s pointing_to symbolic_name e.g. If you want to create symbolic link from a -> b ln -s b a (Condition:you should have file b in that directory & there should not be any file with name a)
Grep for word in a zip file unzip -t xmlparserv2.zip |grep HandlerBase unzip -l appsborg2.zip | grep 9.0.4 0 04-18-03 17:10 .xdkjava_version_9.0.4.0.0_production
Redirecting standard error to standard output sh patch.sh 2>&1 | tee patch.log
Printer check lpstat -p printername printer printername is idle. enabled since Mon Sep 15 14:50:53 2008. available.
lpstat -t | grep cac-check-bak
# ls -l test -rw-r--r-- 1 root root 727 Apr 9 17:50 test # lp -d cac-check-bak test request id is cac-check-bak-54 (1 file(s))
# lpstat -o cac-check-bak
STEPS: 1. Verify whether the Printer IP is pingable from the server. root# ping 2. Verify whether we are able to telnet to port 515 (or 9100 if HP) of the Printer IP.
/usr/lib/lp/model/netstandard Step: 2 Enable and Accept The Printer: enable accept Step: 3 Check the printer status. lpstat -t | grep Step: 4 Fire a test print and check the queue. lp -d ( firing printjob)
-----------------------------APPS--------------------------------- SEE NOTE ONE ABOVE
The below are the steps for adding printer on Apps: 1. Login to Application as SYSADMIN. 2. Select System Administrator responsibility. 3. Open Printer -> Register form 4. Enter the Printer name, Type and Description 5. Save
To know hostnae from IP address nslookup IP
Verify hostnames are fully qualified with the domain -server: login as root hostname server.domainname
If the hostname is not fully qualified (with domain name) for a server, perform the following check: cat /etc/sysconfig/network NETWORKING=yes HOSTNAME=server.domainnmae GATEWAY=xx.xxx.xx.xx If the HOSTNAME shows the fully qualified name in this file, then issue a reboot command for the settings to take effect.
To kill LOCAL=NO processes on DB ps -ef | grep 'LOCAL=NO' | grep orad1 | awk '{ print $2 }' | xargs -i -t kill -9 {}
Embedding SQL in Shell #!/bin/sh VAR1=`sqlplus -s username/password end set pagesize 0 feedback off ver off heading off echo off select sysdate from dual; exit; end` echo “system date is ” $VAR1 #end of shell script
Checking the Sun Operating System System and hardware Configuration: Hardware Status: sun4 (UNIX command; ‘arch’) Operating System: SunOS 5.11 Generic sun4u sparc SUNW, Sun-Fire-V240 (UNIX command; ‘uname –a’). CPU: 2 CPU’s. Each having the sparcv9 processor operates at 1503 MHz and has a sparcv9 floating point processor (UNIX command; ‘psrinfo –v’). Memory size: 5120 Megabytes (UNIX command; ‘prtconf |grep size’). Swap Total: (45440k bytes allocated + 4032k reserved = 49472k used) 14468936k available, i.e., 14GB (UNIX command; ‘swap –s’). Check file System mounted and its respective size (UNIX command; ‘df -h’)
To extract jar files jar -xfv timesheet.jar jar xvf $ORACLE_HOME/8402746/ewt3.jar
To split large files split -l 2000 FILE # split -l 50 book sect
This example splits book into 50-line segments named sectaa, sectab, sectac, and so forth.
# split book This example splits book into 1000-line segments named xaa, xab, xac, and so forth.
Following are the most requred OS commands while installing and configuring Oracle Software on Unix/Linux Operating Systems. Operating System: AIX 5L Based Systems (64-Bit) Physical RAM: # /usr/sbin/lsattr -E -l sys0 -a realmem Swap Space: # /usr/sbin/lsps -a
Group and User Creation in Solairs. This post is for creating an Unix Group and a User.
Solaris 5.10 -------------------------------------- Creating a Group: --------------------------------------
For instance: Group - dba
Login as ROOT User
login: root Password: Sun Microsystems Inc. SunOS 5.10 Generic January 2005 #
To Check whther the group is already created.
# grep dba /etc/group or # cat /etc/groupgrep dba
If dba group info is not displayed, then
To create a Group:
# groupadd dba
Syntax: groupadd -g
# cat /etc/groupgrep dba
dba:103:
Note: The gid, which needs to be changed, should be not being the gid of other group. Example: # usermod -g 333 dba UX: groupmod: ERROR: 103 is already in use. Choose another.
To remove a Group:
# groupdel dba
# cat /etc/groupgrep dba
Commands: ---------
Create Group - groupadd Modify Group - groupmod Remove Group - groupdel
For more details, check the man pages i.e. man groupadd, man groupmod, and man groupdel
-------------------------------------- Creating a User Account: --------------------------------------
For instance: User - Oracle
Login as ROOT User
login: root Password: Sun Microsystems Inc. SunOS 5.10 Generic January 2005 #
To Check whther the oracle user is already created.
Note: In the above command Option -Discription -Value ------------- -------------------- -------------------- -d -Home for the Oracle user -/export/home/oracle -m -For making directory -g -Primary Group dba -s -Default Shell for the User -/bin/sh Login -Name -Oracle
For example: To Comment the user and assing secondray group to the user
# usermod -c "Owner of the Oracle Software 10g" -G oinstall oracle
Note: In the above command Option -Discription -Value ------------- -------------------- -------------------- -c -Comment -"Owner of the Oracle Software" -G -econdary -Group oinstall
# grep oracle /etc/passwd oracle:x:100:100:Owner of the Oracle Software 10g:/export/home0/oracle:/bin/sh
To set a password:
# passwd -r files oracle New Password: XXXXXXXX Re-enter new Password: XXXXXXXX passwd: password successfully changed for oracle
Note: Where XXXXXXXX is the new password for oracle User.
To remove a user:
# userdel -r oracle
Note: The "-r" option is used to remove the user's home directory from the system. And the Oracle user account should not be removed until and unles required, and this should not be done on Production Servers.
# grep oracle /etc/passwd
Commands: --------- Create a user - useradd Modify a user - usermod Rmove a user - userdel
seta password to the user- passwd
For more details, please check the man pages in UNIX i.e. man useradd, man usermod, and man userdel
UnZip can be downloaded from the following URLs: Metalink : http://updates.oracle.com/unzips/unzips.html Info-Zip : http://www.info-zip.org.
Perl 5.005 Use the Perl shipped with iAS1022 and RDBMS 9i if available or download it from Perl.com
"Obtain and Install JDK 1.3 on All Applications Middle Tier Server Nodes
Download JDK 1.3 Operating System JDK 1.3 Download Location Sun Solaris (SPARC) http://java.sun.com/j2se/1.3/download.html Windows NT/2000 http://java.sun.com/j2se/1.3/download.html HP HP/UX http://www.hp.com/products1/unix/java/ IBM AIX http://www.ibm.com/developerworks/java/jdk/aix/index.html HP Tru64 UNIX http://www.compaq.com/java/download/index.html Linux http://java.sun.com/j2se/1.3/download.html
follow the installation instructions provided in the package to install the JDK for each Applications middle tier
server node. Take a note for the new JDK 1.3 installation top-level directory with the full path as [JDK13_TOP] [JDK13_TOP]/bin/java -version ---> confirm downloaded version
Convert .sh file to unix format “:set fileformat=unix”
Unix Operating System release Solaris -> cat /etc/release Red Hat Linux -> cat /etc/redhat-release
system log file /var/adm/messages service is /usr/sbin/syslogd ps -ef|grep syslo root 27893 7373 0 00:02:27 pts/4 0:00 grep syslo root 9222 1 0 23:48:53 ? 0:00 /usr/sbin/syslogd
"How to find hostname on Linux/OEL ? Use command “hostname” to find host name of Linux
How to change hostname on Linux/OEL ?
Open file /etc/sysconfig/network using editor like vi , nano or ed Change entry HOSTNAME=XXXXXX to HOSTNAME=New_Host_Name Restart xinetd service or reboot Linux/OEL Restart xinetd service xinetd restart Reboot Linux reboot If you have defined hostname resolution in hosts file then change entry in /etc/hosts
Starting xvfb run this as applvis nohup /usr/bin/X11/Xvfb :0 & and then run this as applvis nohup /usr/bin/X11/mwm &
O/s monitoring use top/iostat/sar/vmstat
Most of the times while viewing big log files in vi editor, you would get "Line too Long" error A simple solution to this problem is to use the fold command:
fold -80 yourfile.log > folded.log
Program to convert plain text files in DOS format to UNIX format. dos2unix *.*
Below is the script which we used, - where certain files in non-prod were pointing to PROD. #! /bin/bash
Manual way of collection and upload $ pwd /d02/oravis/visdb/10.2.0/ccr/bin $ ./emCCR collect Oracle Configuration Manager - Release: 10.3.3.1.0 - Production Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. ------------------------------------------------------------------ Collection and upload done.
Verify in the systems tab of metalink to see the upload is done
To simplify RDA configuration, use an RDA profile, and the best choice is the DB9i profile, even for 10g or 11g, because the DB10g profile is a superset of DB9i that adds stuff we don't care about (for DB Install). First set the ORA* environment variables for the DB of interest, then run the RDA config pass:
Unix: cd {dir you unzipped RDA into} export ORACLE_HOME={dir} export ORACLE_SID={name} ./rda.sh -Syvp DB9i
Next, edit the resulting setup.cfg file, search for 'sysdba' (first hit will be a comment), and change the 2 lines directly above and below as follows: for SQL_LOGIN= replace 'system' with '/' and for SQL_SYSDBA= replace 0 with 1 then save it, and run the (rda) command again, with no arguments this time: Unix: ./rda.sh The output subdirectory will contain a new RDA*.zip file for you to upload
cp qfpt.dat file which should be latest 2.9.5 data release from any of the other instnaces to $PAY_TOP/vendor/2.9.5/data
as , US Super HRMS Manger responsibility --> Submit Processes and Reports Quantum Program Update Installer Platform:REDHAT40 Install in Directory:$PAY_TOP/vendor/quantum
Quantum Data Update Installer Data Source: $PAY_TOPvendor/quantum/data Data File Location: $PAY_TOP/quantum/data
Capture required information before updating rows. Sample Output sqlplus apps select NODE_NAME ,count(*) from FND_CONCURRENT_QUEUES group by NODE_NAME order by NODE_NAME;
NODE_NAME COUNT(*) ------------------------------ ---------- a 2 b 9 c 4 d 41 2
select NODE_NAME2,count(*) from FND_CONCURRENT_QUEUES group by NODE_NAME2 order by NODE_NAME2;
NODE_NAME2 COUNT(*) ------------------------------ ---------- c 15 d 4 39
select TARGET_NODE,count(*) from FND_CONCURRENT_QUEUES group by TARGET_NODE order by TARGET_NODE;