P. 1
Daily rpt

Daily rpt

|Views: 3|Likes:
Published by gr8ajay

More info:

Published by: gr8ajay on Mar 11, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as TXT, PDF, TXT or read online from Scribd
See more
See less

03/11/2011

pdf

text

original

******************************************************************************** ******************* #### 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

ixf -rw-r----./catdb/WWProdCompatCol lection./catdb/WWProdCompatCollection.tar -rw------.echo.sleep 1800.Z.1 opicmadm opicadmg 58552105 Jun 26 2007 .tar.1 opicmadm opicadmg 51469138 Jun 09 2007 ././catdb/trsnetterpass1b.200708281353 -rw-r----.echo.ixf < ea4-PROD-/home/opicmadm=>df -g . done while true do clear./CATNAV1./CATNAV1.1 opicmadm opicadmg 60897748 Dec 11 15:24 . done ea4-PROD-/home/opicmadm=>find . df -g grep opicmdb2.del ./x .200708281353 02032301169 ******************************************************************************** ******************************* ************************************************** AIX ************************ **************************** ******************************************************************************** ******************************* ### Links ### ******************************************************************************** ******************************* .ProdIDBckup -rw-r----./catdb/ddl/wwcto1.1 opicmadm opicadmg 75349265 Jun 08 2007 .47 6./pad/Prd_Migration/AC TA_data_exp_imp_Load/char_value.echo.1 opicmadm opicadmg 77147362 Dec 05 13:19 .del ea4-PROD-/home/opicmadm=>gzip .ixf.1 opicmadm opicadmg 51469138 Jun 09 2007 . grep -iv "z $" \-rwx-----. echo.1 opicmadm opicadmg 86061849 Aug 29 2007 ./catdb/trsnetterpass1b .060607. echo. df -g .echo.del -rw------. echo./bertil/eAnnv12/id/All .1 opicmadm opicadmg 75288399 Jun 06 2007 ./bigcat/bigcat.1 opicmadm opicadmg 53698560 Jun 04 2007 ./ Filesystem GB blocks Free %Used Iused %Iused Mounted on /dev/opicmadmlv 19.1 opicmadm opicadmg 65708658 Jun 27 2007 .del ea4-PROD-/home/opicmadm=>o. -size +50549203c -exec ls -ltr {} \./catdb/ddl/wwcto1.del -rw-r----./x -rw-r----./catdb/ddl/wwcto.ixf -rw------.48 67% 12296 1% /home/opicmadm ea4-PROD-/home/opicmadm=>gzip . date sleep 1800. date.del ./catdb/ccto2 -rw------.

/ awk '/[0-9]+%/ $4>=50 {print $4}' e25ciapp004-/home/opicmadm/ajay=>df .echo "Val ue is $n"./ awk '{print "Used FS is : " $4}' Used FS is : %Used Used FS is : 60% e25ciapp004-/home/opicmadm/ajay=>df . ksh: ./: cannot execute Value is $n e25ciapp004-/home/opicmadm/ajay=>n=df ./ awk ' $4>61 {print $4}' . n=df ./ awk /[0-9][0-9]%/{print } Value is e25ciapp004-/home/opicmadm/ajay=>echo "n=df ./ awk '/*%/ {print "Used FS is : " $4}' awk: 0602-521 There is a regular expression error./ awk '/[0-9][0-9]/ {print $4}' %Used 60% e25ciapp004-/home/opicmadm/ajay=>df ./ awk '{print $3}' Free 10647328 e25ciapp004-/home/opicmadm/ajay=>df . n=df ./ Filesystem 512-blocks Free %Used Iused %Iused Mounted on /dev/lv01 26214400 10647328 60% 6673 1% /home/opicmadm e25ciapp004-/home/opicmadm/ajay=>df ./: cannot execute Value is e25ciapp004-/home/opicmadm/ajay=>echo 'n=df ./ awk ' $4>50 {print $4}' 60% e25ciapp004-/home/opicmadm/ajay=>df .ec ho "Value is $n". ksh: ./ awk '/[0-9][0-9]%/{print $4}'"./ awk '{print $4}' %Used 60% e25ciapp004-/home/opicmadm/ajay=>df .ec ho "Value is $n"./ awk '/[0-9][0-9]%/{print }' Value is e25ciapp004-/home/opicmadm/ajay=>df ./ awk '/[0-9][0-9]%/{print $4}'./ awk '/[0-9][0-9]%/{print $4}'./ awk '/[0-9][0-9]%/ {print "Used FS is : " $4}' Used FS is : 60% e25ciapp004-/home/opicmadm/ajay=>n=df ./ awk '/[0-9]+%/ $4>=60 {print $4}' e25ciapp004-/home/opicmadm/ajay=>df ./ awk '/[0-9][0-9]%/{print $4}''.e25ciapp004-/home/opicmadm/ajay=>df ./ awk '/[0-9]+%/ $4>50 {print $4}' e25ciapp004-/home/opicmadm/ajay=>df . *?+ not preceded by valid expression The source line number is 1./ awk ' $4>70 {print $4}' e25ciapp004-/home/opicmadm/ajay=>df ./ awk ' $4>60 {print $4}' 60% e25ciapp004-/home/opicmadm/ajay=>df ./ awk '/[0-9]+%/{print $4}' 60% e25ciapp004-/home/opicmadm/ajay=>df ./ awk '/[0-9][0-9]%/ {print "Used FS is : " $4}' Used FS is : 60% e25ciapp004-/home/opicmadm/ajay=>df .echo 'Val ue is $n'. The error context is >>> /*%/ <<< {print "Used FS is : " $4} e25ciapp004-/home/opicmadm/ajay=>df .

67.akadia.in. http://www.salary from employees order by salary desc ) a where ROWNUM <= 10 ) where rnum =2 .oracle.com/technology/oramag/oracle/plsql/index./ awk ' $4 > /^7/ {print $4}' 60% e25ciapp004-/home/opicmadm/ajay=>who opicmadm pts/0 Oct 16 07:34 (adashore.html#Oracle%20Publications%20(PDF) ******************************************************************************** ******************************* ##Second largest value from list select * from ( select a.html All Oracle Magazine Editions are available here http://www.e25ciapp004-/home/opicmadm/ajay=>df .ibm.p hp http://www.oracle.html#604 http://www./ awk ' $4 > /59/ {print $4}' 60% e25ciapp004-/home/opicmadm/ajay=>df .oracle.html http://www. ROWNUM rnum from ( select first_name.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./ awk ' $4 > /64/ {print $4}' 60% e25ciapp004-/home/opicmadm/ajay=>df .com/articles/8i/CostBasedOptimizerAndDatabaseStatistics.oracle.com/oracle/or-articles/foot5 http://www.com/oracle/or-articles/ http://www.dbazine.com/html/publications.html All publication's pdf and html http://www.com/oramag/oracle/index./ awk ' $4>59 {print $4}' 60% e25ciapp004-/home/opicmadm/ajay=>df .dbazine.com/oramag/oracle/02-jul/o42ocp.50.dbazine.html http://www.*.html PL/SQL best practice from ORACLE.hu/sqlbible0076.com) opicmadm pts/2 Oct 15 15:59 (9./ awk ' $4 > /^6/ {print $4}' 60% e25ciapp004-/home/opicmadm/ajay=>df .tar.com/technology/oramag/oracle/02-sep/o52ocp.com/oramag/oracle/01-jan/o11sql.com/oracle/or-articles/foot4 http://www.oracle-base.oracle.

where cost relates to system resources. 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.This method is used if internal statistics are pres ent. The CBO checks several possible execution plans and selects the one with th e lowest cost. Cost Based Optimizer (CBO) .******************************************************************************** ******************************* Long--> Var len char data upto 2GB. Analyze the table to find migrated rows. If Oracle encounters bad rows. ANALYZE TABLE ORDERS VALIDATE STRUCTURE INTO SCOTT.Char data ANALYZE TABLE ORDERS VALIDATE STRUCTURE. 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. 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.mm) timestamp<0-9/6> with local time zone (data stored as db time zone) BLOB/BFILE---> unstructured binary data (max 4GB) CLOB --. ANALYZE TABLE ORDERS VALIDATE STRUCTURE CASCADE. A row is chained if the row is bigger than the block size of the database. use the following syntax. Oracle does a COMPUTE. You can also validate the blocks of the indexes associated with the table by specifying the CASCADE clause. When using the ESTIMATE option. . If you do not specify the SAMPLE clause. the total number of unused blocks.CORRUPTED_ROWS. Cost Based Optimizer (CBO) and Database Statistics Whenever a valid SQL statement is processed Oracle has to decide how to retrieve the necessary data. ANALYZE TABLE ORDERS ESTIMATE STATISTICS SAMPLE 20 PERCENT. ANALYZE TABLE ORDERS ESTIMATE STATISTICS SAMPLE 200 ROWS. timestamp<0-9/6> timestamp<0-9/6> with time zone (time zone displacement in hr. Or acle samples 1064 rows. and the average free space in each block The average row length ANALYZE TABLE ORDERS COMPUTE STATISTICS.Only the ROWIDs are listed in the CHAINE D_ROWS table ANALYZE TABLE ORDERS LIST CHAINED ROWS. ANALYZE TABLE ORDERS DELETE STATISTICS. To specify a different table name. You can calculate the exact statistics (COMPUTE) of the table or sample a few rows and estimate the statistics (ESTIMATE). it inserts them into the INVALID_ROWS table. This decision can be made using one of two methods: Rule Based Optimizer (RBO) . which was expanded due to an update.This method is used if the server has no internal s tatistics relating to the objects referenced by the statement. This method is no longer favoured by Oracle and will be desupported in future releases.

So using BETWEEN AND has no performance benefits IN ( . A database is an organized collection of information.. If you omit this clause. You have seen how to enable and disable a constraint.. a constraint can have four states: ENABLE VALIDATE This is the default for the ENABLE clause.. retrieves. ENABLE NOVALIDATE This constraint does not validate the existing data. DISABLE VALIDATE The constraint is disabled (any index used to enforce the constraint is dropped). Therefore. and no checks are done on future or existing dat a. To manage databases. relational. There are four main types of databases: hierarchical. last_name. The ON DELETE clause specifies the action to be taken when a row in the parent table is deleted and child rows exist with the deleted parent primary key. ENABLE and DISABLE affect only future data that will be added/modified in the table. A DBMS is a pr ogram that stores. or columns in the table (parent table) that is referenced by the constraint.. The existing data in the table is validated to verify that it conforms to the constraint. You can delete the child rows (CASCADE) or set the foreign key column values to NULL (SET NULL).The foreign key is the column or columns in the table (child table) in which the constraint is created. The relational model consists of the following: Collection of objects or relations Set of operators to act on the relations Data integrity for accuracy and consistency BETWEEN AND is actually translated by Oracle server to a pair of AND conditions: (a >= lower limit) AND (a <= higher limit). In contrast. the VALIDATE and NOVALIDATE keywords in the ALTER TABLE command act on the existing data. ) is actually translated by Oracle server to a set of OR conditions: a = value1 OR a = value2 OR a = value3. Oracle does not allow any inserts/updates/deletes on a table with a DISABLE VALIDATE constraint. but the constraint remains valid. job_id . DISABLE NOVALIDATE This is the default for the DISABLE clause. Changing the constraint status to DISABLE VALIDATE is a quick way to make a table read-only. The constraint is disabled. So using IN ( . ) has no performance benefits SELECT employee_id. and more recently object relational. the unique key column. Oracle will not allow you to delete from the parent table if child records exist. No DML operation is allowed on the table because future changes cannot be verified. and modifies data in the database on request. network. but enables the constraint for future constraint checking. the referenced key is the primary key. you need database management systems (DBMS).

search_string.NVL(cust_marital_status.'unknown')).923.customers GROUP BY cust_gender. [NOT] IN 5 [NOT] BETWEEN 6 NOT logical condition 7 AND logical condition 8 OR logical condition SELECT last_name.2)=45.923. or if the employee is a sales representative.92.0)=46.000. salary FROM employees WHERE job_id = SA_REP OR job_id = AD_PRES AND salary > 15000.923)=45. TRUNC(45.-------------. TRUNC(45.COUNT(*) FROM sh. trim_character FROM trim_source) REPLACE(text. string .FROM employees WHERE job_id LIKE %SA\_% ESCAPE \ . GENDER MARITAL_STATUS COUNT(*) -----. [.ROLLUP(NVL(cust_marital_status.-2)=0 FROM DUAL. ******************************************************************************** ******************* SELECT CUST_GENDER gender . SELECT TRUNC(45. n. string ) RPAD(column expression. n.'unknown') marital_status . Order Evaluated Operator 1 Arithmetic operators 2 Concatenation operator 3 Comparison conditions 4 IS [NOT] NULL.923. string ) TRIM(leading trailing both. ROUND(45. INSTR(column expression.2)45. [n] ) LPAD(column expression.---------F married 4701 . job_id.-1)=50 FROM DUAL. LIKE. Override rules of precedence by using parentheses.m].923. ROUND(45.923.replacement_string) How to enter "Rajiv's" in a column? or update by this value? SELECT ROUND(45.92. Select the row if an employee is a president and earns more than $15. The order of execution for a SELECT statement is as follows: FROM clause WHERE clause SELECT clause ORDER BY clause ***You can sort by a column that is not in the SELECT list.

Oracle continues this process until all tables are joined into the result.'unknown').NVL(cust_marital_status.cust_gender). An outer join (containing the (+) operator) cannot be combined with another cond .-------------------F married M married married F single M single single F unknown M unknown unknown COUNT(*) ---------4701 9328 14029 (subtotal) 5898 12868 18766 (subtotal) 5716 11489 17205 (subtotal) 50000 (grand total) JOIN:---->> To execute a join of three or more tables. Oracle takes these steps: 1.COUNT(*) FROM sh. 3.customers GROUP BY ROLLUP(NVL(cust_marital_status.'unknown')). Oracle joins two of the tables based on the join conditions.'unknown') marital_status . Oracle joins the result to another table. GENDER MARITAL_STATUS -----. GENDER -----F F F F M M M M MARITAL_STATUS COUNT(*) -------------. 2.---------married 4701 single 5898 unknown 5716 16315 (subtotal) married 9328 single 12868 unknown 11489 33685 (subtotal) 50000 (grand total) SELECT CUST_GENDER gender . SELECT CUST_GENDER gender .COUNT(*) FROM sh.NVL(cust_marital_status.F F F M M M M single unknown married single unknown 5898 5716 16315 (subtotal) 9328 12868 11489 33685 (subtotal) The Field which is in rollup will be rolled and sum for filed outside rollup in group by clause will be dispalyed.customers GROUP BY ROLLUP(cust_gender.NVL(cust_marital_status. for in example above cust_gender is in GROUP BY but out side of ROLLUP there for group some for each gender (value) cust_gender is displayed. based on join conditions.'unknown') marital_status . comparing thei r columns.

SQL> SELECT c.department_id (+) = d.department_id (+) SQL> / WHERE e.city 2 FROM countries c. departments d 3* WHERE e. d. Temporary tables are used to hold t emporary data specific to a transaction or session.employee_id.department_id UNION SELECT e. The following query works. d. .department_id (+) = d.A constraint can be considered as a rule or policy defined in the database to enforce data integrity and business rules.department_name FROM employees e. locations l 3 WHERE c. e.'Israel').last_name. departments d WHERE e. e. locations l 3 WHERE c.department_id = d.department_id.last_name. A table should have at leas t one column.last_name. d.employee_id. For example.department_name FROM employees e FULL OUTER JOIN departments d ON e. l. the following query is not valid.employee_id.country_name.country_name IN ('India'.country_name.city 2 FROM countries c.department_name FROM employees e.department_id (+) = d.city (+) LIKE 'B%'. e. e. because the outer-join operator is used on the LOCATI ONS table and the IN condition is on the column from COUNTRIES table. l.department_name 2 FROM employees e. departments d WHERE e.department_id (+). SQL> SELECT c. as in the following query: SELECT e.department_id. d.ition using the OR or IN logical operators.department_id (+) * ERROR at line 3: ORA-01468: a predicate may reference only one outer-joined table SQL> The full outer join can be achieved using the UNION operator and the outer-join operator. CONSTRAINT:-. Trying to perform a similar query with the outer-join operator will producean er ror: SQL> SELECT e.employee_id.country_id (+) 4* OR l. FULL OUTER JOIN ============= SELECT e.country_id = l.country_id (+) 4* AND c.You can also create object tables and temporary tables.last_name.country_id = l.department_id = d. d. Table:-Defined with columns and stores rows of data.

T he object can even be part of another database. The existing data in the table is validated to verify that it conforms to the constraint. but the constraint is kept valid. 2) ENABLE NOVALIDATE This does not validate the existing data. Index:. Synonym:. a constraint can have four states: 1) ENABLE VALIDATE This is the default for the ENABLE clause. A composite index has more than one column in the index.A customized representation of data from one or more tables and/ or views . Views are used as a window to show information from tables in a certain way or to restrict the in formation. Creating and d ropping indexes does not affect the storage of data in the underlying tables. and a private synonym is accessible only to its owner. A public synonym is accessible to all users of the datab ase. Sequences are useful for genera ting unique serial numbers or key values. Because a synonym is simply an alias. Oracle has B-tree and bitmap indexes.A structure associated with tables used to speed up the queries. You can create unique or nonunique ind exes. An inde x is an access path to reach the desired row faster. No DML operation is allowed on the table b ecause future changes cannot be .A way to generate continuous numbers. or other accessible database o bject. it requires no storage other than its definition in t he data dictionary. sequence. The foreign key defined on a table refers to the primary key or unique key o f another table. FOREIGN KEY Establishes a parent-child relationship between tables by using comm on columns. the VALIDATE and NOVALIDATE keywords in the ALTER TABLE statement a ct on the existing data. The sequence definition is stored in the data dict ionary. view. In contrast.An alias for any table. Synonyms are useful because they hide the identity of the underlying object. The c olumn data types in parent table and child table should match. but enables the c onstraint for future constraint checking. The fore ign key is the column or columns in the able (child table) where the constraint is created. Sequence:. In most cases unique indexes are created automatically by Oracle when you create a primary key or a uniqu e key constraint in a table. 3) DISABLE VALIDATE The constraint is disabled (any index used to enforce the co nstraint is also dropped). The referenced key is t he primary key or unique key column or columns in the table (parent table) that is referenced by the constraint. Views are queries stored in the database that select data from one or more tables. ENABLE and DISABLE affect only future data that will be added or modified in the table. Therefore.View:. A foreign key constraint protects one or more columns in a table by ensuring t hat for each non-NULL value there is data available elsewhere in the database with a primary or unique key.

verified. and no checks are done on future or existing data. The constraint is disabled. 4) DISABLE NOVALIDATE This is the default for the DISABLE clause.com/articles/9i/Case9i.gz FeatureCollection.php .oracle-base.200711121230.200711131307.gz WWProdCompatCollection.200711122030.gz http://www.gz WWProdCompatCollection. WorldWideProductCollection.200711132030.

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->