Following error occurs while running patchsets.sh supplied by Metalink Document Oracle Applications Current Patchset Comparison Utility - patchsets.sh [ID 139684.1]
patchsets.sh[295]: /usr/bin/grep: 0403-027 The parameter list is too long.
patchsets.sh[295]: /usr/bin/grep: 0403-027 The parameter list is too long.
patchsets.sh[295]: /usr/bin/grep: 0403-027 The parameter list is too long.
patchsets.sh[295]: /usr/bin/grep: 0403-027 The parameter list is too long.
patchsets.sh[295]: /usr/bin/grep: 0403-027 The parameter list is too long.
patchsets.sh[295]: /usr/bin/grep: 0403-027 The parameter list is too long.
patchsets.sh[295]: /usr/bin/grep: 0403-027 The parameter list is too long.
patchsets.sh[295]: /usr/bin/grep: 0403-027 The parameter list is too long.
Error is thrown not only for grep but even for all the OS utilities(sed,date,awk,tr,cp, rm) that are used in the script.
This happens because by default the ouput files are created under /tmp and if and only if /tmp has way too many files in it.
Easy workaround is as follows:
Oracle provides an option to set the output directory by setting a env variable called CUST_TEMP.
Set CUST_TEMP to a empty directory or clear all the files under /tmp and patchsets.sh should work fine.
Other way round
#getconf ARG_MAX
12345
This means that ARG_MAX is low. Set ARG_MAX to a higher value and this should solve your issue.
Check ncargs as well,
lsattr -El sys0 -a ncargs
ARG_MAX can be increased by increasing ncargs.
ON AIX, YOU CAN USE THE FOLLOWING COMMAND AS ROOT,
/usr/sbin/chdev -l sys0 -a ncargs='128'
patchsets.sh[295]: /usr/bin/grep: 0403-027 The parameter list is too long.
patchsets.sh[295]: /usr/bin/grep: 0403-027 The parameter list is too long.
patchsets.sh[295]: /usr/bin/grep: 0403-027 The parameter list is too long.
patchsets.sh[295]: /usr/bin/grep: 0403-027 The parameter list is too long.
patchsets.sh[295]: /usr/bin/grep: 0403-027 The parameter list is too long.
patchsets.sh[295]: /usr/bin/grep: 0403-027 The parameter list is too long.
patchsets.sh[295]: /usr/bin/grep: 0403-027 The parameter list is too long.
patchsets.sh[295]: /usr/bin/grep: 0403-027 The parameter list is too long.
Error is thrown not only for grep but even for all the OS utilities(sed,date,awk,tr,cp, rm) that are used in the script.
This happens because by default the ouput files are created under /tmp and if and only if /tmp has way too many files in it.
Easy workaround is as follows:
Oracle provides an option to set the output directory by setting a env variable called CUST_TEMP.
Set CUST_TEMP to a empty directory or clear all the files under /tmp and patchsets.sh should work fine.
Other way round
#getconf ARG_MAX
12345
This means that ARG_MAX is low. Set ARG_MAX to a higher value and this should solve your issue.
Check ncargs as well,
lsattr -El sys0 -a ncargs
ARG_MAX can be increased by increasing ncargs.
ON AIX, YOU CAN USE THE FOLLOWING COMMAND AS ROOT,
/usr/sbin/chdev -l sys0 -a ncargs='128'
Comments
You have shared a excellent info. Many thanks to you.
Regards,
Deepak
Is there any option to know the job status of the patch being applied? I am looking for an option to find patch activity log if the original log is not being updated during patching.
Regards,
Deepak.
1)what is a function in oracle?
2)difference b/w rowid & rownum
3)what is sql*loader
4)what is diff b/w sql&sql*plus
5)how to select only odd rows,even
rows(not based on salfor eg1,3,5
and 2,4,6 etc...)
6)how to select a particular row
for eg 7th row
select a.* from emp a where rownum=7
what is d diff b/w translate &replace
Regards,
Hema
1 create table temp(A number primary key,
2 B number unique,
3 C number check > 0,
4 D number not null
5* )
SQL> /
C number check > 0,
*
ERROR at line 3:
ORA-00906: missing left parenthesis
pls correct this
regards
hema
Refer to my presentation below for details on Function in oracle. (Includes definition and examples)
http://www.mithunashok.com/2011/02/sql-basics-presentation.html
2)difference b/w rowid & rownum
Both rowid and rownum are pseudocolumns.
Rowid stores address information for each row in a table and it is always static.
Rownum always returns a number for each row indicating the order in which the row is selected by oracle and it is always dynamic.
Consider following examples,
SELECT rowid,rownum,ename FROM emp;
SELECT rowid, rownum,ename FROM emp ORDER BY ename;
SELECT rowid, rownum, ename FROM emp WHERE ename LIKE 'A%';
SELECT rowid, rownum, ename FROM emp WHERE ename LIKE 'M%';
Compare the results from all the querries. Notice that rowid never changes but rownum changes in the way in which oracle selects the record.
3)what is sql*loader
SQL*Loader is a utility/program used to load data from any text file to the database. Usually used to migrate the data from one schema to another or from one database to another. It is also called as bulk loader.
4)what is diff b/w sql&sql*plus
Refer to slide 23 of my presentation below,
http://www.mithunashok.com/2011/03/sql-basics-basic-select-statement.html
5)how to select only odd rows,even
rows(not based on salfor eg1,3,5
and 2,4,6 etc...)
SELECT rownum,ename FROM emp;
To SELECT only odd numbered rows,
SELECT ename, rownum FROM emp GROUP BY rownum, ename HAVING MOD(rownum,2) = 1 ORDER BY rownum;
To SELECT even numbered rows,
SELECT ename, rownum FROM emp GROUP BY rownum, ename HAVING MOD(rownum,2) = 0 ORDER BY rownum;
6)how to select a particular row
for eg 7th row
select a.* from emp a where rownum=7
SELECT ename, rownum FROM emp GROUP BY rownum, ename HAVING rownum = 7;
OR
SELECT * FROM ( SELECT rownum rownumber, ename FROM emp) WHERE rownumber = 7;
7) what is d diff b/w translate &replace
REPLACE and TRANSLATE are similar functions. Using REPLACE you can replace a string with another single string. Otherwise TRANSLATE lets you make multiple single one to one substitution in a single statement. Look at the example below.
SELECT TRANSLATE('Qspiders students rock', ' s', '_1') TRANS,REPLACE('Qspiders students rock','s','x') REP FROM DUAL;
Here in the example TRANSLATE function replaces both ' '(space) with '_' and 's' with '1'. REPLACE function can replace only 1 string that 's' with 'x'.
8) create table temp(A number primary key,
B number unique,
C number check > 0,
D number not null )
SQL> /
C number check > 0,
*
ERROR at line 3:
ORA-00906: missing left parenthesis
pls correct this
You should always use check condition with a comparission value inside brackets. Use the statement as,
CREATE TABLE temp(A NUMBER PRIMARY KEY,
B NUMBER UNIQUE,
C NUMBER CHECK (c > 0),
D NUMBER NOT NULL);
Hope this answers all your questions.