CONTENTS Title Page Copyright Page Preface 1 Introduction 1.1 Data Distributor Major Capabilities 1.2 Data Management and Data Access Products 1.3 User and Application Interfaces to Data Distributor 1.4 Using Centralized Data Versus Replicated Data 1.4.1 Central Data Management 1.4.2 Replicated Data Management 2 Overview 2.1 Data Distributor Concepts 2.1.1 Transfers 2.1.2 Local and Remote Databases 2.1.3 Data Distribution Scenarios 2.1.3.1 Distributing Data from One Source to Many Targets 2.1.3.2 Distributing Data from Many Sources to One Target 2.1.3.3 Exchanging Data Among Peer Databases 2.1.3.4 Archiving Data 2.1.4 Selecting Subsets of Data 2.1.5 Methods of Transfer 2.1.5.1 Extraction and Extraction Rollup Transfers 2.1.5.2 Replication Transfers 2.2 Choosing a Method of Transfer 2.2.1 Classifying Your Database Tasks 2.2.2 Transfer Choices and Considerations 2.2.2.1 Types of Source Database Used 2.2.2.2 Location of Data Distributor 2.2.2.3 Data Currency and Volume of Data Transferred 2.2.2.4 Target Disk Storage Usage 2.2.2.5 Source Disk Storage Usage 2.2.2.6 Source Database Transaction Rate 2.2.2.7 Source Database Availability 3 Components of Data Distributor 3.1 Overview 3.2 Using the SQL Interfaces 3.2.1 Using SQL/Services to Query a Target Database 3.2.2 Using SQL Applications to Issue Data Distributor Statements 3.3 How DEC Rdb or DBI Licenses Affect Use of Data Distributor 3.4 Source Database 3.5 Target Database 3.6 Transfer Monitor 3.7 Transfer Database 3.8 Transfer and Schedule Definitions 3.9 Copy Process 3.10 Special Data Distributor System Tables for Replications 4 Preparations for Distributing Data 4.1 Determining Product Versions and Licenses 4.2 Using Data Distributor in a Multiversion DEC Rdb Environment 4.3 Requirements for Locating Data Distributor at Various Sites 4.4 Moving Applications to Target Sites 4.4.1 Using the Data Dictionary with Data Distributor 4.4.2 Using Transfer Definitions to Provide Remote Copies of Database Definitions 4.5 Preparations at the Transfer Definition Site 4.6 Preparations at the Source Sites 4.7 Preparations at the Target Site 4.8 Remote Access Using Proxy Accounts 4.8.1 Specifying Proxy Accounts in Transfer Definitions 4.8.2 Setting Up Proxy Accounts for the Copy Process 4.9 Preparing Database Access Using the RMU/OPEN Command 4.10 DECnet Network Tuning Parameters 4.11 Performing Database Maintenance, Backup, Recovery, and Conversion 4.11.1 Maintenance, Backup, Recovery, and Conversion of Source Databases 4.11.1.1 Backing Up and Recovering a Source Database 4.11.1.2 Converting Source Databases 4.11.2 Maintenance, Backup, Recovery, and Conversion of Target Databases 4.11.2.1 Backing Up and Recovering a Target Database 4.11.2.2 Converting Target Databases 4.11.3 Maintenance, Backup, Recovery, and Conversion of Transfer Databases 4.11.3.1 Backing Up and Recovering a Transfer Database 4.11.3.2 Converting Transfer Databases 4.11.4 Changing Data Definitions and Restructuring Databases 4.11.4.1 Changing Definitions in and Restructuring Source Databases 4.11.4.2 Changing Definitions in and Restructuring Target Databases 5 Creating Database Transfers 5.1 Extraction and Extraction Rollup Transfers 5.1.1 Extraction and Extraction Rollup Transfer Definition Elements 5.1.1.1 Identifying Source Databases 5.1.1.2 Target Nodes and Directories 5.1.1.3 Target Database Parameters 5.1.1.4 Using the Wildcard Character 5.1.1.5 Database Aliases 5.1.1.6 Location of Copy Process Log Files 5.1.1.7 Using Command Procedures 5.1.2 Identifying Rows 5.1.3 Forming Select Expressions 5.1.4 Transferring Views 5.1.5 Creating and Starting an Extraction or an Extraction Rollup Transfer 5.2 Replication Transfers 5.2.1 Replication Transfer Definition Elements 5.2.1.1 Identifying the Source Database 5.2.1.2 Target Nodes and Directories 5.2.1.3 Target Database Parameters 5.2.1.4 The Wildcard Character 5.2.1.5 Database Aliases 5.2.1.6 Location of Copy Process Log Files 5.2.1.7 Using Command Procedures 5.2.2 Identifying Rows 5.2.2.1 The Effect of Inserting, Updating, and Deleting Rows 5.2.3 Forming Select Expressions 5.2.4 Transferring Views 5.2.5 Creating and Starting a Replication Transfer 5.3 Character Set Considerations with Database Transfers 5.3.1 MIA Character Set Not Supported by RDO 5.3.2 Terminal Device Characteristics Restrict Use of Character Sets 5.3.3 Effects of Transferring Database Objects with Different Character Sets 5.3.4 Using Different Versions of DEC Rdb for Source and Target Databases 5.4 Using Multischema Databases as Source Databases 5.5 DEC DB Integrator Target Considerations 5.5.1 CREATE TRANSFER Requirements 5.5.2 Manual Creation of Data Distributor Tables 5.5.3 Limit to Number of Tables Per Transfer 5.5.4 Datatype Limitations 5.5.5 Uniqueness of Object Names 5.5.6 Access String Requirements for Target DB2 and SYBASE Databases 5.5.7 Indexes and Column Constraints 5.5.8 Source Definition Changes 6 Working with Transfers 6.1 Creating a Schedule for Transfers 6.2 Transfer States 6.3 Executing the Transfer 6.4 Modifying Your LOGIN.COM File for the Copy Process 6.5 Stopping Transfers 6.6 Changing and Dropping Transfers 6.6.1 Changing Transfer Definitions Using the SQL ALTER TRANSFER Statement 6.6.2 Dropping Transfer Definitions 6.7 Changing and Dropping Schedules 6.7.1 Changing Schedules 6.7.2 Dropping Schedules 6.8 Changing Data Definitions After a Transfer is Defined 6.9 Displaying Transfer Information 6.9.1 Showing a Transfer Definition 6.9.2 Examining Target Database Information 6.9.3 Showing a Transfer Schedule 6.9.4 Showing Transfer Status 6.9.5 Showing All Transfer Information 6.10 Using Log Files 6.10.1 Using Copy Process Log Files 6.10.2 Copy Process Option for Logging Individual Row Keys 6.10.3 Using Transfer Monitor Log Files 6.11 Using Checkpoints for Quicker Recovery from Some Transfer Failures 6.12 User-Added Data Definitions in a Target Database 6.12.1 Effects of Transfer Reexecution on User-Added Definitions 6.12.1.1 Extraction and Extraction Rollup Transfers 6.12.1.2 Replication Transfers 6.12.2 Adding Indexes to Target Tables 6.12.3 Adding Constraints for Target Tables 6.12.4 Adding Triggers for Target Tables 6.12.5 Adding Multischema Attributes to Target Tables 6.12.6 Adding Multifile Storage Areas to a Target Database 6.12.7 Modifying Protection for Target Databases and Tables 6.12.8 Adding Tables to Target Databases 6.12.9 Adding Views to Target Databases 6.13 User-Added Data in a Target Database 6.14 Special Data Definitions Supporting Replications 6.15 Application Requirements for Transfers 6.15.1 Storing Database Definitions in the Data Dictionary 6.15.2 Identifying the Location of the Database 6.15.3 Determining the State of a Target Database 6.15.4 Modifying Row Descriptions in Application Programs 6.15.5 Modifying Transaction Share Modes and Lock Types for Extraction or Extraction Rollup Databases 6.15.6 Modifying Transaction Share Modes and Lock Types for Replication Databases 6.15.7 Evaluating Application Schedules for Extraction or Extraction Rollup Databases 6.15.8 Evaluating Application Schedules for Replication Databases 6.15.9 Providing Data Definitions Without Data at the Target Site 6.16 Replication Transfers Performance Option 6.16.1 Performance Considerations 6.16.2 Aiding Performance with Indexing 6.16.3 Optional Indexing 6.16.3.1 Using the Logical Name DDAL$CHANGES_INDEX_transfer_name 6.16.3.2 Using the Logical Name DDAL$CHANGES_INDEX 6.16.4 Creating the Indexes 6.16.4.1 Index Creation for Replication Initialization and Reinitialization 6.16.4.2 Index Creation for Replication Updates 6.16.5 Dropping the Indexes 6.16.6 Creating Indexes for Replication Transfers 6.17 Limiting Concurrent Transfers on a CPU 6.18 Maximum Size of Source Database Table 7 Using Command Procedures with Transfers 7.1 Defining and Executing Command Procedures 7.1.1 Executing Command Procedures 7.1.1.1 Executing Remotely or Locally Stored Command Procedures on a Local Node 7.1.1.2 Executing Remotely Stored Command Procedures on a Remote Node 7.1.2 Completing the Transfer with DDAL$EPILOGUE.COM 7.1.3 Executing Multiple Command Procedures 7.1.4 Passing Parameters to Command Procedures 7.1.5 Using DDAL$TRANSFER_NAME to Identify a Transfer 7.1.6 Executing a Command Procedure on a Remote Node 7.1.7 Finding Command Procedure Information in the Copy Process Log File 7.2 Determining Transfer Status 7.2.1 Using DDAL$CP_CONTINUE to Affect Transfer Execution 7.2.1.1 Determining Prologue Success Status with Prologue Command Procedures 7.2.1.2 Determining Transfer Success Status with Epilogue Command Procedures 7.2.1.3 Determining Epilogue Success Status with Epilogue Command Procedures 7.2.2 Using the SHOW TRANSFER STATUS Statement 7.2.3 Using the Copy Process Log for Status Information 7.3 Typical Uses of Command Procedures 7.3.1 Creating Target Indexes and Other Database Attributes 7.3.2 Granting Target Database Access Rights 7.3.3 Defining Transfer and Schedule Definition Protection Using Access Control Lists 7.3.4 Bringing Up the Network Line at Transfer Time 7.3.5 Storing Data Definitions in the Data Dictionary at a Target Site 7.3.5.1 Using the SUBMIT/REMOTE Command to Run a Remote Command Procedure 7.3.5.2 Using the TYPE Command to Run a Remote Command Procedure 8 Transferring Data to Existing Databases 8.1 Overview 8.1.1 Merging Reference Data with Existing Data 8.1.2 Replication Rollup Transfers 8.1.3 Two-Way Data Transfers 8.1.4 Archive Databases 8.2 Using Transfers to Existing Databases 8.2.1 Extraction Transfers to an Existing Database 8.2.1.1 Using an Epilogue Procedure to Add Indexes, Constraints, and New Views 8.2.1.2 Updating the Target Database Dictionary 8.2.1.3 Using Prologue Procedures for Transfer Reexecution 8.2.1.4 Changing Table Definitions 8.2.1.5 Changing Domain Definitions 8.2.1.6 Changing View Definitions 8.2.1.7 Dropping Indexes and Constraints 8.2.1.8 Database Access Conflicts 8.2.2 Replication Transfers to an Existing Database 8.2.2.1 Replication Transfers Defined as TYPE IS REPLICATION 8.2.2.2 Replication Transfers Defined as TYPE IS REPLICATION WITH NO DELETE 8.2.3 Writing to Target Databases 8.2.3.1 New Databases 8.2.3.2 Existing Databases 8.2.4 Multiple Transfers to an Existing Database 8.2.5 Multiple RMS Transfers to an Existing Database 8.2.6 Transfer Failure and Storage Usage 8.2.7 Database Consistency 8.3 Restrictions 9 SQL Statements for Data Distributor 9.1 ALTER SCHEDULE Statement 9.2 ALTER TRANSFER Statement 9.3 CREATE SCHEDULE Statement 9.4 CREATE TRANSFER Statement 9.5 DROP SCHEDULE Statement 9.6 DROP TRANSFER Statement 9.7 GRANT Statement 9.8 HELP Statement 9.9 REINITIALIZE TRANSFER Statement 9.10 REVOKE Statement 9.11 SET LOGICAL_NAME TRANSLATION FOR TRANSFER Statement 9.12 SHOW TRANSFER Statement 9.13 START TRANSFER Statement 9.14 STOP TRANSFER Statement 10 RDO Statements for Data Distributor 10.1 DEFINE SCHEDULE Statement 10.2 DEFINE TRANSFER Statement 10.3 DELETE SCHEDULE Statement 10.4 DELETE TRANSFER Statement 10.5 HELP Statement 10.6 REINITIALIZE TRANSFER Statement 10.7 SHOW TRANSFER Statement 10.8 START TRANSFER Statement 10.9 STOP TRANSFER Statement A The Transfer Database and Special-Purpose System Tables A.1 Data Distributor Transfer Database Tables A.1.1 DDAL$INVOKE_TIME Transfer Database Table A.1.2 DDAL$TRANSFERS Transfer Database Table A.1.3 DDAL$ROLLUP_DATABASES Transfer Database Table A.1.4 DDAL$TRANSFER_DATABASE Transfer Database Table A.1.5 DDAL$TRANSFER_FIELDS Transfer Database Table A.1.6 DDAL$TRANSFER_RELATIONS Transfer Database Table A.1.7 DDAL$TRANSFER_SCHEDULE Transfer Database Table A.1.8 DDAL$TRANSFERS_STATUS Transfer Database Table A.1.9 DDAL$TRANSFER_VIEWS Transfer Database Table A.2 Data Distributor System Tables in Source Databases A.2.1 RDB$TRANSFERS System Table A.2.2 RDB$TRANSFER_RELATIONS System Table A.2.3 RDB$CHANGES System Table A.2.4 RDB$CHANGES_MAX_TSER System Table A.3 Data Distributor System Tables in Target Databases A.3.1 RDB$VINTAGE and DDAL$TRANSFER_INFO Tables A.3.2 RDBVMS$TRANSFER_OWNER and DDAL$TRANSFER_OWNR Table B Data Distributor Logical Names B.1 DDAL$CHANGES_INDEX Logical Name B.2 DDAL$CP_CONTINUE Logical Name B.3 DDAL$CP_LOG_OPTIONS Logical Name B.4 DDAL$CP_READ_CHANGES Logical Name B.5 DDAL$MAX_COPY_PROCESS Logical Name B.6 DDAL$PURGE Logical Name C Data Distributor Operational Information C.1 Operational Procedures C.1.1 Re-creating the Transfer Database C.1.2 Starting and Stopping the Transfer Monitor C.2 Transfer States and Transfer Status Codes C.3 Special-Purpose System Tables Used with Replication Source Databases C.4 Metadata Maintained by Data Distributor in Target Databases C.5 Access Rights for Transfer Database and Special-Purpose System Tables C.6 Transaction Activity During Transfer Execution C.6.1 Transfer Retries After Recoverable Errors C.6.2 Common Operations C.6.3 Extraction or Extraction Rollup Transfer Operation C.6.3.1 Transfer to a New Target Database C.6.3.2 Transfer to an Existing Target Database C.6.4 Initial or Reinitialized Replication Transfer Operation C.6.4.1 Transfer to a New Target Database C.6.4.2 Transfer to an Existing Target Database C.6.5 Replication Update Transfer Operation D Examples D.1 Using an SQL Application to Create and Control the Execution of Transfers D.2 Compiling and Linking the Test Program D.3 Checking Transfer Execution Status D.4 Using DEC DB Gateway for RMS with Data Distributor Glossary