Enhancing your expertise in Java, Kubernetes, Spring Boot, AWS, BTC, and ETH can significantly elevate your career prospects in the ever-evolving tech industry. Welcome to my blog, where I share insights and resources to help you master these key technologies and stay ahead of the curve. Enhance your tech skills with insights on Java, Kubernetes, Spring Boot, AWS, BTC, and ETH. Master advanced topics and stay updated with practical tips and tutorials!
Thursday, September 13, 2007
How to list tables in another schema?
db2> list tables for schema s2
db2> list tables for schema s3
or to list for all schemas
db2> list tables for all
or
db2 > Select TABSCHEMA, TABNAME, DEFINER from SYSCAT.TABLES where tabschema
IN ('S1','S2','S3')
tabschema is the schema name & Definer is the user name
EXTRA
to check store procedure
db2 > select PROCSCHEMA, PROCNAME from SYSCAT.PROCEDURES where procname = 'RPT_REGUSER_LOGIN_I' or procschema = 'IBSADMIN';
ref
Notes on creating a Java "jar" file for an application
If you have an appliation that you want to package so that it can be executed using a command like:
java -jar myjarfile.jar arg1 arg2
you will need to create the ".jar" file properly. This means that the class containing the main method must be identified and that you have included any necessary support ".jar" files. You must also include a class path.
Tuesday, September 11, 2007
Cursor closes at COMMIT unless you use the WITH HOLD option on cursor.
Example
OPEN UPDATE_CURSOR WITH HOLD;
-- Declare cursor
FOR vl AS
c1 CURSOR with hold FOR
SELECT customer_id as id,full_name from customer where full_name like 'test%'
DO
update customer set status ='A' where customer_id = id;
COMMIT; <======= Can commit inside Loop if you choose WITH HOLD
END FOR;
COMMIT;
ref ,
ibm
Monday, September 10, 2007
alter table in stored procedure
LANGUAGE SQL
MODIFIES SQL DATA
BEGIN
declare v_stmt varchar(20);
--now store ur query inside this variable,then prepare the statement.
v_stmt = 'alter table emp drop primary key';
prepare S1 from v_stmt;
EXECUTE IMMEDIATE S1;
END @
ref