You can create your stored procedure any way you like as long as it's supported by DB2. However, you need to be able to get the binary code into the DB2 function path on the server. After you do that, you can simply catalog the procedure using the DB2 Command Center or Dos command prompt...
John, you are making this more complicated than it is. Are you familiar with DB2's "VALUE" statement; it's kind of like a select statement. Now, I don't know what language your client/server app is written in so I can't show you the specific code, but the statement itself is EXACTLY...
Hi Nancy, first of all, has an actual Client instance been created or was the DB2 system software merely loaded on the machine? Assuming an instance was actually created,
it sounds like the userid you are using to connect to DB2 with is not sourcing /db2instancename/sqllib/db2profile.
Can you...
Are you connecting to DB2 on the mainframe or to some other platform? Sounds like there is a possible problem with how ODBC is reading the DB2 Catalog. I assume you can connect and do queries successfully outside of your program via the DB2 Command Center or MS ACCESS or something?
Anyway, the...
John, here are 2 ways:
1) Values IDENTITY_VAL_LOCAL()
2) SET :HOSTVAR = IDENTITY_VAL_LOCAL()
You can also, just use the IDENTITY_VAL_LOCAL() function on subsequent inserts to child tables if you need to propagate the value.
Hope this helps,
Todd
Does you source table happen to have columns defined as Identity fields? How about Blob fields? Any Referential Integrity constraints that are causing the errors? It's kind of hard to tell what the problem is without seeing the error messages but usually you can deal with most import problems...
Off the top of my head, DB2 EE is somewhere in the neighborhood of $15,000 per processor depending on the platform of the server; but has the advantage of not having to license individual developers or users. Workgroup is licensed by user though.
hmmm, any chance that sna, portions of it, or the snaadmin home directory existed on a non-rootvg filesystem on the original machine and consequently is not part of the mksysb?
Just something to check...
Hi James,
One quick thing you can try off the top of your head is when setting up your DB2 ODBC database source, there is an option for optimizing for Microsoft VB & Access. However, I've worked with several VB/DB2 systems and if there are performance problems, generally it's the backend...
Do you mean you get an error of some kind if you attempt the altar or that you can't find the buttons to click to execute the alter? If the latter is the case, you'll want to make sure you scroll to the bottom when you bring up the Altar dialog windows; sometimes you have to do this to see the...
Hiya,
Just use the IDENTITY_VAL_LOCAL()function in a SET statement or subsequent insert statement; however you want to do it. Here's an example:
SET :HOSTVAR = IDENTITY_VAL_LOCAL()
Hope this helps!
Todd
IBM Certified Solutions Expert
Hi Nancy,
DB2 UDB v7.2 allows columns with a length > 255 bytes to be specified as part of the index key. You have to set the registry variable DB2_INDEX_2BYTEVARLEN to ON to activate it. Hope this helps...
Todd
Increasing the timeout value is only masking the problem and may do more harm then good. What you really need to be doing is making sure your queries are coded to make use of indexes, making sure the tables have been recently reorged, etc; in other words, tuning your queries and databases.
I...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.