If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Hi
Do you have application development client installed on your machine? Make sure you do. Also, check if you have Microsoft Visual C++ 5.0/6.0 or VisualAge C++ 4.2.5.0. I have it working on my NT database but I have problems on AIX.
Good luck

Originally posted by Musa Hi
Do you have application development client installed on your machine? Make sure you do. Also, check if you have Microsoft Visual C++ 5.0/6.0 or VisualAge C++ 4.2.5.0. I have it working on my NT database but I have problems on AIX.
Good luck

Yes I have App. Dev client. I`ve just install MS Visual C++6.0 .... but things are still the same... ( .... any other ideas ?

I have run into this exact same problem when I first started to use Db2.

First make sure the DB server has the necessary compiler installed. Unlike Oracle and SQL Server, the compiler needed to build and run sql stored procs is not pakaged with the DB2 software.

If you are a developer and are not running on the db server, you only need to install the developer client. As long as your DB server has the compiler installed you DO NOT need to install the C++ compiler on your client PC.

Lastly, when you install the C++ compiler make sure you use the supported version. When you install the C++ compiler you need to make sure you copy the following environment variables
Right click on My computer go to properties and then the advanced tab
copy the following C++ user variables down to the associated system variables:
INCLUDE
LIB
PATH

1. you need to go to adminstrative tools->computer management->Local Users and Groups-> create a new user called "db2admin" give the user adminstrator rights.
2. You need to go to ->Local Users and Groups-> Local Security Settings

there are several policy's you need to add the db2admin to:
-act as part of the operating system
-increase quotas
-replace a process level token
-create a token object
-log on locally (not sure if this one is required)

Also once you have set up all this correctly. Just as an FYI, you can create a stored proc and then copy the DLL files to DB instance that doesn't have the compiler and with the DLL alone the stored proc will execute.

And I have another problem. Once I could'n create SQL Stored PRoc. I try
with Java Stored Proc. - and every sigle one looks (and works) ok. But now I try call one
SQLJ proc form another and this doesn't works - any ideas ? - note that both are created as "Modifies SQL data" procedures!

A couple of FYI about DB2. You can't truncate table, there's no such command. They suggest for large volume deletes to use drop table or replace command. Second there is no alter table drop column command, you have to create a new table and select into and then drop the old one and rename the new one.

10x a lot!!! - but SQLJ help needed...

Anyway, I start this project with SQLJ Stored procedures (its easiset way for me, as I work with JAVA mostly...)and another question ...

Another problem. Once I could'n create SQL Stored PRoc. I try
with Java Stored Proc. - and every sigle one looks (and works) ok. But now I try CALL one
SQLJ proc form another and this doesn't works - any ideas ? - note that both are created as "Modifies SQL data" procedures!

After all I'll attach example from my current project - this procedure searches in table for certain record and returns this single record as result. If no record found and autoCreate is set to autoCreateON - procedure creates new record and returns newly created record as result set.

feel free to ask me anything for Java ... and other things. if I can I`ll try to anser you...