department of administrative services - nedb2ug db2 databases to the... · bureau of enterprise...

21
Bureau of Enterprise Systems and Technology Department of Administrative Services Migrating DB2 Databases to the IBM PureData System for Transactions Dean Myshrall – June 18, 2015

Upload: duongdan

Post on 29-Apr-2018

220 views

Category:

Documents


2 download

TRANSCRIPT

BureauofEnterpriseSystemsandTechnologyDepartmentofAdministrativeServices

MigratingDB2DatabasestotheIBMPureData

SystemforTransactions

DeanMyshrall–June18,2015

StateofCT–DB2LUWStaffManager:BillFusickDBAs:PhilipDilorenzo

BarbaraMcCabeGraceNunesMattSheaVenkataPagidimarri(consultant)

MigratingDB2DatabasestotheIBMPureDataSystemforTransactions

Agenda•  PurchasedConfiguration•  StateConfiguration•  TSMPreparation•  SourceSystemPreparation•  TargetSystemPreparation•  Migration•  FinalSteps

MigratingDB2DatabasestotheIBMPureDataSystemforTransactions

PurchasedConfiguration•  T1500-192Medium½Rack•  12ComputeNodes–16CoresperNode•  6ClustersMaximum•  10DatabasesperClusterMaximum•  Memory–3.1TB•  V7000StorageUnit

–  eachunithas:18x900GBHDD,6x400GBSSD–  TotalstorageSSD–9.6TBunformatted,4.8TBformatted–  TotalstorageHDD–64.8TBunformatted,32.4TBformatted

MigratingDB2DatabasestotheIBMPureDataSystemforTransactions

PurchasedConfiguration•  2ManagementServers

–  OptimUtilities&GUI•  NetworkConnections

–  ManagementNetwork–2–1GBCopper–  DataNetwork–2–10GBSFP+Fiber

•  OS–RHEL6.2•  DB2–10.5.4(alsosupports10.1.4)

MigratingDB2DatabasestotheIBMPureDataSystemforTransactions

StateConfiguration•  Created6Clusters

–  UAT,Staging,Production(2),Conversion,DBASandbox–  4applications

•  Assigned2computenodespercluster•  PurescaleClusterFacilityandDataMembersarecollocated

acrosseachapairofnodes.

MigratingDB2DatabasestotheIBMPureDataSystemforTransactions

MigratingDB2DatabasestotheIBMPureDataSystemforTransactions

MigratingDB2DatabasestotheIBMPureDataSystemforTransactions

Preparation

MigratingDB2DatabasestotheIBMPureDataSystemforTransactions

TSMPreparation•  CreatePDTXnode

Note:Bydefault,PDTXarchiveslogstoTSM.Thisshouldbeaseparatepool.

•  Warning!–  PDTXcomeswithTSMclient6.2.2.0–  Ifyoursourceserversareatahigherlevel,youmustupgradePDTX

TSMclienttomatchthesourceservers.–  Whenyoucompletedallmigrations,revertPDTXTSMclientto

6.2.2.0

MigratingDB2DatabasestotheIBMPureDataSystemforTransactions

SourceSystemPreparation•  Upgradeto10.5.4•  UseTSMfordatabasebackups

–  PointsourceTSMtoPDTXnode

•  Grantdbadm,secadm,dataaccess,accessctrltothePDTXinstanceowner.

MigratingDB2DatabasestotheIBMPureDataSystemforTransactions

PDTXDatabasePreparation•  CreateashelldbonthePDTXinstance.

–  SettingsshouldmatchthesourceDB(pagesize,etc)–  Createthedefaultdatabaseuser.

•  Gettheshelldb’sid.You’llneedthislater.

MigratingDB2DatabasestotheIBMPureDataSystemforTransactions

PDTXDatabasePreparationDisableOPMdatacollectiontoenableofflinebackupandrestore

MigratingDB2DatabasestotheIBMPureDataSystemforTransactions

Migration

MigratingDB2DatabasestotheIBMPureDataSystemforTransactions

MigrationProcessSource:•  PointsourceinstanceTSMtothePDTXTSMnode.•  OfflinebackupofthesourcedatabasetoTSM•  Un-catalogSourceDatabase•  Ifthereareotherdbsontheserver

–  ResettheTSMnodetotheoriginalvalue.

MigratingDB2DatabasestotheIBMPureDataSystemforTransactions

MigrationProcessTarget:PDTXMostworkdoneonthePDTXcommandline

•  db2setDB2_RESTORE_GRANT_ADMIN_AUTHORITIES=ONWillgivethePDTXinstanceownerAdminrightstothemigrateddatabase.ThisisaRegistryvariable.RequiresInstanceStop/Start.

MigratingDB2DatabasestotheIBMPureDataSystemforTransactions

MigrationRestorethesourcedbRESTOREDATABASEbipconctUSETSMOPEN1SESSIONSOPTIONS'-fromnode=PDTXTSMnode’

-fromOwner=SourceInstanceownerTAKENAT20150612150314 --sourcebackuptimestampON'/db2sd_data_instance_PDTXtargetshelldb_databaseGUID’--RecordedduringshelldbcreationDBPATHON'/db2sd_data_instance_PDTXtargetshelldb_databaseGUID'INTO[PDTXtargetshelldb] REPLACEHISTORYFILEREPLACEEXISTINGWITHOUTROLLINGFORWARDWITHOUTPROMPTING;

MigratingDB2DatabasestotheIBMPureDataSystemforTransactions

MigrationFixthelogpaths–aftertherestore,theyreferencethesourcedb’slogpaths•  db2-v"updatedbcfgforPDTXdbusingNEWLOGPATH'/

db2sd_log_instance_PDTXdb_PDTXdatabaseGUID'MIRRORLOGPATH'/db2sd_mlog_instance_PDTXdb_databaseGUID'IMMEDIATE"

•  db2"updatedbcfgforPDTXdbusingLOGARCHMETH1TSM

FAILARCHPATH'/db2sd_data_instance_PDTX_db_PDTXdatabaseGUID/failedlog'immediate"

MigratingDB2DatabasestotheIBMPureDataSystemforTransactions

Migration•  TurnthedatabaseintoaPurescaledatabase.

db2checkSDPDTXdb•  Backthatsuckerup(offline)

MigratingDB2DatabasestotheIBMPureDataSystemforTransactions

MigrationGrantPDTXDBdefaultusernecessaryrightstothemigrateddatabase.connecttoPDTXdb;CREATEROLE“appdba";GRANTACCESSCTRLONDATABASETOROLE"APPDBA";GRANTCREATE_EXTERNAL_ROUTINEONDATABASETOROLE"APPDBA";GRANTCREATE_NOT_FENCED_ROUTINEONDATABASETOROLE"APPDBA";GRANTDATAACCESSONDATABASETOROLE"APPDBA";GRANTDBADMONDATABASETOROLE"APPDBA";GRANTLOADONDATABASETOROLE"APPDBA";GRANTSECADMONDATABASETOROLE"APPDBA";GRANTROLEappdbaTOUSERdefaultPDTXdbuser;CONNECTRESET;

MigratingDB2DatabasestotheIBMPureDataSystemforTransactions

Migration•  FinalSteps

–  Re-enableOPMdatacollection

–  Setupbackup,maintenanceschedule(crontab)• NativePDTXbackupschedulerhaslimitedcapabilities

–  Verifyapplicationconnectivity

MigratingDB2DatabasestotheIBMPureDataSystemforTransactions