ibm-information-center/dist/eclipse/plugins/i5OS.ic.sqlp_5.4.0.1/rbafysaverestore.htm

97 lines
6.7 KiB
HTML
Raw Normal View History

2024-04-02 14:02:31 +00:00
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="security" content="public" />
<meta name="Robots" content="index,follow" />
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta name="DC.Type" content="reference" />
<meta name="DC.Title" content="Save/restore" />
<meta name="abstract" content="The i5/OS save/restore functions are used to save tables, views, indexes, journals, journal receivers, sequences, SQL packages, SQL procedures, SQL triggers, user-defined functions, user-defined types, and schemas on disk (save file) or to some external media (tape or diskette)." />
<meta name="description" content="The i5/OS save/restore functions are used to save tables, views, indexes, journals, journal receivers, sequences, SQL packages, SQL procedures, SQL triggers, user-defined functions, user-defined types, and schemas on disk (save file) or to some external media (tape or diskette)." />
<meta name="DC.subject" content="save/restore, data integrity" />
<meta name="keywords" content="save/restore, data integrity" />
<meta name="DC.Relation" scheme="URI" content="rbafydataintex.htm" />
<meta name="copyright" content="(C) Copyright IBM Corporation 1998, 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1998, 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="rbafysaverestore" />
<meta name="DC.Language" content="en-us" />
<!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
<link rel="stylesheet" type="text/css" href="./ic.css" />
<title>Save/restore</title>
</head>
<body id="rbafysaverestore"><a name="rbafysaverestore"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Save/restore</h1>
<div><p>The <span class="keyword">i5/OS™</span> save/restore
functions are used to save tables, views, indexes, journals, journal receivers,
sequences, SQL packages, SQL procedures, SQL triggers, user-defined functions,
user-defined types, and schemas on disk (save file) or to some external media
(tape or diskette).</p>
<div class="section"><p>The saved versions can be restored onto any <span class="keyword">iSeries™</span> system
at some later time. The save/restore function allows an entire collection,
selected objects, or only objects changed since a given date and time to be
saved. All information needed to restore an object to its previous state
is saved. This function can be used to recover from damage to individual tables
by restoring the data with a previous version of the table or the entire collection.</p>
</div>
<div class="section"><p>When a program or service program that was created for an SQL
procedure, an SQL function, or a sourced function is restored, it is automatically
added to the SYSROUTINES and SYSPARMS catalogs, as long as a procedure or
function does not already exist with the same signature and program name.
SQL programs created in QSYS will not be created as SQL procedures when restored.
Additionally, external programs or service programs that were referenced on
a CREATE PROCEDURE or CREATE FUNCTION statement may contain the information
required to register the routine in SYSROUTINES. If the information exists
and the signature is unique, the functions or procedures will also be added
to SYSROUTINES and SYSPARMS when restored.</p>
</div>
<div class="section"><p>When an SQL table is restored, the definitions for the SQL triggers
that are defined for the table are also restored. The SQL trigger definitions
are automatically added to the SYSTRIGGERS, SYSTRIGDEP, SYSTRIGCOL, and SYSTRIGUPD
catalogs. The program object that is created from the SQL CREATE TRIGGER statement
must also be saved and restored when the SQL table is saved and restored.
The saving and restoring of the program object is not automated by the database
manager. The precautions for self-referencing triggers should be reviewed
when restoring SQL tables to a new library. </p>
</div>
<div class="section"><p>When an *SQLUDT object is restored for a user-defined type, the
user-defined type is automatically added to the SYSTYPES catalog. The appropriate
functions needed to cast between the user-defined type and the source type
are also created, as long as the type and functions do not already exist.</p>
</div>
<div class="section"><p>When a *DTAARA for a sequence is restored, the sequence is automatically
added to the SYSSEQUENCES catalog. If the catalog is not successfully updated,
the *DTAARA will be modified so it cannot be used as a sequence and an SQL9020
informational message will be output in the job log.</p>
</div>
<div class="section"><p>Either a distributed SQL program or its associated SQL package
can be saved and restored to any number of systems. This allows any number
of copies of the SQL programs on different systems to access the same SQL
package on the same application server. This also allows a single distributed
SQL program to connect to any number of application servers that have the
SQL package restored (CRTSQLPKG can also be used). SQL packages cannot be
restored to a different library.</p>
</div>
<div class="section"> <div class="note"><span class="notetitle">Note:</span> Restoring a schema to an existing library or to a schema that
has a different name does not restore the journal, journal receivers, or IDDU
dictionary (if one exists). If the schema is restored to a schema with a different
name, the catalog views in that schema will only reflect objects in the old
schema. The catalog views in QSYS2, however, will appropriately reflect all
objects.</div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbafydataintex.htm" title="Data integrity protects data from being destroyed or changed by unauthorized persons, system operation or hardware failures (such as physical damage to a disk), programming errors, interruptions before a job is completed (such as a power failure), or interference from running applications at the same time (such as serialization problems).">Data integrity</a></div>
</div>
</div>
</body>
</html>