DB2 Programming Skills (vii) _DB2

Source: Internet
Author: User
Tags db2 db2 installation dname ibm db2 one table zip
The DB2 tutorial being looked at is: DB2 Programming Tips (vii). 3.4 See which tables the SP uses
Select Bname from SYSCAT.PACKAGEDEP where btype= ' T ' and Pkgname in (select Bname to Sysibm.sysdependencies where dname in (select Specificname from syscat.procedures where procname= ' Pr_clear_match_divide_sha '))
3.5 See which SP is using the function
Select ProcName from Syscat. Procedures where Specificname in (select Dname to Sysibm.sysdependencies where bname in (select Pkgname) from Syscat.pac KAGEDEP where bname in (select Specificname from syscat.functions where funcname= ' get_current_date '))


When using a function, be aware that if you want to drop the function, you must first drop all other stored procedures that call the function.
A function must be created before the SP that invokes the function can create success.
3.6 Modifying table structure
Add more fields to one table at a time
DB2 "ALTER TABLE tb_test add column T1 char (1) Add Column T2 char (2) Add column t3 int"


4 DB2 System Management
4.1 DB2 Installation
Install DB2 7.1 or another version under Windows 98, and replace the contents of Autoexec.bat with the following if there is a JDBC error or if Windwos 98 does not start:


C:\progra~1\trendp~1\pcscan. EXE C:\ C:\WINDOWS\COMMAND\/ns/win95
REM c:\windows\command.com/e:32768
REM [Header]

REM [CD-ROM Drive]

REM [Miscellaneous]

REM [Display]

Set path=%path%; C:\MSSQL\BINN; C:\progra~1\sqllib\bin; C:\progra~1\sqllib\function; C:\PROGRA~1\SQLLIB\SAMPLES\REPL; C:\progra~1\sqllib\help
IF EXIST c:\progra~1\ibm\imnnq\imqenv. BAT call c:\progra~1\ibm\imnnq\imqenv. BAT
IF EXIST c:\progra~1\ibm\imnnq\imnenv. BAT call c:\progra~1\ibm\imnnq\imnenv. BAT
Set DB2INSTANCE=DB2
Set classpath=.; C:\progra~1\sqllib\java\db2java.zip; C:\progra~1\sqllib\java\runtime.zip; C:\progra~1\sqllib\java\sqlj.zip; C:\progra~1\sqllib\bin
Set Mdis_profile=c:\progra~1\sqllib\metadata\profiles
Set LC_ALL=ZH_CN
Set Include=c:\progra~1\sqllib\include; C:\progra~1\sqllib\lib; C:\progra~1\sqllib\templates\include
Set Lib=c:\progra~1\sqllib\lib
Set Db2path=c:\progra~1\sqllib
Set Db2tempdir=c:\progra~1\sqllib
Set Vws_templates=c:\progra~1\sqllib\templates
Set vws_logging=c:\progra~1\sqllib\logging
Set Vwspath=c:\progra~1\sqllib
Set VWS_FOLDER=IBM DB2
Set icm_folder= Information Directory Manager

Win



<

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.