Teradata Data Stream Architecture User Guide Release 14.11 B035-3150-093K September 2013 The product or products described in this book are licensed products of Teradata Corporation or its affiliates. Teradata, Active Data Warehousing, Active Enterprise Intelligence, Applications-Within, Aprimo, Aprimo Marketing Studio, Aster, BYNET, Claraview, DecisionCast, Gridscale, MyCommerce, Raising Intelligence, Smarter. Faster. Wins., SQL-MapReduce, Teradata Decision Experts, "Teradata Labs" logo, "Teradata Raising Intelligence" logo, Teradata ServiceConnect, Teradata Source Experts, "Teradata The Best Decision Possible" logo, The Best Decision Possible, WebAnalyst, and Xkoto are trademarks or registered trademarks of Teradata Corporation or its affiliates in the United States and other countries. Adaptec and SCSISelect are trademarks or registered trademarks of Adaptec, Inc. AMD Opteron and Opteron are trademarks of Advanced Micro Devices, Inc. Apache, Apache Hadoop, Hadoop, and the yellow elephant logo are either registered trademarks or trademarks of the Apache Software Foundation in the United States and/or other countries. Apple, Mac, and OS X all are registered trademarks of Apple Inc. Axeda is a registered trademark of Axeda Corporation. Axeda Agents, Axeda Applications, Axeda Policy Manager, Axeda Enterprise, Axeda Access, Axeda Software Management, Axeda Service, Axeda ServiceLink, and Firewall-Friendly are trademarks and Maximum Results and Maximum Support are servicemarks of Axeda Corporation. Data Domain, EMC, PowerPath, SRDF, and Symmetrix are registered trademarks of EMC Corporation. GoldenGate is a trademark of Oracle. Hewlett-Packard and HP are registered trademarks of Hewlett-Packard Company. Hortonworks, the Hortonworks logo and other Hortonworks trademarks are trademarks of Hortonworks Inc. in the United States and other countries. Intel, Pentium, and XEON are registered trademarks of Intel Corporation. IBM, CICS, RACF, Tivoli, and z/OS are registered trademarks of International Business Machines Corporation. Linux is a registered trademark of Linus Torvalds. LSI is a registered trademark of LSI Corporation. Microsoft, Active Directory, Windows, Windows NT, and Windows Server are registered trademarks of Microsoft Corporation in the United States and other countries. NetVault is a trademark or registered trademark of Quest Software, Inc. in the United States and/or other countries. Novell and SUSE are registered trademarks of Novell, Inc., in the United States and other countries. Oracle, Java, and Solaris are registered trademarks of Oracle and/or its affiliates. QLogic and SANbox are trademarks or registered trademarks of QLogic Corporation. Quantum and the Quantum logo are trademarks of Quantum Corporation, registered in the U.S.A. and other countries. Red Hat is a trademark of Red Hat, Inc., registered in the U.S. and other countries. Used under license. SAS and SAS/C are trademarks or registered trademarks of SAS Institute Inc. SPARC is a registered trademark of SPARC International, Inc. Symantec, NetBackup, and VERITAS are trademarks or registered trademarks of Symantec Corporation or its affiliates in the United States and other countries. Unicode is a registered trademark of Unicode, Inc. in the United States and other countries. UNIX is a registered trademark of The Open Group in the United States and other countries. Other product and company names mentioned herein may be the trademarks of their respective owners. The information contained in this document is provided on an "as-is" basis, without warranty of any kind, either express or implied, including the implied warranties of merchantability, fitness for a particular purpose, or non-infringement. Some jurisdictions do not allow the exclusion of implied warranties, so the above exclusion may not apply to you. In no event will Teradata Corporation be liable for any indirect, direct, special, incidental, or consequential damages, including lost profits or lost savings, even if expressly advised of the possibility of such damages. The information contained in this document may contain references or cross-references to features, functions, products, or services that are not announced or available in your country. Such references do not imply that Teradata Corporation intends to announce such features, functions, products, or services in your country. Please consult your local Teradata Corporation representative for those features, functions, products, or services available in your country. Information contained in this document may contain technical inaccuracies or typographical errors. Information may be changed or updated without notice. Teradata Corporation may also make improvements or changes in the products or services described in this information at any time without notice. To maintain the quality of our products and services, we would like your comments on the accuracy, clarity, organization, and value of this document. Please e-mail: teradata-books@lists.teradata.com Any comments or materials (collectively referred to as "Feedback") sent to Teradata Corporation will be deemed non-confidential. Teradata Corporation will have no obligation of any kind with respect to Feedback and will be free to use, reproduce, disclose, exhibit, display, transform, create derivative works of, and distribute the Feedback and derivative works thereof without limitation on a royalty-free basis. Further, Teradata Corporation will be free to use any ideas, concepts, know-how, or techniques contained in such Feedback for any purpose whatsoever, including developing, manufacturing, or marketing products or services incorporating Feedback. Copyright © 2013 by Teradata Corporation. All Rights Reserved. Table of Contents Preface...........................................................................................................................................................17 Audience.............................................................................................................................................................. 17 Changes to This Book........................................................................................................................................ 17 Supported Releases............................................................................................................................................. 17 Related Documentation.....................................................................................................................................18 Product Safety Information...............................................................................................................................18 Chapter 1: Overview..................................................................................................................................................... 19 Introduction to Data Stream Architecture......................................................................................................19 BAR Integration.................................................................................................................................................. 19 BAR Job Workflow.............................................................................................................................................21 Initial BAR Setup and BAR Job Creation Through the BAR portlets..........................................................22 Differences Between TARA and DSA..............................................................................................................22 About Permissions..............................................................................................................................................23 About Restrictions..............................................................................................................................................24 Component Deletion..........................................................................................................................................24 About Backup Types...........................................................................................................................................24 Example of a Backup Strategy....................................................................................................................26 Incomplete Backups.................................................................................................................................... 26 Active and Retired Jobs......................................................................................................................................27 About the Command-Line Interface and BAR Portlets................................................................................ 27 Multiple DSA Domains......................................................................................................................................27 Chapter 2: Teradata BAR Portlets................................................................................................................... 29 BAR Setup............................................................................................................................................................29 Configuring BAR Setup.............................................................................................................................. 29 General DSA Settings..................................................................................................................................30 Systems and Nodes......................................................................................................................................31 Adding a System and Node Configuration.......................................................................................31 Deleting a System................................................................................................................................. 32 Teradata Data Stream Architecture User Guide, Release 14.11 3 Table of Contents Adding a Node....................................................................................................................................... 32 Deleting a Node..................................................................................................................................... 32 Media Servers................................................................................................................................................32 Adding a Media Server......................................................................................................................... 33 Deleting a Media Server....................................................................................................................... 33 Backup Applications.....................................................................................................................................33 Adding a NetBackup Server.................................................................................................................33 Deleting a NetBackup Server............................................................................................................... 34 Target Groups................................................................................................................................................34 Adding or Copying a Target Group.................................................................................................... 34 Deleting a Remote Group.....................................................................................................................35 Adding or Editing a Restore Group.................................................................................................... 35 Deleting a Restore Group..................................................................................................................... 36 Managing the DSC Repository................................................................................................................... 36 Scheduling a Repository Backup......................................................................................................... 37 Backing Up the Repository.................................................................................................................. 37 Restoring the Repository...................................................................................................................... 37 BAR Operations................................................................................................................................................... 37 About the Saved Jobs View.......................................................................................................................... 38 About the Job Status Filter Bar............................................................................................................ 39 Running a Job.........................................................................................................................................40 Aborting a Job........................................................................................................................................40 Viewing Job Status................................................................................................................................. 41 About the Log Tab...................................................................................................................41 About the Stream Tab.............................................................................................................42 About the Phase Log...............................................................................................................43 Viewing Save Sets...................................................................................................................................43 Viewing Backup IDs.............................................................................................................................. 44 Retiring a Job..........................................................................................................................................45 Activating a Job....................................................................................................................... 45 Deleting a Job...........................................................................................................................45 About the Job History View.........................................................................................................................46 Viewing Job History.............................................................................................................................. 46 Planning a Job............................................................................................................................................... 47 Backup Jobs............................................................................................................................................ 47 Restore Jobs............................................................................................................................................ 48 Analyze Jobs........................................................................................................................................... 48 Managing Jobs....................................................................................................................................... 48 Creating or Editing a Backup Job........................................................................................................48 Creating or Editing a Restore Job........................................................................................................49 Creating or Editing an Analyze Job.................................................................................................... 50 ARC Script Migration...........................................................................................................................51 About the Select Objects Tab............................................................................................................... 51 4 Teradata Data Stream Architecture User Guide, Release 14.11 Table of Contents About the Selection Summary Tab................................................................................................................52 About the Save Set Version Tab..................................................................................................................... 52 About the Job Settings Tab............................................................................................................................. 52 Changing Job Permissions..............................................................................................................................55 About the Object Browser..................................................................................................................................... 56 Setting Object Browser Defaults....................................................................................................................57 Object Types.....................................................................................................................................................57 Using the Object Browser...............................................................................................................................58 About Filters and Sorting.......................................................................................................................................59 Clearing Filters.................................................................................................................................................60 Configuring Columns to Display.................................................................................................................. 60 Exporting Table Data...................................................................................................................................... 60 Chapter 3: Teradata DSA Command Line Interface..................................................................................63 Command-Line Interface Overview........................................................................................................................... 63 Accessing the DSA Command-Line Interface.................................................................................................... 63 Accessing DSA Command Help........................................................................................................................... 63 DSA Command Types........................................................................................................................................... 64 DSA Configuration.................................................................................................................................................69 Systems and Nodes.......................................................................................................................................... 69 Configuring a System and Node..................................................................................................... 69 Media Servers...................................................................................................................................................70 Adding or Updating a Media Server...............................................................................................70 Backup Applications........................................................................................................................................70 Adding or Updating a NetBackup Server...................................................................................... 70 Target Groups...................................................................................................................................................71 Adding or Updating a Target Group.............................................................................................. 71 Enabling a System or Target Group................................................................................................ 71 Disabling a System or Target Group............................................................................................... 72 Adding a Target Group Map............................................................................................................72 Exporting a Target Group Map....................................................................................................... 73 Deleting a Target Group Map.......................................................................................................... 73 Deleting a Component....................................................................................................................................73 Viewing Configuration Information............................................................................................................. 74 Exporting DSA Component Configuration.................................................................................................77 Managing the DSC Repository...................................................................................................................... 78 Scheduling and Configuring a Repository Backup.......................................................................78 Backing Up the DSC Repository..................................................................................................... 78 Exporting the Repository Backup Configuration......................................................................... 79 Teradata Data Stream Architecture User Guide, Release 14.11 5 Table of Contents Restoring the DSC Repository.............................................................................................. 79 About Aborting a DSC Repository Job................................................................................ 79 Planning a Job............................................................................................................................................... 80 Backup Jobs............................................................................................................................................ 80 Restore Jobs............................................................................................................................................ 80 Analyze Jobs........................................................................................................................................... 80 Creating or Updating a Job.................................................................................................................. 80 Automatically Retiring a Job................................................................................................. 81 Including Objects.................................................................................................................... 82 Excluding Objects................................................................................................................... 83 Renaming Tables..................................................................................................................... 83 Renaming a Database............................................................................................................. 84 Mapping to a Different Database..........................................................................................84 Changing Job Options............................................................................................................ 84 DSA Command-Line Interface Job Options....................................................................... 85 Running a Job.........................................................................................................................................88 Viewing Job Status................................................................................................................................. 88 Considerations for Aborting a Job...................................................................................................... 89 Aborting a Job........................................................................................................................................89 Exporting a Job...................................................................................................................................... 90 Retiring a Job..........................................................................................................................................90 Activating a Job......................................................................................................................................90 Deleting a Job.........................................................................................................................................90 Chapter 4: Troubleshooting.................................................................................................................................... 93 TVI Logging......................................................................................................................................................... 93 BARNC Error Codes........................................................................................................................................... 94 Locked Object Restrictions................................................................................................................................ 96 Releasing Locked Objects............................................................................................................................97 Appendix A: Administrative Tasks....................................................................................................................... 99 Protecting the DSC Repository..........................................................................................................................99 Recovering the DSC Repository........................................................................................................................ 99 Job Migration to a Different DSA Environment........................................................................................... 101 Restoring to a Different DSA Environment............................................................................................101 Exporting Job Metadata.............................................................................................................................102 6 Teradata Data Stream Architecture User Guide, Release 14.11 Table of Contents Importing Job Metadata...................................................................................................................................... 103 Validating Job Metadata.......................................................................................................................................103 Restarting DSMain...................................................................................................................................................... 104 Appendix B: Rules for Restoring and Copying Objects........................................................................... 105 Selective Backup and Restore Rules.......................................................................................................................... 105 Appendix C: XML Values......................................................................................................................................................... 107 Values for XML Elements........................................................................................................................................... 107 Appendix D: Teradata DSA Commands.................................................................................................................... 111 About Using DSA Commands................................................................................................................................... 111 abort_job.......................................................................................................................................................................112 Purpose.................................................................................................................................................................. 112 Syntax..................................................................................................................................................................... 112 Examples................................................................................................................................................................ 112 Parameters............................................................................................................................................................. 112 Usage Notes........................................................................................................................................................... 112 XML File Example................................................................................................................................................ 113 activate_job...................................................................................................................................................................113 Purpose.................................................................................................................................................................. 113 Syntax..................................................................................................................................................................... 113 Example..................................................................................................................................................................113 Parameters............................................................................................................................................................. 113 Usage Notes........................................................................................................................................................... 113 XML File Example................................................................................................................................................ 113 config_general.............................................................................................................................................................. 114 Purpose.................................................................................................................................................................. 114 Syntax..................................................................................................................................................................... 114 Example..................................................................................................................................................................114 Parameters............................................................................................................................................................. 114 Usage Notes........................................................................................................................................................... 114 XML File Example................................................................................................................................................ 114 config_media_servers..................................................................................................................................................115 Purpose.................................................................................................................................................................. 115 Syntax..................................................................................................................................................................... 115 Teradata Data Stream Architecture User Guide, Release 14.11 7 Table of Contents Example....................................................................................................................................................... 115 Parameters................................................................................................................................................... 115 Usage Notes................................................................................................................................................. 115 XML File Example......................................................................................................................................115 config_nbu..........................................................................................................................................................116 Purpose........................................................................................................................................................ 116 Syntax........................................................................................................................................................... 116 Example....................................................................................................................................................... 116 Parameters................................................................................................................................................... 116 Usage Notes................................................................................................................................................. 116 XML File Example......................................................................................................................................117 config_repository_backup................................................................................................................................117 Purpose........................................................................................................................................................ 117 Syntax........................................................................................................................................................... 118 Example....................................................................................................................................................... 118 Parameters................................................................................................................................................... 118 Usage Notes................................................................................................................................................. 118 XML File Example......................................................................................................................................118 config_systems .................................................................................................................................................. 119 Purpose........................................................................................................................................................ 119 Syntax........................................................................................................................................................... 119 Example....................................................................................................................................................... 119 Parameters................................................................................................................................................... 119 Usage Notes................................................................................................................................................. 119 XML File Example......................................................................................................................................120 config_target_groups........................................................................................................................................ 121 Purpose........................................................................................................................................................ 121 Syntax........................................................................................................................................................... 121 Example....................................................................................................................................................... 121 Parameters................................................................................................................................................... 122 Usage Notes................................................................................................................................................. 122 XML File Examples.................................................................................................................................... 122 config_target_group_map................................................................................................................................123 Purpose........................................................................................................................................................ 123 Syntax........................................................................................................................................................... 123 Example....................................................................................................................................................... 123 Parameter.....................................................................................................................................................123 Usage Notes................................................................................................................................................. 124 XML File Example......................................................................................................................................124 create_job ...........................................................................................................................................................125 Purpose........................................................................................................................................................ 125 Syntax........................................................................................................................................................... 125 Example....................................................................................................................................................... 125 Parameters................................................................................................................................................... 126 Usage Notes................................................................................................................................................. 126 8 Teradata Data Stream Architecture User Guide, Release 14.11 Table of Contents XML File Examples.............................................................................................................................................. 127 delete_component .......................................................................................................................................................132 Purpose.................................................................................................................................................................. 132 Syntax..................................................................................................................................................................... 133 Example..................................................................................................................................................................133 Parameters............................................................................................................................................................. 133 Usage Notes........................................................................................................................................................... 133 XML File Example................................................................................................................................................ 134 delete_job......................................................................................................................................................................134 Purpose.................................................................................................................................................................. 134 Syntax..................................................................................................................................................................... 134 Example..................................................................................................................................................................134 Parameters............................................................................................................................................................. 134 Usage Notes........................................................................................................................................................... 134 XML File Example................................................................................................................................................ 134 delete_target_group_map...........................................................................................................................................135 Purpose.................................................................................................................................................................. 135 Syntax..................................................................................................................................................................... 135 Example..................................................................................................................................................................135 Parameters............................................................................................................................................................. 135 XML File Example................................................................................................................................................ 135 disable_component .....................................................................................................................................................135 Purpose.................................................................................................................................................................. 135 Syntax..................................................................................................................................................................... 135 Example..................................................................................................................................................................136 Parameters............................................................................................................................................................. 136 Usage Notes........................................................................................................................................................... 136 XML File Example................................................................................................................................................ 136 enable_component ......................................................................................................................................................136 Purpose.................................................................................................................................................................. 136 Syntax..................................................................................................................................................................... 136 Example..................................................................................................................................................................136 Parameters............................................................................................................................................................. 136 Usage Notes........................................................................................................................................................... 137 XML File Example................................................................................................................................................ 137 export_config ...............................................................................................................................................................137 Purpose.................................................................................................................................................................. 137 Syntax..................................................................................................................................................................... 137 Examples................................................................................................................................................................ 137 Parameters............................................................................................................................................................. 137 Usage Notes........................................................................................................................................................... 138 XML File Example................................................................................................................................................ 138 export_job.....................................................................................................................................................................138 Purpose.................................................................................................................................................................. 138 Syntax..................................................................................................................................................................... 138 Teradata Data Stream Architecture User Guide, Release 14.11 9 Table of Contents Example....................................................................................................................................................... 138 Parameters................................................................................................................................................... 138 Usage Notes................................................................................................................................................. 139 XML File Example......................................................................................................................................139 export_job_metadata........................................................................................................................................ 139 Purpose........................................................................................................................................................ 139 Syntax........................................................................................................................................................... 139 Example....................................................................................................................................................... 139 Parameters................................................................................................................................................... 139 Usage Notes................................................................................................................................................. 140 XML File Example......................................................................................................................................140 export_repository_backup_config.................................................................................................................. 140 Purpose........................................................................................................................................................ 140 Syntax........................................................................................................................................................... 140 Example....................................................................................................................................................... 140 Parameters................................................................................................................................................... 140 Usage Notes................................................................................................................................................. 141 XML File Example......................................................................................................................................141 export_target_group_map............................................................................................................................... 141 Purpose........................................................................................................................................................ 141 Syntax........................................................................................................................................................... 141 Example....................................................................................................................................................... 141 Parameters................................................................................................................................................... 141 XML File Example......................................................................................................................................142 import_job_metadata....................................................................................................................................... 142 Purpose........................................................................................................................................................ 142 Syntax........................................................................................................................................................... 142 Example....................................................................................................................................................... 142 Parameters................................................................................................................................................... 142 Usage Notes................................................................................................................................................. 143 XML File Example......................................................................................................................................143 import_repository_backup_config................................................................................................................. 143 Purpose........................................................................................................................................................ 143 Syntax........................................................................................................................................................... 143 Example....................................................................................................................................................... 143 Parameters................................................................................................................................................... 143 Usage Notes................................................................................................................................................. 144 XML File Example......................................................................................................................................144 job_status............................................................................................................................................................ 144 Purpose........................................................................................................................................................ 144 Syntax........................................................................................................................................................... 144 Example....................................................................................................................................................... 144 Parameters................................................................................................................................................... 144 Usage Notes................................................................................................................................................. 145 XML File Example......................................................................................................................................145 10 Teradata Data Stream Architecture User Guide, Release 14.11 Table of Contents job_status_log...............................................................................................................................................................145 Purpose.................................................................................................................................................................. 145 Syntax..................................................................................................................................................................... 145 Example..................................................................................................................................................................145 Parameters............................................................................................................................................................. 145 XML File Example................................................................................................................................................ 145 list_components........................................................................................................................................................... 146 Purpose.................................................................................................................................................................. 146 Syntax..................................................................................................................................................................... 146 Example..................................................................................................................................................................146 Parameters............................................................................................................................................................. 146 XML File Example................................................................................................................................................ 147 list_general_settings.................................................................................................................................................... 147 Purpose.................................................................................................................................................................. 147 Syntax..................................................................................................................................................................... 147 Example..................................................................................................................................................................147 Parameters............................................................................................................................................................. 147 XML File Example................................................................................................................................................ 147 list_job_history............................................................................................................................................................ 147 Purpose.................................................................................................................................................................. 147 Parameters............................................................................................................................................................. 147 XML File Example................................................................................................................................................ 148 list_jobs......................................................................................................................................................................... 148 Purpose.................................................................................................................................................................. 148 Syntax..................................................................................................................................................................... 148 Example..................................................................................................................................................................148 Parameters............................................................................................................................................................. 148 XML File Example................................................................................................................................................ 149 list_query_nbu_backupids......................................................................................................................................... 149 Purpose.................................................................................................................................................................. 149 Syntax..................................................................................................................................................................... 149 Example..................................................................................................................................................................149 Parameters............................................................................................................................................................. 150 XML File Example................................................................................................................................................ 150 list_recover_backup_metadata.................................................................................................................................. 150 Purpose.................................................................................................................................................................. 150 Syntax..................................................................................................................................................................... 150 Example..................................................................................................................................................................150 Parameters............................................................................................................................................................. 150 XML File Example................................................................................................................................................ 150 list_repository_backup_settings ............................................................................................................................... 151 Purpose.................................................................................................................................................................. 151 Syntax..................................................................................................................................................................... 151 Example..................................................................................................................................................................151 Parameters............................................................................................................................................................. 151 Teradata Data Stream Architecture User Guide, Release 14.11 11 Table of Contents XML File Example......................................................................................................................................151 list_save_sets ..................................................................................................................................................... 151 Purpose........................................................................................................................................................ 151 Syntax........................................................................................................................................................... 151 Examples......................................................................................................................................................151 Parameters................................................................................................................................................... 151 Usage Notes................................................................................................................................................. 152 XML File Example......................................................................................................................................152 list_target_group_map......................................................................................................................................152 Purpose........................................................................................................................................................ 152 Syntax........................................................................................................................................................... 152 Example....................................................................................................................................................... 152 Parameters................................................................................................................................................... 153 XML File Example......................................................................................................................................153 list_validate_job_metadata...............................................................................................................................153 Purpose........................................................................................................................................................ 153 Syntax........................................................................................................................................................... 153 Example....................................................................................................................................................... 153 Parameters................................................................................................................................................... 153 object_release..................................................................................................................................................... 154 Purpose........................................................................................................................................................ 154 Syntax........................................................................................................................................................... 154 Example....................................................................................................................................................... 154 Parameters................................................................................................................................................... 154 Usage Notes................................................................................................................................................. 154 XML File Example......................................................................................................................................154 object_release_status ........................................................................................................................................155 Purpose........................................................................................................................................................ 155 Syntax........................................................................................................................................................... 155 Example....................................................................................................................................................... 155 Parameters................................................................................................................................................... 155 Usage Notes................................................................................................................................................. 155 XML File Example......................................................................................................................................155 query_nbu_backupids.......................................................................................................................................155 Purpose........................................................................................................................................................ 155 Syntax........................................................................................................................................................... 155 Example....................................................................................................................................................... 155 Parameters................................................................................................................................................... 156 XML File Example......................................................................................................................................156 recover_backup_metadata................................................................................................................................156 Purpose........................................................................................................................................................ 156 Syntax........................................................................................................................................................... 156 Example....................................................................................................................................................... 156 Parameters................................................................................................................................................... 156 XML File Example......................................................................................................................................157 12 Teradata Data Stream Architecture User Guide, Release 14.11 Table of Contents retire_job.......................................................................................................................................................................157 Purpose.................................................................................................................................................................. 157 Syntax..................................................................................................................................................................... 157 Example..................................................................................................................................................................157 Parameters............................................................................................................................................................. 157 Usage Notes........................................................................................................................................................... 157 XML File Example................................................................................................................................................ 157 run_job..........................................................................................................................................................................158 Purpose.................................................................................................................................................................. 158 Syntax..................................................................................................................................................................... 158 Example..................................................................................................................................................................158 Parameters............................................................................................................................................................. 158 Usage Notes........................................................................................................................................................... 158 XML File Example................................................................................................................................................ 158 run_ping........................................................................................................................................................................159 Purpose.................................................................................................................................................................. 159 Syntax..................................................................................................................................................................... 159 Example..................................................................................................................................................................159 Parameter...............................................................................................................................................................159 XML File Example................................................................................................................................................ 159 run_repository_job......................................................................................................................................................159 Purpose.................................................................................................................................................................. 159 Syntax..................................................................................................................................................................... 160 Examples................................................................................................................................................................ 160 Parameters............................................................................................................................................................. 160 Usage Notes........................................................................................................................................................... 160 XML File Example................................................................................................................................................ 160 set_status_rate.............................................................................................................................................................. 161 Purpose.................................................................................................................................................................. 161 Syntax..................................................................................................................................................................... 161 Example..................................................................................................................................................................161 Parameters............................................................................................................................................................. 161 XML File Example................................................................................................................................................ 161 sync_save_sets..............................................................................................................................................................161 Purpose.................................................................................................................................................................. 161 Syntax..................................................................................................................................................................... 162 Example..................................................................................................................................................................162 Parameters............................................................................................................................................................. 162 Usage Notes........................................................................................................................................................... 162 XML File Example................................................................................................................................................ 162 update_job ................................................................................................................................................................... 163 Purpose.................................................................................................................................................................. 163 Syntax..................................................................................................................................................................... 163 Example..................................................................................................................................................................163 Parameters............................................................................................................................................................. 163 Teradata Data Stream Architecture User Guide, Release 14.11 13 Table of Contents Usage Notes................................................................................................................................................. 164 XML File Example......................................................................................................................................164 validate_job_metadata...................................................................................................................................... 164 Purpose........................................................................................................................................................ 164 Syntax........................................................................................................................................................... 164 Example....................................................................................................................................................... 164 Parameters................................................................................................................................................... 164 14 Teradata Data Stream Architecture User Guide, Release 14.11 List of Tables Table 1: TARA and DSA Components and Functionality............................................................................ 22 Table 2: DSA Configuration Commands........................................................................................................ 65 Table 3: DSA Operating Commands............................................................................................................... 67 Teradata Data Stream Architecture User Guide, Release 14.11 15 List of Tables 16 Teradata Data Stream Architecture User Guide, Release 14.11 Preface Audience This guide is intended for use by: • Database administrators • System administrators • Software developers, production users, and testers The following prerequisite knowledge is required for this product: • Dual-active systems • Teradata Database • Teradata system hardware Changes to This Book Date and Release Description September 2013 14.11 Updated for the DSA 14.11 release, including: • Added information about incremental backup and new backup types • Added information about multiple DSA domains • Added new appendix for administrative tasks, including restoring to a different DSA environment • Added appendix for rules for restoring and copying objects Supported Releases This book supports the following releases: • Teradata Database 14.10 • Teradata DSA 14.11 and 14.11.00.01 • Teradata Viewpoint 14.10 To locate detailed supported-release information: 1 Go to http://www.info.teradata.com. 2 Under the Online Publications subcategory, click General Search. 3 Search on 3119 in the Publication Product ID box. Teradata Data Stream Architecture User Guide, Release 14.11 17 Preface Related Documentation Access the Teradata Information Products web site to view or download additional documentation related to this product. 1. Go to http://www.info.teradata.com. 2. Under the Online Publications subcategory, click General Search. 3. Search on the title or publication ID. Title Publication ID Teradata Viewpoint User Guide B035-2206 Describes the Teradata Viewpoint portal, portlets, and system administration features. Product Safety Information This document may contain information addressing product safety practices related to data or property damage, identified by the word Notice. A notice indicates a situation which, if not avoided, could result in damage to property, such as equipment or data, but not related to personal injury. Example Notice: Improper use of the Reconfiguration utility can result in data loss. 18 Teradata Data Stream Architecture User Guide, Release 14.11 CHAPTER 1 Overview Introduction to Data Stream Architecture Teradata Data Stream Architecture (DSA) enables you to back up and restore your Teradata Database 14.10 data using Teradata Viewpoint portlets and Symantec NetBackup. Teradata DSA is a new alternative to the ARC-based BAR architecture that uses the Teradata Tiered Archive/Restore Architecture (TARA) user interface. It improves the scalability and latency limitations of earlier backup and recovery solutions, providing a significant improvement in performance and usability. It can co-exist with ARC-based BAR applications on the same BAR hardware. Teradata DSA is integrated with two Viewpoint portlets, BAR Setup and BAR Operations, providing user interfaces to Teradata DSA that are similar to those for other Teradata ecosystem components. This integration leverages the user account management features of Viewpoint and enhances usability. In addition, Teradata DSA provides a command-line utility that can also be used to configure, initiate, and monitor backup and restore jobs. BAR Integration Teradata Data Stream Architecture (DSA) features a Data Stream Controller (DSC) that controls BAR operations and enables communication between DSMain, the BAR portlets, and the DSA Network Client. Teradata DSA records system setup information and DSA job metadata in the DSC Repository. Data Stream Controller (DSC) The Data Stream Controller (DSC) controls all BAR operations throughout an enterprise environment. The DSC is notified of all requested BAR operations and manages resources to ensure optimal system backup and restore job performance. DSC Repository and Backup DSC Repository The DSC repository is the storage database for job definitions, logs, archive metadata, and hardware configuration data. The DSC manages the repository using JDBC and is the only client component that can update the repository metadata. DSMain DSMain delegates DSA job plans to Teradata Database. Job plans include stream lists, object lists, and job details. DSMain tracks the stream and object progress Teradata Data Stream Architecture User Guide, Release 14.11 19 Chapter 1 Overview through the backup and restore process and communicates with the DSA Network Client. DSA Network Client The DSA Network Client controls the data path from DSMain to the storage device and verifies authentication from Teradata Database. The DSA Network Client then opens the connection to the appropriate device or API. JMS Broker Communication between the DSA components is performed using a JMS broker. BAR Portlets The BAR Setup and BAR Operations Viewpoint portlets manage the DSA configuration and job operations. DSA Command-Line Interface (CLI) The DSA command-line interface provides an alternative to the BAR portlets. The DSA command-line interface allows job launch, monitoring, and scheduling capabilities. It also provides commands to define DSA configuration. 20 Teradata Data Stream Architecture User Guide, Release 14.11 Chapter 1 Overview Source/Target Database DS Main Disks/Tapes DSA Network Client Fast Socket Backup/Restore BAR Admin Server DSC Repository JDBC JMS JDBC Backup DSC Repository JDBC Data Stream Controller JMS (DSC) JMS Broker (ActiveMQ) JMS Viewpoint Server JMS BAR Command-Line Interface BAR Job Workflow The BAR Operations portlet or DSA command-line interface communicates with the DSC when a user creates or runs a backup, restore, or analyze job. The DSC controls the job flow by sending the job processing instructions to the appropriate DSA component. The DSC receives job status information from the DSA component and also notifies the Teradata Database and other client applications of any action taken on a specific job. The job definition is stored in the DSC repository. Teradata Data Stream Architecture User Guide, Release 14.11 21 Chapter 1 Overview Create/Run Job Saved Jobs View (Active Jobs) Create Job • Select Job Type • Select Objects • Select Job Settings BAR Operations Portlet Source/Target Database Save Job Create Job Run Job Run Job DSC Run Job DS Main Save Job Create/Run Job Command-Line Interface BAR Command-Line Interface • Specify Job Type • Specify Objects Create Job • Specify Job Settings Initial BAR Setup and BAR Job Creation Through the BAR portlets Setting up your BAR environment is a prerequisite for backing up the Teradata Database. The systems configured and enabled in the BAR Setup portlet are available in the BAR Operations portlet. BAR setup configurations include systems and nodes, media servers, backup applications, and target groups. These setup configurations are stored in the DSC repository, which manages BAR operations. After configuring your BAR environment, you can use the BAR Operations portlet to create jobs, import BAR legacy scripts, manage job settings, and monitor job progress. Related Topics Configuring BAR Setup, on page 29 Managing Jobs, on page 48 Differences Between TARA and DSA The following table maps legacy BAR components and functionality, including TARA, to Teradata DSA components and functionality to provide a better understanding of architectural changes. Table 1: TARA and DSA Components and Functionality 22 Legacy BAR Teradata DSA 14.10 TARA products include: • Teradata Extension for NetBackup Teradata DSA 14.10 supports NetBackup only Teradata Data Stream Architecture User Guide, Release 14.11 Chapter 1 Overview Legacy BAR • • Teradata DSA 14.10 Teradata Extension for Tivoli Storage Manager Teradata Extension for NetVault NetBackup Access Module DSA NetBackup Access Module TARA GUI Teradata Viewpoint portlets TARA JIR repository Teradata Database 14.10 Teradata TARA Teradata DSA and DSA Network Client Teradata ARC DSMain (now part of DBS HUT) ARC scripts DSA XML TTU (CLIv2, TDICU, TeraGSS, PIOM) N/A Mainframe ARC Not available Appliance Backup Utility Not available Operating systems: • Red Hat • SLES • Windows SLES 11 Row-level backup Block-level backup Note: Teradata DSA is SLES 11 only. Teradata Database operates on its own supported operating systems independent of Teradata DSA. About Permissions Users in a Viewpoint role that has been granted access to the BAR Setup portlet can use the portlet to add, remove, or edit the following resources in a BAR system configuration: • Teradata Database systems • Media Servers • Backup Applications • Target Groups Viewpoint administrators can grant the BAR administrators privilege to any role. A BAR administrator has the following permissions in the BAR Operations portlet: Permissions Description Edit all jobs Edit any existing jobs Run all jobs Run any job Users who are not BAR administrators are only able to perform those actions on their own jobs, unless the job owner gives permission to that user. Teradata Data Stream Architecture User Guide, Release 14.11 23 Chapter 1 Overview About Restrictions Teradata DSA currently has the following limitations: • There can only be one target device (tape drive or disk) per NetBackup policy. • Multi-byte characters are not supported in the DSA command-line interface. • Backup and restore jobs cannot be run when an AMP is down. • Backup and restore jobs are subject to a 1MB SQL size limit. Note: User might reach this limit if they select a large amount of objects for a job. • Backup and restore jobs are subject to a database lock limit of up to 5,000 database objects. • The same user ID can run only one restore job at a time. If the user is already logged on and is running a BAR operation (including legacy BAR jobs), a DSA restore job will be aborted. • If the Teradata Database system restarts during an archive or restore operation, the host utility lock will remain on the remaining unprocessed objects. The user must release the lock manually. • The number of AMP Worker Tasks (AWT) dictates the number of DSA jobs that can run in parallel to allow for parallelism during restore. • A maximum of three concurrent restore jobs can be run on a system. • Up to 20 backup jobs can be run concurrently (based on 80 AWT). Component Deletion A BAR component is an entity or defined relationship, such as a media server configuration, that is associated with a Teradata DSA job. A BAR component cannot be deleted from the Teradata DSA configuration if it is specified in a job. It does not matter if the job is in an active or retired state. For the component to be deleted, any job that references the component must be deleted first. Note: If the only reference to the BAR component is in a new job that has never been run, the component can be deleted. About Backup Types The Teradata incremental backup and restore feature is available when running the combination of Teradata DSA 14.11 (or later) and Teradata Database 14.10 (or later). Teradata implements incremental database backup using the Changed Block Backup (CBB) feature. With CBB, a Teradata Database System will only back up data blocks that have changed since a prior backup operation. This can greatly reduce the time and storage required to perform backups, at the cost of an increase in overall restore time. Overall restore time is increased because DSA has to read multiple datasets from disk or tape media and construct the complete dataset to restore. Incremental backup is applicable to both standard backup and online archive. 24 Teradata Data Stream Architecture User Guide, Release 14.11 Chapter 1 Overview Incremental backup is appropriate for: • Databases and tables that have a very low change rate compared to table size • Primary Partition Index (PPI) tables for which changes are limited to one or few partitions The incremental backup feature allows three types of backups: full, delta, and cumulative. Full A full backup archives all data from the specified objects. This backup takes the longest time to complete, and uses the most backup storage space. However, a full backup has the shortest restore time, since all data required to restore the objects will be contained within a single backup image. Note: A full backup must be initially performed prior to any other type of backup. The full backup will be used as a baseline for further incremental steps. Delta A delta backup archives only the data which has changed since the last backup operation. This backup will complete in the shortest time and use the least storage space. However, a delta backup will increase the time to restore the database, as it potentially adds many backup images that must be processed before a set of objects can be fully restored. Cumulative A cumulative backup archives the data which has changed since the last full backup was run. This backup type consolidates changes from multiple delta backups or cumulative backups before a full backup is run. A cumulative backup has a shorter database restore time than a series of delta or cumulative backups, and it takes less time and space than a full backup. Keep in mind that if any save set is removed from the DSC repository, any subsequent run dependent on the removed save set is invalid. A save set would be removed, for example, if it was expired on the NetBackup side and subsequently the sync_save_sets command were run. Regardless of the type of incremental backup performed, the dictionary information for all objects is fully backed up. This ensures that all non-data objects and object definitions are fully recovered to the point in time in the event of a restore from any increment. In the event of a restore or analyze_validate, you select the backup image corresponding to the point in time to which the objects should be restored. This can be a full, delta, or cumulative backup image. For a given restore scenario (point in time), the following images are processed, relative to the selected backup image: • The most recent full backup • The most recent cumulative backup, if any. Only if newer than the full backup. • Any delta backups between the most recent full or cumulative, and the selected restore point in time In the event of an analyze_read, only the selected save set is analyzed. Keep in mind that, if any save set is removed from the DSC repository, any subsequent run dependent on that save set is invalid. Teradata Data Stream Architecture User Guide, Release 14.11 25 Chapter 1 Overview Note: Running a cumulative or delta incremental backup of a DBC ALL backup job does not include the DBC system tables. DBC is important when you need to restore the whole system after a system initialization (sysinit). DBC requires a full backup. Therefore, it is important that for every incremental backup job cycle run, a separate full backup of the DBC is taken. Example of a Backup Strategy Consider a site that performs a full backup every Sunday, a cumulative backup every Wednesday, and delta backups on the other days: Day Sunday Monday Tuesday Wednesday Thursday Friday Saturday Backup Type F D D C D D D The full backup every Sunday contains all of the data for all of the tables. The delta backups on Monday and Tuesday contain only changed data blocks for those particular days. The Wednesday cumulative backup contains all changes from the Monday and Tuesday delta backups, plus any new changes. The Thursday, Friday, and Saturday delta backups contain only changes on each of those days. If the site were to perform a restore of the delta backup image produced on a Friday, the following images would be restored: • The full backup from the prior Sunday • The cumulative backup from the prior Wednesday • The delta backup from Thursday • The delta backup from Friday Incomplete Backups The integrity of the database data is compromised if any part of the incremental backup is lost or corrupted. If any delta, cumulative, or full image required for a restore is missing or corrupt, a restore from any dependent backup image fails. Incomplete backups are not subject to this limitation. An incomplete backup occurs if any incremental backup completed with errors, or was aborted and not re-run. In the event of a failed backup, prior and subsequent incremental backups are not affected. Similarly, when a backup completes with non-fatal errors, prior and future incremental backups do not use the backup image that received an error. Instead, subsequent incremental backup jobs use the most recent successful backup as the base. Therefore, it is important to fix the underlying cause of any error that occurs during incremental backups, and to re-run the incremental backup at the next available opportunity. The following other situations may require that a new full backup be generated before any further delta or cumulative backups be run: • The system has gone through SYSINIT and/or a full database container (DBC) restore since the most recent full backup • The system has had an access module processor (AMP) reconfiguration or rebuild since the most recent full backup • The object list in the backup has been changed • The dictionary or data phase in the backup job has been changed 26 Teradata Data Stream Architecture User Guide, Release 14.11 Chapter 1 Overview • Check retention invalidates or removes the last full save set in the DSC repository Active and Retired Jobs An active job refers to any job that is not scheduled to be deleted. Active jobs can be run from the BAR Operations portlet or the DSA command-line interface. When the job has a deletion date, it is considered retired and cannot be run. You can still access the job history, which is the log of each specified job run, until the job’s deletion date. The job and job history are deleted from the DSC repository at the job's deletion date. Note: A DSC repository job is specifically designed to back up or restore the DSC repository. A DSC repository job does not have an active or retired designation, so DSC repository jobs are always considered active and cannot be retired. About the Command-Line Interface and BAR Portlets Teradata DSA architecture has two user interfaces. The first interface, the BAR Setup and BAR Operations portlets, are Viewpoint portlets for DSA configuration and management. The second interface is a standard command-line interface that provides all of the functionality as the portlets provide, including DSA component configuration. A DSA administrator might consider using the DSA command-line interface rather than the BAR portlets for specific situations, such as: • Job scheduling, because this cannot be administrated in the BAR Operations portlet. • Exporting an XML file associated with a job created in the portlet. • Streamlining the updates of multiple job definitions. • Using scripts to automate DSA commands. Note: Because BAR portlets are optimized to use caching in order to minimize the impact on DSC, if you use job scripting automation through the DSA command-line interface, there should be a 30 second interval between DSC command requests. Multiple DSA Domains If your site has multiple DSA domains, the BAR admin user can export metadata from DSA domain A and import it later to DSA domain B using the DSA command-line interface. This migration is performed for each job and is necessary before any restore operation can be done on the target DSA domain B, running a distinct NetBackup environment. As part of the migration, the administrator is responsible for transferring the related information for tape media and the NetBackup catalog. Related Topics Job Migration to a Different DSA Environment, on page 101 Exporting Job Metadata, on page 102 Teradata Data Stream Architecture User Guide, Release 14.11 27 Chapter 1 Overview Importing Job Metadata, on page 103 Validating Job Metadata, on page 103 28 Teradata Data Stream Architecture User Guide, Release 14.11 CHAPTER 2 Teradata BAR Portlets BAR Setup The BAR Setup portlet allows you to designate the hardware and software to use when backing up your Teradata Database. Use this portlet to configure the following: • Systems and nodes • Media servers • Third-party backup software, such as NetBackup • Hardware and software groups to use as targets for backup operations • Logical mappings between different target groups for restoring to different client configurations After the configuration is complete, the BAR Setup portlet employs the DSC Repository to save all of your configuration settings. These configured systems, media servers, backup applications, and target groups are available for use in backup, restore, and analyze jobs. Configuring BAR Setup This task outlines configuration tasks involved in the BAR Setup portlet to make systems, media servers, backup applications, and target groups available in the BAR Operations portlet. 1 Adding a System and Node Configuration Note: Add and enable systems in the Teradata Systems portlet to make them available in the BAR Setup portlet. 2 Adding a Media Server A media server must be defined so it can be made available for target groups. 3 Adding a NetBackup Server NetBackup is currently the only third-party backup application supported in a DSA environment. 4 Adding or Copying a Target Group In order for data to be backed up to a device, a target group must be created to configure media servers to the backup application. 5 General DSA Settings Allows you to set general DSA settings. 6 Scheduling a Repository Backup Describes how to schedule a backup of the DSC repository. Teradata Data Stream Architecture User Guide, Release 14.11 29 Chapter 2 Teradata BAR Portlets General DSA Settings The BAR Setup portlet General category allows you to set the following DSA settings: threshold, security management, log levels, and how long to keep retired jobs. Setting Description DSC REPOSITORY THRESHOLD Specifies the maximum amount of data to store in your DSC repository. A repository size below 85 percent of the threshold is a normal state for BAR operations. After 85 percent of the size threshold is met, warning messages are generated. After 95 percent of the size threshold is met, all BAR jobs that create more data on the repository receive an error message and are not permitted to run. The repository database perm space needs to be increased or jobs will have to be deleted in order to continue using DSA at that point. Security Management Enables Teradata Viewpoint authentication on the DSA command-line interface. If checked, a user submitting certain commands from the command-line interface will be required to enter a valid Teradata Viewpoint user name and password before they can be executed. BAR LOGGING Specifies the level of BAR log information to display for the Data Stream Controller and the BAR Network Client. Extensive logging information is typically only useful for support personnel when gathering information about a reported problem. Error Enables minimal logging. Provides only error messages. This is the default setting. Warning Adds warning messages to error message logging. Info Provides informational messages with warning and error messages to the job log. Debug Enables full logging. All messages, including debug, are sent to the job log. Note: This setting can affect performance. DELETE RETIRED JOBS Specifies the deletion settings used when backup jobs are retired in the BAR Operations portlet. After Sets the number of days from the date a job is retired to wait before deleting the job. Never Prevents deletion of retired jobs. 30 Teradata Data Stream Architecture User Guide, Release 14.11 Chapter 2 Teradata BAR Portlets Systems and Nodes You can add, configure, and set stream limits for systems and nodes in the BAR Setup portlet and by using DSA setup commands from the DSA command-line interface. After you enable configured systems, they are available for backup and restore jobs in the BAR Operations portlet and for DSA operation commands. Adding a System and Node Configuration Prerequisite: Add and enable systems in the Teradata Systems portlet to make them available in the BAR Setup portlet. Configure a system and node in the BAR Setup portlet to make them available in the BAR Operations portlet. 1 From the CATEGORIES list, click Systems and Nodes. 2 Click next to SYSTEMS. The System Details window allows you to enter the information for the system. 3 For System Details, enter the following: Option Description System Name Choose the system from the drop-down list. Note: You can add a system from the Teradata Systems portlet. System Selector [Optional] To change the system selector, click Update. The credentials to the system are verified before the update can occur. Note: You must stop and start DSMain in Teradata Database after changing the system selector. SSL Communication [Optional] Select the Enable SSL over JMS Communication checkbox to enable the SSL communication. Note: You must add the TrustStore password created during SSL setup. You must stop and start DSMain in Teradata Database after enabling SSL communication. Database Query Method Default Stream Limits For Nodes Choose BASE_VIEW or EXTENDED_VIEW. Note: EXTENDED_VIEW allows for extra database security, but may affect system performance. Set the default limits for each node configured with the system. For each node is the maximum amount of concurrent steams allowed per node. For each job on a node is the maximum amount of concurrent streams allowed for each job on the node. 4 Click Apply. 5 Add a Node(s) to the system configuration. 6 Click Enable on the System Details view to enable the system and node configuration in the BAR Operations portlet. Teradata Data Stream Architecture User Guide, Release 14.11 31 Chapter 2 Teradata BAR Portlets Note: The repository backup system is pre-configured on the portlet, but you must run the Update on the System Selector and then run the Apply before you enable the system for use. Deleting a System Use the following steps to delete a system from the BAR Setup portlet, which removes it as a source for restore or backup jobs from the BAR Operations portlet. Note: You cannot delete a system if it is in use by a job or the system is marked for repository backup. 1 From the CATEGORIES list, click Systems and Nodes. 2 From the SYSTEMS list, click next to the system to be deleted. A confirmation message appears. 3 Click OK. Adding a Node 1 From the CATEGORIES list, click Systems and Nodes. 2 From the SYSTEMS list, click a system. 3 From the SETUP list, click Nodes. 4 Click next to NODES. 5 Enter a name for the node, up to 32 characters. 6 [Optional] Enter a stream limit for each node and for each job on the node. Note: A default limit is set by the system configured with the node. 7 Enter a node address in the IP Address box. 8 [Optional] Add and remove addresses by clicking the and buttons. 9 Click Apply. Deleting a Node 1 From the CATEGORIES list, click Systems and Nodes. 2 From the SYSTEMS list, click the system to which the node is attached. 3 From the SETUP list, click Nodes. 4 From the NODES list, click next to the node you want to delete. A confirmation message appears. 5 Click OK. Media Servers Media servers manage data during system backups and restores. Media servers are made available to your BAR environment as soon as the DSA software is installed and running. DSA administrators can then add or delete media servers to their BAR configuration, and 32 Teradata Data Stream Architecture User Guide, Release 14.11 Chapter 2 Teradata BAR Portlets assign media servers to target group configurations, in the BAR Setup portlet or through the command-line interface by using DSA setup commands. Adding a Media Server Media servers manage data during backup jobs. 1 From the CATEGORIES list, click MEDIA SERVERS. 2 Click next to MEDIA SERVERS. 3 Enter a media server name. 4 Enter the backup application client name. Note: This is the corresponding NetBackup client name, which is created during the NetBackup configuration on the NetBackup server. 5 Verify the BAR NC port number for the BAR network server coincides with the server port setting in the DSA client handler property file. Note: The default port is 15401. 6 Enter an address in the IP ADDRESS box. This is the address of the media server. Additional addresses can be entered for network cards that are attached to the server. Note: IP addresses are not validated. 7 Enter an address in the NETWORK MASK box. 8 [Optional] Add and remove addresses by clicking the and buttons. 9 Click Apply. Deleting a Media Server Media servers can be deleted from the BAR Setup portlet to make them unavailable for target groups in the BAR Operations portlet. Note: If a media server is currently configured to a target group, it cannot be deleted. 1 From the CATEGORIES list, click Media Servers. 2 Click next to the media server you want to delete. 3 Click OK. Backup Applications Backup applications are third-party applications that transfer data between a storage device and a Teradata Database system. You can configure the third-party server software to: • Indicate the media server on which the third-party backup software is located • Customize setup options for each server Adding a NetBackup Server When using a NetBackup server to back up and restore data, you must add and configure the NetBackup server through the BAR Setup portlet. Teradata Data Stream Architecture User Guide, Release 14.11 33 Chapter 2 Teradata BAR Portlets Note: NetBackup policies are tied to media servers during the target group configuration. It is important that the policies entered for your NetBackup configuration coincide with the policies intended for the media server configuration mapped as a target. 1 From the CATEGORIES list, click Backup Applications. 2 From the APPLICATIONS list, click NetBackup. 3 Click next to SERVERS. 4 Enter a server nickname of up to 32 characters in NICKNAME. You can use alphanumeric characters and underscores, but no spaces. 5 Enter the server IP address or DNS of up to 64 characters in SERVERNAME (IP/DNS). 6 From the SETUP list, click Policies. • Under EDIT POLICIES, enter a policy name, up to 128 characters. Note: Policy names are case-sensitive. • Enter number of storage devices. • Click to add additional policies. 7 Click Apply. Deleting a NetBackup Server Deleting a NetBackup server disassociates the server and its settings from the BAR Setup portlet. The server can no longer be used as a target for backups in the BAR Operations portlet. Note: If a NetBackup server is currently configured to a target group, it cannot be deleted. 1 From the CATEGORIES list, click Backup Applications. 2 Under APPLICATIONS, click NetBackup. 3 Under SERVERS, click located next to the server you want to delete. A confirmation message appears. 4 Click OK. Target Groups Target groups are comprised of media servers and devices used for storing backup data. DSA administrators create target groups, and assign media servers and devices. Target groups are then accessible to BAR backup jobs. After a backup job has run to completion, you can create a BAR restore job to restore data using the same target group as the backup job. You can also create a target group map, which allows a BAR restore job to restore data from a different target group. Adding or Copying a Target Group Data can be backed up to devices defined in NetBackup, which are attached to media servers in the Teradata Database system. These relationships are defined in target groups, which you can create and copy. 34 Teradata Data Stream Architecture User Guide, Release 14.11 Chapter 2 Teradata BAR Portlets 1 From the CATEGORIES list, click Target Groups. 2 From the TARGET GROUPS list, click Remote Groups. 3 Next to REMOTE GROUPS, do one of the following: Option Description Add Click to add a remote group. Copy Click in the row of the remote group you want to copy. 4 Enter a name for the new target group. You can use alphanumeric characters, dashes, and underscores, but no spaces. 5 [Optional] Select the Enable target group checkbox to enable the remote group. 6 Under TARGET ENTITY, select a NetBackup Server. 7 [Optional] Select the Use this target group for repository backups only checkbox to enable this restriction. Note: This target group cannot be used for other jobs. 8 Under TARGETS, do the following: a Select the BAR media server and the target server pair. b Select a policy and specify the number of devices associated with the policy. c [Optional] Add or remove policies and devices for each server pair. d You can add or remove target server pairs. 9 Click Apply. Deleting a Remote Group Note: A target group cannot be deleted if it is in use by a job in the BAR Operations portlet. 1 From the CATEGORIES list, click Target Groups. 2 From the TARGET GROUPS list, click Remote Groups. 3 From the REMOTE GROUPS list, click want to delete. next to the name of the remote group you A confirmation message appears. 4 Click OK. Adding or Editing a Restore Group The device and media servers relationships that are defined in target groups can be selected to create target group maps called restore groups. 1 From the CATEGORIES list, click Target Groups. 2 From the TARGET GROUPS list, click Restore Groups. 3 Next to RESTORE GROUPS, do one of the following: Teradata Data Stream Architecture User Guide, Release 14.11 35 Chapter 2 Teradata BAR Portlets Option Description Add Click to add a restore group. Edit Click in the row of the restore group you want to edit. 4 Select the Backup target group from the list. a [Optional] Click the BAR media server associated with the backup target group to view policy and device details. 5 Select the Restore target group from the list. a [Optional] Click the BAR media server associated with the restore target group to view policy and device details. 6 Click Apply. Deleting a Restore Group Note: A restore group cannot be deleted if it is in use by a job in the BAR Operations portlet. 1 From the CATEGORIES list, click Target Groups. 2 From the TARGET GROUPS list, click Restore Groups. 3 From the RESTORE GROUPS list, click want to delete. next to the name of the remote group you A confirmation message appears. 4 Click OK. Managing the DSC Repository DSA configuration settings and job metadata are stored in the Data Stream Controller (DSC) Repository. You can automate a repository backup or initiate the backup manually. A repository backup job backs up your DSC metadata to a target group. Any running DSC repository job (backup, restore, or analyze) prevents jobs from being submitted and DSA configuration settings from being changed. Configuration settings and DSC metadata can be restored to the DSC repository from a storage device. If you abort a DSC repository restore job while the job is in progress or if the restore job fails. DSC triggers a command to restore all repository tables to their initial state, which is an empty table. The current data in the DSC repository would be lost. Note: Before you can recover the DSC Repository, a DSC repository backup job and an export of the repository backup configuration must have been completed successfully at least once. The export of the repository backup configuration can only be performed using the DSA command line. Failure to perform a successful repository backup and an export of the repository backup configuration will result in an unrecoverable DSC repository in the case of a complete disaster. 36 Teradata Data Stream Architecture User Guide, Release 14.11 Chapter 2 Teradata BAR Portlets Scheduling a Repository Backup You can schedule a backup of the Data Stream Controller (DSC) Repository data through the BAR Setup portlet. 1 From the CATEGORIES list, click Repository Backup. 2 Under FREQUENCY, enter a number in Weeks, which specifies the weekly interval and select the day(s) the backup job will run. 3 Enter a START TIME for the backup. 4 Select a TARGET GROUP. 5 Click Apply. Backing Up the Repository This task describes how to manually back up the DSC repository. Note: Running a repository backup prevents jobs from being submitted and DSA configuration settings from being changed. 1 From the CATEGORIES list, click Repository Backup. 2 Click Back Up DSC Now. 3 Click Continue. 4 [Optional] Click Abort to end the backup. Restoring the Repository This task describes how to restore a backup of DSC repository metadata. Note: If you abort a DSC repository restore job while the job is in progress or if the restore job fails, DSC repository metadata will be corrupted. DSC triggers a command to restore all repository tables to their initial state, which is an empty table. 1 From the CATEGORIES list, click Repository Backup. 2 Click Restore DSC Now. During the restore job, the BAR Setup and BAR Operations portlets are unavailable. 3 Select a save set to restore. 4 Click Continue. [Optional] Click Abort to end the restore operation. When the restore job is complete, the BAR Setup and BAR Operations portlets become available. BAR Operations The BAR Operations portlet allows a user to manage the following functions: • Creating, managing, and submitting jobs Teradata Data Stream Architecture User Guide, Release 14.11 37 Chapter 2 Teradata BAR Portlets • Viewing job status and history Job types include backup, restore, and analyze. About the Saved Jobs View The Saved Jobs view displays a table of Active, Retired, or Repository jobs, allows you to view the job status and job actions available for each job, and enables you to create a new job. Note: Repository jobs are only visible to users with BAR administrator privileges. Show: Jobs Menu Filters the Saved Jobs view for Active, Retired, or Repository jobs. A job state of active means the job is ready to be run for a backup, restore, or analyze. A job state of retired means the job cannot be run. A repository job is specific to a DSC repository backup, restore, or analyze job. New Job Button Creates a backup, restore, or analyze job. Can only be used when Show: Active Jobs is in effect. Job Status Filter Bar Provides a count of the jobs by status and allows you to filter the Job Table. The filter bar is only in use when Show: Active Jobs is in effect. Overflow Menu Shows a list of job statuses. You can select another job status to replace a status on the Job Status Filter Bar. Filters Displays data by showing only rows that match your filter criteria. Click on the column headers to sort data in ascending or descending order. Saved Jobs Table Lists the job name, type, status, start time, end time, owner, size and last duration of the job. Table Actions Configure Columns allows you to select, lock, and order the displayed columns. Export creates a .csv file containing all available data. 38 Teradata Data Stream Architecture User Guide, Release 14.11 Chapter 2 Teradata BAR Portlets About the Job Status Filter Bar The job status filter bar allows you to filter on a specific job status in the Saved Jobs view. The job status filter bar buttons provide a count of job runs for each status category. Click on any button to filter for the selected job status or select a job status from the list. For example, click Complete to display all jobs that have run to completion. You can select a job status from the Overflow Menu to replace a job status currently showing on the Job Status filter bar. All All jobs currently saved in the BAR repository Complete Jobs which have run to completion Running Jobs that are in progress Teradata Data Stream Architecture User Guide, Release 14.11 39 Chapter 2 Teradata BAR Portlets Failed Jobs which have failed to run to completion Queued A job that is waiting for resources to become available before it can begin running Aborted A job run that has been stopped by a user prior to completion Aborting A job run that is in the process of being stopped by a user prior to completion Warning Jobs which run to completion, but received warning messages regarding possible issues during the run. Not Responding A job that DSC has not received any status for 15 minutes New A job that has never been run Running a Job 1 Click next to a job. 2 Select Run. 3 If you selected a backup job that is NEW or if the target group has changed for the backup job since the previous run, a FULL backup will be run automatically. Otherwise, you will be prompted to select the backup type. Select one of the following and click Run. Backup Type Description Full Archives all data from the specified objects Delta Archives only data that has changed since the last backup Cumulative Archives the data that has changed since the last full backup, consolidating multiple delta or cumulative backups 4 If you are running a repository restore job, a dialog confirms that you want to restore the repository from the latest repository backup save set. Click OK. The BAR Setup and BAR Operations portlets are unavailable while the repository restore job is running. Aborting a Job You can abort a job run from the Saved Jobs view or the Job Status view. 1 Choose the view to select the job you need to abort: 40 Teradata Data Stream Architecture User Guide, Release 14.11 Chapter 2 Teradata BAR Portlets View Description Saved Job a. Click next to a job. b. Select Abort. Job Status a. Click Abort. 2 Click OK to confirm you want to abort the job run. Viewing Job Status Depending on the type of the job and the run status, you can view the details from the Saved Jobs or Job History view. 1 Do one of the following, depending on the run status of the job: View Option Description Status of running job a. Click the Saved Jobs tab. or the most recent job b. Click next to a job. c. Select Job status. If the job is currently running, you will see the Steams tab and a progress bar indicating the percentage of the job completed. For a running or completed jobs, the Log tab displays details about the objects included in the job. Status logs of previously run jobs a. Click the Job History tab. b. Click next to a job. c. Select Details. The Log tab displays details about the objects included in the job. 2 [Optional] To view phase details, click Phase Log. • The dictionary and data phase details are available for backup and analyze_validate jobs. • The dictionary, data, build, and postscript phase details are available for restore jobs. 3 [Optional] To view details of the saved data sets for backup jobs, click View Save Sets. About the Log Tab The Log tab displays details about database objects for running and completed backup, restore, and analyze_validate jobs. This information is read-only. The tab is available when viewing a job status. You can select, lock, and designate the order of columns from the Table Actions menu. Field Description Job Type Start Time Start date and time job began Analyze_Read End Time Date and time job ended Backup Restore Analyze_Read Teradata Data Stream Architecture User Guide, Release 14.11 41 Chapter 2 Teradata BAR Portlets Field Description Job Type Analyze_Validate File Name The backup files that comprise the save set Analyze_Read Object Name Name of the object being backed up, restored, or validated Backup Restore Analyze_Validate Object Type Type of object being backed up, restored, or validated Backup Restore Analyze_Validate Phase The job phase can be dictionary, data, build, or postscript Backup Restore Analyze_Read Analyze_Validate Status The job status of the object Backup Restore Analyze_Read Analyze_Validate Parent Name Specifies the name of the parent of the object being backed up, restored, or validated Backup Restore Analyze_Validate Byte Count Total number of bytes copied Backup Restore Analyze_Read Analyze_Validate Row Count Total number of rows copied Backup Restore Error Code Specifies the error code encountered Backup Restore Analyze_Read Analyze_Validate Warning Code Specifies the warning code encountered Backup Restore Analyze_Read Analyze_Validate About the Stream Tab The Stream tab displays details about the job streams during a backup, restore, or analyze job. This information is read-only. The tab is available when viewing the job status of a running job. You can select, lock, and designate the order of columns from the Table Actions menu. 42 Field Description Node Specifies the node where the job stream is running Stream Numerically identifies a job stream Teradata Data Stream Architecture User Guide, Release 14.11 Chapter 2 Teradata BAR Portlets Field Description Object Name of object being backed up, restored, or analyzed Average Stream Rate (Data phase) For a backup job, the number of bytes reported by DS Main since the stream started. For a restore and analyze_validate job, the number of bytes reported by the ClientHandler since the stream started. About the Phase Log The Phase Log tab displays details about database objects in running and completed backup, restore, and analyze jobs. This information is read-only. The tab is available when viewing job status. Field Description Job Phase The job phase to which the information pertains. Backup Backup jobs have two phases: Dictionary and Data. In addition to Restore Dictionary and Data, restore jobs have Build and Postscript Analyze_Validate phases. Objects The number of objects processed during the phase Backup Restore Analyze_Validate Start Start date and time the phase began Backup Restore Analyze_Validate End Date and time the phase ended Backup Restore Analyze_Validate Average speed (Data phase) • • Size (Data phase) Job Type For backup jobs, average speed = (sum of bytes reported Backup by DSMain for all objects and streams) / Time interval Restore from time first byte of data received from DSMain and Analyze_Validate last object backed up, plus the refresh rate (which is 30 seconds by default). The average backup rate includes tape mount, positioning, and close time. For restore jobs, average speed = sum of bytes reported by DSMain for all objects and streams) / Time interval from first receipt of data for first object from BARNC through data transfer for last object, plus the refresh rate (which is 30 seconds by default). The average restore rate includes tape mount, positioning, and close time, and the time for the concurrent table index build process while the data is being restored. The time for any remaining table index builds after the restore data transfer of the last object is completed is not included. Size of the data processed during the phase duration Backup Restore Analyze_Validate Viewing Save Sets You can view all of the save sets associated with a given backup job. Teradata Data Stream Architecture User Guide, Release 14.11 43 Chapter 2 Teradata BAR Portlets 1 Do one of the following, depending on the tab you are currently viewing: View Option Description From the Saved Jobs tab • Click • Select Job status. • Click • Select Details. From the Job History tab next to a job. next to a job. 2 Click View Save Sets. The SAVE SETS view lists the save sets for the selected job. You can select, lock, and designate the order of columns from the Table Actions menu. Column Header Description BACKUP DATE Date and time the backup job started OBJECTS Number of objects processed SIZE Aggregate size of the objects processed BACKUP TYPE Full, delta, or cumulative backup TYPE Job type associated with the save set TARGET GROUP Target group associated with the save set COMPLETION DATE Date and the backup job finished LOCATION Location where the objects were backed up JOB PHASE Job phase associated with the save set Viewing Backup IDs You can view the backup IDs for a given save set. Backup IDs are necessary for duplicating tapes in NetBackup. 1 Do one of the following, depending on the run status of the job: View Option Description Status of running job or the most recent job • Click the Saved Jobs tab. • Click • Select Job status. • Click the Job History tab. • Click • Select Details. Status logs of previously run jobs next to a job. next to a job. 2 Click View Save Sets. 3 Click 44 next to a save set and select Backup IDs. Teradata Data Stream Architecture User Guide, Release 14.11 Chapter 2 Teradata BAR Portlets The BACKUP IDS for the save set are listed. You can select, lock, and designate the order of columns from the Table Actions menu. Column Header Description BACKUP ID Backup ID to use for duplicating tapes in NetBackup. FILE NAME File name of the file associated with the backup ID. FILE SIZE File size of the file associated with the backup ID DATE Date and timestamp for the file created. Retiring a Job You can retire a job from the Saved Jobs view, if the job is not in Running, New, Aborting, Not Responding, or Queued status. When you retire a job, the job moves from the Active Jobs view to the Retired Jobs view. Note: A retired job will be automatically deleted if this setting is configured through the BAR Setup portlet or DSA command-line interface. A warning message will appear before the job is retired reporting the deletion date. 1 Click next to a job. 2 Select Retire. 3 Click Yes to confirm the job retirement. Activating a Job You can activate a job from the Retired Jobs view. When you activate a job, the job is moved from the Retired Jobs view to the Active Jobs view. 1 Click next to a job. 2 Select Activate. 3 Click Yes to confirm the job activation. Deleting a Job You can immediately delete a job from the Retired Jobs view. You can also delete a job from the Saved Jobs view, if the job has a status of New. 1 Click next to a job. 2 Select Delete. Note: If you are attempting to delete a backup job with dependent restore or analyze jobs, a message displays with the dependent job names that must be deleted before you can delete the backup job. 3 Click Yes to confirm the job deletion. The job and job history will be deleted immediately and cannot be restored. Teradata Data Stream Architecture User Guide, Release 14.11 45 Chapter 2 Teradata BAR Portlets About the Job History View The Job History view displays a table of BAR jobs that have been run, and allows you to view the details of the last job run. Filters Displays data by showing only rows that match your filter criteria. Click on the column headers to sort data in ascending or descending order. Job Table Lists the job name, type, status, start time, end time, size and duration of the job. Table Actions Configure Columns allows you to select, lock, and order the displayed columns. Export creates a .csv file containing all available data. Viewing Job History The Job History tab of the BAR Operations portlet displays a list of all job executions. You can view more detailed information about a single job execution from either the Job History or Saved Jobs view. 46 Teradata Data Stream Architecture User Guide, Release 14.11 Chapter 2 Teradata BAR Portlets 1 Do one of the following: Option Description From the Job History view From the Saved Jobs view a. Click next to a job. b. Select Details. c. Click View History. a. Click next to a job. b. Select Job Status. c. From the Job Status view, click View History. The Job History for the job appears. You can select, lock, and designate the order of columns from the Table Actions menu. Column Header Description START Start date and time job began END Date and time job ended DURATION Total time the job ran STATUS The job status of the job run OBJECTS A count of database objects copied during the job SOURCE Source system (backup) of the job. TARGET Target group (backup) or system (restore) of the job. Planning a Job Creating a job comprises several options. There are different considerations before creating each job type. The following is an overview of some of the considerations. Backup Jobs Backup jobs archive objects from a source system to a target group. Target groups are defined by a BAR administrator in the BAR Setup portlet or command-line interface. BAR Operations portlet users can migrate the object list from an existing ARC script into a backup job. Objects in that list that exist in the specified source system will be automatically selected in the object browser when a new job is created from the migrated ARC script. When you run a backup job for the first time or when you change the target group for a backup job, all data from the specified objects is archived. After this initial full backup, you may choose the backup type: • Full: Archives all data from the specified objects • Delta: Archives only the data that has changed since the last backup operation • Cumulative: Archives the data that has changed since the last full backup was run Teradata Data Stream Architecture User Guide, Release 14.11 47 Chapter 2 Teradata BAR Portlets Restore Jobs Restore jobs are based on successful executions of backup jobs and can only be created for a backup job that has successfully run to completion. Users can define a restore job to always restore the latest version of a backup save set or they can specify a save set version. A target Teradata system must be selected in order to define the restore job. By default, all objects from the save set are included in the restore job but the selections can be modified by the user. Analyze Jobs An analyze job can employ either a read-only or validate analysis method for each job. An analyze read-only job reads the data from the media device to verify that reads are successful. An analyze validate job sends the data to the AMPs, where it is interpreted and examined but not restored. You will also need to specify a save set version from a successful backup job run. Managing Jobs This task outlines the tasks you can use to manage BAR operations jobs. 1 Choose the type of job you need to create: Job Type Description Backup • Create a backup job. Restore • Create a new restore job. • Create a restore job from a backup job save set. • Create a new analyze job. • Create an analyze job from a backup job save set. Analyze 2 Select and define jobs settings. 3 Change job permissions if anything about the job changed. 4 Monitor a running job's status and view job phase log updates. 5 Abort a job from the Saved Jobs view or the Job Status view. 6 Retire a job from the Saved Jobs view. 7 Activate a job from the Retired Jobs view. 8 Delete an active, saved, or retired job. Creating or Editing a Backup Job 1 From the Saved Jobs view, do one of the following: Option Description Create a job a. Click New Job. b. Select the backup job type and click Ok. 48 Teradata Data Stream Architecture User Guide, Release 14.11 Chapter 2 Teradata BAR Portlets Option Description c. [Optional] If you are migrating objects from an existing ARC or TARA script, enter the script name in the Migrate ARC script box. Edit a job a. Click next to a job. b. Select Edit. 2 From the EDIT BACKUP JOB view, do one of the following: • If you are creating a job, enter a unique job name, then specify a source system and target group, if not already specified. Note: If you specify a source system, you will be immediately prompted to provide a user and password for the system. • [Optional] If you are editing a job, change the target group, if necessary. Note: Once a backup job has been run successfully and has a save set, the source system for the job cannot be modified. 3 Click Credentials to verify or change user credentials. Note: This step is optional if you are editing a job. 4 [Optional] Add a job description. 5 [Optional] Select objects from the source system in the Select Objects tab. 6 [Optional] To verify the parent and objects selected, click the Selection Summary tab. 7 [Optional] To adjust job settings for the job, click the Job Settings tab. 8 Click Save. Related Topics Job Settings, on page 52 ARC Script Migration, on page 51 Changing Job Permissions, on page 55 Creating or Editing a Restore Job 1 From the Saved Jobs view, do one of the following: Option Description Create a new job a. Click New Job. b. Select the restore job type and click Ok. Create a job from a backup job save set Create a job from migrated job metadata Teradata Data Stream Architecture User Guide, Release 14.11 a. Click for a backup job that has completed. b. Select Create restore job to create a restore job from the selected save set. a. Click for a migrated job. 49 Chapter 2 Teradata BAR Portlets Option Description Note: Migrated job metadata results when tapes and metadata information that pointed to a specific backup job were migrated from one DSA environment to a different one. b. Select Create restore job to create a restore job from the selected migrated job. Edit a job a. Click for the job you want to change. b. Select Edit. 2 If you are creating a job, enter a unique job name. 3 If the source set you want to use is not already displayed or you want to change it, click Edit, select Specify a version, and select the save set to use. 4 Select the Target system and enter the Credentials associated with it. 5 Select the Target group. 6 [Optional] Add a job description. 7 [Optional] To change the objects selected, clear the check boxes and select others in the Select Objects tab. 8 [Optional] To verify the parent and objects selected, click the Selection Summary tab. 9 [Optional] To adjust job settings for the job, click the Job Settings tab. 10 Click Save. Related Topics Job Settings, on page 52 Changing Job Permissions, on page 55 Creating or Editing an Analyze Job 1 From the Saved Jobs view, do one of the following: Option Description Create a new job a. Click New Job. b. Select the analyze job type and click Ok. Create a job from a backup job save set Edit a job a. Click next to a backup job that has completed. b. Select Create analyze job to use the selected save set for the analyze job. a. Click next to the job you want to change. b. Select Edit. 2 From the EDIT ANALYZE JOB view, do one of the following: • If you are creating a new job, enter a unique job name, then specify an analysis method and job to analyze if not already specified. 50 Teradata Data Stream Architecture User Guide, Release 14.11 Chapter 2 Teradata BAR Portlets • [Optional] If you are editing a job, change the analysis method and job to analyze, if necessary. Note: If the analysis method is changed to validate, the system and credentials will need to be provided. 3 Specify a save set version from the Save Set Version tab. 4 [Optional] To adjust job settings for the job, click the Job Settings tab. 5 Click Save. ARC Script Migration The Migrate ARC script allows users to import an existing ARC or TARA script into the BAR Operations portlet. Only the set of objects that define the backup job are migrated into the portlet. Information about target media, number of streams, and connection parameters will not migrate into the portlet from the ARC scripts. ARC script syntax EXCLUDE is supported at object level. EXCLUDE is supported at database level, but a database range is not allowable for exclusion. If any objects in the script do not exist in the selected source system, they will not be included in the new job. About the Select Objects Tab The Select Objects tab allows you to select and exclude objects for backup and restore jobs. Job Type Object Selection Rules Description Backup • • • Restore • • • Users and databases have a database settings option to include all children databases and users DBC is always the root object Selecting DBC with the database setting to include all will back up all databases defined in the Teradata Database system, but automatically exclude DBC objects Only objects that were included in the related backup job have object settings The root object is named after the source save set being restored plus the timestamp Selecting the root node creates a job that restores all objects in the save set Note: If you want to selectively restore objects from a save set, de-select the root object • • Backup and Restore • • The rename to option under object settings restores objects to a target system using a new name The map to option under object settings restores the object to a target system under a different user or database than was designated for the backup job Objects in a hierarchy can be included or excluded, but objects below an excluded object cannot be included The include all option includes all children objects in the database hierarchy Teradata Data Stream Architecture User Guide, Release 14.11 51 Chapter 2 Teradata BAR Portlets About the Selection Summary Tab The Selection Summary tab is a tabular view of the objects explicitly selected in the Select Objects tab. Only selected objects and object settings are displayed. You can select, lock, and designate the order of columns from the Table Actions menu. The following columns are available: Column Header Description PARENT Parent object of the selected object OBJECT Name of the selected object TYPE Object type of the selected object SIZE Object size of the selected object RENAME Name to which the selected object will be renamed REMAP Database to which the selected object will be remapped About the Save Set Version Tab The Save Set Version tab allows you to select a save set version against which you can run your analyze job. You can select the latest version or you can specify another version if more than one save set exists. You can select, lock, and designate the order of columns from the Table Actions menu. The following columns are available: Column Header Description BACKUP DATE Start date and time job began OBJECTS A count of database objects copied during the job SIZE Aggregate size for the objects processed BACKUP TYPE Full, delta, or cumulative backup associated with the save set TYPE Backup TARGET GROUP Target group of the backup job COMPLETION DATE Date and time the backup job was completed LOCATION Location where the objects were backed up JOB PHASE Job phase associated with the save set About the Job Settings Tab The Job Settings tab allows you to apply changes to the default jobs settings that are created for backup, restore, and analyze jobs during job creation. 52 Field Description Job Type Automatically retire Determines whether a job is retired automatically. Backup Restore Analyze Teradata Data Stream Architecture User Guide, Release 14.11 Chapter 2 Teradata BAR Portlets Field Description Job Type Never Default. The job is not retired automatically. The job retire must be set manually. After Specifies the time, in days or weeks, that a job is automatically retired. Backup Method Determines the type of backup to perform. Backup Offline Default. Backs up everything associated with each specified object while the database is offline. No updates can be made to the objects during the backup job run. Online Backs up everything associated with each specified object and initiates an online archive for all objects being archived. The online archive creates a log that contains all changes to the objects while the archive is prepared. Dictionary Only Backs up only the dictionary and table header information for each object. No sync check box Determines where synchronization is done for the Backup job. Only available for online backup jobs. • Default is unchecked. If unchecked, synchronization occurs across all tables simultaneously. If you try to run a job that includes objects that are already being logged, the job aborts. • If the check box is selected, there can be different synchronization points. If you try to run a job that includes objects that are already being logged, the job runs to completion and a warning is returned to the user. Logging level Determines the types of messages that the database job logs. Error Backup Restore Analyze_validate Default. Enables minimal logging. Provides only error messages. Teradata Data Stream Architecture User Guide, Release 14.11 53 Chapter 2 Teradata BAR Portlets Field Description Job Type Warning Adds warning messages to error message logging. Info Provides informational messages with warning and error messages to the job log. Debug Enables full logging. All messages, including Debug, are sent to the job log. Job Permissions • • If the job permissions have not been defined, the Backup permissions show as not shared. Restore Analyze If job permissions have been defined, the cumulative number of users and roles with shared permissions are shown. Click Edit to open the Change Permissions dialog box if job permissions need to be changed. Query Band Allows tagging of sessions or transactions with a set Backup of user-defined name-value pairs to identify where a Restore query originated. These identifiers are in addition to the current set of session identification fields, such as user ID, account string, client ID, and application name. Note: Valid query band values are defined on the database. Note: DSA creates query bands for restore jobs when the user sets an override temperature or block level compression option to a value other than DEFAULT. You can enter different query bands in the bottom text box. Override temperature Determines the temperature at which data is restored. Restore DEFAULT Default. This data is restored at the default temperature setting for the system. HOT This data is accessed frequently. WARM This data is accessed less frequently. COLD This data is accessed least frequently. 54 Teradata Data Stream Architecture User Guide, Release 14.11 Chapter 2 Teradata BAR Portlets Field Description Job Type Block Level Compression (BLC) Defines data compression used. Restore DEFAULT Default. Applies same data compression as the backup job if allowed on the target system. ON Compress data at the block level if allowed on the target system. OFF Restore the data blocks uncompressed. Disable Fallback check box Fallback protection means that a copy of every table Restore row is maintained on a different AMP in the configuration. Fallback-protected tables are always fully accessible and are automatically recovered by the system. • Default is unchecked. If unchecked, restored tables are recreated with fallback automatically enabled. • If checked, restored tables are recreated without fallback enabled. This might be necessary in cases where space on the target system is at a premium or where the copied table is being used for temporary purposes. Run as copy check box Allows restore to run as a copy. Restore • Default is unchecked. If unchecked, the restore runs as intended. If restore is to a different system than the backup job system, this is the default action. If the restore is to the same system, the restore runs as a copy. • If checked, the restore runs as a copy. DBC Credentials Click Set Credentials to open the Enter Credentials dialog box if DBC credentials need to be established. Restore Changing Job Permissions When you create a job, you can set permissions that allow some users or roles to run the job and some users or roles to edit the job. After a job is created, you can change permissions for users or roles. To designate job permissions, you must be the owner of the job or the DSA administrator. 1 From the Saved Jobs view, create or edit a job. 2 Click the Job Settings tab and click Edit. 3 Select users and roles to grant access. Teradata Data Stream Architecture User Guide, Release 14.11 55 Chapter 2 Teradata BAR Portlets Option Description Users Roles a. Select one or more Viewpoint users and click box. b. Select a user and grant access to Run or Edit. to move it to the Users with access a. Select one or more Viewpoint roles and click box. b. Select a role and grant access to Run or Edit. to move it to the Roles with access 4 Click OK. About the Object Browser The object browser allows you to view a list of objects that are on a source Teradata Database system and archive objects to a target group and restore these objects to a target system. The object browser simplifies the process of viewing and selecting Teradata Database objects for backup and restore jobs. Database objects display as a hierarchically-organized tree. You can use filtering to limit the number of objects displayed in the tree. Expand a branch of objects in the tree by clicking next to the object type. The following table lists general controls in the object browser. 56 Control Action Object Settings dialog box Provides settings for objects in a backup or restore job. Object Icon Identifies the database object type. Hovering over the object icon will show the object type and full object name. Teradata Data Stream Architecture User Guide, Release 14.11 Chapter 2 Teradata BAR Portlets Setting Object Browser Defaults You can define the object types displayed when using the object browser tree. By default, the object browser shows databases and users in the tree. The tree refreshes more quickly when you select fewer object types. 1 From the portlet frame, click to access the PREFERENCES view. 2 [Optional] In the General tab, select the object types to display by default in the object browser. 3 [Optional] Click Clear Defaults to remove the default settings. Note: Clearing the defaults removes those settings for new instances of the BAR Operations portlet but does not change the current portlet instance. 4 Click OK. Object Types The following table lists database objects and associated icons displayed in the object browser tree. When selecting object types for copying, you can select any independent object by itself or with other objects. Teradata Data Stream Architecture User Guide, Release 14.11 57 Chapter 2 Teradata BAR Portlets Database Object Icon Aggregate function Authorization Contract Function Database External stored procedures Hash Index JAR Join Index Macro NoPI table PPI table Queue table Standard function Stored procedure Table Table function Table Operator Trigger User View Using the Object Browser Filtering allows you to display only database objects that match your filter criteria. The filtering controls are identified in the following graphic and explained in the table. 1 Expand the branches and select the object types for your job. 58 Teradata Data Stream Architecture User Guide, Release 14.11 Chapter 2 Teradata BAR Portlets Control Action Filter Box Filters for database objects in the branch or sub-branch that match criteria that you enter in the box. Filtering is case insensitive. Check Box Selects all objects in the branch and sub-branch. Object-Type Filter Selects types of database objects. Matched Objects Total objects that match the current filter criteria in the branch. If no objects of the type are found, the branch displays 0 matches. Selection-Option List Toggles selection of multiple items in the sub-branch only. Page-Results Navigator Navigates through pages of filtered results in the branch. 2 Click Save. The Saved Job view appears. About Filters and Sorting Filters allow you to display only rows that match your filter criteria. You can narrow the search further by filtering on multiple columns. Use wildcard characters or symbols in the filter to include number or word variations in the filter match. Sorting allows you to change the order of rows in a table based upon criteria in a column and applies across all pages of the table. Sort on a column by clicking the column header. A second click reverses the sort order. You can sort on two columns consecutively using Ctrl +Click in the column header. Primary sort order is indicated by a single arrow, and secondary sort order is indicated by a double arrow. Teradata Data Stream Architecture User Guide, Release 14.11 59 Chapter 2 Teradata BAR Portlets The filtering, sorting, and page number settings that you choose for the default or minimized view are not used when you switch to the maximized view. Clearing Filters You can clear the filter box values from the table. 1 Do one of the following: Option Description Clear individual filter boxes Clear all filter boxes a. Click on the filter box. a. Select Clear Filters at the bottom of the portlet. Configuring Columns to Display Use the Columns dialog box to select, lock, and order columns. You can resize columns in the table. The column selection, order, and lock settings that you choose are applied to the minimized and maximized views separately. 1 Click in the table header and select Configure Columns. 2 In the Columns dialog box, select the check boxes of columns to display. Mouse over the name to see the complete name. 3 [Optional] Click next to the column name. The columns at the top of the list can be locked in the table to remain on the left when scrolling horizontally. 4 [Optional] Click and drag the row to reorder the column. 5 Click Apply to save the changes. 6 [Optional] In the table, drag the column heading border the column. in either direction to resize Exporting Table Data You can export data to a .csv file for further analysis and formatting. The exported .csv file contains all available data. The format for the time, date, and some numeric values differs in the view and exported .csv file. 1 Click in the table header and select Export. 2 Save the file using the browser options. The file is saved to your download area or to a location that you specify, depending on the browser settings. 60 Teradata Data Stream Architecture User Guide, Release 14.11 Chapter 2 Teradata BAR Portlets 3 [Optional] Reformat exported data to match the format in the view. To format timestamp columns in Excel to include the seconds in the time: a Right-click the column header and select Format Cells from the menu that opens. b On the Number tab, select Custom from the Category list. c In the Type list, select the timestamp format closest to your desired format. d Edit the Type box to add :ss to the end of the timestamp format. For example: m/d/ yyyy h:mm:ss AM/PM e Click OK. Teradata Data Stream Architecture User Guide, Release 14.11 61 Chapter 2 Teradata BAR Portlets 62 Teradata Data Stream Architecture User Guide, Release 14.11 CHAPTER 3 Teradata DSA Command Line Interface Command-Line Interface Overview DSA provides a command-line interface that enables you to carry out the same actions that can be carried out in the BAR Setup and BAR Operations portlets, plus additional commands that are not available in the portlets. The DSA command-line interface includes setup commands for configuring, updating, and deleting targets, sources, and the DSC repository. The command-line interface also includes operations commands for creating, running, and monitoring jobs. You can run the commands on an ad-hoc basis, as an alternative to using the portlets. You can switch between the command-line and portlet interfaces. For example, you can create jobs in the portlet and then view them using the list_jobs command. Or you can export the XML file associated with a job you created in the portlet, and update the job definition using the command line. You can also develop scripts to automate DSA commands and to use with UNIX cron or other job-scheduling applications. For example, you might want to have a backup job run automatically every night at 1 a.m. Each command has a number of parameters that can be specified directly in the command line to run the command. In addition, many of the commands require that additional information necessary to carry out the commands be specified in an XML file. Sample XML files for system and component configuration and for job definition are provided in the Samples folder included with the command line installation package. The sample files include helpful comments and show the available settings for the commands to which they correspond. Accessing the DSA Command-Line Interface After the DSA command-line interface package has been successfully installed, the command line can be accessed from the Linux console. You can run DSA commands from any file system location without navigating to the installation directory. 1 Type dsc from any directory and press Enter. Accessing DSA Command Help You can view a list and brief description of all of the commands available in the DSA command-line interface. The basic syntax and usage of commands is shown for each command. Teradata Data Stream Architecture User Guide, Release 14.11 63 Chapter 3 Teradata DSA Command Line Interface You can also specify a command name to view more detailed information about the command, including a syntax example and a list and description of each of the parameters associated with the command. 1 Type dsc help in the command line, and do one of the following: Option Description View all commands • View a specific command • • Press Enter to view a list of all of the command names. Add a specific command name to view information about a particular command. Press Enter. For example, for information about the create_job command, type dsc help create_job and press Enter. The following is displayed: NAME: create_job - Create Job Command DESCRIPTION: Creates a DSA job based on the file, with user modifications from parameters below. User will be required to authenticate username and password to the source/target system on the console. EXAMPLE: create_job -n|-name job1 -f|-file parameters.xml PARAMETERS: Parameter Example Description n|name job1 (Optional) Name for the job, must be unique d|description backup web apps (Optional) Description of the job. For multi-word surround by \\" must be escaped with backslash. t|type restore (Optional) Type of the job: [BACKUP,RESTORE,ANALYZE_READ,ANALYZE_VALIDATE] o|owner joe (Optional) Job owner b|backup_name backupWeb1 (Optional) Backup job name(only for RESTORE or ANALYZE jobs) v|backup_version 60 (Optional) Backup version number(only for RESTORE or ANALYZE jobs). Type LATEST or 0 for latest save set. f|file parameters.xml XML File to upload as basis for new job. u|user_authentication user (Required when security management is enabled) Supplies command with Viewpoint user DSA Command Types DSA commands can be categorized as two major types: • DSA setup commands for administration and configuration that allow you to create, update, and delete targets, sources, and the DSC repository. This functionality corresponds to that provided by the BAR Setup portlet. 64 Teradata Data Stream Architecture User Guide, Release 14.11 Chapter 3 Teradata DSA Command Line Interface • DSA operation commands for management and reporting that allow you to create, execute, monitor, update, and delete jobs. This functionality corresponds to that provided by the BAR Operations portlet. The following table lists and briefly describes the administration and configuration commands. Table 2: DSA Configuration Commands Command Name Description config_general The config_general command configures the general settings, based on the information contained in the parameters XML file. config_media_servers The config_media_servers command configures the BAR media servers. config_nbu The config_nbu command configures a DSA system to use Symantec NetBackup third-party software to back up and restore data. config_repository_backup The config_repository_backup command provides the configuration information to back up the DSC repository. config_systems The config_systems command configures the DSC settings for the Teradata system and nodes used for backup and restore jobs. The command also sets the selector in the targeted system for ActiveMQ. config_target_groups The config_target_groups command configures the target groups based on the target type and the information from the parameters file. config_target_group_map The config_target_group_map command configures the map between target groups when restoring to a different client configuration. delete_component The delete_component command deletes an existing component based on the information in the parameters. delete_target_group_map The delete_target_group_map command deletes a target group map for restoring to a different client configuration. disable_component The disable_component command disables an existing BAR component based on the component name and type. enable_component The enable_component command enables an existing BAR component based on the component name and type. export_config The export_config command exports the current XML definition for the requested BAR component. Teradata Data Stream Architecture User Guide, Release 14.11 65 Chapter 3 Teradata DSA Command Line Interface Command Name Description export_job_metadata The export_job_metadata command exports metadata of a job (job definition, save sets, and targets) based on the requested backup version. In the case of a disaster to the DSC repository, exporting job metadata enables the job to be migrated and restored to a different DSA environment. export_repository_backup_config The export_repository_backup_config command exports all configurations associated with setting up a repository backup job. This includes the system, NetBackup, media servers, and target group associated with the target selected in config_repository_backup. export_target_group_map The export_target_group_map command exports a map between target groups for restoring to a different client configuration. import_repository_backup_config The import_repository_backup_config command imports all configurations associated with setting up a repository backup job. This includes system, NetBackup, media servers, and target group configurations. This command is used to recover the DSC backup repository after a disaster. list_components The list_components command lists components defined and stored in the DSC repository. If a specific component is requested, that component definition is displayed. Otherwise, a list of the components matching any provided filters is displayed. Any partial component name returns all components matching the partial input. Note: The Type parameter is required. list_general_settings The list_general_settings command lists all current general settings. list_repository_backup_settings The list_repository_backup_settings command lists all current repository backup settings. list_target_group_map The list_target_group_map command lists the maps between target groups for restoring to a different client configuration. run_ping The run_ping command lists the component status of all media servers and Teradata systems. The following table lists and briefly describes the management and reporting commands. 66 Teradata Data Stream Architecture User Guide, Release 14.11 Chapter 3 Teradata DSA Command Line Interface Table 3: DSA Operating Commands Command Name Description abort_job The abort_job command aborts an actively running job, a job in the queue, or a job that is not responding. activate_job The activate_job command activates a retired job, which allows the job to be available. create_job The create_job command creates a job based on the values you specify for parameters in the command line or in the XML file. Parameter values you enter in the command line supersede any value you enter for those parameters in the parameters XML file. delete_job The delete_job command deletes a job and any data associated with it from the DSC repository. Any logs and job history are deleted and cannot be restored. Any backup save sets created for the job that exist on devices managed by third-party solutions must be deleted manually using the interface for that solution. Note: This command only deletes new or retired jobs. export_job The export_job command exports the current XML definition for the requested job. export_job_metadata The export_job_metadata command exports metadata of a job (job definition, save sets, and targets) based on the requested backup version. In the case of a disaster to the DSC repository, exporting job metadata enables the job to be migrated and restored to a different DSA environment. import_job_metadata The import_job_metadata command imports metadata of a job (job definition, save sets, and targets) to the specified directory. In the case of a disaster to the DSC repository, exporting and them importing job metadata enables the job to be restored to a different DSA environment. job_status The job_status command gets the latest status for a job with the given name and displays it on the screen. If the job is running, a detailed status message is displayed. If the job is not running, the status of the last run for that job is displayed. job_status_log The job_status_log command displays the latest status log for a job with the given name if the job is running. If the job is not running, the status log for the last run job is displayed. list_jobs The list_jobs command lists jobs defined and stored in the DSC repository. If a specific job is requested, that job definition is displayed. Otherwise, a list of job names matching any provided filters is displayed. If no parameters are provided, a list of all jobs is displayed. list_query_nbu_backupids The list_query_nbu_backupids command lists the results of the query returned from the query_nbu_backupids command. Teradata Data Stream Architecture User Guide, Release 14.11 67 Chapter 3 Teradata DSA Command Line Interface Command Name Description list_recover_backup_metadata The list_recover_backup_metadata command lists the overall status and individual media server status of the recover_backup_metadata command. 68 list_save_sets The list_save_sets command lists all valid save sets for a given job name. list_validate_job_metadata The list_validate_job_metadata command lists the information returned from a successful validate_job_metadata command. object_release The object_release command releases all objects of a given job that are currently locked. It does not release objects for new, running, or queued jobs. object_release_status The object_release_status command lists the current status of objects requested to be released. query_nbu_backupids The query_nbu_backupids command queries NetBackup for information needed for a NetBackup duplicate. recover_backup_metadata The recover_backup_metadata command queries the third party media to recover backup metadata and rebuild the backup job plan in the case of a disaster to the DSC repository. The command can only be run on repository backup jobs with no save sets. retire_job The retire_job command retires an active job. It does not retire a running or queued status job, or one that is already in the retired state. run_job The run_job command runs a job as soon as all necessary resources are available. The DSC limits the number of jobs running concurrently, per system, to 20 and queues up to 20 more jobs beyond that limit. The DSC also verifies that the target media defined in the job is available before the job is started. If the target media is not immediately available, the job is queued. run_repository_job The run_repository_job command runs a job in the DSC repository. set_status_rate The set_status_rate command configures the status update rate between DSC and the media servers or Teradata systems. sync_save_sets The sync_save_sets command sends a request to all NetBackup clients that contain save sets that are past the dataset.retention.days (configured in dsc.properties) to determine if the save sets have expired on the NetBackup side. If they have expired, DSC removes them from the DSC repository. update_job The update_job command updates an existing DSA job based on the information from the command line parameters or the parameter file if provided. Parameter values specified in the command line supersede any values entered for those same parameters in the XML file. Teradata Data Stream Architecture User Guide, Release 14.11 Chapter 3 Teradata DSA Command Line Interface Command Name Description validate_job_metadata The validate_job_metadata command queries NetBackup for information needed to validate the save set. DSA Configuration DSA configuration commands enable you to set up the DSC repository and system components. These commands can be used as an alternative to using the BAR Setup portlet. DSA configuration commands enable you to perform a wide range of configuration activities, including: • Setting general DSC repository settings • Backing up the DSC repository, and exporting and importing repository backup information • Configuring systems, nodes, media servers, third-party applications, and target groups • Enabling and disabling systems and target groups • Viewing DSC repository and component information The procedures for using the DSA configuration commands are described in detail in the following sections. Systems and Nodes You can add, configure, and set stream limits for systems and nodes in the BAR Setup portlet and by using DSA setup commands from the DSA command-line interface. After you enable configured systems, they are available for backup and restore jobs in the BAR Operations portlet and for DSA operation commands. Configuring a System and Node Prerequisite: Before using this command, you must prepare an XML file that contains the necessary system and node configuration information, including the system name, node IP addresses, and limits on the number of streams per node. The config_systems command configures the DSC settings for the Teradata system and nodes used for backup and restore jobs. The command also sets the selector in the targeted system for ActiveMQ. Even though the repository backup system is already pre-configured, you must rerun config_systems to set up the system selector and amp discovery before the system can be enabled for use. 1 Type dsc config_systems followed by the parameters, and press Enter. Parameters Description f|file File The full file path and file name of the file containing the necessary configuration parameters. s|SystemOrSelector System or Selector [Optional] Flag indicating whether the systems and node configuration or selector setting is skipped when you run the command. If this option is not specified, then both parts of the Teradata Data Stream Architecture User Guide, Release 14.11 69 Chapter 3 Teradata DSA Command Line Interface Parameters Description configuration (system and selector) are run. Enter one of the following: • system to avoid configuring Teradata systems and nodes • selector to avoid setting the selector in the targeted system for ActiveMQ Note: If you choose the selector option with this parameter, restart Teradata Database using a DSMain restart. u|user_authentication User Required when security management is enabled. Supplies the command with the Viewpoint user, and triggers a password prompt for authentication. 2 Type the source user name and password, and press Enter. Media Servers Media servers manage data during system backups and restores. Media servers are made available to your BAR environment as soon as the DSA software is installed and running. DSA administrators can then add or delete media servers to their BAR configuration, and assign media servers to target group configurations, in the BAR Setup portlet or through the command-line interface by using DSA setup commands. Adding or Updating a Media Server The config_media_servers command configures the BAR media servers. To use the config_media_servers command, you must specify the XML file that contains the necessary media server configuration information, including the media server name, thirdparty client, port and ip address. 1 Type dsc config_media_servers -f followed by the full file path, and press Enter. Backup Applications Backup applications are third-party applications that transfer data between a storage device and a Teradata Database system. You can configure the third-party server software to: • Indicate the media server on which the third-party backup software is located • Customize setup options for each server Adding or Updating a NetBackup Server The config_nbu command configures a DSA system to use Symantec NetBackup third-party software to back up and restore data. To use the config_nbu command, you must specify the XML file that contains the necessary NetBackup configuration information, server name and ip address, and policy class information. The policies you define must match those defined in NetBackup. 1 Type dsc config_nbu -f followed by the full file path, and press Enter. 70 Teradata Data Stream Architecture User Guide, Release 14.11 Chapter 3 Teradata DSA Command Line Interface Target Groups Target groups are comprised of media servers and devices used for storing backup data. DSA administrators create target groups, and assign media servers and devices. Target groups are then accessible to BAR backup jobs. After a backup job has run to completion, you can create a BAR restore job to restore data using the same target group as the backup job. You can also create a target group map, which allows a BAR restore job to restore data from a different target group. Adding or Updating a Target Group Prerequisite: Configure a third party application and media server before adding a target group. The config_target_groups command configures the target groups based on the target type and the information from the parameters file. To use the config_target_groups command, you must specify the XML file that contains the necessary target group configuration information, including the target group name, entity, BAR media server, and policy class information. 1 Type dsc config_target_groups followed by the parameters, and press Enter. Parameters Description t|type Type The target type of the BAR component to add to the target group. This must be target_nbu. f|file File The full file path and file name of the file containing the necessary configuration parameters. B|repository_backup Repository Backup [Optional] Marks a target group for repository backup. S|skip_prompt SkipPrompt [Optional] Skips displaying a confirmation message before performing the command action. Note: The Skip Prompt parameter can only be used if the Repository Backup parameter is specified. Enabling a System or Target Group Prerequisite: A system or target group must be configured in your BAR environment before it can be enabled. Use the BAR Setup portlet or a configuration file to configure the component. The enable_component command enables an existing BAR component based on the component name and type. 1 Type dsc enable_component followed by the parameters, and press Enter. Parameters Description n|name Name The name of the BAR component. The name must be unique. t|type Type The type of BAR component. Enter system or target_group. Teradata Data Stream Architecture User Guide, Release 14.11 71 Chapter 3 Teradata DSA Command Line Interface Parameters Description u|user_authentication User Required when security management is enabled. Supplies the command with the Viewpoint user, and triggers a password prompt for authentication. Disabling a System or Target Group Prerequisite: The system or target group cannot be in use when you plan to disable it. The disable_component command disables an existing BAR system or target group. 1 Type dsc disable_component followed by the parameters, and press Enter. Option Description n|name Name The name of the BAR component. The name must be unique. t|type Type The type of BAR component. Enter system or target_group. u|user_authentication User Required when security management is enabled. Supplies the command with the Viewpoint user, and triggers a password prompt for authentication. Adding a Target Group Map Prerequisite: Configure a target group before adding a target group map. The target group mapping is maintained in an XML file to designate the new configuration for the restore. The config_target_group_map command configures the map between target groups when restoring to a different client configuration. 1 Open the XML file containing the target mapping configuration information. A sample map, sample_target_map.xml, is supplied in the DSC sample library. 2 Specify target group map tags: Target Group Map Tag Description master_source_target_name The backup target group name. master_dest_target_name The restore target group name. target_group_maps A sub target grouping consisting of a backup and restore configuration pair. source_mediaserver_name The backup media server. source_policy_class_name The third party backup application policy associated with the backup media server. dest_mediaserver_name The restore media server. dest_policy_class_name The third party backup application policy associated with the restore media server. 3 Type dsc config_target_group_map followed by the parameters, and press Enter. 72 Teradata Data Stream Architecture User Guide, Release 14.11 Chapter 3 Teradata DSA Command Line Interface Parameter Description f|file File The full file path and file name of the file containing the necessary configuration parameters. u|user_authentication User Required when security management is enabled. Supplies the command with the Viewpoint user, and triggers a password prompt for authentication. V|virtual [Optional] Indicates this is a mapping from a virtual target group to a physical target group. Exporting a Target Group Map The export_target_group_map command exports a map between target groups for restoring to a different client configuration. 1 Type dsc export_target_group_map followed by the parameters, and press Enter. Parameter Description s|source SampSrc The source target group represents the backup target group for mapping. d|destination SampDest The destination target group represents the restore target group for mapping. f|file File The full file path and file name of the file to which to write the XML definition. V|virtual [Optional] Indicates this is a mapping from a virtual target group to a physical target group. Deleting a Target Group Map The delete_target_group_map command deletes a target group map for restoring to a different client configuration. 1 Type dsc delete_target_group_map followed by the parameters, and press Enter. Parameter Description s|source SampSrc The source target group represents the backup target group for mapping. d|destination SampDest The destination target group represents the restore target group for mapping. u|user_authentication User Required when security management is enabled. Supplies the command with the Viewpoint user, and triggers a password prompt for authentication. Deleting a Component The delete_component command deletes an existing component based on the information in the parameters. To use the delete_component command, you must specify the component name and type, as well as the system if you are deleting a node. Teradata Data Stream Architecture User Guide, Release 14.11 73 Chapter 3 Teradata DSA Command Line Interface You can delete a system, node, media server, NetBackup server, or a target group. You cannot delete any of the following: • A system in use by a job • A media server in use by a target group • A NetBackup server in use by a target group • A target group in use by a job • A target group in use by a target group map • The system marked for repository backup • A policy used by a target group 1 Type dsc delete_component followed by the parameters, and press Enter. Parameters Description n|name Name The name of the BAR component. The name must be unique. t|type Type The type of BAR component. Enter one of the following: • system s|system System • node • media_server • nbu_server • target_group This value must be specified if the component type is a node. S|skip_prompt SkipPrompt [Optional] Skips displaying a confirmation message before performing the command action. u|user_authentication User Required when security management is enabled. Supplies the command with the Viewpoint user, and triggers a password prompt for authentication. Viewing Configuration Information The list commands allow you to view component configurations, DSA general settings, active jobs, retired jobs, DSC jobs, job history, repository backup settings, valid save sets, and target group maps. 1 Type the list command followed by the parameters, if applicable, and press Enter. List Command Description list_components The list_components command lists components defined and stored in the DSC repository. If a specific component is requested, that component definition is displayed. Otherwise, a list of the components matching any provided filters is displayed. Any partial component name returns all components matching the partial input. Note: The Type parameter is required. 74 Teradata Data Stream Architecture User Guide, Release 14.11 Chapter 3 Teradata DSA Command Line Interface List Command Description e|enabled Enabled Filter components based on whether or not they are enabled. This applies only to system and target_group components. n|name Name The name of the job on which to perform the action. Must be unique for each job. Note: If you specify a name, the command processes the name with wildcards at the beginning and end of the name. Specifying job1 might produce a list which include job1, job 111 and backupjob1. s|system System Filter components based on the associated Teradata system. This applies only to node components. t|type Type The type of BAR component. Enter one of the following: • system • node • media_server • nbu_server • target_group V|virtual [Optional] Indicates this is a mapping from a virtual target group to a physical target group. list_general_settings The list_general_settings command lists all current general settings. There are no parameters associated with this command. list_jobs The list_jobs command lists jobs defined and stored in the DSC repository. If a specific job is requested, that job definition is displayed. Otherwise, a list of job names matching any provided filters is displayed. If no parameters are provided, a list of all jobs is displayed. n|name Name The name of the job on which to perform the action. Must be unique for each job. Note: If you specify a name, the command processes the name with wildcards at the beginning and end of the name. Specifying job1 might produce a list which include job1, job 111 and backupjob1. Teradata Data Stream Architecture User Guide, Release 14.11 75 Chapter 3 Teradata DSA Command Line Interface List Command Description o|owner Owner [Optional] The owner of the job. Job ownership is used to determine the appropriate privileges given to DSA users. s|state State [Optional] Enter active or retired. The default is active. S|status Status [Optional] The latest status for a job. Enter one of the following: • running • completed_successfully • completed_errors • failed • queued • aborting • aborted • new • not_responding • warning t|type Type The type of job being viewed. Enter one of the following: • backup • restore • analyze_read • analyze_validate B|repository_backup Repository Backup [Optional] View repository backup jobs. list_job_history The list_job_history command lists all history of jobs in the DSC repository or by specific job. n|name Name The name of the DSA job to display history. b|bucket BucketNumber [Optional] Select a bucket number to display a grouping of data when there are too many results returned to display at once. The command output notifies the user if there are more buckets of data that can be displayed. 76 Teradata Data Stream Architecture User Guide, Release 14.11 Chapter 3 Teradata DSA Command Line Interface List Command Description list_repository_backup_settings The list_repository_backup_settings command lists all current repository backup settings. There are no parameters associated with this command. list_save_sets The list_save_sets command lists all valid save sets for a given job name. n|name Name The name of the job or target group for its save sets. If -B is not specified, name refers to a backup job. If -B is specified, name refers to a target group name. F|filter Filter [Optional] Filter the save sets by the stop_time. Enter one of the following: • last_week • last_month • last_year B|repository_backup Repository Backup [Optional] View the backup repository for DSC repository backup save sets. list_target_group_map The list_target_group_map command lists the maps between target groups for restoring to a different client configuration. There are no parameters associated with this command. Exporting DSA Component Configuration The export_config command exports the current XML definition for the requested BAR component. 1 Type dsc export_config followed by the parameters, and press Enter. Parameters Description n|name Name The name of the component you want to export. You do not need to enter a name if the value of the Type parameter is general. t|type Type The type of component or repository backup you want to export. Enter one of the following: • system • media_server • nbu_server • target_groups • general Teradata Data Stream Architecture User Guide, Release 14.11 77 Chapter 3 Teradata DSA Command Line Interface Parameters Description f|file File The full file path and file name of the file to which to write the XML definition. Managing the DSC Repository DSA configuration settings and job metadata are stored in the Data Stream Controller (DSC) Repository. You can automate a repository backup or initiate the backup manually. A repository backup job backs up your DSC metadata to a target group. Any running DSC repository job (backup, restore, or analyze) prevents jobs from being submitted and DSA configuration settings from being changed. Configuration settings and DSC metadata can be restored to the DSC repository from a storage device. If you abort a DSC repository restore job while the job is in progress or if the restore job fails. DSC triggers a command to restore all repository tables to their initial state, which is an empty table. The current data in the DSC repository would be lost. Note: Before you can recover the DSC Repository, a DSC repository backup job and an export of the repository backup configuration must have been completed successfully at least once. The export of the repository backup configuration can only be performed using the DSA command line. Failure to perform a successful repository backup and an export of the repository backup configuration will result in an unrecoverable DSC repository in the case of a complete disaster. Scheduling and Configuring a Repository Backup Prerequisite: Before scheduling a DSC repository backup job, configure a remote target group for the job. Use the sample_config_repository_backup.xml file to identify the repository backup target group and have scheduling parameters ready. The config_repository_backup command allows you to schedule a DSC repository backup job. Note: Before you can recover the DSC Repository , a DSC repository backup job and an export of the repository backup configuration must have been completed successfully at least once. 1 Type dsc config_repository_backup followed by the parameter, and press Enter. Parameter Description f|file File The full file path and file name of the file containing the necessary configuration parameters. u|user_authentication User Required when security management is enabled. Supplies the command with the Viewpoint user, and triggers a password prompt for authentication. Backing Up the DSC Repository Prerequisite: Before you back up the DSC repository, run the configure_repository_backup command. The run_repository_job command allows you to back up the DSC repository. 78 Teradata Data Stream Architecture User Guide, Release 14.11 Chapter 3 Teradata DSA Command Line Interface Note: Before you can recover the DSC Repository , a DSC repository backup job and an export of the repository backup configuration must have been completed successfully at least once. 1 Type dsc run_repository_job -t backup, and press Enter. Note: The run_repository_job command can only be initiated if no operational jobs are running. Exporting the Repository Backup Configuration The export_repository_backup_config command exports all configurations associated with setting up a repository backup job. This includes the system, NetBackup, media servers, and target group associated with the target selected in config_repository_backup. Note: Before you can recover the DSC Repository , a DSC repository backup job and an export of the repository backup configuration must have been completed successfully at least once. 1 Type dsc export_repository_backup_config followed by the parameters, and press Enter. Parameters Description f|file File The full file path and file name of the file to which to write the XML definition. Restoring the DSC Repository Prerequisite: A valid DSC repository backup job save set must exist before a DSC repository restore job can be run. The run_repository_job command allows you to restore the DSC repository. 1 Type dsc run_repository_job followed by the parameters, and press Enter. Parameters Description t|type Type Enter RESTORE to restore the DSC repository. v|backup_version BackupVersion [Optional] Backup version number. Enter latest or 0 for the latest save set. n|name Name [Optional] Enter the name of the target group for the restore. If not specified, will restore to default target group set in target group configuration xml file. u|user_authentication User Required when security management is enabled. Supplies the command with the Viewpoint user, and triggers a password prompt for authentication. About Aborting a DSC Repository Job Before aborting a DSC repository job, you must have a repository backup job configuration file exported to a remote location. If you abort a DSC restore job while the job is in progress, DSC metadata will be corrupted. DSC triggers a command to restore all repository tables to their initial state, which is an empty table. This results in data that cannot be recovered. Teradata Data Stream Architecture User Guide, Release 14.11 79 Chapter 3 Teradata DSA Command Line Interface Planning a Job Creating a job comprises several options. There are different considerations before creating each job type. The following is an overview of some of the considerations. Backup Jobs Backup jobs archive objects from a source system to a target group. Target groups are defined by a BAR administrator in the BAR Setup portlet or command-line interface. BAR Operations portlet users can migrate the object list from an existing ARC script into a backup job. Objects in that list that exist in the specified source system will be automatically selected in the object browser when a new job is created from the migrated ARC script. When you run a backup job for the first time or when you change the target group for a backup job, all data from the specified objects is archived. After this initial full backup, you may choose the backup type: • Full: Archives all data from the specified objects • Delta: Archives only the data that has changed since the last backup operation • Cumulative: Archives the data that has changed since the last full backup was run Restore Jobs Restore jobs are based on successful executions of backup jobs and can only be created for a backup job that has successfully run to completion. Users can define a restore job to always restore the latest version of a backup save set or they can specify a save set version. A target Teradata system must be selected in order to define the restore job. By default, all objects from the save set are included in the restore job but the selections can be modified by the user. Analyze Jobs An analyze job can employ either a read-only or validate analysis method for each job. An analyze read-only job reads the data from the media device to verify that reads are successful. An analyze validate job sends the data to the AMPs, where it is interpreted and examined but not restored. You will also need to specify a save set version from a successful backup job run. Creating or Updating a Job The create_job command creates a job based on the values you specify for parameters in the command line or in the XML file. Parameter values you enter in the command line supersede any value you enter for those parameters in the parameters XML file. You can also edit an existing job by using the update_job command. Note: Before you create a restore or analyze type job, a backup job must have been completed successfully or run with a warning. 1 Type dsc create_job or dsc update_job followed by the parameters, and press Enter. 80 Teradata Data Stream Architecture User Guide, Release 14.11 Chapter 3 Teradata DSA Command Line Interface Parameter Description n|name Name The name of the job on which to perform the action. Must be unique for each job. d|description Description [Optional] A meaningful description of the job. To allow a multiword description, add '\"' before and after the description string. \"A description of Job 1\" t|type Type The type of job. Enter one of the following: • backup • restore • analyze_read • analyze_validate o|owner Owner [Optional] The owner of the job. Job ownership is used to determine the appropriate privileges given to DSA users. b|backup_name BackupName [Optional] An existing backup job name. For restore, analyze_read, and analyze_validate jobs only. v|backup_version BackupVersion [Optional] Backup version number. For restore, analyze_read, and analyze_validate jobs only. Enter latest or 0 for the latest save set. f|file File The full file path and file name of the file containing the necessary parameters to create the job. If the same parameters are provided both in the file and on the command line, Teradata DSA uses the values specified in the command line. u|user_authentication User Required when security management is enabled. Supplies the command with the Viewpoint user, and triggers a password prompt for authentication. 2 Type the user name and password, and press Enter. Automatically Retiring a Job You can set jobs to automatically retire by enabling the auto_retire in the XML file containing the job definition. 1 Open the XML file containing the job definition and set the following: Parameter Description auto_retire Specify true. Note: False is the default value and means the job does not retire automatically. retire_value Specify an integer to represent the number of days or weeks until the job is retired. Note: The integer can be no longer than three digits. retire_units Specify days or weeks. Teradata Data Stream Architecture User Guide, Release 14.11 81 Chapter 3 Teradata DSA Command Line Interface Including Objects You can include database objects for any backup, restore, or analyze_validate job by specifying an object under objectlist in the XML file containing the job definition. 1 Open the XML file containing the job definition information. 2 Under objectlist, specify: Option Description objectinfo Contains the information on all objects for the job. object_name The name of the object. The name can have a maximum of 128 characters. object_type The type of object. The accepted values are: AGGREGATE_FUNCTION AUTHORIZATION COMBINED_AGGREGATE_FUNCTIONS CONTRACT_FUNCTION DATABASE EXTERNAL_PROCEDURE GLOP_SET HASH_INDEX INSTANCE_OR_CONSTRUCTOR_METHOD JAR JOIN_INDEX JOURNAL MACRO NO_PI_TABLE ORDERED_ANALYTICAL_FUNCTION QUEUE_TABLE STANDARD_FUNCTION STATISTICAL_FUNCTION STORED_PROCEDURE TABLE TABLE_FUNCTION TABLE_OPERATOR TRIGGER USER USER_DEFINED_METHOD USER_DEFINED_DATA_TYPE VIEW parent_name [Optional] The name of the object parent. The name can have a maximum of 128 characters. Note: All objects other than databases and users are required to have a parent name. parent_type [Optional] The type of parent. The accepted values are: DATABASE USER The following XML sample file excerpt shows how to include an object. 82 Teradata Data Stream Architecture User Guide, Release 14.11 Chapter 3 Teradata DSA Command Line Interface <objectlist> <objectinfo> <object_name>VIEW1</object_name> <object_type>VIEW</object_type> <parent_name>DB1</parent_name> <parent_type>DATABASE</parent_type> </objectinfo> Excluding Objects You can exclude objects from any backup or restore job by amending the excludeobjectinfo in the XML file containing the job definition. 1 Open the XML file containing the job definition information. 2 Under excludeobjectinfo, specify the object name and object type that you want to exclude. For example, to exclude tables T1 and T2 from a job that restores Teradata Database: <objectinfo> <object_name>BAR</object_name> <object_type>DATABASE</object_type> <parent_name>DBC</parent_name> <parent_type>DATABASE</parent_type> <!-Optional --> <exclude> <excludeobjectinfo> <object_name>T1</object_name> <object_type>TABLE</object_type> <parent_name>BAR</parent_name> <parent_type>DATABASE</parent_type> </excludeobjectinfo> <excludeobjectinfo> <object_name>T2</object_name> <object_type>TABLE</object_type> <parent_name>BAR</parent_name> <parent_type>DATABASE</parent_type> </excludeobjectinfo> </exclude> </objectinfo> Renaming Tables You can rename tables in a restore job by adding rename_to to the table in the XML file containing the job definition. 1 Open the XML file containing the job definition information. 2 Under objectinfo, identify the table to rename and add the new table name inside rename_to. In the following example, table T1 in the BAR database is restored and renamed as T2: <objectinfo> <object_name>T1</object_name> <object_type>TABLE</object_type> <parent_name>BAR</parent_name> <parent_type>DATABASE</parent_type> Teradata Data Stream Architecture User Guide, Release 14.11 83 Chapter 3 Teradata DSA Command Line Interface <object_attribute_list> <rename_to>T2</rename_to> </object_attribute_list> </objectinfo> Renaming a Database You can rename a database in a restore job by adding map_to to the table in the XML file containing the job definition. This option restores the database to the target system using a new name for the database. 1 Open the XML file containing the job definition information. 2 Under objectinfo, identify the database to rename and add the new database name inside map_to. The following example renames database BAR to NEWBAR: <objectinfo> <object_name>BAR</object_name> <object_type>DATABASE</object_type> <parent_name>DBC</parent_name> <parent_type>DATABASE</parent_type> <object_attribute_list> <map_to>NEWBAR</map_to> </object_attribute_list> </objectinfo> Mapping to a Different Database You can map an object to a different database so that it is restored to the target system under a different user or database than was originally designated for the backup job. You do this using the map_to tag in the XML file containing the job definition. 1 Open the XML file containing the job definition information. 2 Under objectinfo, identify the object, and add the new database name inside map_to. The following example restores table T1, originally backed up from database BAR, to database NEWBAR: <objectinfo> <object_name>T1</object_name> <object_type>TABLE</object_type> <parent_name>BAR</parent_name> <parent_type>DATABASE</parent_type> <object_attribute_list> <map_to>NEWBAR</map_to> </object_attribute_list> </objectinfo> Changing Job Options You can change job options for any backup, restore, or analyze job by amending the job options in the XML file containing the job definition. 84 Teradata Data Stream Architecture User Guide, Release 14.11 Chapter 3 Teradata DSA Command Line Interface 1 Open the XML file containing the job definition information. 2 Under <job_options>, list the necessary job options and place the appropriate value within the job tags. The following example shows the job options section in the XML file for a restore job: <job_options> <!-Optional, true/false --> <data_phase>DATA</data_phase> <!-Optional, true/false --> <enable_temperature_override>true</enable_temperature_override> <!-Optional, enum type, COLD/WARM/HOT --> <temperature_override>HOT</temperature_override> <!-Optional, enum type, DEFAULT/ON/OFF --> <block_level_compression>ON</block_level_compression> <!-Optional, true/false --> <disable_fallback>true</disable_fallback> <!-Optional, max 2048 characters --> <query_band>queryband</query_band> <!-- Optional, starts with upper case ( Error/Info/Debug/ Warning ) --> <dsmain_logging_level>Debug</dsmain_logging_level> <!-Optional, true/false --> <nowait>true</nowait> <!-- 'reblock' - Optional, accepted values: true/false --> <!-- Note: Only useful for RESTORE jobs. --> <reblock>true</reblock> <!-Optional, true/false --> <run_as_copy>true</run_as_copy> <!-Optional, max 32 characters --> <saveset_user>barem</saveset_user> <!-Optional, max 32 characters --> <saveset_password>barem</saveset_password> <job_options> DSA Command-Line Interface Job Options You can select and define job options for backup, restore, and analyze jobs by specifying the values for the options in the XML file containing the job definition. Note: The XML files in the sample library and the files produced by the BAR Operations portlet have the XML in a specific order. The order of the XML within the files must not be changed for the jobs to run properly. Job Options Description Job Type online Determines the type of backup to perform. Backup False Default. Backs up everything associated with each specified object while the database is offline. No updates can be made to the objects during the backup job run. Teradata Data Stream Architecture User Guide, Release 14.11 85 Chapter 3 Teradata DSA Command Line Interface Job Options Description Job Type True Backs up everything associated with each specified object and initiates an online archive for all objects being archived. The online archive creates a log that contains all changes to the objects while the archive is prepared. dataphase Determines the type of backup to perform. Backup DATA Default. Performs a full backup. DICTIONARY Performs a dictionary-only backup. enable_temperature_override Optional setting that pertains to restore jobs only. Restore True The temperature_override value is applied when restoring the data. False The temperature from the backup is applied. nosync Determines where synchronization is done for the job. Only Backup available for online backup jobs. • Default value is false. If false, synchronization occurs across all tables simultaneously. If you try to run a job that includes objects that are already being logged, the job aborts. • True allows different synchronization points. If you try to run a job that includes objects that are already being logged, the job runs to completion and a warning is returned to the user. dsmain_logging_level Determines the types of messages that the database job logs. Error Backup Restore Default. Enables minimal logging. Provides only error messages. Warning Adds warning messages to error message logging. Info Provides informational messages with warning and error messages to the job log. Debug Enables full logging. All messages, including Debug, are sent to the job log. 86 Teradata Data Stream Architecture User Guide, Release 14.11 Chapter 3 Teradata DSA Command Line Interface Job Options Description Job Type nowait Generates warning messages to the job status log for objects that the Teradata Database fails to get locks on immediately. Backup Restore Analyze_validate Note: In either case, the job waits until the lock is released. • • Default is true. If true, a warning message is generated when a job is stopped because of a lock. If false, no warning message is generated when a job is stopped because of a lock. reblock Determines level of inserts, either row or block level. This option is Restore valid only for the same configuration restore. Different configuration restore always use row level inserts. • Default is false. The restore uses block level inserts. • If true, the restore uses row level inserts, forcing reblocking when tables must be restored matching the target system's default block size. Required when the backup is restored to a different AMP configuration, hash function, hash bucket, row format or block alignment. Optional when the backup is restored from a system with different block size than the target system and the block size of the restored data objects must match the target system's block size. query_band Allows tagging of sessions or transactions with a set of user-defined Backup Restore name-value pairs to identify where a query originated. These identifiers are in addition to the current set of session identification fields, such as user ID, account string, client ID, and application name. Note: Valid query band values are defined on the database. temperature_override Determines the temperature at which data is restored. Restore DEFAULT Default. This data is restored at the default temperature setting for the system. HOT This data is accessed frequently. WARM This data is accessed less frequently. COLD This data is accessed least frequently. block_level_compression Defines data compression used. Restore DEFAULT Default. Applies same data compression as the backup job if allowed on the target system. Teradata Data Stream Architecture User Guide, Release 14.11 87 Chapter 3 Teradata DSA Command Line Interface Job Options Description Job Type ON Compress data at the block level if allowed on the target system. OFF Restore the data blocks uncompressed. disable_fallback Fallback protection means that a copy of every table row is Restore maintained on a different AMP in the configuration. Fallbackprotected tables are always fully accessible and are automatically recovered by the system. • Default value is false. If false, restored tables are recreated with fallback automatically enabled. • True recreates restored tables without fallback enabled. This might be necessary in cases where space on the target system is at a premium or where the copied table is being used for temporary purposes. run_as_copy Allows restore to run as a copy. • Default value is false. If false, the restore runs as intended. If restore is to a different system than the backup job system, this is the default action. If the restore is to the same system, the restore runs as a copy. • True runs the restore as a copy. Restore Running a Job 1 Type dsc run_job followed by the parameters, and press Enter. Parameter Description n|name Name The name of the job on which to perform the action. Must be unique for each job. b|backup_type BackupType Enter the type of backup: full, delta, or cumulative p|preview Preview [Optional] Generates an XML file which lists the job plan and settings. f|file File [Optional] If you are previewing the job, this is the file path and file name of the output file to save the job plan. u|user_authentication User Required when security management is enabled. Supplies the command with the Viewpoint user, and triggers a password prompt for authentication. Viewing Job Status The job_status command gets the latest status for a job with the given name and displays it on the screen. If the job is running, a detailed status message is displayed. If the job is not running, the status of the last run for that job is displayed. 1 Type dsc job_status followed by the parameters, and press Enter. 88 Teradata Data Stream Architecture User Guide, Release 14.11 Chapter 3 Teradata DSA Command Line Interface Parameter Description n|name Name The name of the job on which to perform the action. Must be unique for each job. I|job_execution_id Job Execution ID [Optional] The execution ID for the job. Must be an integer. B|repository_backup Repository Backup [Optional] Flag to return status on repository backup jobs. Considerations for Aborting a Job You might want to abort a job after the job has been submitted to run. For example, you might have forgotten to include an object for backup that you did not specify in the job definition XML file. Or you might see, while a backup job is running, that data will fill the media if the job is completed. You can use the abort_job command to abort an actively running job or a job in the queue. An abort command creates two states for the job. While the job state is aborting, devices are being released for other jobs to use. After the job has reached an aborted state, the job releases DSA stream resources and the DSC job slot. If you abort an actively running job, DSA does not create a save set. Any backed files are rolled back to the state they were in following the last complete, successful run. Third-party backup management software does not keep records of jobs that are not run successfully. Notice: If you try to abort a restore job of a DSC repository backup while the job is in progress, the DSC metadata is corrupted. DSC triggers a command to restore all repository tables to their initial state, which is an empty table. You would therefore lose your DSC repository backup data. Aborting a Job The abort_job command aborts an actively running job, a job in the queue, or a job that is not responding. If the abort_job command is given when a job is in the queue to be run, it is removed from the queue. If the job is actively running, a request is sent to abort the job. It can take several minutes for the job to be completely stopped if it is already running. 1 Type dsc abort_job followed by the parameters, and press Enter. Parameters Description n|name Name The name of the job on which to perform the action. Must be unique for each job. O|override [Optional] Can only be used for backup, restore, and analyze_validate jobs. The job must be in the aborting phase. S|skip_prompt SkipPrompt [Optional] Skips displaying a confirmation message before performing the command action. B|repository_backup Repository Backup [Optional] Aborts any running DSC repository job. The name of the job is not required when this parameter is used. Teradata Data Stream Architecture User Guide, Release 14.11 89 Chapter 3 Teradata DSA Command Line Interface Parameters Description u|user_authentication User Required when security management is enabled. Supplies the command with the Viewpoint user, and triggers a password prompt for authentication. Exporting a Job The export_job command exports the current XML definition for the requested job. 1 Type dsc export_job followed by the parameters, and press Enter. Parameters Description n|name Name The name of the job on which to perform the action. The job must be active. f|file File The full file path and file name of the file to which to write the XML definition. Retiring a Job The retire_job command retires an active job. It does not retire a running or queued status job, or one that is already in the retired state. 1 Type dsc retire_job followed by the parameters, and press Enter. Parameters Description n|name Name The name of the job on which to perform the action. Must be unique for each job. S|skip_prompt SkipPrompt [Optional] Skips displaying a confirmation message before performing the command action. u|user_authentication User Required when security management is enabled. Supplies the command with the Viewpoint user, and triggers a password prompt for authentication. Activating a Job The activate_job command activates a retired job, which allows the job to be available. 1 Type dsc activate_job followed by the parameters, and press Enter. Parameters Description n|name Name The name of the job on which to perform the action. Must be unique for each job. S|skip_prompt SkipPrompt [Optional] Skips displaying a confirmation message before performing the command action. u|user_authentication User Required when security management is enabled. Supplies the command with the Viewpoint user, and triggers a password prompt for authentication. Deleting a Job The delete_job command deletes a job and any data associated with it from the DSC repository. Any logs and job history are deleted and cannot be restored. Any backup save sets 90 Teradata Data Stream Architecture User Guide, Release 14.11 Chapter 3 Teradata DSA Command Line Interface created for the job that exist on devices managed by third-party solutions must be deleted manually using the interface for that solution. Note: This command only deletes new or retired jobs. 1 Type dsc delete_job followed by the parameters, and press Enter. Parameters Description n|name Name The name of the job on which to perform the action. Must be unique for each job. S|skip_prompt SkipPrompt [Optional] Skips displaying a confirmation message before performing the command action. u|user_authentication User Required when security management is enabled. Supplies the command with the Viewpoint user, and triggers a password prompt for authentication. Teradata Data Stream Architecture User Guide, Release 14.11 91 Chapter 3 Teradata DSA Command Line Interface 92 Teradata Data Stream Architecture User Guide, Release 14.11 CHAPTER 4 Troubleshooting TVI Logging TVI allows critical failures to be reported to Teradata immediately. Logging by TVI is enabled by default, but can be disabled by setting the value of the logger.useTviLogger property in clienthandler.properties and the dsc.properties files to false. TVI errors that are reported to Teradata DSA are listed below by message ID number. All of the errors above 4000000 are critical. 1751001 Synopsis: DSC Server was started. Meaning: DSC Server was started. Probable Cause: DSC Server was started. Recommendations: n/a 1753001 Synopsis: BARNC was started. Meaning: BARNC was started. Probable Cause: BARNC was started. Recommendations: n/a 4751001 Synopsis: DSC and Commons version mismatch Meaning: DSC version does not match Commons version, DSC failed to start. Probable Cause: Installed package using outdated DSC.xsd schema version. Recommendations: Request a new build. 4751002 Synopsis: DSC cannot connect to JMS broker. Meaning: The JMS broker is unreachable from the DSC. Probable Cause: ActiveMQ service may be down or DSC may have incorrect JMS broker port/url configuration. Recommendations: Check ActiveMQ service is running. Verify JMS broker port/url on DSC. 4751003 Synopsis: JDBC connection to DSC repository failed. Teradata Data Stream Architecture User Guide, Release 14.11 93 Chapter 4 Troubleshooting Meaning: Fail to connect to DSC repository. Probable Cause: DSC repository is unavailable or there is a network error. Recommendations: Check database is running. Verify logon user/password. 4751004 Synopsis: DSC was stopped. Meaning: DSC Server was stopped. Probable Cause: A service could be stopped manually or during a shut down or reboot, or the DSC repository is down. Recommendations: Check the log file for DSC at $DSA_LOG_DIR/dsc.log. If the BAR DSC server is rebooted, the DSC component should start automatically. However, if Teradata Database is not up within five minutes, start the DSC component manually by typing /etc/init.d/dsc start at the command line. 4753001 Synopsis: BARNC and Commons version mismatch. Meaning: BARNC version does not match Commons version, BARNC failed to start. Probable Cause: Installed package using outdated DSC.xsd schema version. Recommendations: Request a new build. 4753002 Synopsis: BARNC was stopped. Meaning: BARNC was stopped. Probable Cause: A service could be stopped manually or during a shut down or reboot. BARNC should start automatically on reboot. Recommendations: Check the log file for BARNC at $DSA_LOG_DIR/ clienthandler.log. BARNC Error Codes BARNC errors are reported in the ClientHandler log file. BSAInit error: Open Session Error in the XBSA Possible Causes: Wrong permission in NetBackup Remedy or actions: 1. Check permissions on the bp.conf 2. Check whether the NetBackup license is active Access Module error: No server or client is selected. Cannot continue, More Info Clienthandler logs Possible Causes: Wrong Configuration 94 Teradata Data Stream Architecture User Guide, Release 14.11 Chapter 4 Troubleshooting Remedy or actions: 1. Look in the ClientHandler logs for further clarification. You may also refer to the NetBackup Troubleshooting Guide. Check NetBackup configuration: 2. a. Check that the client and media servers are correct. b. Check that the NetBackup Master Server is correct. c. As NetBackup is case sensitive, ensure that the client server and master server are in the correct case. Access Module error: Cannot connect to Access Module: Open session failure Possible Causes: Wrong configuration or connection Remedy or actions: 1. Look in the ClientHandler logs for further clarification. You may also refer to the NetBackup Troubleshooting Guide. 2. Check NetBackup configuration: a. b. c. d. Check that the policy is active. Check that the client and media servers are correct. Check that the NetBackup Master Server is correct. As NetBackup is case sensitive, ensure that the client server and master server are in the correct case. Access Module error: No backup file to restore Possible Causes: Wrong configuration or connection Remedy or actions: 1. Look in the ClientHandler logs for further clarification. You may also refer to the NetBackup Troubleshooting Guide. Check NetBackup configuration: 2. a. b. c. d. Check that the policy is active. Check that the client and media servers are correct. Check that the NetBackup Master Server is correct. As NetBackup is case sensitive, ensure that the policy name, client server, and master server are in the correct case. Access Module error Possible Causes: A system error occurred while processing a user command. Remedy or actions: 1. Look in the ClientHandler logs for further clarification. You may also refer to the NetBackup Troubleshooting Guide. 2. Check NetBackup configuration for user permissions. a. Check that the client and media servers are correct. b. Check that the NetBackup Master Server is correct. Teradata Data Stream Architecture User Guide, Release 14.11 95 Chapter 4 Troubleshooting c. As NetBackup is case sensitive, ensure that the client server and master server are in the correct case. There is an error in the policy, More Info - Clienthandler logs Possible Causes: The policy is not correct. Remedy or actions: 1. Look in the ClientHandler logs for further clarification. You may also refer to the NetBackup Troubleshooting Guide. Check NetBackup configuration: 2. a. Check that the policy is active. b. As NetBackup is case sensitive, ensure that the policy name is in the correct case. Access Module error: XBSA: Create Object error Possible Causes: Wrong configuration Remedy or actions: 1. Look in the ClientHandler logs for further clarification. You may also refer to the NetBackup Troubleshooting Guide. Check NetBackup configuration: 2. a. b. c. d. Check that the policy is active. Check that the client and media servers are correct. Check that the NetBackup Master Server is correct. As NetBackup is case sensitive, ensure that the client server and master server are in the correct case. BARNC error: BARNC Memory Errors, More Info - Clienthandler logs Possible Causes: Application ran out of memory, or a network related issue Remedy or actions:Look in the Clienthandler logs for further clarification. You may also refer to the NetBackup Troubleshooting Guide. Locked Object Restrictions The Teradata Database system places locks on objects during the time that transactions take place. For example, if a transaction is taking place on a table, you cannot run a read operation until the previous transaction is complete. If there are locks on objects included in a job, DSA waits indefinitely until the locks are released. When this happens, the object status in the Log tab of the Job Status view displays "LOCKED" to indicate that the object is locked. If this situation, you might want to abort the job and run the object_release command to attempt to release the locks, so that the job can be run when all of the objects can be accessed. 96 Teradata Data Stream Architecture User Guide, Release 14.11 Chapter 4 Troubleshooting Releasing Locked Objects The object_release command releases all objects of a given job that are currently locked. It does not release objects for new, running, or queued jobs. 1 Type dsc object_release followed by the parameters, and press Enter. Parameter Description n|name Name The name of the job on which to perform the action. Must be unique for each job. S|skip_prompt SkipPrompt [Optional] Skips displaying a confirmation message before performing the command action. u|user_authentication User Required when security management is enabled. Supplies the command with the Viewpoint user, and triggers a password prompt for authentication. Teradata Data Stream Architecture User Guide, Release 14.11 97 Chapter 4 Troubleshooting 98 Teradata Data Stream Architecture User Guide, Release 14.11 APPENDIX A Administrative Tasks Protecting the DSC Repository The DSC repository stores all DSA data, including configuration definitions and settings, job definitions, job status, and job history. Therefore it is critical to protect the data in the DSC repository. Without the DSC repository, no Teradata database backup data sets can be restored. The DSC repository should be backed up every day after all of the daily Teradata database backup jobs have completed. The DSC backup data set must also be included in the disaster recovery and data protection policies of the organization. This includes any vaulting or offsite storage of backup datasets. Perform the following steps to protect the DSC repository. 1 Configure a target group for your DSC repository backup and schedule a DSC repository backup. 2 Type dsc export_config -t SYSTEM -n dscnode_Repository_name -f repository_config_system.xml on the DSC server. Note: Keep repository_config_system.xml in a safe, known location to be used in case of a disaster. 3 Type dsc export_repository_backup_config -f export_repository_backup_config.xml . Note: Keep export_repository_backup_config.xml in a safe, known location to be imported back into DSC in case of a disaster. 4 Run a DSC repository backup. Recovering the DSC Repository Prerequisite: • A valid DSC repository backup job data set must exist before a DSC restore job can be run. • The corresponding repository_config_system.xml file for the DSC repository data set must be present. • The corresponding export_repository_backup_config.xml file for the DSC repository data set must be present. The run_repository_job command allows you to restore the DSC repository. Teradata Data Stream Architecture User Guide, Release 14.11 99 Appendix A Administrative Tasks Note: If you have lost the BAR database but still have the BARBACKUP database, go directly to the run_repository_job step to restore the repository. 1 If your DSC repository is lost, run the following commands in BTEQ to drop the BAR and BARBACKUP databases: delete database BAR; drop database BAR; delete database BARBACKUP; drop database BARBACKUP; 2 Type java -jar dscisntallapp.jar create_repository in the directory where DSC is installed, install path/dsa/dsc, to recreate the DSC repository. 3 Restart all DSA services to re-establish connection to the DSC repository. 4 Type dsc import_repository_backup_config -f export_repository_backup_config.xml , in the directory where DSA is installed install path/dsa, to import the initial DSC repository configurations. Note: The export_repository_backup_config.xml file was created after exporting your initial DSC repository configuration. 5 If SSL is not enabled for this system, perform the following. If SSL is enabled for the system, skip to the next step. a Copy the saved repository_config_system.xml file that was exported from the DSC server. b Type dsc config_systems -f repository_config_system.xml c Type dsc enable_component -n dsc_repository_system_name -t SYSTEM d Type dsc enable_component -n dsc_repository_target_group_name -t TARGET_GROUP e Restart the ClientHandler. 6 After SSL is enabled for this system, perform the following in the BAR Setup portlet: a From the CATEGORIES list, click Systems and Nodes and select the repository. b Select the Enable SSL over JMS Communication check box and enter the TrustStore password. c Click Apply and enter the credentials when prompted. d Restart DSMain on the DSC repository system as indicated in the warning message. e After DSMain has restarted, click Enable in the BAR Setup portlet. f From the CATEGORIES list, click Media Servers, select the media server used for repository backup, and click Enable. This activates the media server in the background. 7 Type dsc recover_backup_metadata -n repository_target_group to recover save set information and recreate the backup job. 100 Teradata Data Stream Architecture User Guide, Release 14.11 Appendix A Administrative Tasks 8 Type dsc list_recover_backup_metadata -n repository_target_group and verify that the overall status is COMPLETED. When the overall status if completed, you can proceed to the next step. 9 Type dsc run_repository_job followed by the parameters, and press Enter. Parameters Description t|type Type Enter restore to restore the DSC repository. v|backup_version BackupVersion [Optional] Backup version number. Enter latest or 0 for the latest save set. n|name Name [Optional] Enter the name of the target group for the restore. If not specified, will restore to default target group set in target group configuration xml file. Job Migration to a Different DSA Environment You can migrate tapes pointing to a specific backup job in one DSA environment to a different DSA environment. The Administrator user can export backup job metadata (job definition, save sets, and targets) in XML format using the export_job_metadata command. The exported backup job metadata files together with the tapes can then be sent to the site where the other DSA environment is located. Users can then use the import_job_metadata command on the DSA command line to create the same job and associated targets and save sets using the exported backup job metadata XML. The import of job metadata is handled by the other DSA environment in the following order: 1. Virtual systems, media servers, NetBackup servers, and targets are saved into the DSC Repository. 2. The job definition is saved into the DSC repository. 3. Job save sets are saved into the DSC repository. After the job metadata has been successfully imported using the command import_job_metadata, the config_target_group_map command should be used to map the exported virtual targets to one of the physical targets in the new DSA environment. The new backup job that was imported can be used to create a restore job using the mapped target. The save set metadata on tape of the migrated backup job can also be validated using the command validate_job_metadata. You can generate a job plan that uses multiple task-sets based on the streams soft limits set on the source and target. For best performance, use one-to-one mappings from the tapes or disk storage through the new target groups and streams passing the data to the AMPs. You can temporarily modify the streams soft limits and target groups to match on the source and target system. Restoring to a Different DSA Environment The backup job must have been completed successfully in the original DSA configuration in order to be restored to a different DSA environment. In addition, the save sets on the NetBackup side must not have been expired. Teradata Data Stream Architecture User Guide, Release 14.11 101 Appendix A Administrative Tasks When restoring to a different DSA environment, dscuser must be the same in the new DSA environment as in the original DSA environment because the new DSA environment requires the same permissions to access the files created by the original DSA. When the export_job_metadata or import_job_metadata command is running, no other operations or commands can be executed at the same time. In addition, export_job_metadata and import_job_metadata cannot be run if an operational job or repository job is already running. 1 In the original DSA configuration, create a backup job. 2 In the original DSA configuration, run the backup job. 3 In the original DSA configuration, export the backup job definition and associated targets and save sets. 4 Migrate the exported metadata files and tapes to the new DSA location. 5 In the new DSA environment, import the targets and components. 6 Configure your DSA environment with physical systems, media servers, NetBackup servers, and target groups if they are not already present. 7 In the new DSA environment, map the old target group configuration to a physical target group using the -V option. 8 Validate the metadata against the NetBackup data. 9 Verify that the system and target group for the restore job is enabled. 10 Create a restore job based on the migrated backup job. Exporting Job Metadata To migrate a job to another DSA environment, you must first export the job metadata (job definition, targets, and save sets). The data must be exported in the following order: 1. Targets 2. Job definition 3. Save sets 1 Type dsc export_job_metadata followed by the parameters, and press Enter. Parameters Description n|name Name The name of the job on which to perform the action. The job must be active. d|directory DirectoryPath [Optional] Directory where the files are exported to or imported from. v|backup_version BackupVersion 102 [Optional] Backup version number. Enter latest or 0 for the latest save set. Defaults to the latest if no version is entered. Teradata Data Stream Architecture User Guide, Release 14.11 Appendix A Administrative Tasks Parameters Description t|type Type [Optional] The type of job metadata. You may enter JOB (for the job definition), SAVESET, or TARGET. If nothing is specified, all three types of metadata are included. Importing Job Metadata Importing the metadata of a backup job (job definition, targets, and save sets) enables you to restore it in a different DSA environment. The data must be imported in the following order: 1. Targets 2. Job definition 3. Save sets 1 Type dsc import_job_metadata followed by the parameters, and press Enter. Parameters Description n|name Name The name of the job on which to perform the action. The job must be active. d|directory DirectoryPath [Optional] Directory where the files are exported to or imported from. v|backup_version BackupVersion [Optional] Backup version number. Enter latest or 0 for the latest save set. Defaults to the latest if no version is entered. t|type Type [Optional] The type of job metadata. You may enter JOB (for the job definition), SAVESET, or TARGET. If nothing is specified, all three types of metadata are included. Validating Job Metadata Job metadata imported to a new DSA environment should be validated against the original exported metadata before you attempt to restore the job. 1 Type dsc validate_job_metadata followed by the parameters, and press Enter. Parameters Description n|name Name The name of the job on which to perform the action. The job must be active. v|backup_version BackupVersion [Optional] Backup version number. Enter latest or 0 for the latest save set. Defaults to the latest if no version is entered. V [Optional] Indicates that this is a virtual target group. d|destination SampDest Required if -V is specified. It indicates the physical target group to which the virtual target group is mapped. Teradata Data Stream Architecture User Guide, Release 14.11 103 Appendix A Administrative Tasks Restarting DSMain You must restart DSMain after setting the following system options in the BAR Setup portlet: • System Selector changing the system selector requires DSMain restart • SSL Communication enabling SSL communication requires DSMain restart 1 In the Database Window, open the Supvr window. Note: For instructions on starting the Database Window, see the Database Window (xdbw) chapter in the appropriate Utilities volume. 2 Type start bardsmain –s to stop DSMain. 3 Type start bardsmain to start DSMain. 104 Teradata Data Stream Architecture User Guide, Release 14.11 APPENDIX B Rules for Restoring and Copying Objects Selective Backup and Restore Rules This appendix lists individual object types, whether they can be restored or copied, and under what conditions. When performing a selective backup and restore on a table or database, observe the following rules in order for the operation to be successful. • Methods and UDTs are stored in SYSUDTLIB; SYSUDTLIB is only backed up or restored as part of a DBC backup. • While an operation may be allowed, there is no guarantee the object will function as desired once the operation is complete. Type Restore Same Database Copy Same Database Copy and Rename Same Database Copy Different Database Copy and Rename Different Database DB Level Object Level DB Level Object Level DB Level Object Level DB Level Object Level DB Level Object Level Aggregate Function Yes Yes Yes Yes Yes No Yes Yes Yes No JAR Yes Yes Yes Yes Yes No Yes Yes Yes No External Stored Procedures Yes Yes Yes Yes Yes No Yes Yes Yes No Standard Function Yes Yes Yes Yes Yes No Yes Yes Yes No Trigger Yes Yes No No No No No No No No Instant or Constructor Method N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A Join Index Yes Yes Yes Yes No No Yes Yes No No Macro Yes Yes Yes Yes Yes No Yes Yes Yes No Hash Index Yes Yes Yes Yes No No Yes Yes No No Stored Procedure Yes Yes Yes Yes Yes No Yes Yes Yes No Queue Table Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Table Function Yes Yes Yes Yes Yes No Yes Yes Yes No Table Function (Operator) Yes Yes Yes Yes Yes No Yes Yes Yes No Table Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes PPI Table Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes NOPI Table Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes User-Defined Data Type (UDT) N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A View Yes Yes Yes Yes Yes No Yes Yes Yes No Authorization Yes Yes Yes Yes Yes No Yes Yes Yes No Parser Contract Function Yes Yes Yes Yes Yes No Yes Yes Yes No System Join Index (1) Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Teradata Data Stream Architecture User Guide, Release 14.11 105 Appendix B Rules for Restoring and Copying Objects Type Restore Same Database Copy Same Database Copy and Rename Same Database Copy Different Database Copy and Rename Different Database DB Level DB Level DB Level DB Level DB Level Object Level Object Level Object Level Object Level Object Level (1) System Join Indexes (SJIs) can be copied to a different database and the DB name can be changed but the object name cannot be changed. 106 Teradata Data Stream Architecture User Guide, Release 14.11 APPENDIX C XML Values Values for XML Elements Many DSA commands read an XML file that specifies setup information or job details by specifying values for XML elements. The following table indicates accepted values, case sensitivity, and character number restrictions for XML element values. These are in accordance with typical XML standards for Teradata Database. XML Element Requirements bar_media_server policy_class_name saveset_accountid saveset_password saveset_user system_name source_media target_entity target_group_name target_media target_name target_tdpid Maximum of 32 characters. media_server_name netbackup_media_server Maximum of 32 characters, alphanumeric and "-", "_" auto_retire Accepted values: true, false. Must be entered in lowercase letters. barnc_logging_level Accepted values: Error, Info, Debug, Warning. Must be entered in lowercase letters. block_level_compression Accepted values: DEFAULT, ON, OFF. Must be entered in uppercase letters. database_query_method Accepted values: BASE_VIEW, EXTENDED_VIEW. Must be entered in uppercase letters. data_phase Accepted values: DATA, DICTIONARY. Must be entered in uppercase letters. disable_fallback Accepted values: true, false. Must be entered in lowercase letters. dsc_logging_level Accepted values: Error, Info, Debug, Warning. dsmain_logging_level Accepted values: Error, Info, Debug, Warning. Teradata Data Stream Architecture User Guide, Release 14.11 107 Appendix C XML Values 108 XML Element Requirements enable_temperature_override Accepted values: true, false. Must be entered in lowercase letters. frequency_units Accepted values: DAYS, WEEKS. Must be entered in uppercase letters. frequency_value Value must be between 1-999. Defaults to 7. ip_address Maximum of characters 64, alphanumeric plus ".", ":" is_delete_after Accepted values: Y/N. Must be entered as an uppercase letter. is_enabled Accepted values: true, false. Must be entered in lowercase letters. is_encrypted Accepted values: Y/N. Must be entered as an uppercase letter. is_repository_backup Accepted values: true, false. Must be entered in lowercase letters. job_description Maximum of 256 characters job_name Maximum of 128 characters job_type Accepted values: BACKUP, RESTORE, ANALYZE_VALIDATE, ANALYZE_READ. Must be entered in uppercase letters. job_owner Maximum of 64 characters netmask Maximum of 64 characters, alphanumeric plus ".", ":" nosync Accepted values: true, false. Must be entered in lowercase letters. nowait Accepted values: true, false. Must be entered in lowercase letters. object_name Maximum of 128 characters object_type Must be entered in uppercase letters. Accepted values are: AGGREGATE_FUNCTION, AUTHORIZATION, COMBINED_AGGREGATE_FUNCTIONS, CONTRACT_FUNCTION, DATABASE, EXTERNAL_PROCEDURE, GLOP_SET, HASH_INDEX, INSTANCE_OR_CONSTRUCTOR_METHOD, JAR, JOIN_INDEX, JOURNAL, MACRO, NO_PI_TABLE, ORDERED_ANALYTICAL_FUNCTION, QUEUE_TABLE, STANDARD_FUNCTION, STATISTICAL_FUNCTION, STORED_PROCEDURE, TABLE, TABLE_FUNCTION, TABLE_OPERATOR, TRIGGER, USER, USER_DEFINED_METHOD, USER_DEFINED_DATA_TYPE, VIEW online Accepted values: true, false. Must be entered in lowercase letters. parent_name Maximum of 128 characters parent_type Accepted values: DATABASE, USER. Must be entered in uppercase letters. policy_class_name Maximum of 128 characters, alphanumeric and "-", "_" port Maximum of 5 digits. Must be between 1 and 65535 query_band Maximum of 2,048 characters Teradata Data Stream Architecture User Guide, Release 14.11 Appendix C XML Values XML Element Requirements storage_devices Maximum of 3 characters, numeric range between 1-999 third_party_server_name Maximum of 30 characters, alphanumeric and "-", "_" reset_node_limit Accepted values: true, false. Must be entered in lowercase letters. retire_units Accepted values: DAYS, WEEKS. Must be entered in uppercase letters. run_as_copy Accepted values: true, false. Must be entered in lowercase letters. start_am_pm Accepted values: AM, PM. Must be entered in uppercase letters. start_time Maximum of 5 characters. Values must be between 1:00 and 12:00 (AM and PM are entered in the start_am_pm element ) target_accountid Maximum of 30 characters temperature_override Accepted values: DEFAULT, HOT, WARM, COLD. Must be entered in uppercase letters. third_party_media_type Accepted values: net_backup, tivoli, net_vault. Must be entered in lowercase letters. threshold_units Accepted values: MB, GB Teradata Data Stream Architecture User Guide, Release 14.11 109 Appendix C XML Values 110 Teradata Data Stream Architecture User Guide, Release 14.11 APPENDIX D Teradata DSA Commands About Using DSA Commands This appendix provides a reference for DSA commands. There are two major types of DSA commands: • Configuration commands for configuring systems, servers, target groups, and the DSC repository • Management and reporting commands for creating, executing, updating, and monitoring jobs Use a DSA command by typing it in the command line, and then typing in any necessary parameters. There are complex mappings between BAR components, so the configuration commands must read attributes from an XML file. Configuration commands must specify the XML file name and location. Some of the management and reporting commands also accept XML files in which you can specify additional attributes that cannot be entered as parameters in the command line. The section for each command in this appendix provides the command's purpose, syntax, an example of what you might enter, a list of necessary and optional parameters, and a sample XML file, if the command requires one. Note the following conventions for using the command line: • In the Syntax description, the word following a parameter is a placeholder that indicates that you must enter a value for the parameter. For example, where the syntax says Type, you might enter backup to specify a backup job for the job type parameter in the command line. • Unless a parameter is listed as [Optional], you must specify a value for it. For commands that support XML files, you may specify values for parameters in the XML rather than directly in the command line. If you specify different parameter values in both the command line and in the XML, the values in the command line are used. • Every parameter can be typed as a word or as a single character. A vertical bar indicates that you can use either format. For example, n|name means that you can type name or n to enter the name parameter. • Always type a hyphen before each parameter that you enter. For example, after the command name, type -file or -f to specify the file parameter. • The value for the file parameter must specify the filename and location of the input or output XML file. • The Example section shows literal examples of what you might enter at the command line prompt. For example: dsc.sh config_systems -f configSystem.xml Teradata Data Stream Architecture User Guide, Release 14.11 111 Appendix D Teradata DSA Commands • The XML File Example sections show samples of XML input files that certain commands require. Some commands export information as output to an XML file. Output file examples are not shown in this section. abort_job Purpose The abort_job command aborts an actively running job, a job in the queue, or a job that is not responding. Syntax abort_job -n|-name Name [parameters] Examples dsc abort_job -n job1 -S dsc abort_job -B -S Parameters n|name Name The name of the job on which to perform the action. Must be unique for each job. O|override [Optional] Can only be used for backup, restore, and analyze_validate jobs. The job must be in the aborting phase. S|skip_prompt SkipPrompt [Optional] Skips displaying a confirmation message before performing the command action. B|repository_backup Repository Backup [Optional] Aborts any running DSC repository job. The name of the job is not required when this parameter is used. u|user_authentication user Required when security management is enabled. Supplies the command with the Viewpoint user, and triggers a password prompt for authentication. Usage Notes There are two phases to aborting a job: aborting and aborted. The aborting phase releases media devices to the pool. The aborted phase releases node stream limits. 112 Teradata Data Stream Architecture User Guide, Release 14.11 Appendix D Teradata DSA Commands If the abort_job command is given when a job is in the queue to be run, it is removed from the queue. If the job is actively running, a request is sent to abort the job. It can take several minutes for the job to be completely stopped if it is already running. XML File Example This command does not support an XML file. activate_job Purpose The activate_job command activates a retired job, which allows the job to be available. Syntax activate_job -n|-name Name [parameters] Example dsc activate_job -n job1 -S Parameters n|name Name The name of the job on which to perform the action. Must be unique for each job. Example: job1 S|skip_prompt SkipPrompt [Optional] Skips displaying a confirmation message before performing the command action. u|user_authentication User Required when security management is enabled. Supplies the command with the Viewpoint user, and triggers a password prompt for authentication. Usage Notes The activate_job command sets the state of a retired job to active, which allows you to run the job. You cannot activate a job that is already in the active state. XML File Example This command does not support an XML file. Teradata Data Stream Architecture User Guide, Release 14.11 113 Appendix D Teradata DSA Commands config_general Purpose The config_general command configures the general settings, based on the information contained in the parameters XML file. Syntax config_general -f|-file File Example dsc config_general -f configGeneral.xml Parameters f|file File The full file path and file name of the file containing the necessary configuration parameters. Example: configGeneral.xml u|user_authentication User Required when security management is enabled. Supplies the command with the Viewpoint user, and triggers a password prompt for authentication. Usage Notes Use the config_general command to change the default general configuration values. XML File Example The sample XML file below specifies general configuration settings. <?xml version="1.0" encoding="utf-8" ?> <dscConfigGeneral dscVersion="dscVersion1" xmlns="http:// schemas.teradata.com/v2012/DSC"> <!-- 'warning_threshold' - Required, integer value. --> <warning_threshold>10</warning_threshold> <!-- 'threshold_units' - Required, accepted values: MB/GB --> <threshold_units>MB</threshold_units> <!-- 'is_encrypted' - Required, accepted values: Y/N --> <is_encrypted>Y</is_encrypted> <!-- 'dsc_logging_level' - Required, accepted values: Error,Info,Debug,Warning --> <dsc_logging_level>Error</dsc_logging_level> <!-- 'barnc_logging_level' - Required, accepted values: Error,Info,Debug,Warning --> <barnc_logging_level>Error</barnc_logging_level> <!-- 'delete_job_time' - Required, integer value. --> 114 Teradata Data Stream Architecture User Guide, Release 14.11 Appendix D Teradata DSA Commands <delete_job_time>40</delete_job_time> <!-- 'is_delete_after' - Required, accepted values: Y/N --> <is_delete_after>Y</is_delete_after> </dscConfigGeneral> config_media_servers Purpose The config_media_servers command configures the BAR media servers. Syntax config_media_servers -f|-file File Example dsc config_media_servers -f configMediaServers.xml Parameters f|file File The full file path and file name of the file containing the necessary configuration parameters. Example: configMediaServers.xml u|user_authentication User Required when security management is enabled. Supplies the command with the Viewpoint user, and triggers a password prompt for authentication. Usage Notes You must issue this command before creating a target group. The component name can only use the following characters: 'A-Z', 'a-z', '0-9' and '_'. XML File Example The sample XML file below specifies parameters to configure BAR media servers. <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <!-- Copyright (C) 2009 by Teradata Corporation. All Rights Reserved. TERADATA CORPORATION CONFIDENTIAL AND TRADE SECRET --> <dscConfigMediaServers dscVersion="dscVersion1" xmlns="http:// schemas.teradata.com/v2012/DSC" xmlns:xsi="http://www.w3.org/2001/ XMLSchema-instance" xsi:schemaLocation="DSC.xsd"> Teradata Data Stream Architecture User Guide, Release 14.11 115 Appendix D Teradata DSA Commands <!-- Required, max characters 32, alphanumeric plus "-","_" --> <media_server_name>media_server71</media_server_name> <!-- Required, max characters 32, alphanumeric plus "-","_" --> <backup_app_client_name>media_server71</backup_app_client_name> <!-- Required, max characters 5, Value range 1-65535 --> <port>2410</port> <ip_info> <!-- 'ip_address' - Required (at least one) , max characters 64, alphanumeric plus "-", "_", ".", ":" --> <ip_address>111.111.111.111</ip_address> <!-- 'netmask' - Required (at least one), max characters 64, alphanumeric plus "-", "_", ".", ":" --> <netmask>255.255.255.0</netmask> </ip_info> </dscConfigMediaServers> config_nbu Purpose The config_nbu command configures a DSA system to use Symantec NetBackup third-party software to back up and restore data. Syntax config_nbu -f|-file File Example dsc config_nbu -f configNbu.xml Parameters f|file File The full file path and file name of the file containing the necessary configuration parameters. Example: nbu_config.xml u|user_authentication User Required when security management is enabled. Supplies the command with the Viewpoint user, and triggers a password prompt for authentication. Usage Notes The policies you define are case-sensitive and must match the policies defined in NetBackup. The component name can only use the following characters: 'A-Z', 'a-z', '0-9' and '_'. 116 Teradata Data Stream Architecture User Guide, Release 14.11 Appendix D Teradata DSA Commands XML File Example The sample XML file below specifies parameters to configure NetBackup servers. <?xml version="1.0" encoding="UTF-8" ?> <dscConfigNbu xmlns="http://schemas.teradata.com/v2012/DSC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.teradata.com/v2012/DSC DSC.xsd"> <!-- 'third_party_server_name' Required, max characters 30, alphanumeric and "-","_" --> <third_party_server_name>remoteNbu1</third_party_server_name> <!-- 'ip_address' - Required, max characters 50, alphanumeric and "-","_",".",":" --> <ip_address>99.23.23.555</ip_address> <!-- 'third_party_media_type' - Required, accepted values: net_backup, tivoli, net_vault --> <third_party_media_type>net_backup</third_party_media_type> <!-- 'policy_class' - Required (at least one) --> <policy_class> <!-- 'policy_class_name' - Required, max characters 128, alphanumeric and "-","_" --> <policy_class_name>policy711</policy_class_name> <!-- 'storage_devices' - Required, max characters 3, numeric range between 1-999 --> <storage_devices>200</storage_devices> </policy_class> <policy_class> <policy_class_name>policy712</policy_class_name> <storage_devices>100</storage_devices> </policy_class> <policy_class> <policy_class_name>policy713</policy_class_name> <storage_devices>100</storage_devices> </policy_class> <policy_class> <policy_class_name>policy721</policy_class_name> <storage_devices>100</storage_devices> </policy_class> <policy_class> <policy_class_name>policy722</policy_class_name> <storage_devices>100</storage_devices> </policy_class> </dscConfigNbu> config_repository_backup Purpose The config_repository_backup command provides the configuration information to back up the DSC repository. Teradata Data Stream Architecture User Guide, Release 14.11 117 Appendix D Teradata DSA Commands Syntax config_repository_backup -f|-file File Example dsc config_repository_backup -f configRepositoryBackup.xml Parameters f|file File The full file path and file name of the file containing the necessary configuration parameters. Example: configRepositoryBackup.xml u|user_authentication User Required when security management is enabled. Supplies the command with the Viewpoint user, and triggers a password prompt for authentication. Usage Notes The DSC repository contains all BAR information, including configuration and job definitions. It should be backed up regularly to enable system recovery. XML File Example A sample XML file containing configuration and scheduling information for a repository backup is shown below. <dscRepositoryBackup dscVersion="dscVersion1" xmlns="http:// schemas.teradata.com/v2012/DSC"> <!-- 'target_name' - Required, max 32 characters --> <target_name>SampleBackupRepoTargetGroup</target_name> <!-- 'frequency_value' - Required, Value between 1-999, Defaults to 7 --> <frequency_value>7</frequency_value> <!-- 'day_selection' - Required, accepted values: Su, Mo, Tu, We, Th, Fr, Sa --> <day_selection>Sa,Su</day_selection> <!-- 'start_time' - Required, Max characters 5, Values 1:00-12:00 --> <start_time>12:00</start_time> <!-- 'start_am_pm' - Required, accepted values: AM/PM --> <start_am_pm>AM</start_am_pm> </dscRepositoryBackup> 118 Teradata Data Stream Architecture User Guide, Release 14.11 Appendix D Teradata DSA Commands config_systems Purpose The config_systems command configures the DSC settings for the Teradata system and nodes used for backup and restore jobs. The command also sets the selector in the targeted system for ActiveMQ. Syntax config_systems -f|-file File Example dsc config_systems -f configSystem.xml -s system Parameters f|file File The full file path and file name of the file containing the necessary configuration parameters. Example: configSystem.xml s|skip_system_config SkipSystemConfiguration [Optional] Flag indicating whether the systems and node configuration or selector setting is skipped when you run the command. If this option is not specified, then both parts of the configuration (system and selector) are run. Enter one of the following: • system to avoid configuring Teradata systems and nodes • selector to avoid setting the selector in the targeted system for ActiveMQ Note: If you choose the selector option with this parameter, restart Teradata Database using a DSMain restart. u|user_authentication User Required when security management is enabled. Supplies the command with the Viewpoint user, and triggers a password prompt for authentication. Usage Notes Hot standby nodes should be included when configuring a system. The component name can only use the following characters: 'A-Z', 'a-z', '0-9' and '_'. The xml file example below shows some system configuration attributes. System configuration is subject to the restrictions and requirements listed below. Setting reset_node_limit to true overwrites node limits with the system's hard and soft limits. Soft and hard limits for insertion of new nodes: Teradata Data Stream Architecture User Guide, Release 14.11 119 Appendix D Teradata DSA Commands • If node limits are specified, they are used. • If node limits are not specified, the system limits are used. • The soft limits cannot be greater than the hard limits. Soft and hard limits when updating existing nodes: • If the node limit is specified, the node limit is used. • If a node limit is not specified and the system limit = system limit in database, the node limit is used. • If a node limit is not specified and system limit is not the same as system limit in database, system limit is used. IP addresses can be changed whether or not nodes are in use. If IP addresses are not entered and IP addresses for the node exists in the repository, there will be no change, and nothing will be deleted. IP addresses need to be unique. There are two validations: • IP addresses in pass-in nodes need to be unique. • If the IP address has been used by a different node in the repository, is in the list of pass-in nodes, and has a new IP address, it is valid. If the node is not in the list of pass-in nodes and the request comes from a portlet, it is rejected as the same IP address cannot be used for multiple nodes. If the request comes from the command line, it is valid, as the node in the repository is deleted. XML File Example A representative XML file containing system configuration information is shown below. <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <!-Copyright (C) 2009 by Teradata Corporation. All Rights Reserved. TERADATA CORPORATION CONFIDENTIAL AND TRADE SECRET --> <dscConfigSystems xmlns="http://schemas.teradata.com/v2012/DSC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="DSC.xsd"> <system> <!-- 'system_name' - Required, max 32 characters --> <system_name>system7</system_name> <!-- 'tdpid' - Required (unless skipped by option)--> <tdpid>system7</tdpid> <!-- 'database_query_method' - Required, accepted values: BASE_VIEW/EXTENDED_VIEW required --> <database_query_method>BASE_VIEW</database_query_method> <!-- 'streams_softlimit' - Required, number of streams per node per job --> <streams_softlimit>20</streams_softlimit> <!-- 'streams_hardlimit' - Required, max number of streams per node--> 120 Teradata Data Stream Architecture User Guide, Release 14.11 Appendix D Teradata DSA Commands <streams_hardlimit>20</streams_hardlimit> <!-- 'reset_node_limit' - Optional, accepted values: true/ false --> <reset_node_limit>false</reset_node_limit> <!-- 'node', Required (at least one) --> <node> <!-- 'node_name', Required --> <node_name>system7Node1</node_name> <!-- 'ip_address' - Required (at least one)--> <ip_address>229.0.0.1</ip_address> <ip_address>99.23.106.11</ip_address> <!-- 'streams_softlimit' - Optional, number of streams per node for each job --> <streams_softlimit>20</streams_softlimit> <!-- 'streams_hardlimit' - Optional, max number of streams per node --> <streams_hardlimit>20</streams_hardlimit> </node> <node> <node_name>system7Node2</node_name> <ip_address>99.23.110.12</ip_address> <ip_address>229.0.0.2</ip_address> <streams_softlimit>20</streams_softlimit> <streams_hardlimit>20</streams_hardlimit> </node> </system> </dscConfigSystems> config_target_groups Purpose The config_target_groups command configures the target groups based on the target type and the information from the parameters file. Syntax config_target_groups -t|-type Target Type -f|-file File -B|-repository_backup -S|-skip_prompt Example dsc config_target_groups -t target_nbu -f TargetGroupParameters.xml -B -S Teradata Data Stream Architecture User Guide, Release 14.11 121 Appendix D Teradata DSA Commands Parameters t|type Type The target type of the BAR component to add to the target group. This must be target_nbu. Example: target_nbu f|file File The full file path and file name of the file containing the necessary configuration parameters. Example: TargetGroupParameters.xml B|repository_backup Repository Backup [Optional] Marks a target group for repository backup. S|skip_prompt SkipPrompt [Optional] Skips displaying a confirmation message before performing the command action. u|user_authentication User Required when security management is enabled. Supplies the command with the Viewpoint user, and triggers a password prompt for authentication. Usage Notes The component name can only use the following characters: 'A-Z', 'a-z', '0-9' and '_'. XML File Examples A sample XML file with information to configure a remote target group (target_nbu) is shown below. <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <!-- Copyright (C) 2009 by Teradata Corporation. All Rights Reserved. TERADATA CORPORATION CONFIDENTIAL AND TRADE SECRET --> <dscConfigTargetGroupsRemoteMedia dscVersion="dscVersion1" xmlns="http://schemas.teradata.com/v2012/DSC"> <!-- 'target_group_name' - Required, max 32 characters --> <target_group_name>SampleTargetGroup</target_group_name> <!-- 'is_enabled' Optional, accepted values: true/false. Default : false --> <is_enabled>true</is_enabled> <!-- 'is_repository_backup' Optional, accepted values: true/false. Default: false --> <is_repository_backup>true</is_repository_backup> <!-- 'target_entity' - Required, max 32 characters --> <target_entity>nbu52</target_entity> <!-- 'targets' - Required (at least one) --> <targets> <!-- 'bar_media_server' - Required, max 32 characters --> <bar_media_server>SampleMediaServer1</bar_media_server> <!-- 'policy_class' - Required (at least one) --> <policy_class> 122 Teradata Data Stream Architecture User Guide, Release 14.11 Appendix D Teradata DSA Commands <!-- 'policy_class_name' - Required, max 32 characters. Policy must exist on target_entity. --> <policy_class_name>policy75</policy_class_name> <!-- 'devices' - Required --> <devices>1</devices> </policy_class> <policy_class> <policy_class_name>policy76</policy_class_name> <devices>1</devices> </policy_class> </targets> <targets> <bar_media_server>SampleMediaServer2</bar_media_server> <policy_class> <policy_class_name>policy75</policy_class_name> <devices>1</devices> </policy_class> <policy_class> <policy_class_name>policy76</policy_class_name> <devices>1</devices> </policy_class> </targets> </dscConfigTargetGroupsRemoteMedia> config_target_group_map Purpose The config_target_group_map command configures the map between target groups when restoring to a different client configuration. Syntax config_target_group_map -f|-file Name Example dsc config_target_group_map -f target_group_mapping.xml Parameter f|file File The full file path and file name of the file containing the target group mapping parameters target_group_mapping.xml u|user_authentication User Required when security management is enabled. Supplies the command with the Viewpoint user, and triggers a password prompt for authentication. Teradata Data Stream Architecture User Guide, Release 14.11 123 Appendix D Teradata DSA Commands V|virtual [Optional] Indicates this is a mapping from a virtual target group to a physical target group. Usage Notes All backup (source) and restore (destination) sub-targets (media server/policy name pairs) must have a mapping in the XML file in order to succeed. Any changes to either target group using the config_target_groups command could disable the mappings attached to the specific target. If the new target group configuration adds or removes sub-targets, it will disable all mappings associated with the target group. To reenable the mappings, reconfigure that mapping reflecting the target group changes using the config_target_group_map command. XML File Example A representative XML file containing target group mapping is shown below. Note the following: • A master_source_target_name is required • A master_dest_target_name is required • In the list of target_group_maps, at least one is needed • The master_source_dsc_id is optional if mapping between two physical target groups, but required if mapping between a virtual target and a physical target <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <dscConfigTargetGroupMap xmlns="http://schemas.teradata.com/v2012/DSC"> <master_source_target_name>MasterSampSource</ master_source_target_name> <master_source_dsc_id>MasterSrcDscIdSample</ master_source_dsc_id> <master_dest_target_name>MasterSampDest</ master_dest_target_name> <target_group_maps> <source_mediaserver_name>SampSrcMS1</ source_mediaserver_name> <source_policy_class_name>policy1</ source_policy_class_name> <dest_mediaserver_name>SampDestMS1</dest_mediaserver_name> <dest_policy_class_name>policy1</dest_policy_class_name> </target_group_maps> <target_group_maps> <source_mediaserver_name>SampSrcMS1</ source_mediaserver_name> <source_policy_class_name>policy1</ source_policy_class_name> <dest_mediaserver_name>SampDestMS2</dest_mediaserver_name> <dest_policy_class_name>policy2</dest_policy_class_name> </target_group_maps> <target_group_maps> <source_mediaserver_name>SampSrcMS2</ 124 Teradata Data Stream Architecture User Guide, Release 14.11 Appendix D Teradata DSA Commands source_mediaserver_name> <source_policy_class_name>policy2</ source_policy_class_name> <dest_mediaserver_name>SampDestMS2</dest_mediaserver_name> <dest_policy_class_name>policy2</dest_policy_class_name> </target_group_maps> <target_group_maps> <source_mediaserver_name>SampSrcMS3</ source_mediaserver_name> <source_policy_class_name>policy3</ source_policy_class_name> <dest_mediaserver_name>SampDestMS1</dest_mediaserver_name> <dest_policy_class_name>policy1</dest_policy_class_name> </target_group_maps> <target_group_maps> <source_mediaserver_name>SampSrcMS4</ source_mediaserver_name> <source_policy_class_name>policy4</ source_policy_class_name> <dest_mediaserver_name>SampDestMS1</dest_mediaserver_name> <dest_policy_class_name>policy1</dest_policy_class_name> </target_group_maps> <target_group_maps> <source_mediaserver_name>SampSrcMS4</ source_mediaserver_name> <source_policy_class_name>policy4</ source_policy_class_name> <dest_mediaserver_name>SampDestMS2</dest_mediaserver_name> <dest_policy_class_name>policy2</dest_policy_class_name> </target_group_maps> </dscConfigTargetGroupMap> create_job Purpose The create_job command creates a job based on the values you specify for parameters in the command line or in the XML file. Parameter values you enter in the command line supersede any value you enter for those parameters in the parameters XML file. Syntax create_job [ -file File | parameters] Example dsc create_job -n job1 -f parameters.xml Teradata Data Stream Architecture User Guide, Release 14.11 125 Appendix D Teradata DSA Commands Parameters n|name Name The name of the job on which to perform the action. Must be unique for each job. Example: job1 f|file File The full file path and file name of the file containing the necessary parameters to create the job. If the same parameters are provided both in the file and on the command line, Teradata DSA uses the values specified in the command line. Example: parameters.xml d|description Description [Optional] A meaningful description of the job. To allow a multi-word description, add '\"' before and after the description string. Example: \"backup web apps\" t|type Type The type of job. Enter one of the following: • backup • restore • analyze_read • analyze_validate Example: restore o|owner Owner [Optional] The owner of the job. Job ownership is used to determine the appropriate privileges given to DSA users. Example: user1 b|backup_name BackupName [Optional] An existing backup job name. For restore, analyze_read, and analyze_validate jobs only. Example: backupWeb1 u|user_authentication User Required when security management is enabled. Supplies the command with the Viewpoint user, and triggers a password prompt for authentication. v|backup_version BackupVersion [Optional] Backup version number. For restore, analyze_read, and analyze_validate jobs only. Enter latest or 0 for the latest save set. Example: 2 Usage Notes To get the backup version of a save set, use the list_save_sets command. 126 Teradata Data Stream Architecture User Guide, Release 14.11 Appendix D Teradata DSA Commands XML File Examples The sample XML file below specifies job parameters for a remote backup job. <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <!-Copyright (C) 2009 by Teradata Corporation. All Rights Reserved. TERADATA CORPORATION CONFIDENTIAL AND TRADE SECRET --> <dscCreateJob xmlns="http://schemas.teradata.com/v2012/DSC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="DSC.xsd"> <!-Optional --> <job_instance> <!-- 'job_name' - Required, max 128 characters.--> <!-- Note: Can be omitted in xml to be specified via command line. --> <job_name>SampleRemoteBackup1</job_name> <!-- 'job_description' - Required, max 256 characters. --> <!-- Note: Can be omitted in xml to be specified via command line. --> <job_description>This is a sample remote backup job.</ job_description> <!-- 'job_type' - Required, accepted values: BACKUP,RESTORE,ANALYZE_VALIDATE,ANALYZE_READ --> <!-- Note: Can be omitted in xml to be specified via command line. --> <job_type>BACKUP</job_type> <!-- 'job_owner' - Required, max 64 characters --> <!-- Note: Can be omitted in xml to be specified via command line. --> <job_owner>admin</job_owner> <!-- 'auto_retire' - Optional, accepted values: true/false --> <auto_retire>true</auto_retire> <!-- 'retire_value' - Required (if auto_retire is true) --> <retire_value>15</retire_value> <!-- 'retire_units' - Required (if auto_retire is true), accepted values: DAYS,WEEKS --> <retire_units>DAYS</retire_units> <!-- 'objectlist' - Required for BACKUP/RESOTRE/ ANALYZE_VALIDATE/DATAMOVER/DATAMOVERDIRECT --> <!-- Note: 'objectlist' is NOT permitted for ANALYZE_READ jobs --> <objectlist> <objectinfo> <!-- 'object_name' - Required, max 128 characters --> Teradata Data Stream Architecture User Guide, Release 14.11 127 Appendix D Teradata DSA Commands <object_name>BAR1</object_name> <!-- 'object_type' - Required, accepted values: AGGREGATE_FUNCTION, AUTHORIZATION, COMBINED_AGGREGATE_FUNCTIONS, DATABASE, EXTERNAL_PROCEDURE, GLOP_SET, HASH_INDEX, INSTANCE_OR_CONSTRUCTOR_METHOD, JAR, JOIN_INDEX, JOURNAL, MACRO, NO_PI_TABLE, ORDERED_ANALYTICAL_FUNCTION, QUEUE_TABLE, STANDARD_FUNCTION, STATISTICAL_FUNCTION, STORED_PROCEDURE, TABLE, TABLE_FUNCTION, TRIGGER, USER, USER_DEFINED_METHOD, USER_DEFINED_DATA_TYPE, VIEW --> <object_type>VIEW</object_type> <!-- 'parent_name' - Optional, max 128 characters --> <parent_name>DBC</parent_name> <!-- 'parent_type' - Optional, accepted values: DATABASE/USER --> <parent_type>DATABASE</parent_type> </objectinfo> <objectinfo> <object_name>BAR</object_name> <object_type>DATABASE</object_type> <!-- 'exclude' - Optional --> <exclude> <excludeobjectinfo> <object_name>T1</object_name> <object_type>TABLE</object_type> </excludeobjectinfo> <excludeobjectinfo> <object_name>T2</object_name> <object_type>TABLE</object_type> </excludeobjectinfo> </exclude> </objectinfo> <objectinfo> <object_name>BAR2</object_name> <object_type>VIEW</object_type> <parent_name>DBC</parent_name> <parent_type>DATABASE</parent_type> </objectinfo> </objectlist> </job_instance> <!-- 'source_tdpid' - Required, max 32 characters --> <source_tdpid>system1</source_tdpid> <!-- 'source_accountid' - Optional, max 30 characters --> <source_accountid>acctid</source_accountid> <!-- 'target_media' - Required, max 32 characters --> <target_media>remote1_nbu</target_media> 128 Teradata Data Stream Architecture User Guide, Release 14.11 Appendix D Teradata DSA Commands <!-- 'job_options' - Required --> <job_options> <!-- 'online'- Optional, accepted values: true/false --> <online>false</online> <!-- 'nosync' - Optional, accepted values: true/false --> <nosync>false</nosync> <!-- 'data_phase' - Required, DATA,DICTIONARY --> <data_phase>DATA</data_phase> accepted values: <!-- 'enable_temperature_override' - Optional, accepted values: true/false --> <enable_temperature_override>false</ enable_temperature_override> <!-- 'query_band' - Optional, max 2048 characters --> <query_band>queryBandTest</query_band> <!-- 'dsmain_logging_level' - Optional, accepted values: Error,Info,Debug,Warning --> <dsmain_logging_level>Error</dsmain_logging_level> <!-'nowait' - Optional, accepted values: true/false --> <nowait>true</nowait> </job_options> </dscCreateJob> The sample XML file below specifies job parameters for a remote restore job. <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <!Copyright (C) 2009 by Teradata Corporation. All Rights Reserved. TERADATA CORPORATION CONFIDENTIAL AND TRADE SECRET --> <dscCreateJob xmlns="http://schemas.teradata.com/v2012/DSC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="DSC.xsd"> <!-Optional --> <job_instance> <!-- 'job_name' - Required, max 128 characters.--> <!-- Note: Can be omitted in xml to be specified via command line. --> <job_name>SampleRemoteRestore1</job_name> <!-- 'job_description' - Required, max 256 characters. --> <!-- Note: Can be omitted in xml to be specified via command line. --> <job_description>This is a sample remote restore job.</ job_description> <!-- 'job_type' - Required, accepted values: BACKUP,RESTORE,ANALYZE_VALIDATE,ANALYZE_READ --> <!-- Note: Can be omitted in xml to be specified via command Teradata Data Stream Architecture User Guide, Release 14.11 129 Appendix D Teradata DSA Commands line. --> <job_type>RESTORE</job_type> <!-- 'job_owner' - Required, max 64 characters --> <!-- Note: Can be omitted in xml to be specified via command line. --> <job_owner>admin</job_owner> <!-- 'auto_retire' - Optional, accepted values: true/false --> <auto_retire>true</auto_retire> <!-- 'retire_value' - Required (if auto_retire is true) --> <retire_value>15</retire_value> <!-- 'retire_units' - Required (if auto_retire is true), accepted values: DAYS,WEEKS --> <retire_units>DAYS</retire_units> <!-- 'objectlist' - Required for BACKUP/RESOTRE/ ANALYZE_VALIDATE/DATAMOVER/DATAMOVERDIRECT --> <!-- Note: 'objectlist' is NOT permitted for ANALYZE_READ jobs --> <objectlist> <objectinfo> <!-- 'object_name' - Required, max 128 characters --> <object_name>BAR1</object_name> <!-- 'object_type' - Required, accepted values: AGGREGATE_FUNCTION, AUTHORIZATION, COMBINED_AGGREGATE_FUNCTIONS, DATABASE, EXTERNAL_PROCEDURE, GLOP_SET, HASH_INDEX, INSTANCE_OR_CONSTRUCTOR_METHOD, JAR, JOIN_INDEX, JOURNAL, MACRO, NO_PI_TABLE, ORDERED_ANALYTICAL_FUNCTION, QUEUE_TABLE, STANDARD_FUNCTION, STATISTICAL_FUNCTION, STORED_PROCEDURE, TABLE, TABLE_FUNCTION, TRIGGER, USER, USER_DEFINED_METHOD, USER_DEFINED_DATA_TYPE, VIEW --> <object_type>VIEW</object_type> <!-- 'parent_name' - Optional, max 128 characters --> <parent_name>DBC</parent_name> <!-- 'parent_type' - Optional, accepted values: DATABASE/USER --> <parent_type>DATABASE</parent_type> </objectinfo> <objectinfo> <object_name>BAR</object_name> <object_type>DATABASE</object_type> <!-- 'exclude' - Optional --> <exclude> <excludeobjectinfo> <object_name>T1</object_name> <object_type>TABLE</object_type> 130 Teradata Data Stream Architecture User Guide, Release 14.11 Appendix D Teradata DSA Commands </excludeobjectinfo> <excludeobjectinfo> <object_name>T2</object_name> <object_type>TABLE</object_type> </excludeobjectinfo> </exclude> </objectinfo> <objectinfo> <object_name>BAR2</object_name> <object_type>VIEW</object_type> <parent_name>DBC</parent_name> <parent_type>DATABASE</parent_type> <!-- 'object_attribute_list' Optional --> <object_attribute_list> <!-- 'map_to' - Optional, max 128 characters --> <map_to>DBC2</map_to> <!-- 'rename_to' - Optional, max 128 characters --> <rename_to>BAR2</rename_to> </object_attribute_list> </objectinfo> </objectlist> <!-- 'backup_name' - Required for RESTORE,ANALYZE_READ,ANALYZE_VALIDATE jobs. --> <backup_name>SampleRemoteBackup1</backup_name> <!-- 'backup_version' - Required for RESTORE,ANALYZE_READ,ANALYZE_VALIDATE jobs. --> <!-- Note: Value = '0' the latest save set from backup. Value > 0 is an existing save set.--> <backup_version>0</backup_version> </job_instance> <!-- 'source_media' - Required, max 32 characters --> <source_media>remote1_nbu</source_media> <!-- 'target_tdpid' - Required, max 32 characters --> <target_tdpid>system1</target_tdpid> <!-- 'target_accountid' - Optional, max 30 characters --> <target_accountid>acctid</target_accountid> <!-- 'job_options' - Required --> <job_options> <!-- 'data_phase' - Required, DATA,DICTIONARY --> <data_phase>DATA</data_phase> accepted values: <!-- 'enable_temperature_override' - Optional, accepted values: true/false --> <enable_temperature_override>false</ enable_temperature_override> Teradata Data Stream Architecture User Guide, Release 14.11 131 Appendix D Teradata DSA Commands <!-- 'temperature_override' - Optional, accepted values: DEFAULT,HOT,WARM,COLD --> <temperature_override>DEFAULT</temperature_override> <!-- 'block_level_compression' - Optional, accepted values: DEFAULT,ON,OFF --> <block_level_compression>DEFAULT</block_level_compression> <!-- 'disable_fallback' - Optional, accepted values: true/ false --> <disable_fallback>false</disable_fallback> <!-- 'query_band' - Optional, max 2048 characters --> <query_band>queryBandTest</query_band> <!-- 'dsmain_logging_level' - Optional, accepted values: Error,Info,Debug,Warning --> <dsmain_logging_level>Error</dsmain_logging_level> <!-'nowait' - Optional, accepted values: true/false --> <nowait>true</nowait> <!-- 'reblock' - Optional, accepted values: true/false <!-- Note: Only useful for RESTORE jobs.--> <reblock>false</reblock> --> <!-- 'run_as_copy' - Optional, accepted values: true/false --> <!-- Note: Only useful for RESTORE jobs.--> <run_as_copy>false</run_as_copy> <!-- 'savset_user' - Optional, max 32 characters --> <!-- Note: Only for RESTORE and ANALYZE_VALIDATE jobs --> <saveset_user>admin</saveset_user> <!-- 'savset_password' - Optional, max 32 characters --> <!-- Note: Only for RESTORE and ANALYZE_VALIDATE jobs --> <saveset_password>admin</saveset_password> <!-- 'savset_accountid' - Optional, max 30 characters --> <!-- Note: Only for RESTORE and ANALYZE_VALIDATE jobs --> <saveset_accountid>acctid</saveset_accountid> </job_options> </dscCreateJob> delete_component Purpose The delete_component command deletes an existing component based on the information in the parameters. 132 Teradata Data Stream Architecture User Guide, Release 14.11 Appendix D Teradata DSA Commands Syntax dsc delete_component [parameters] Example dsc delete_component -n system1 -t system -S Parameters n|name Name The name of the BAR component. The name must be unique. Example: node1 t|type Type The type of BAR component. Enter one of the following: • system • node • media_server • nbu_server • target_group Example: node s|system System This value must be specified if the component type is a node. Example: system1 S|skip_prompt SkipPrompt [Optional] Skips displaying a confirmation message before performing the command action. u|user_authentication User Required when security management is enabled. Supplies the command with the Viewpoint user, and triggers a password prompt for authentication. Usage Notes You cannot delete any of the following: • A system in use by a job • A media server in use by a target group • A NetBackup server in use by a target group • A target group in use by a job • A target group in use by a target group map • The system marked for repository backup • A policy used by a target group Teradata Data Stream Architecture User Guide, Release 14.11 133 Appendix D Teradata DSA Commands XML File Example This command does not support an XML file. delete_job Purpose The delete_job command deletes a DSA job and any data associated with it from the DSC repository. Any logs and job history are deleted and cannot be restored. Any backup save sets created for the job that exist on devices managed by third-party solutions must be deleted manually using the interface for that solution. Syntax dsc delete_job -n|-name Name Example dsc delete_job -n job1 -S Parameters n|name Name The name of the job on which to perform the action. Must be unique for each job. Example: job1 S|skip_prompt SkipPrompt [Optional] Skips displaying a confirmation message before performing the command action. u|user_authentication User Required when security management is enabled. Supplies the command with the Viewpoint user, and triggers a password prompt for authentication. Usage Notes Generally, to delete a backup job, you must retire it first. There is one exception: you can also delete an active backup job if its status is New. A backup job cannot be deleted if there are restore or analyze jobs associated with it. XML File Example This command does not support an XML file. 134 Teradata Data Stream Architecture User Guide, Release 14.11 Appendix D Teradata DSA Commands delete_target_group_map Purpose The delete_target_group_map command deletes a target group map for restoring to a different client configuration. Syntax delete_target_group_map -s|-source SampSrc -d|-destination SampDest Example dsc delete_target_group_map -s SampSrc -d SampDest Parameters s|source SampSrc The source target group represents the backup target group for mapping. Example: SampSrc d|destination SampDest The destination target group represents the restore target group for mapping. Required if -V is specified. It indicates the physical target group to which the virtual target group is mapped. Example: SampDest u|user_authentication User Required when security management is enabled. Supplies the command with the Viewpoint user, and triggers a password prompt for authentication. XML File Example This command does not support an XML file. disable_component Purpose The disable_component command disables an existing BAR component based on the component name and type. Syntax dsc disable_component -n|-name Name -t|-type Type Teradata Data Stream Architecture User Guide, Release 14.11 135 Appendix D Teradata DSA Commands Example dsc disable_component -n system1 -t system Parameters n|name Name The name of the BAR component. The name must be unique. Example: system1 t|type Type The type of BAR component. Enter system or target_group. Example: SYSTEM u|user_authentication User Required when security management is enabled. Supplies the command with the Viewpoint user, and triggers a password prompt for authentication. Usage Notes You cannot disable a component when it is in use. XML File Example This command does not support an XML file. enable_component Purpose The enable_component command enables an existing BAR component based on the component name and type. Syntax enable_component -n|-name Name -t|-type Type Example dsc enable_component -n system1 -t system Parameters n|name Name The name of the BAR component. The name must be unique. Example: system1 136 Teradata Data Stream Architecture User Guide, Release 14.11 Appendix D Teradata DSA Commands t|type Type The type of BAR component. Enter system or target_group. Example: SYSTEM u|user_authentication User Required when security management is enabled. Supplies the command with the Viewpoint user, and triggers a password prompt for authentication. Usage Notes You must enable a system or target group before running a job that uses it. XML File Example This command does not support an XML file. export_config Purpose The export_config command exports the current XML definition for the requested BAR component. Syntax export_config -n|-name Name -t|-type Type -f|-file File Examples export_config -n component1 -t system -f System1Config.xml export_config -t general -f GeneralConfig.xml Parameters n|name Name The name of the component you want to export. You do not need to enter a name if the value of the Type parameter is general. Example: component1 t|type Type The type of component or repository backup you want to export. Enter one of the following: • system • media_server • nbu_server Teradata Data Stream Architecture User Guide, Release 14.11 137 Appendix D Teradata DSA Commands • target_groups • general Example: system f|file File The full file path and file name of the file to which to write the XML definition. Example: System1Config.xml Usage Notes This command can be used with the configuration commands to update a BAR configuration. XML File Example This command does not require an XML file as input. You must supply a file name and location to which the XML file results are exported as output. export_job Purpose The export_job command exports the current XML definition for the requested job. Syntax export_job -n|-name Name -f|-file File Example export_job -n job1 -f job1Definition.xml Parameters n|name Name The name of the job on which to perform the action. Must be unique for each job. Example: job1 f|file File The full file path and file name of the file to which to write the XML definition. Example: job1Definition.xml 138 Teradata Data Stream Architecture User Guide, Release 14.11 Appendix D Teradata DSA Commands Usage Notes The XML file that is exported by using this command can be used in the update_job command to create a job. XML File Example This command does not require an XML file as input. You must supply a file name and location to which the XML file results are exported as output. export_job_metadata Purpose The export_job_metadata command exports metadata of a job (job definition, save sets, and targets) based on the requested backup version. In the case of a disaster to the DSC repository, exporting job metadata enables the job to be migrated and restored to a different DSA environment. The data must be exported in the following order: 1. Targets 2. Job definition 3. Save sets Syntax export_job_metadata -n|-name Name -d|-directory DirectoryPath -v|-backup_version BackupVersion -t|-type Type -u|-user_authentication User Example dsc export_job_metadata -n job1 -v latest Parameters n|name Name The name of the job on which to perform the action. Must be unique for each job. Example: job1 d|directory DirectoryPath [Optional] Directory where the files are exported to or imported from. Example: var/opt/dsa v|backup_version BackupVersion [Optional] Backup version number. Enter latest or 0 for the latest save set. Defaults to the latest if no version is entered. Teradata Data Stream Architecture User Guide, Release 14.11 139 Appendix D Teradata DSA Commands Example: latest t|type Type [Optional] The type of job metadata. You may enter JOB (for the job definition), SAVESET, or TARGET. If nothing is specified, all three types of metadata are included. Example: JOB u|user_authentication User Required when security management is enabled. Supplies the command with the Viewpoint user, and triggers a password prompt for authentication. Usage Notes When the export_job_metadata or import_job_metadata command is running, no other operations or commands can be executed at the same time. In addition, export_job_metadata and import_job_metadata cannot be run if an operational job or repository job is already running. XML File Example This command does not support an XML file. export_repository_backup_config Purpose The export_repository_backup_config command exports all configurations associated with setting up a repository backup job. This includes the system, NetBackup, media servers, and target group associated with the target selected in config_repository_backup. The resulting repository configuration file should be used if the DSC repository needs to be restored from a disaster recovery. Syntax export_repository_backup_config -f|-file File Example export_repository_backup_config -f ConfigRepositoryBackup.xml Parameters f|file File The full file path and file name of the file to which to write the XML definition. Example: configRepositoryBackup.xml 140 Teradata Data Stream Architecture User Guide, Release 14.11 Appendix D Teradata DSA Commands Usage Notes It is recommended that you run this command after configuring the backup repository and after any updates to the repository. XML File Example This command does not require an XML file as input. You must supply a file name and location to which the XML file results are exported as output. export_target_group_map Purpose The export_target_group_map command exports a map between target groups for restoring to a different client configuration. Syntax export_target_group_map -s|-source SampSrc -d|-destination SampDest -f|-file Name Example dsc export_target_group_map -s SampSrc -d SampDest -f TargetGroupMap.xml Parameters s|source SampSrc The source target group represents the backup target group for mapping. Example: SampSrc d|destination SampDest The destination target group represents the restore target group for mapping. Required if -V is specified. It indicates the physical target group to which the virtual target group is mapped. Example: SampDest f|file File The full file path and file name of the file to which to write the XML definition. TargetGroupMap.xml V|virtual [Optional] Indicates this is a mapping from a virtual target group to a physical target group. Teradata Data Stream Architecture User Guide, Release 14.11 141 Appendix D Teradata DSA Commands I | dsc_id SampleDscId [Optional] The name or dscId of the source DSC environment. Required if -V is specified. XML File Example This command does not require an XML file as input. You must supply a file name and location to which the XML file results are exported as output. import_job_metadata Purpose The import_job_metadata command imports metadata of a job (job definition, save sets, and targets) to the specified directory. In the case of a disaster to the DSC repository, exporting and them importing job metadata enables the job to be restored to a different DSA environment. The data must be imported in the following order: 1. Targets 2. Job definition 3. Save sets Syntax import_job_metadata -n|-name Name -d|-directory DirectoryPath -v|-backup_version BackupVersion -t|-type Type -u|-user_authentication User Example dsc import_job_metadata -n job1 -v latest Parameters n|name Name The name of the job on which to perform the action. Must be unique for each job. Example: job1 d|directory DirectoryPath [Optional] Directory where the files are exported to or imported from. Example: var/opt/dsa v|backup_version BackupVersion [Optional] Backup version number. Enter latest or 0 for the latest save set. Defaults to the latest if no version is entered. 142 Teradata Data Stream Architecture User Guide, Release 14.11 Appendix D Teradata DSA Commands Example: latest t|type Type [Optional] The type of job metadata. You may enter JOB (for the job definition), SAVESET, or TARGET. If nothing is specified, all three types of metadata are included. Example: JOB u|user_authentication User Required when security management is enabled. Supplies the command with the Viewpoint user, and triggers a password prompt for authentication. Usage Notes When the export_job_metadata or import_job_metadata command is running, no other operations or commands can be executed at the same time. In addition, export_job_metadata and import_job_metadata cannot be run if an operational job or repository job is already running. XML File Example This command does not support an XML file. import_repository_backup_config Purpose The import_repository_backup_config command imports all configurations associated with setting up a repository backup job. This includes system, NetBackup, media servers, and target group configurations. This command is used to recover the DSC backup repository after a disaster. Syntax import_repository_backup_config -f|-file File Example import_repository_backup_config -f ConfigRepositoryBackup.xml Parameters -f|-file File The file to import. This file is created by the export_repository_backup_config command. Example: configRepositoryBackup.xml Teradata Data Stream Architecture User Guide, Release 14.11 143 Appendix D Teradata DSA Commands u|user_authentication User Required when security management is enabled. Supplies the command with the Viewpoint user, and triggers a password prompt for authentication. Usage Notes You must run the export_repository_backup_config command before running the import_repository_backup_config command in order to reference the configurations file that will restore the repository. XML File Example This command imports information from the XML file created from the export_repository_backup_config command. job_status Purpose The job_status command gets the latest status for a job with the given name and displays it on the screen. If the job is running, a detailed status message is displayed. If the job is not running, the status of the last run for that job is displayed. Syntax dsc job_status -n|-name Name -I|-job_execution_id JobExecutionID Example dsc job_status -n job1 -I job1ExecutionId Parameters n|name Name The name of the job on which to perform the action. Must be unique for each job. Example: job1 I|job_execution_id Job Execution ID [Optional] The execution ID for the job. Must be an integer. The ID must match a version number listed in the list_save_sets command output for the same job. Example: 2 B|repository_backup Repository Backup [Optional] Flag to return status on repository backup jobs. 144 Teradata Data Stream Architecture User Guide, Release 14.11 Appendix D Teradata DSA Commands Usage Notes This command displays the latest status for a job in the screen. XML File Example This command does not support an XML file. job_status_log Purpose The job_status_log command displays the latest status log for a job with the given name if the job is running. If the job is not running, the status log for the last run job is displayed. Syntax job_status_log -n|-name Name -I|-job_execution_id JobExecutionID Example dsc job_status_log -n job1 -I 123456 Parameters n|name Name The name of the DSA job for which to display status. Example: job1 I|job_execution_id Job Execution ID [Optional] The execution ID for the job. Must be an integer. The ID must match a version number listed in the list_save_sets command output for the same job. Example: 2 B|repository_backup Repository Backup [Optional] Flag to return status on repository backup jobs. b|bucket BucketNumber [Optional] Select a bucket number to display a grouping of data when there are too many results returned to display at once. The command output notifies the user if there are more buckets of data that can be displayed. XML File Example This command does not support an XML file. Teradata Data Stream Architecture User Guide, Release 14.11 145 Appendix D Teradata DSA Commands list_components Purpose The list_components command lists components defined and stored in the DSC repository. If a specific component is requested, that component definition is displayed. Otherwise, a list of the components matching any provided filters is displayed. Any partial component name returns all components matching the partial input. Note: The Type parameter is required. Syntax list_components -e|-enabled true|false -n|-name Name -s|-system System -t|-type Type Example list_components -e true -n system1 -t system Parameters e|enabled Enabled Filter components based on whether or not they are enabled. This applies only to system and target_group components. Example: true n|name Name The name of the BAR component. The name must be unique. Example: component1 s|system System Filter components based on the associated Teradata system. This applies only to node components. Example: system1 t|type Type The type of BAR component. Enter one of the following: • system • node • media_server • nbu_server • target_group Example: system V|virtual [Optional] Indicates this is a mapping from a virtual target group to a physical target group. 146 Teradata Data Stream Architecture User Guide, Release 14.11 Appendix D Teradata DSA Commands XML File Example This command does not support an XML file. list_general_settings Purpose The list_general_settings command lists all current general settings. Syntax list_general_settings Example dsc list_general_settings Parameters There are no parameters associated with this command. XML File Example This command does not support an XML file. list_job_history Purpose The list_job_history command lists all history of jobs in the DSC repository or by specific job. Parameters n|name Name [Optional] The name of the DSA job to display. Example: job1 b|bucket BucketNumber [Optional] Select a bucket number to display a grouping of data when there are too many results returned to display at once. The command output notifies the user if there are more buckets of data that can be displayed. Teradata Data Stream Architecture User Guide, Release 14.11 147 Appendix D Teradata DSA Commands XML File Example This command does not support an XML file. list_jobs Purpose The list_jobs command lists jobs defined and stored in the DSC repository. If a specific job is requested, that job definition is displayed. Otherwise, a list of job names matching any provided filters is displayed. If no parameters are provided, a list of all jobs is displayed. Syntax list_jobs [optional parameters] Example dsc list_jobs -n job1 Parameters n|name Name [Optional] The name of the job definition to display. Note: If you specify a name, the command processes the name with wildcards at the beginning and end of the name. Specifying job1 might produce a list which include job1, job 111 and backupjob1. Example: job1 o|owner Owner [Optional] The owner of the job. Job ownership is used to determine the appropriate privileges given to DSA users. Example: user s|state State [Optional] Enter active or retired. The default is active. Example: active S|status Status [Optional] The latest status for a job. Enter one of the following: • running • completed_successfully • completed_errors • failed • queued 148 Teradata Data Stream Architecture User Guide, Release 14.11 Appendix D Teradata DSA Commands • aborting • aborted • new • not_responding • warning t|type Type The type of job being viewed. Enter one of the following: • backup • restore • analyze_read • analyze_validate • migrated Example: backup B|repository_backup Repository Backup [Optional] View repository backup jobs. b|bucket BucketNumber [Optional] Select a bucket number to display a grouping of data when there are too many results returned to display at once. The command output notifies the user if there are more buckets of data that can be displayed. XML File Example This command does not support an XML file. list_query_nbu_backupids Purpose The list_query_nbu_backupids command lists the results of the query returned from the query_nbu_backupids command. Syntax list_query_nbu_backupids -n|name -v|backup_version Example dsc query_nbu_backupids -n MyJob -v LATEST Teradata Data Stream Architecture User Guide, Release 14.11 149 Appendix D Teradata DSA Commands Parameters n|name Name The name of the job on which to perform the action. Must be unique for each job. Example: MyJob v|backup_version BackupVersion [Optional] Backup version number. Type LATEST or 0 for latest save set. Defaults to latest if no version is entered. Example: LATEST XML File Example This command does not support an XML file. list_recover_backup_metadata Purpose The list_recover_backup_metadata command lists the overall status and individual media server status of the recover_backup_metadata command. Syntax list_recover_backup_metadata -n|-name Name Example dsc list_recover_backup_metadata -n target_group1 Parameters n|name Name The name of the target group used for backup of the DSC repository. Example: target_group1 XML File Example This command does not support an XML file. 150 Teradata Data Stream Architecture User Guide, Release 14.11 Appendix D Teradata DSA Commands list_repository_backup_settings Purpose The list_repository_backup_settings command lists all current repository backup settings. Syntax list_repository_backup_settings Example dsc list_repository_backup_settings Parameters There are no parameters associated with this command. XML File Example This command does not support an XML file. list_save_sets Purpose The list_save_sets command lists all valid save sets for a given job name. Syntax list_save_sets -n|-name Name -F|-filter Filter -v|backup_version BackupVersion -B| backup_repository Examples dsc list_save_sets -n job1 -F last_week dsc list_save_sets -n targetgroup1 -F last_week -B Parameters n|name Name The name of the job or target group for its save sets. If -B is not specified, name refers to a backup job. If -B is specified, name refers to a target group name. Example: job1 Teradata Data Stream Architecture User Guide, Release 14.11 151 Appendix D Teradata DSA Commands F|filter Filter [Optional] Filter the save sets by the stop_time. Enter one of the following: • last_week • last_month • last_year Example: last_month v|backup_version BackupVersion [Optional] Backup version number. Enter latest or 0 for the latest save set. Defaults to the latest if no version is entered. Example: latest B|repository_backup Repository Backup [Optional] View the backup repository for DSC repository backup save sets. b|bucket BucketNumber [Optional] Select a bucket number to display a grouping of data when there are too many results returned to display at once. The command output notifies the user if there are more buckets of data that can be displayed. Usage Notes If the -B parameter is specified and no save sets are available, the command builds a job plan from data or metadata files, if they exist. XML File Example This command does not support an XML file. list_target_group_map Purpose The list_target_group_map command lists the maps between target groups for restoring to a different client configuration. Syntax list_target_group_map -s|-source SampSrc -d|-destination SampDest Example dsc list_target_group_map -s SampSrc -d SampDest 152 Teradata Data Stream Architecture User Guide, Release 14.11 Appendix D Teradata DSA Commands Parameters The parameters are optional. However, if you specify one of the parameters, you must also specify the other parameter. s|source SampSrc The source target group represents the backup target group for mapping. Example: SampSrc d|destination SampDest The destination target group represents the restore target group for mapping. Required if -V is specified. It indicates the physical target group to which the virtual target group is mapped. Example: SampDest V|virtual [Optional] Indicates this is a mapping from a virtual target group to a physical target group. XML File Example This command does not support an XML file. list_validate_job_metadata Purpose Syntax list_validate_job_metadata -n|-name jobName -v|-backup_version version Example dsc list_validate_job_metadata -n job1 -v latest Parameters n|name Name The name of the job on which to perform the action. Must be unique for each job. Example: job1 v|backup_version BackupVersion [Optional] Backup version number. Enter latest or 0 for the latest save set. Defaults to the latest if no version is entered. Example: latest Teradata Data Stream Architecture User Guide, Release 14.11 153 Appendix D Teradata DSA Commands XML File Example This command does not support an XML file. object_release Purpose The object_release command releases all objects of a given job that are currently locked. It does not release objects for new, running, or queued jobs. Syntax object_release -n|-name Name -S|-skip_prompt Example dsc object_release -n job1 -S Parameters n|name Name The name of the job on which to perform the action. Must be unique for each job. Example: job1 S|skip_prompt SkipPrompt [Optional] Skips displaying a confirmation message before performing the command action. u|user_authentication User Required when security management is enabled. Supplies the command with the Viewpoint user, and triggers a password prompt for authentication. Usage Notes This command does not apply to analyze and analyze_read jobs. XML File Example This command does not support an XML file. 154 Teradata Data Stream Architecture User Guide, Release 14.11 Appendix D Teradata DSA Commands object_release_status Purpose The object_release_status command lists the current status of objects requested to be released. Syntax object_release_status -n|-name Name Example dsc object_release_status -n job1 Parameters n|name Name The name of the job on which to perform the action. Must be unique for each job. Example: job1 Usage Notes Use this command to check the status of the object_release command. XML File Example This command does not support an XML file. query_nbu_backupids Purpose The query_nbu_backupids command queries NetBackup for information needed for a NetBackup duplicate. Syntax query_nbu_backupids -n|name -v|backup_version Example dsc query_nbu_backupids -n MyJob -v LATEST Teradata Data Stream Architecture User Guide, Release 14.11 155 Appendix D Teradata DSA Commands Parameters n|name Name The name of the job on which to perform the action. Must be unique for each job. Example: MyJob v|backup_version BackupVersion [Optional] Backup version number. Type LATEST or 0 for latest save set. Defaults to latest if no version is entered. Example: LATEST u|user_authentication User Required when security management is enabled. Supplies the command with the Viewpoint user, and triggers a password prompt for authentication. XML File Example This command does not support an XML file. recover_backup_metadata Purpose The recover_backup_metadata command queries the third party media to recover backup metadata and rebuild the backup job plan in the case of a disaster to the DSC repository. The command can only be run on repository backup jobs with no save sets. Syntax recover_backup_metadata -n|-name Name Example dsc recover_backup_metadata -n target_group1 Parameters n|name Name The name of the target group used for backup of the DSC repository. Example: target_group1 u|user_authentication User Required when security management is enabled. Supplies the command with the Viewpoint user, and triggers a password prompt for authentication. 156 Teradata Data Stream Architecture User Guide, Release 14.11 Appendix D Teradata DSA Commands XML File Example This command does not support an XML file. retire_job Purpose The retire_job command retires an active job. It does not retire a running or queued status job, or one that is already in the retired state. Syntax retire_job -n|-name Name -S|-skip_prompt Example dsc retire_job -n job1 -S Parameters n|name Name The name of the job on which to perform the action. Must be unique for each job. Example: job1 S|skip_prompt SkipPrompt [Optional] Skips displaying a confirmation message before performing the command action. u|user_authentication User Required when security management is enabled. Supplies the command with the Viewpoint user, and triggers a password prompt for authentication. Usage Notes After a job is retired, no status information is returned for the job. The only commands you can use with a retired job are: delete_job, activate_job and list_jobs (with a Retired filter). XML File Example This command does not support an XML file. Teradata Data Stream Architecture User Guide, Release 14.11 157 Appendix D Teradata DSA Commands run_job Purpose The run_job command runs a job as soon as all necessary resources are available. The DSC limits the number of jobs running concurrently, per system, to 20 and queues up to 20 more jobs beyond that limit. The DSC also verifies that the target media defined in the job is available before the job is started. If the target media is not immediately available, the job is queued. Syntax run_job -n|-name JobName -b|backup_type BackupType -p|-preview -f|-file File Example dsc run_job -n job1 -b cumulative -p -f file1.xml Parameters n|name Name The name of the job on which to perform the action. Must be unique for each job. Example: job1 b|backup_type BackupType Enter the type of backup: full, delta, or cumulative Example: delta p|preview Preview [Optional] Generates an XML file which lists the job plan and settings. f|file File [Optional] If you are previewing the job, this is the file path and file name of the output file to save the job plan. Example: job1.xml u|user_authentication User Required when security management is enabled. Supplies the command with the Viewpoint user, and triggers a password prompt for authentication. Usage Notes The run_job command cannot be used successfully for a retired job. XML File Example This command does not require an XML file as input. You must supply a file name and location to which the XML file results are exported as output. 158 Teradata Data Stream Architecture User Guide, Release 14.11 Appendix D Teradata DSA Commands run_ping Purpose The run_ping command lists the component status of all media servers and Teradata systems. Syntax run_ping -t|-type Type -n|-name Name Example dsc run_ping -t system -n system1 Parameter n|name Name [Optional] Name of the system or media server whose status you want to display. You do not need to specify a name. By default, the status of all components will be displayed. Example: user1 t|type Type The type of BAR component whose status you want to display. Enter either system or media_server. Example: system XML File Example This command does not support an XML file. run_repository_job Purpose The run_repository_job command runs a job in the DSC repository. The run_repository_job command can only be initiated if no operational jobs are running. The -v and -n parameters are not supported for backup types of jobs, and are optional parameters for restore and analyze jobs. If -v is not entered, it defaults to the latest successful backup job version. You do not need to specify a target name for restore or analyze jobs; if you do not, the command takes the target name configured in config_repository_backup. Teradata Data Stream Architecture User Guide, Release 14.11 159 Appendix D Teradata DSA Commands Syntax run_repository_job -t|-type Type run_repository_job -v|backup_version run_repository_job -v|backup_version -n|target_name Examples dsc run_repository_job -t backup dsc run_repository_job -t restore -v dsc run_repository_job -t restore -v -n target1 Parameters t|type Type Enter backup, restore, analyze_validate, or analyze_read. v|backup_version BackupVersion [Optional] Backup version number. For restore, analyze_read, and analyze_validate jobs only. Enter latest or 0 for the latest save set. Example: 0 n|target_name Target Name [Optional] The target name for the restore or analyze job. If not specified, the restore will be to the default target group set by the config_repository_backup command. Example: target1 u|user_authentication User Required when security management is enabled. Supplies the command with the Viewpoint user, and triggers a password prompt for authentication. Usage Notes This command automatically generates backup, restore, and analyze jobs based on the repository backup target group configuration the user created. XML File Example This command does not support an XML file. 160 Teradata Data Stream Architecture User Guide, Release 14.11 Appendix D Teradata DSA Commands set_status_rate Purpose The set_status_rate command configures the status update rate between DSC and the media servers or Teradata systems. Syntax set_status_rate -n|-name Name -t|-type Type -r|-rate Rate Example dsc set_status_rate -n mediaserver1 -t system -r 15 Parameters n|name Name The name of the database system or media server name. Example: mediaserver1 t|type Type The type of BAR components to update. Enter system or media_server. Example: SYSTEM r|rate Rate The rate of the status refresh in seconds. The default is 30 seconds. The valid range is between 30 and 60 seconds. Example: 45 u|user_authentication User Required when security management is enabled. Supplies the command with the Viewpoint user, and triggers a password prompt for authentication. XML File Example This command does not support an XML file. sync_save_sets Purpose The sync_save_sets command sends a request to all NetBackup clients that contain save sets that are past the dataset.retention.days (configured in dsc.properties) to determine if the save sets have expired on the NetBackup side. If they have expired, DSC removes them from the DSC repository. Teradata Data Stream Architecture User Guide, Release 14.11 161 Appendix D Teradata DSA Commands The sync_save_sets user command is a manual alternative to using the checkretention.cronstring property in dsc.properties to schedule an automatic task. Syntax sync_save_sets -S|skip_prompt Example dsc sync_save_sets -S Parameters S|skip_prompt SkipPrompt [Optional] Skips displaying a confirmation message before performing the command action. u|user_authentication User Required when security management is enabled. Supplies the command with the Viewpoint user, and triggers a password prompt for authentication. Usage Notes Running this command removes information in DSC about save sets that previously existed on the backup application. This includes removing restore and analyze jobs that reference each save set. Restore and analyze jobs that point to an expired save set and are not set to the latest save set are deleted along with the expired save set. If the restore or analyze job points to the expired save set but is set to the latest save set, the restore or analyze job fails to run until the attached backup job is run again and creates a new save set to which the restore or analyze job points. If a save set with dependent save sets is expired, the dependent save sets are invalidated. Invalid save sets are not available for use in creating or editing jobs. Any jobs referencing invalid save sets are rejected at run time. Notice: If the physical media of the backup save set becomes damaged, neither auto check retention job nor the sync_save_sets command should be run until the media is replaced or repaired. If the physical media cannot be repaired, use sync_save_sets to mark the save set so that any run depending on this save set is invalidated. XML File Example This command does not support an XML file. 162 Teradata Data Stream Architecture User Guide, Release 14.11 Appendix D Teradata DSA Commands update_job Purpose The update_job command updates an existing DSA job based on the information from the command line parameters or the parameter file if provided. Parameter values specified in the command line supersede any values entered for those same parameters in the XML file. Syntax update_job -n|-name Name [parameters|File] Example dsc update_job -n job1 -f parameters.xml Parameters n|name Name The name of the job on which to perform the action. Must be unique for each job. Example: job1 d|description Description [Optional] A meaningful description of the job. To allow a multi-word description, add '\"' before and after the description string. Example: \"backup web apps\" t|type Type The type of job. Enter one of the following: • backup • restore • analyze_read • analyze_validate Example: backup o|owner Owner [Optional] The owner of the job. Job ownership is used to determine the appropriate privileges given to DSA users. Example: user b|backup_name BackupName [Optional] An existing backup job name. For restore, analyze_read, and analyze_validate jobs only. Example: backupWeb1 Teradata Data Stream Architecture User Guide, Release 14.11 163 Appendix D Teradata DSA Commands v|backup_version BackupVersion [Optional] Backup version number. For restore, analyze_read, and analyze_validate jobs only. Enter latest or 0 for the latest save set. Example: 60 f|file File The full file path and file name of the file containing the necessary parameters to create the job. If the same parameters are provided both in the file and on the command line, Teradata DSA uses the values specified in the command line. Example: backupjob1.xml u|user_authentication User Required when security management is enabled. Supplies the command with the Viewpoint user, and triggers a password prompt for authentication. Usage Notes You cannot update a retired job. XML File Example This command imports information from the XML file created from the export_job command. validate_job_metadata Purpose The validate_job_metadata command queries NetBackup for information needed to validate the save set. The validate_job_metatdata should be run after a backup job has been successfully imported and the old target group configuration has been mapped to a physical target group. Syntax validate_job_metadata -n|-name -v|-backup_version -V -d|-destination Example dsc validate_job_metadata -n job1 -v latest -V -d SampDest Parameters n|name Name The name of the job on which to perform the action. Must be unique for each job. 164 Teradata Data Stream Architecture User Guide, Release 14.11 Appendix D Teradata DSA Commands Example: job1 v|backup_version BackupVersion [Optional] Backup version number. Enter latest or 0 for the latest save set. Defaults to the latest if no version is entered. Example: latest V|virtual [Optional] Indicates this is a mapping from a virtual target group to a physical target group. d|destination SampDest Required if -V is specified. It indicates the physical target group to which the virtual target group is mapped. Example: SampDest XML File Example This command does not support an XML file. Teradata Data Stream Architecture User Guide, Release 14.11 165 Appendix D Teradata DSA Commands 166 Teradata Data Stream Architecture User Guide, Release 14.11