17.10 - Procedure for Backing Up a Package - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL External Routine Programming

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1147-171K
Language
English (United States)

Here is a synopsis of the steps you take to back up a specific version of a package and the associated CREATE/REPLACE statement that installs the package on the server. For a complete example, see Example: Backing Up a Package.

  1. Save the CREATE/REPLACE statement that installs the package on the server in a file.
  2. Start lobteq on your Windows client system.

    The interface and commands are similar to BTEQ.

  3. Log on to the target database.

    Use the same LOGON command that you use in BTEQ. For details on the BTEQ LOGON command, see Basic Teradata® Query Reference, B035-2414.

  4. Use the lobteq .using command to open the package and the file that you created in Step 1 and load them into data buffers for the USING modifier of the next CALL statement.

    The .using command supports the following syntax for opening files:

    .using 'filename'xfile [... 'filename'xfile]

    where filename is the name of the file.

  5. Call the savepkg stored procedure.

    Use a USING modifier with the CALL statement to pass the contents of the two files as LOBs in deferred mode to the server.

  6. Exit lobteq.

The savepkg stored procedure backs up the specific version of your package and its associated CREATE/REPLACE statement in the SYSLIB system tables, which are FALLBACK protected. You can then add the SYSLIB system tables to the list of database tables that you back up as part of your regular archiving activities.