Book Image

Teradata Cookbook

By : Abhinav Khandelwal, Viswanath Kasi, Rajsekhar Bhamidipati
Book Image

Teradata Cookbook

By: Abhinav Khandelwal, Viswanath Kasi, Rajsekhar Bhamidipati

Overview of this book

Teradata is an enterprise software company that develops and sells its eponymous relational database management system (RDBMS), which is considered to be a leading data warehousing solutions and provides data management solutions for analytics. This book will help you get all the practical information you need for the creation and implementation of your data warehousing solution using Teradata. The book begins with recipes on quickly setting up a development environment so you can work with different types of data structuring and manipulation function. You will tackle all problems related to efficient querying, stored procedure searching, and navigation techniques. Additionally, you’ll master various administrative tasks such as user and security management, workload management, high availability, performance tuning, and monitoring. This book is designed to take you through the best practices of performing the real daily tasks of a Teradata DBA, and will help you tackle any problem you might encounter in the process.
Table of Contents (19 chapters)
Title Page
Dedication
Packt Upsell
Contributors
Preface
Index

Archiving databases


To provide security and data integrity, Teradata Database provides the backup and archive facility. The backup and recovery of data is very critical in case of system crush, which leads to data corruption, or when developers want to rebuild a table with new columns or definitions. Backup and recovery comes to the rescue in many cases.

The ARCHIVE command allows you to back up objects in a database to media (tape). The following diagram shows the syntax for ARCHIVE command:

Teradata ARC orange book

In this recipe, we will back up one of the databases along with all the object in that database.

Getting ready

You need to be connected to the Teradata arcmain utility. To archive the database, the user must be granted the ARCHIVE and SELECT privileges on the database to be archived. This can be checked in the following code:

/*GRANT Archive to archive role*/
GRANT RESTORE, DUMP ON DATABASENAME TO ARCH_ROLE;
GRANT ARCH_ROLE to ARCH01

How to do it...

  1. Connect to the Teradata arcmain utility...