Search

Ramchandra's Weblog

Just ……everything about DB2 LUW

Category

Uncategorized

What Does a DBA Do ??

Data Management Today by Craig Mullins : What Does a DBA Do?

Advertisements

DROPING REFERENCIAL INTEGRITY CONSTRAINT IN DB2

steps for droping and recreating RI:-

1. genrate RI by using db2look:
db2look -d dbname -e -a -td @ -l -o dbname.sql

2.check the RI
select tbname, relname, refkeyname from sysibm.sysrels

create script for droping RI
select ‘ALTER TABLE ‘||tbname||’  DROP CONSTRAINT ‘||relname   from sysibm.sysrels

3.do your operation data migration/ db2move ..etc

4. recreate RI (keep only RI part in dbname.sql delete the rest)
db2 -td@ -vf dbname.sql

alter the identity column to update value in Db2

ALTER TABLE RECEIPT ALTER COLUMN RECEIPT_NUMBER DROP IDENTITY
GO
update GDT.RECEIPT set RECEIPT_NUMBER=1 where RECEIPT_NUMBER=2
GO
SELECT     MAX(RECEIPT_NUMBER)  FROM     GDT.RECEIPT
go
ALTER TABLE  RECEIPT ALTER COLUMN RECEIPT_NUMBER SET GENERATED BY DEFAULT as identity( START WITH 32331 INCREMENT BY 1 CACHE 20)
GO

DB2 security best practices

DB2 security, Part 8: Twelve DB2 security best practices

DB2 security best practices

Explain Plan of DB2 Stored Procedures /static sql

How to create Explain Plan of DB2 Stored Procedures? | db2ude

Explain Plan of DB2 Stored Procedures?

ONLINE_TABLE_MOVE stored procedure

doyouDB2.com

ONLINE_TABLE_MOVE stored procedure

ONLINE_TABLE_MOVE stored procedure

doyouDB2.com

ONLINE_TABLE_MOVE stored procedure

DB2 Basics: Constraints

DB2 Basics: Constraints

DB2 Basics: Constraints

technical articals

DB2 best practices for basic design, performance, and manageability

Raghavan’s WikiSite: Teklinx

Blog at WordPress.com.

Up ↑