Академический Документы
Профессиональный Документы
Культура Документы
*******************
#### Daily Activity ####
********************************************************************************
*******************
02/02/08:-- We got a Sev1 on Saturday ,2nd Feb for File System usage increased b
eyond 98% on
pokxopi9 websphere file system.
Robert Whaley Called me around 9:00 am IST. I worked for that
,searched few huge files and
compressed them.I decreased usage upto 75%. MN ticket number was #34
553927. I have closed that
ticket.I compressed following logs from year 2007
-rw-r--r-- 1 opicmadm opicadmg 52709398 Aug 28 09:13 ./installedApps/pokxopi
9/eacm.ear/bui.war/temp/CtoSbb20070828091159.123
-rw-rw-rw- 1 opicmadm opicadmg 53096006 Aug 30 07:41 ./installedApps/pokxopi
9/eacm.ear/bui.war/temp/CtoSbb20070830073948.123
......................
......................
......................
************************************************************
*********
************************************************************
*********
cat9tail
while true
do
clear;
echo;echo;echo;
date;
echo;
rpt;
echo;echo;echo;
date
sleep 1800;
done
while true
do
clear;
echo;echo;echo;
date;
echo;
mon;
echo;echo;echo;
date
sleep 1800;
done
while true
do
clear;
echo;echo;echo;
date;
echo;
df -g ./;
df -g|grep opicmdb2;
echo;echo;echo;
date
sleep 1800;
done
02032301169
********************************************************************************
*******************************
************************************************** AIX ************************
****************************
********************************************************************************
*******************************
### Links ###
********************************************************************************
*******************************
e25ciapp004-/home/opicmadm/ajay=>df ./|awk '/[0-9][0-9]%/ {print "Used FS is : "
$4}'
Used FS is : 60%
e25ciapp004-/home/opicmadm/ajay=>df ./
Filesystem 512-blocks Free %Used Iused %Iused Mounted on
/dev/lv01 26214400 10647328 60% 6673 1% /home/opicmadm
e25ciapp004-/home/opicmadm/ajay=>df ./|awk '{print $3}'
Free
10647328
e25ciapp004-/home/opicmadm/ajay=>df ./|awk '{print $4}'
%Used
60%
e25ciapp004-/home/opicmadm/ajay=>df ./|awk '/[0-9][0-9]/ {print $4}'
%Used
60%
e25ciapp004-/home/opicmadm/ajay=>df ./|awk '{print "Used FS is : " $4}'
Used FS is : %Used
Used FS is : 60%
e25ciapp004-/home/opicmadm/ajay=>df ./|awk '/*%/ {print "Used FS is : " $4}'
awk: 0602-521 There is a regular expression error.
*?+ not preceded by valid expression
The source line number is 1.
The error context is
>>> /*%/ <<< {print "Used FS is : " $4}
e25ciapp004-/home/opicmadm/ajay=>df ./|awk '/[0-9][0-9]%/ {print "Used FS is : "
$4}'
Used FS is : 60%
e25ciapp004-/home/opicmadm/ajay=>n=df ./|awk '/[0-9][0-9]%/{print $4}';echo 'Val
ue is $n';
ksh: ./: cannot execute
Value is $n
e25ciapp004-/home/opicmadm/ajay=>n=df ./|awk '/[0-9][0-9]%/{print $4}';echo "Val
ue is $n";
ksh: ./: cannot execute
Value is
e25ciapp004-/home/opicmadm/ajay=>echo 'n=df ./|awk '/[0-9][0-9]%/{print $4}'';ec
ho "Value is $n";
n=df ./|awk /[0-9][0-9]%/{print }
Value is
e25ciapp004-/home/opicmadm/ajay=>echo "n=df ./|awk '/[0-9][0-9]%/{print $4}'";ec
ho "Value is $n";
n=df ./|awk '/[0-9][0-9]%/{print }'
Value is
e25ciapp004-/home/opicmadm/ajay=>df ./|awk '/[0-9]+%/{print $4}'
60%
e25ciapp004-/home/opicmadm/ajay=>df ./|awk '/[0-9]+%/ $4>=60 {print $4}'
e25ciapp004-/home/opicmadm/ajay=>df ./|awk '/[0-9]+%/ $4>=50 {print $4}'
e25ciapp004-/home/opicmadm/ajay=>df ./|awk '/[0-9]+%/ $4>50 {print $4}'
e25ciapp004-/home/opicmadm/ajay=>df ./|awk ' $4>50 {print $4}'
60%
e25ciapp004-/home/opicmadm/ajay=>df ./|awk ' $4>60 {print $4}'
60%
e25ciapp004-/home/opicmadm/ajay=>df ./|awk ' $4>70 {print $4}'
e25ciapp004-/home/opicmadm/ajay=>df ./|awk ' $4>61 {print $4}'
e25ciapp004-/home/opicmadm/ajay=>df ./|awk ' $4>59 {print $4}'
60%
e25ciapp004-/home/opicmadm/ajay=>df ./|awk ' $4 > /59/ {print $4}'
60%
e25ciapp004-/home/opicmadm/ajay=>df ./|awk ' $4 > /64/ {print $4}'
60%
e25ciapp004-/home/opicmadm/ajay=>df ./|awk ' $4 > /^6/ {print $4}'
60%
e25ciapp004-/home/opicmadm/ajay=>df ./|awk ' $4 > /^7/ {print $4}'
60%
e25ciapp004-/home/opicmadm/ajay=>who
opicmadm pts/0 Oct 16 07:34 (adashore.in.ibm.com)
opicmadm pts/2 Oct 15 15:59 (9.50.67.97)
you have mail in /usr/spool/mail/opicmadm
e25ciapp004-/home/opicmadm/ajay=>echo "There are ($who|wc -l) users on the syste
m"
There are (|wc -l) users on the system
e25ciapp004-/home/opicmadm/ajay=>echo "There are $(who|wc -l) users on the syste
m"
There are 2 users on the system
e25ciapp004-/home/opicmadm/ajay=>
********************************************************************************
*******************************
************************************************** ORACLE *********************
*******************************
********************************************************************************
*******************************
### Links ###
http://sqlbible.tar.hu/sqlbible0076.html#604
http://www.oracle-base.com/articles/8i/CostBasedOptimizerAndDatabaseStatistics.p
hp
http://www.oracle.com/oramag/oracle/01-jan/o11sql.html
http://www.dbazine.com/oracle/or-articles/
http://www.dbazine.com/oracle/or-articles/foot4
http://www.dbazine.com/oracle/or-articles/foot5
http://www.oracle.com/technology/oramag/oracle/02-sep/o52ocp.html
http://www.oracle.com/oramag/oracle/02-jul/o42ocp.html
All Oracle Magazine Editions are available here
http://www.oracle.com/oramag/oracle/index.html
PL/SQL best practice from ORACLE.
http://www.oracle.com/technology/oramag/oracle/plsql/index.html
All publication's pdf and html
http://www.akadia.com/html/publications.html#Oracle%20Publications%20(PDF)
********************************************************************************
*******************************
##Second largest value from list
select * from ( select a.*, ROWNUM rnum
from ( select first_name,salary from employees
order by salary desc ) a
where ROWNUM <= 10 )
where rnum =2
********************************************************************************
*******************************
Long--> Var len char data upto 2GB.
timestamp<0-9/6>
timestamp<0-9/6> with time zone (time zone displacement in hr,mm)
timestamp<0-9/6> with local time zone (data stored as db time zone)
BLOB/BFILE---> unstructured binary data (max 4GB)
CLOB --- Char data
ANALYZE TABLE ORDERS VALIDATE STRUCTURE;
If Oracle encounters bad rows, it inserts them into the INVALID_ROWS table.
To specify a different table name, use the following syntax.
ANALYZE TABLE ORDERS VALIDATE STRUCTURE
INTO SCOTT.CORRUPTED_ROWS;
You can also validate the blocks of the indexes associated with the table by
specifying the CASCADE clause.
ANALYZE TABLE ORDERS VALIDATE STRUCTURE CASCADE;
A row is migrated if the row is moved from its original block to another
block because there was not enough free space available in its original block
to accommodate the row, which was expanded due to an update.
A row is chained if the row is bigger than the block size of the database.
Analyze the table to find migrated rows.Only the ROWIDs are listed in the CHAINE
D_ROWS table
ANALYZE TABLE ORDERS LIST CHAINED ROWS;
You can calculate
the exact statistics (COMPUTE) of the table or sample a few rows and
estimate the statistics (ESTIMATE).
ANALYZE command to collect statistics:
The total number of rows in the table and the number of chained rows
The total number of blocks allocated, the total number of unused
blocks, and the average free space in each block
The average row length
ANALYZE TABLE ORDERS COMPUTE STATISTICS;
When using the ESTIMATE option, you can either specify a certain number
of rows or specify a certain percentage of rows in the table. If the rows specif
ied are more than 50 percent
of the table, Oracle does a COMPUTE. If you do not specify the SAMPLE clause, Or
acle samples 1064 rows.
ANALYZE TABLE ORDERS ESTIMATE STATISTICS SAMPLE 200 ROWS;
ANALYZE TABLE ORDERS ESTIMATE STATISTICS SAMPLE 20 PERCENT;
ANALYZE TABLE ORDERS DELETE STATISTICS;
WorldWideProductCollection.200711131307.gz
FeatureCollection.200711121230.gz
WWProdCompatCollection.200711132030.gz
WWProdCompatCollection.200711122030.gz
http://www.oracle-base.com/articles/9i/Case9i.php