A stored procedure (listed below) that loads fine on Windows XP with DB2
V8.1.4 Express fails to load on Linux DB2 Workgroup server V8.1, with
the following message: sh-2.05a$ db2 -td@ -f pgpa.db2 DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command. During SQL processing it returned: SQL0035N The file "P2340425.msg" cannot be opened.
What does this message mean? Where are the .msg files located under
Linux? Thanks for your suggestions in advance.
The databases on XP and Linux are identical; the Linux DB2 is a
production server, the Express DB2 is a testbed. The stanzas in the SP,
executed with a number literal substituted for the parameter, works fine
on the Linux server.
N. Shamsundar
University of Houston
__________________________________________________ ______
FILE pgpa.db2 contents:
-- register using db2 -td@ -vf pgpa.db2
create procedure pgpa(in ssni int)
dynamic result sets 5
language sql
reads sql data
begin
declare c1 cursor with return to client for
select lname,fmname,strt,city,st,zip,phone from xli
where ssn=ssni
for read only;
declare c2 cursor with return to client for
select g.sem,decimal(g.shrs+g.suhrs,3,0) shrs,
decimal(cumsum(g.shrs+g.suhrs),3,0) chrs,
decimal(g.sgpa,4,2) sgpa,
decimal(cumsum(g.sgpa*g.shrs)/cumsum(g.shrs),4,2) cgpa,
decimal(m.shrs+m.suhrs,3,0) smhrs,
decimal(cumsum(m.shrs+m.suhrs),3,0) cmhrs,
decimal(m.sgpa,4,2) smgpa,
decimal(cumsum(m.sgpa*m.shrs)/cumsum(m.shrs),4,2) cmgpa
from gpahist as g
left outer join
mgpahist as m
on g.ssn=m.ssn and g.sem=m.sem
where g.ssn=ssni
for read only;
declare c3 cursor with return to client for
select sem,secno,course,instr,lgrd from grades
where ssn=ssni order by sem desc,course
for read only;
declare c4 cursor with return to client for
select sem,course,secno,instr,hrs,lgrd from transfer
where ssn=ssni order by sem desc,course
for read only;
declare c5 cursor with return to client for
select course,secno,instr,hrs from cursem
where ssn=ssni order by course
for read only;
open c1;
open c2;
open c3;
open c4;
open c5;
end
@ 3 2836
N. Shamsundar wrote: A stored procedure (listed below) that loads fine on Windows XP with DB2 V8.1.4 Express fails to load on Linux DB2 Workgroup server V8.1, with the following message:
sh-2.05a$ db2 -td@ -f pgpa.db2 DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command. During SQL processing it returned: SQL0035N The file "P2340425.msg" cannot be opened.
What does this message mean? Where are the .msg files located under Linux? Thanks for your suggestions in advance.
The databases on XP and Linux are identical; the Linux DB2 is a production server, the Express DB2 is a testbed. The stanzas in the SP, executed with a number literal substituted for the parameter, works fine on the Linux server.
N. Shamsundar University of Houston __________________________________________________ ______ FILE pgpa.db2 contents: -- register using db2 -td@ -vf pgpa.db2 create procedure pgpa(in ssni int) dynamic result sets 5 language sql reads sql data begin declare c1 cursor with return to client for select lname,fmname,strt,city,st,zip,phone from xli where ssn=ssni for read only; declare c2 cursor with return to client for select g.sem,decimal(g.shrs+g.suhrs,3,0) shrs, decimal(cumsum(g.shrs+g.suhrs),3,0) chrs, decimal(g.sgpa,4,2) sgpa, decimal(cumsum(g.sgpa*g.shrs)/cumsum(g.shrs),4,2) cgpa, decimal(m.shrs+m.suhrs,3,0) smhrs, decimal(cumsum(m.shrs+m.suhrs),3,0) cmhrs, decimal(m.sgpa,4,2) smgpa, decimal(cumsum(m.sgpa*m.shrs)/cumsum(m.shrs),4,2) cmgpa from gpahist as g left outer join mgpahist as m on g.ssn=m.ssn and g.sem=m.sem where g.ssn=ssni for read only; declare c3 cursor with return to client for select sem,secno,course,instr,lgrd from grades where ssn=ssni order by sem desc,course for read only; declare c4 cursor with return to client for select sem,course,secno,instr,hrs,lgrd from transfer where ssn=ssni order by sem desc,course for read only; declare c5 cursor with return to client for select course,secno,instr,hrs from cursem where ssn=ssni order by course for read only; open c1; open c2; open c3; open c4; open c5; end @
You might try to create the stored procedure as instance
owner to see if this work.
Then you need to check the permissions on the following path:
<INSTHOME>/sqllib/function/routine/sqlproc/<database>/<schema>/tmp
DB2 creates temporary files here during the stored procedure
compilation phase. There might be insufficient permissions
on the filesystem here.
Best regards
Eric
--
IT-Consulting Herber
******
Download the IFMX Database-Monitor for free at: http://www.herber-consulting.de/BusyBee
***********************************************
Thank you, you hit the nail on the head. The .../tmp directory did not
have write permission for "other".
N. Shamsundar
Eric Herber wrote: N. Shamsundar wrote:
A stored procedure (listed below) that loads fine on Windows XP with DB2 V8.1.4 Express fails to load on Linux DB2 Workgroup server V8.1, with the following message:
sh-2.05a$ db2 -td@ -f pgpa.db2 DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command. During SQL processing it returned: SQL0035N The file "P2340425.msg" cannot be opened.
What does this message mean? Where are the .msg files located under Linux? Thanks for your suggestions in advance.
The databases on XP and Linux are identical; the Linux DB2 is a production server, the Express DB2 is a testbed. The stanzas in the SP, executed with a number literal substituted for the parameter, works fine on the Linux server.
N. Shamsundar University of Houston ________________________________________________ ________ FILE pgpa.db2 contents: -- register using db2 -td@ -vf pgpa.db2 create procedure pgpa(in ssni int) dynamic result sets 5 language sql reads sql data begin declare c1 cursor with return to client for select lname,fmname,strt,city,st,zip,phone from xli where ssn=ssni for read only; declare c2 cursor with return to client for select g.sem,decimal(g.shrs+g.suhrs,3,0) shrs, decimal(cumsum(g.shrs+g.suhrs),3,0) chrs, decimal(g.sgpa,4,2) sgpa, decimal(cumsum(g.sgpa*g.shrs)/cumsum(g.shrs),4,2) cgpa, decimal(m.shrs+m.suhrs,3,0) smhrs, decimal(cumsum(m.shrs+m.suhrs),3,0) cmhrs, decimal(m.sgpa,4,2) smgpa, decimal(cumsum(m.sgpa*m.shrs)/cumsum(m.shrs),4,2) cmgpa from gpahist as g left outer join mgpahist as m on g.ssn=m.ssn and g.sem=m.sem where g.ssn=ssni for read only; declare c3 cursor with return to client for select sem,secno,course,instr,lgrd from grades where ssn=ssni order by sem desc,course for read only; declare c4 cursor with return to client for select sem,course,secno,instr,hrs,lgrd from transfer where ssn=ssni order by sem desc,course for read only; declare c5 cursor with return to client for select course,secno,instr,hrs from cursem where ssn=ssni order by course for read only; open c1; open c2; open c3; open c4; open c5; end @
You might try to create the stored procedure as instance owner to see if this work. Then you need to check the permissions on the following path:
<INSTHOME>/sqllib/function/routine/sqlproc/<database>/<schema>/tmp
DB2 creates temporary files here during the stored procedure compilation phase. There might be insufficient permissions on the filesystem here.
Best regards
Eric
Is the c/c++ compiler installed and configured for DB2 on the linux
machine? Unfortunately, DB2 requires an external c/c++ compiler to
create sql stored procs.
"N. Shamsundar" <sh******************@nospam.xyz> wrote in message news:<c1***********@masala.cc.uh.edu>... A stored procedure (listed below) that loads fine on Windows XP with DB2 V8.1.4 Express fails to load on Linux DB2 Workgroup server V8.1, with the following message:
sh-2.05a$ db2 -td@ -f pgpa.db2 DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command. During SQL processing it returned: SQL0035N The file "P2340425.msg" cannot be opened.
What does this message mean? Where are the .msg files located under Linux? Thanks for your suggestions in advance.
The databases on XP and Linux are identical; the Linux DB2 is a production server, the Express DB2 is a testbed. The stanzas in the SP, executed with a number literal substituted for the parameter, works fine on the Linux server.
N. Shamsundar University of Houston __________________________________________________ ______ FILE pgpa.db2 contents: -- register using db2 -td@ -vf pgpa.db2 create procedure pgpa(in ssni int) dynamic result sets 5 language sql reads sql data begin declare c1 cursor with return to client for select lname,fmname,strt,city,st,zip,phone from xli where ssn=ssni for read only; declare c2 cursor with return to client for select g.sem,decimal(g.shrs+g.suhrs,3,0) shrs, decimal(cumsum(g.shrs+g.suhrs),3,0) chrs, decimal(g.sgpa,4,2) sgpa, decimal(cumsum(g.sgpa*g.shrs)/cumsum(g.shrs),4,2) cgpa, decimal(m.shrs+m.suhrs,3,0) smhrs, decimal(cumsum(m.shrs+m.suhrs),3,0) cmhrs, decimal(m.sgpa,4,2) smgpa, decimal(cumsum(m.sgpa*m.shrs)/cumsum(m.shrs),4,2) cmgpa from gpahist as g left outer join mgpahist as m on g.ssn=m.ssn and g.sem=m.sem where g.ssn=ssni for read only; declare c3 cursor with return to client for select sem,secno,course,instr,lgrd from grades where ssn=ssni order by sem desc,course for read only; declare c4 cursor with return to client for select sem,course,secno,instr,hrs,lgrd from transfer where ssn=ssni order by sem desc,course for read only; declare c5 cursor with return to client for select course,secno,instr,hrs from cursem where ssn=ssni order by course for read only; open c1; open c2; open c3; open c4; open c5; end @ This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Kent Lewandowski |
last post by:
hi all,
Recently I wrote some stored procedures using java jdbc code
(admittedly my first stab) and then tried to implement the same within
java packages (for code reuse). I encountered...
|
by: dromuss via DBMonster.com |
last post by:
I have a problem registering Stored Procedures.
I tried diferent stored procedure and non of them work.
Not even an empty stored procedure like the following:
CREATE PROCEDURE DB2INST1.PRUEBA...
|
by: Timppa |
last post by:
Hi,
Could anyone help me with my problem ?
Environment: Access 2000 and Sql Server 2000.
I have a stored procedure as follows:
DROP table1
SELECT alias1.field1,alias2.field2,table2.field6...
|
by: Not4u |
last post by:
Hello
Config : SQL 2000 on WIN 2000 (IIS 5.0)
In my ASP page for some queries i have this error :
Microsoft OLE DB Provider for SQL Server error '80040e31'
Timeout expired
|
by: Dabbler |
last post by:
I'm using an ObjectDataSource with a stored procedure and am getting the
following error when trying to update (ExecuteNonQuery):
System.Data.SqlClient.SqlException: Procedure or Function...
|
by: nishi57 |
last post by:
I hope I can get some help regarding this issue, which has been going
on for a while. I have a desktop user who is having problem running
"Stored Procedures". The DB2 Connect application works fine...
|
by: =?Utf-8?B?QmFidU1hbg==?= |
last post by:
Hi,
I have a GridView and a SqlDataSource controls on a page. The SqlDataSource
object uses stored procedures to do the CRUD operations. The DataSource has
three columns one of which -...
|
by: Light |
last post by:
Hi all,
I posted this question in the sqlserver.newusers group but I am not getting
any response there so I am going to try it on the fine folks here:).
I inherited some legacy ASP codes in my...
|
by: amgupta8 |
last post by:
Note: This problem occurred when I updated the JDK from 1.3.1 to 1.4.1 or 1.4.2.
Nothing else was changed in the code, other than updating the JDK on the database server (dbm cfg parm jdk_path) and...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |