I would like to copy the statistics for all the objects in a database on one subsystem to another subsystem.
Will the statistics need to be moved across LPARS? If the answer to this is YES, then before we start, you will need to create a PDS for the analysis output to be saved to and, since you cannot do a remote (across LPARs) migration, you will need to move that dataset over to the other LPAR and execute the strategy. The PDS needs to be 80 bytes, FB.
If the statistics migration is on the same LPAR, you may either use a PDS or managed output to hold the analysis output.
Let's get started!
Access RCM off the products main menu #2
This will put you on the RC/Migrator Main Menu from here select
1 - Strategy Services
You will now be on the RC/M Strategy Services screen.
Drop below the header and, enter a 'C' on the first line, pick a strategy name and a description (optional), under TP (type of strategy) you will put an 'M' as this is a migration. Under SO(share option) if you will be the only one using this use a Y, this way no one else can tweak the strategy. If you use a 'U', other people can update the strategy. Put in the ssid that you are doing the migration from (source ssid).
It would look something like this:
T S SRC +---- LAST UPDATE ----
O STRATEGY DESCRIPTION CREATOR P O SSID USER DATE TIME
c TED_____ stats only migration on DB USERID2 M Y SSIDA <== STRATEGY CREATION
This will pop you into the primary object selection screen.
RC/M Create Migration Strategy
If you are doing this for the DB level, you will want to explode down.
So, next to DB place and 'e'... In the criteria section put in the DB name and creator, Using e, you will not have to make subsequent selections.
---------------- RC/M Create Migration Strategy --------------- 09/06/04 09:
Strategy ===> TED Description ===> STATS ONLY MIGRATION ONDB
Creator ===> USERID2 Share Option ===> U (U,Y,N,X,L) SRC SSID ===> SSIDA
PRIMARY OBJECT TYPE SPECIFICATION. (Select one type with 'A' , 'S', or 'E'
_ Storage Group
PRIMARY OBJECT SELECTION SPECIFICATION.
Name ==> PTDB > Creator ==> DA% > Where ==> N
Once you press enter, then you will be placed back on the RC/M Strategy Services screen where you had originally created the strategy.
We are ready to set the analysis options! Place an 'a' next to your newly created strategy, a is for analyze.
T S SRC +---- LAST UPDATE ---
O STRATEGY DESCRIPTION CREATOR P O SSID USER DATE TIM
_ ________ _________________________ USERID2 _ N ____ <== STRATEGY CREATION
a TED STATS ONLY MIGRATION ONDB USERID2 M U SSIDA USERID2 09/06/04 09:
Press enter. This brings you into the RC/M Migration Strategy Analysis - screen.
STRATEGY ===> TED DESCRIPTION ===> STATS ONLY MIGRATION
CREATOR ===> userid2 SHAREOPTION ===> U
EXECUTION SPECIFICATIONS ACCESS SPECIFICATIONS
EXECUTION MODE ===> ( O - Online, B - Batch ) ACM ANALYSIS ===> N
OVERRIDE => N PDS ANALYSIS ===> N
RECOVERY => N
OPTION SPECIFICATIONS DB2 SSID SPECIFICATIONS
UPDATE OPTIONS ===> Y SOURCE SSID ===> SSIDA
GLOBAL CHANGES ===> N TARGET SSID ===> SSIDB
SET NAME ===>
SET CREATOR ===>
OUTPUT DATASET SPECIFICATIONS
EDIT DATASET ===> N
DATASET NAME ===> 'USERID2.RCM3.MIGRATE(TED)'
VOLUME SERIAL ===> (If not cataloged)
Note: under OUTPUT dataset Specification, in quotes, put in the PDS name and the member which is the strategy name! If you have always used a PDS, the strategy name will be appended to the string as it will be used as the member name.
Please set the UPDATE OPTIONS flag to Y and press enter.
This brings you to the Analysis Options Screen.
I think the best thing to do here is just set what you need since there are so many options!
Here are my suggestions:
You will want to set STATS to S as you only want to migrate with no control cards generated.
STATS (Y,N,S,A) ==> S
Please make sure that under the output options, these are set to Y.
ANALYSIS HEADER ==> Y
IMPACT ANALYSIS ==> Y
RPT IN DDLFILE ==> Y
This is what gives you information on what has occurred in the strategy.
Since you are doing STATS only, drop down to the
NO .AUTHS ==> N
BND/DAT/STAT/SQL/GRNT/RI ==> R (B nd, D at, R -Stat, S QL, G rnt, R I or N
COMMIT ASAP ==> N (If SQL only specified)
Set the BND/DAT/STAT/SQL/GRNT/RI ==> R for stats only.
One other thing that you might have an issue with or be prompted for is the @DEFAULT model that you will use.
MODEL ID ==> @DEFAULT
MODEL CREATOR ==> R115SPTI
UPDATE MODEL ==> N
If you need to select a model, blank out the first 2 fields and put a Y on UPDATE MODEL, press enter, this will bring you to a screen where you can select a model, just select one, you won't be doing really anything here as you are not unloading, etc... So, just 'S' next to one and press enter, then you will be placed back on the analysis option screen. TYPE SAVE at the top of this screen so it saves the values that you currently have selected. F3 back to the RC/M Migration Strategy Analysis screen. Here, you can either do this online or in Batch mode, totally up to you!!! Online will tie up your session. THIS WILL ONLY ANALYZE!!!
Make sure you have an SSID in both source and target
DB2 SSID SPECIFICATIONS
SOURCE SSID ===> SSIDA
TARGET SSID ===> SSIDB
It can be in-place like this, it won't matter as you are going to have to move the analysis output to another LPAR to run.
NOTE: If you are not moving the dataset to another LPAR, you will want to specify the Target SSID.
Once you analyze, the dataset will contain the information that you need to migrate the stats! Move the dataset, get back into the products and type BP at the command line, this will put you into the batch processor screen where you can type in the analysis output dataset and member and EXECUTE the stats only strategy. If you are doing this on the same LPAR and, you are ready to execute the strategy, next to the analysis output type an 'S', you will be placed on the Batch Processor Interface screen and, can then submit the strategy.