Creating, altering, or dropping Db2 objects
For more information, view the Quick Course CHANGE MANAGER for DB2 - Performing Specification . |
The following example illustrates these stages by showing you how to use the Task List feature of Change Manager to quickly and easily change the length of a column in a table in your database.
Before you begin a set of tasks to achieve a particular goal, you should allocate your JCL data sets for analysis and execution, ensure that you are using the correct Db2 subsystem, and define your job card with the correct account information.
To modify objects
- Start the Task List feature.The Task List feature of Change Manager enables you to achieve various goals by taking you step-by-step through a series of tasks.
On the BMC AMI Change Manager for Db2 Main Menu (see Main Menu), select Task List and press Enter.
ALUFTASK ------------------------- Task List Menu -----------------------------
Command ===>
Select a task. Then press Enter.
1 1. Create, alter, or drop Db2 objects
2. Migrate Db2 objects using Specification
3. Migrate Db2 objects using scope rules from a Migrate Profile
Commands: HELP ENDOn the Task List Menu, select Create, alter, or drop DB2 objects and press Enter.
ALUFPALT -------------------- Create, Alter, or Drop Db2 Objects --------------
Command ===>
Specify an Alter WORKID.
If the WORKID does not exist, the Create WORKID panel will be displayed.
To see a list of WORKIDs, type a wildcard pattern. (For example BM*.*)
Alter WORKID: RDACRJ.RD10405A
Type S to select processing options. Then press Enter to continue.
_ Create or edit a WORKID
_ Specify changes to Db2 objects
_ Analyze the changes to create a worklist
_ Execute the worklist to process the changes
Commands: HELP END
- Specify an alter-type work ID.A work ID enables you to identify, control, and track a unit of work. The alter-type work ID is used to store the changes to the Db2 objects that you specify.
On the Create, Alter, or Drop DB2 Objects panel, type the name of an alter-type work ID, type S to select all of the processing options, and press Enter.The Create WORKID panel is displayed.
ALUFWRKC -------------------------- Create WORKID ----------- WORKID NOT FOUND
Command ===>
WORKID . . . . . . : RDACRJ.RD10405A
Type . . . . . . . . 1 1. Alter
2. Migrate
3. Receive
Comment . . . . . .
Select additional panels to display for Migrate type WORKID. Then press Enter.
_ WORKID Migrate Options
_ WORKID Change Rules
Commands: HELP END CANCELOn the Create WORKID panel, select Alter for the Type. Then, press Enter.
ALUSOS TER ---------------------- Object Specification ----------------------
Command ===>
WORKID . . . : RDACRJ.RD10405A _ Changed Objects List
Specify the object type(s) to be included in a list.
Stogroup. . (SG Name)
Database. . R1128C01 (DB Name)
Tablespace (DB.TS Name)
Table . . . (Own.TB Name)
Check Cnst (Own.TB.Chk )
Foreign Key (Own.TB.Rel )
Index . . . (Own.IX Name)
Unique Cnst (Own.TB.Uniq)
View. . . . (Own.VW Name)
Trigger . . (Sch.TR Name)
Alias . . . (Own.AL Name)
Synonym . . (Own.SY Name)
Permission (Sch.RP Name)
Mask. . . . (Sch.MK Name)
The following objects are retrieved independently of all other Db2 objects.
Sequence. . (Sch.SQ Name)
Stored Proc (Sch.SP Name)
- Specify the changes that you want to make to the objects.The current values of the objects are displayed on panels. You can modify the attributes for objects by specifying new values or by typing new values over the existing values. All of your changes are stored in Db2 tables.
On the Object Specification panel, type the name of your database, table space, and table. Then, press Enter.From the Mixed List panel, you begin the process of specifying changes to the objects that are listed.
ALUSMXL ER --------------------------- Mixed List ---------------------------
Command ===> Scroll. . CSR
WORKID . . . . : RDACRJ.RD10405A Commands: CANCEL
Type action next to object and press Enter.
E=Edit L=Like D=Drop U=Undo
Objects 92 to 113 of 227
More: - +
Act Object-Type Objects
************************************ TOP **************************************
TSG. . . . . R1128C01 T128PBG
TBB. . . . R1128C01 T@T128PBG
CK . . . R1128C01 T@T128PBG CK@T128PBG
FK . . . R1128C01 T@T128PBG FK@T128PBG
IXVD . . R1128C01 I_DOCIDT@T128PBG
IXC. . . R1128C01 I@T128PBG1
IXU. . . R1128C01 I@T128PBG2
UCU. . R1128C01 T@T128PBG UC@T128PBG
IXP. . . R1128C01 I@T128PBG3
UCP. . R1128C01 T@T128PBG PK@T128PBG
TRB. . . R1128C01 TR@T128PBG
VW . . . R1128C01 V1@T128PBG
VW . . . R1128C01 V2@T128PBG
VW . . . R1128C01 V3@T128PBG
VW . . . R1128C01 V4@T128PBG
VW . . . R1128C01 V5@T128PBG
TSR2 . . . . R1128C01 T128PBR2
TBBT . . . R1128C01 T@T128PBR2
CK . . . R1128C01 T@T128PBR2 CK@T128PBR2
FK . . . R1128C01 T@T128PBR2 FK@T128PBR2
IXVD . . R1128C01 I_DOCIDT@T128PBR2
IX . . . R1128C01 I@T128PBR21On the Mixed List panel, in the Act field type E next to the table that you want to edit and press Enter.
ALUS2TB ER -------------------------- Table Detail --------------------------
Command ===>
WORKID . . . . : RDACRJ.RD10405A
New Values
TB Owner : R1128C01 .
TB Name : T@T128PBG .
Database Name . : R1128C01 . . :
Tablespace Name : T128PBG . . :
Audit . . . . . : NONE . . . (NONE,ALL,CHANGES)
Validproc . . . : . . .
Editproc . . . : . . .
With Row Attr . : . . . (Y,N)
Data Capture . : N . . . (Y,N)
Restrict Drop . : N . . . (Y,N)
Obid . . . . . : 163 . . .
Volatile . . . : N . . . (N,Y)
Append . . . . : N . . . (N,Y)
Label: . . .
Link History TB : N . . . (N,Y,E)
Link Archive TB : N . . . (N,Y)
Table Access . : . . . (C,R,B,blank)
CCSID . . . . . : EBCDIC Partitions . . : 1 (Partition By Growth)
Key Label . . . : . . .
_ Convert to Partition by Range
_ Convert to Materialized Query Table
Select additional panels to display then press Enter.
_ Table Column List _ Table Comment
_ Primary Key Columns _ Auxiliary Objects List
_ Partitioning Key Columns _ Parts List and LimitKey Values
_ MQT Parameters _ Implicit TS Dssize
_ History Table Information _ Archive Table Information
Commands: HELP END CANCEL PF4=ZOOMOn the Table Detail panel, type S to select the Table Column List, and press Enter.The Table Columns List panel displays the current column attributes for the table. In this example, you will change the length of a column.
ALUSTBC ER ----------------------- Table Columns List -----------------------
Command ===> Scroll. . CSR
WORKID . . . . : RDACRJ.RD10405A Commands: CANCEL
Table Owner . . : R1128C01
Table Name . . : T@T128PBG
Type action next to object and press Enter.
E=Edit L=Like I=Insert D=Drop U=Undo CM=Comment ID=Identity_Detail
DV=Default_Value AX=Aux_Obj_List CAX=Create_Aux_Obj Lines 1 to 18 of 29
More: + >
Act Column Name ..+....20...+....30. Column Type Length Nl Df Hi UDT
*** ******************************** TOP **************************************
+ COLC@1@ONE@HUN<>@ONE@HUNDRED@1 CHAR 1 N Y
+ COLVC@2@ONE@HU<>@ONE@HUNDRED@1 VARCHAR 15 N Y
+ COLCL@3@ONE@HU<>@ONE@HUNDRED@1 CLOB 1G Y Y
+ COLBIN@7@ONE@H<>@ONE@HUNDRED@1 BINARY 4 N Y
+ COLVBI@8@ONE@H<>@ONE@HUNDRED@1 VARBIN 5 N Y
+ COLBL@9@ONE@HU<>@ONE@HUNDRED@1 BLOB 1G Y Y
+ COLSI@10@ONE@H<>@ONE@HUNDRED@1 SMALLINT N Y
+ COLIN@11@ONE@H<>@ONE@HUNDRED@1 INTEGER N Y
+ COLBI@12@ONE@H<>@ONE@HUNDRED@1 BIGINT N Y
+ COLDE@13@ONE@H<>@ONE@HUNDRED@1 DECIMAL 5,2 N Y
+ COLNU@14@ONE@H<>@ONE@HUNDRED@1 DECIMAL 10,1 N Y
+ COLFL@15@ONE@H<>@ONE@HUNDRED@1 FLOAT 53 N Y
+ COLRE@16@ONE@H<>@ONE@HUNDRED@1 FLOAT 21 N Y
+ COLDB@17@ONE@H<>@ONE@HUNDRED@1 FLOAT 53 N Y
+ COLDF@19@ONE@H<>@ONE@HUNDRED@1 DECFLOAT 16 Y Y
+ COLDF@20@ONE@H<>@ONE@HUNDRED@1 DECFLOAT 34 Y Y
+ COLDT@21@ONE@H<>@ONE@HUNDRED@1 DATE N Y
+ COLTI@22@ONE@H<>@ONE@HUNDRED@1 TIME N Y- On the Table Columns List panel, tab to the Length field for the column that you are modifying. Type a new value for the length of the column over the existing value. Press Enter.
Press END to return to the Table Detail panel. Press END again to return to the Mixed List Panel.The Mixed List panel displays an '*A' next to the table, indicating that you have made a change to the table.
ALUSMXL ER --------------------------- Mixed List ---------------------------
Command ===> Scroll. . CSR
WORKID . . . . : RDACRJ.RD10405A Commands: CANCEL
Type action next to object and press Enter.
E=Edit L=Like D=Drop U=Undo
Objects 133 to 154 of 227
More: - +
Act Object-Type Objects
TSG. . . . . R1128C01 T128PBG
*A TBB. . . . R1128C01 T@T128PBG
CK . . . R1128C01 T@T128PBG CK@T128PBG
FK . . . R1128C01 T@T128PBG FK@T128PBG
IXVD . . R1128C01 I_DOCIDT@T128PBG
IXC. . . R1128C01 I@T128PBG1
IXU. . . R1128C01 I@T128PBG2
UCU. . R1128C01 T@T128PBG UC@T128PBG
IXP. . . R1128C01 I@T128PBG3
UCP. . R1128C01 T@T128PBG PK@T128PBG
TRB. . . R1128C01 TR@T128PBG
VW . . . R1128C01 V1@T128PBG
VW . . . R1128C01 V2@T128PBG
VW . . . R1128C01 V3@T128PBG
VW . . . R1128C01 V4@T128PBG
VW . . . R1128C01 V5@T128PBG
TSR2 . . . . R1128C01 T128PBR2
TBBT . . . R1128C01 T@T128PBR2
CK . . . R1128C01 T@T128PBR2 CK@T128PBR2
FK . . . R1128C01 T@T128PBR2 FK@T128PBR2
IXVD . . R1128C01 I_DOCIDT@T128PBR2
IX . . . R1128C01 I@T128PBR21Press END to return to the Object Specification panel. Press END again.The Analysis Alter Worklist Interface panel is displayed.
ACMFANL1 ---------------- Analysis Alter Worklist Interface -------------------
Command ===>
WORKID . . . . . : RDACRJ.RD10405A
Analyze "Alter" WORKID
Select type of analysis.
1 1. Generate a worklist which will convert and reload current data.
2. Generate a worklist which will convert and reload current data and
establish a full recovery baseline.
3. Generate a worklist which will reload data from a previous
full recovery baseline.
Select run type. Then press Enter.
Run Type . . . . 1 1. Foreground
2. Batch
Commands: HELP END
- Analyze the changes that you specified.The Analysis component of the product examines the changes that you specified to determine the effect that the changes have on the structure and the related or dependent objects.
On the Analysis Alter Worklist Interface panel, select the option to Generate a worklist which will convert and reload current data. Then select to run the analysis in Foreground. Press Enter.
The Analysis JCL Processing Interface panel is displayed.
ACMFANL3 ---------------- Analysis JCL Processing Interface -------------------
Command ===>
WORKID . . . . : RDACRJ.RD10405A
Specify Dataset Names
Worklist . . . . . 'ACM.DB2V13.V131.WLBASE01(RD10405A)'
Diagnostics . . . . SYSOUT
Sysout Class . . . X (Used only when Diagnostics = SYSOUT)
Select foreground processing options. Then press Enter.
_ Override
S Create analysis input
S Edit analysis input
_ Run analysis
_ Edit Worklist
Commands: BROWSE PREVIOUS HELP ENDOn the Analysis JCL Processing Interface panel, type the name of your Worklist, and type S to select your processing options. Press Enter.The input for the Analysis process is displayed. The input includes the ALUIN input stream, which provides keywords for analyzing the changes. For more information about the input stream, see ALUIN-keywords.
ISREDDE2 SYS22095.T123911.RA000.RDACRJ.WLIN.H02 Columns 00001 00072
Command ===> Scroll ===> CSR
****** ***************************** Top of Data ******************************
==MSG> -Warning- The UNDO command is not available until you change
==MSG> your edit profile using the command RECOVERY ON.
000001 SSID DEND
000002 WORKID RDACRJ.RD10405A
000003 SORTDEVT SYSDA
000004 INCLUDE (DATA AMS SQL REBIND )
000005 SMSINCLUDE ()
000006 IBMUNLOAD IBMLOAD NOUSENGTUL
000007 IBMREORG NOUSENGTR
000008 NODBRMLIB ORDERBY
000009 NOVVALPROP
000010 UNLOADEMPTY NOSTOPCOMMIT TABLEACCESS NOAPPLCOVR IBMCHECK
000011 NOREORGALT
000012 REORGONLINE DYNREORG REORGALL REORGREF
000013 IBMREBUILD
000014 SYNCPOINT 10
000015 NOROLEOWN
000016 NODEFERCDC
000017 STANDALONESTATS DB2STATSUPD TABLEALL NOKEYCARD NOHISTORY
000018 IBMCOPY
000019 SPANNEDRECS
000020 NOBINDONIX
000021 NOMOVETB
000022 MAXSYSUT 20
000023 DYNCOPY
000024 NOPARTCOPY
000025 COPYDDN(COPY01 )
000026 NOUTILCOPY
000027 NOPARALLEL CLONEDATA
000028 NOREGENIDENTITY
****** **************************** Bottom of Data ****************************- Press F8 to scroll down the input. Press END.
- Press Enter to run Analysis.The results of Analysis are a diagnostic output file (ALUPRINT) and a worklist.
To review the results of Analysis (ALUPRINT), you can split your ISPF session or you can use your normal method to review SYSOUT. The last message in the diagnostic output indicates that the worklist completed successfully.
SDSF OUTPUT DISPLAY RDACRJ T0397365 DSID 105 LINE 0 COLUMNS 02- 81
COMMAND INPUT ===> SCROLL ===> CSR
********************************* TOP OF DATA **********************************
SSID DEND
WORKID RDACRJ.RD10405A
SORTDEVT SYSDA
INCLUDE (DATA AMS SQL REBIND )
SMSINCLUDE ()
IBMUNLOAD IBMLOAD NOUSENGTUL
IBMREORG NOUSENGTR
NODBRMLIB ORDERBY
NOVVALPROP
UNLOADEMPTY NOSTOPCOMMIT TABLEACCESS NOAPPLCOVR IBMCHECK
NOREORGALT
REORGONLINE DYNREORG REORGALL REORGREF
IBMREBUILD
SYNCPOINT 10
NOROLEOWN
NODEFERCDC
STANDALONESTATS DB2STATSUPD TABLEALL NOKEYCARD NOHISTORY
IBMCOPY
SPANNEDRECS
NOBINDONIX
NOMOVETB
MAXSYSUT 20
DYNCOPY
NOPARTCOPY
COPYDDN(COPY01 )
NOUTILCOPY
NOPARALLEL CLONEDATA
NOREGENIDENTITY
*BMC396243I DB2 VERSION 13 IN NEW FUNCTION MODE
*BMC56464I DB2 CURRENT FUNCTION LEVEL IS V13R1M501
*BMC56464I DB2 CATALOG LEVEL IS V13R1M501
*BMC56464I APPLCOMPAT IS V13R1M501
*BMC56464I APPLCOMPAT FROM DSNZPARM IS V13R1M501
*** BMC AMI Change Manager for Db2 13.01.00 BASE PTFs applied:
*** BQU3344
*** EXECUTION (AEX) 13.01.00 BASE PTFs applied:
*** NONE
***********************************************************************
*** WORKLIST GENERATION 2022-04-05-12.39.58.577614
*** BMC AMI Change Manager for Db2 VERSION 13.01.00 BASE (05/31/2022)
WORKLIST GENERATION EXECUTION FOR WORKID RDACRJ.RD10405A ON SSID DEND
***********************************************************************
***********************************************************************
*** THE FOLLOWING MESSAGES ARE INFORMATIONAL AND WARNINGS ONLY ***
***********************************************************************
*BMC396472W CREATE FOR TABLESPACE USING NON UNIVERSAL TABLESPACE SYNTAX
* ON FUNCTION LEVEL V12R1M504 OR GREATER MAY RESULT IN:
* PARTITION BY GROWTH UNIVERSAL TABLESPACE MAXPARTITIONS 256
* PARTITION BY RANGE UNIVERSAL TABLESPACE SEGSIZE <DEFAULT>
*BMC45460W TAPE STACKING DISABLED FOR IBM COPY AND DYNAMIC ALLOCATION
*BMC396431W PROCESSING DFSMS-ENCRYPTED OBJECTS OR OBJECTS THAT WILL BE
* ENCRYPTED AS A RESULT OF PROCESSING MIGHT REQUIRE THE
* KEYLABEL OR DATACLAS PARAMETER IN -AMS WORKLIST COMMANDS.
BMC16058W WORKID DEM.D0221B HAS CHANGES FOR TB R1128C01.T@T128PBG
***********************************************************************
*** END OF WARNING MESSAGES - WARNINGS WERE ISSUED ***
***********************************************************************
WORKLIST WAS WRITTEN TO DATASET 'ACM.DB2V13.V131.WLBASE01(RD10405A)'
WORKLIST GENERATION COMPLETE WORKID RDACRJ.RD10405A
******************************** BOTTOM OF DATA ********************************The following figure shows the worklist that was written to the data set that you specified on the Analysis JCL Processing Interface panel.
Press END.The Execution JCL Build Interface panel is displayed.
ACMFEXC0 ------------------ Execution JCL Build Interface ---------------------
Command ===>
WORKID . . . . . : RDACRJ.RD10405A
Select JCL and run type. Then press Enter.
JCL Type . . 1 1. Build Initial JCL
2. Build Restart JCL from previous execution JCL
3. Build Startover JCL from previous execution JCL
Run Type . . 1 1. Build JCL in Foreground
2. Build JCL in Batch
Commands: NEXT HELP END
Execute the changes that you specified and analyzed.The Execution component of the product uses the worklist as its input job stream and performs the tasks contained in the worklist. The worklist acts as a detailed procedure for implementing the changes that you defined in the specification stage.
On the Execution JCL Build Interface panel, press Enter to accept the defaults.The Execution Pre- and Post-Processing Interface panel is displayed.
ACMFEXC1 ---------- Execution Pre- and Post-Processing Interface --------------
Command ===>
WORKID . . . . . : RDACRJ.RD10405A
Specify additional steps to be included in this job. Then press Enter.
Pre-Execution Compare
1 1. Do not do a compare before execution
2. Compare two previous baselines
3. Compare a previous baseline to the current catalog
Pre-Execution Baseline
1 1. Do not build a baseline before execution
2. Build a baseline before execution
Post-Execution Compare
1 1. Do not do a compare after execution
2. Compare a previous baseline to the new catalog structures
3. Compare the baseline built during a previous job step to the new
catalog structures
4. Create CDL to fall back to a previous baseline
Post-Execution Baseline
1 1. Do not build a baseline after execution
2. Build a baseline after execution
Commands: HELP PREVIOUS ENDOn the Execution Pre- and Post-Processing Interface Panel, press Enter to accept the defaults.The Execution JCL Processing Interface panel is displayed.
ACMFEXC3 --------------- Execution JCL Processing Interface -------------------
Command ===>
WORKID . . . . . : RDACRJ.RD10405A
Specify Dataset Names.
Execution JCL . . 'ACM.DB2V13.V131.EXECJCL(RD10405A)'
Worklist . . . . . 'ACM.DB2V13.V131.WLBASE01(RD10405A)'
Diagnostics . . . SYSOUT
JCL Build Options.
Dataset Sizing : No Sizing (use Override Defaults to set or change)
Select Processing Options. Then press Enter to continue.
_ Override Defaults
S Edit Worklist
S Build Execution JCL
S Edit Execution JCL
_ Submit Execution JCL
Commands: BROWSE VIEWX PREVIOUS HELP ENDOn the Execution JCL Processing Interface panel, specify the data set name for the Execution JCL, accept the defaults for the JCL build options, and type S to select the processing options. Press Enter.The Execution JCL is displayed. The JCL includes the //AEXIN DD statement (input stream), which includes keywords that are used in executing the JCL. For more information about the input stream, see AEXIN-keywords.
- After you review the JCL, press END to return to the Execution JCL Processing Interface panel.
- From the Execution JCL Processing Interface panel, press Enter to submit the JCL and process your changes.The result of execution is a worklist execution log (AEXPRINT).
To review the results of execution in the worklist execution log (AEXPRINT), you can split your ISPF session or you can use your normal method to review SYSOUT.The last message in the diagnostic output indicates that the work ID status is complete and that the worklist completed successfully. The worklist implemented the structure changes that you specified.
- Press END to return to the Create, Alter, or Drop DB2 Objects panel.
- Press END to return to the Task List Menu panel.
- Press END to return to the BMC AMI Change Manager for Db2 Main Menu.
This example shows that with Change Manager you have the ability to quickly and accurately specify changes to your data structures, perform an in-depth analysis of those changes to determine their effect on your subsystem, and execute SQL and utilities, while collecting statistics on your Db2 objects.