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.m sg" 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,st rt,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,cours e,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,secn o,instr,hrs,lgr d from transfer
where ssn=ssni order by sem desc,course
for read only;
declare c5 cursor with return to client for
select course,secno,in str,hrs from cursem
where ssn=ssni order by course
for read only;
open c1;
open c2;
open c3;
open c4;
open c5;
end
@ 3 2864
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.m sg" 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,st rt,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,cours e,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,secn o,instr,hrs,lgr d from transfer where ssn=ssni order by sem desc,course for read only; declare c5 cursor with return to client for select course,secno,in str,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.m sg" 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,st rt,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,cours e,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,secn o,instr,hrs,lgr d from transfer where ssn=ssni order by sem desc,course for read only; declare c5 cursor with return to client for select course,secno,in str,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.x yz> 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.m sg" 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,st rt,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,cours e,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,secn o,instr,hrs,lgr d from transfer where ssn=ssni order by sem desc,course for read only; declare c5 cursor with return to client for select course,secno,in str,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 problems doing this.
I wanted to implemented a generic "Helper" class like this:
/**
* Helper
|
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 ()
LANGUAGE SQL
BEGIN
END
|
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
INTO table1
|
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 'UpdateRegistrant'
expects parameter '@EMail', which was not supplied.
The field value was null in the database and not changed in the FormView so
is null going back into the stored procedure. I'm stumped and would greatly
appreciate any suggestions.
| |
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 but when he
runs the stored procedure, he gets the following error message.
"SYSPROC".CSGCSB54 - Run started.
Data returned in result sets is limited to the first 100 rows.
Data returned in result set columns is limited to the first 20...
|
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 - "Modified" of type DateTime - is hidden since it
should not be edited by a user. The system handles the update for this
column. So, I have hidden (Visible=false) this column on the grid. In order
to access the value in this field, I have created a...
|
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 office. The original code's backend
is using the SQL Server 2000 and I am testing to use it on the Express
edition.
And I run into the following problem.
|
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 recompiling/executing the code with 1.4.1 (deploying the newly compiled stored procedure code as well).
This is the original exception that I got before I tried any code modifications:
java.io.IOException: invalid offset/length
at...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |