ibm-information-center/dist/eclipse/plugins/i5OS.ic.db2_5.4.0.1/rbafzmstsetep.htm

136 lines
7.5 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 xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="dc.language" scheme="rfc1766" 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. -->
<meta name="dc.date" scheme="iso8601" content="2005-09-19" />
<meta name="copyright" content="(C) Copyright IBM Corporation 1998, 2006" />
<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="keywords" content="SET ENCRYPTION PASSWORD statement,
SET ENCRYPTION PASSWORD, SQL statements" />
<title>SET ENCRYPTION PASSWORD</title>
<link rel="stylesheet" type="text/css" href="ibmidwb.css" />
<link rel="stylesheet" type="text/css" href="ic.css" />
</head>
<body>
<a id="Top_Of_Page" name="Top_Of_Page"></a><!-- Java sync-link -->
<script language = "Javascript" src = "../rzahg/synch.js" type="text/javascript"></script>
<a name="setep"></a>
<h2 id="setep"><a href="rbafzmst02.htm#ToC_1306">SET ENCRYPTION PASSWORD</a></h2><a id="idx3150" name="idx3150"></a><a id="idx3151" name="idx3151"></a>
<p>The SET ENCRYPTION PASSWORD statement sets the default password and hint
that will be used by the encryption and decryption functions. The password
is not associated with authentication and is only used for data encryption
and decryption.</p>
<a name="wq1759"></a>
<h3 id="wq1759"><a href="rbafzmst02.htm#ToC_1307">Invocation</a></h3>
<p>This statement can be embedded in an application program or issued interactively.
It is an executable statement that can be dynamically prepared.</p>
<a name="wq1760"></a>
<h3 id="wq1760"><a href="rbafzmst02.htm#ToC_1308">Authorization</a></h3>
<p>No authorization is required to execute this statement.</p>
<a name="wq1761"></a>
<h3 id="wq1761"><a href="rbafzmst02.htm#ToC_1309">Syntax</a></h3>
<a href="rbafzmstsetep.htm#synsetep"><img src="c.gif" alt="Click to skip syntax diagram" /></a>
<pre class="cgraphic"><span><img src="c.gif" alt="Read syntax diagram" longdesc="rbafzmstsyn383.htm"
border="0" /></span><a href="#skipsyn-382"><img src="c.gif" alt="Skip visual syntax diagram"
border="0" /></a> .-=-.
>>-SET--ENCRYPTION PASSWORD--+---+------------------------------>
>--+-<span class="italic">password-variable</span>--------+--------------------------------->
'-<span class="italic">password-string-constant</span>-'
>--+--------------------------------------------+-------------->&lt;
| .-=-. |
'-WITH HINT--+---+--+-<span class="italic">hint-variable</span>--------+-'
'-<span class="italic">hint-string-constant</span>-'
</pre>
<a name="skipsyn-382" id="skipsyn-382"></a>
<a name="synsetep"></a>
<h3 id="synsetep"><a href="rbafzmst02.htm#ToC_1310">Description</a></h3>
<dl class="parml">
<dt class="bold"><var class="pv">password-variable</var></dt>
<dd>Specifies a variable that contains an encryption password.
<p>The variable:
</p>
<ul>
<li>Must be a CHAR, VARCHAR, UTF-16 or UCS-2 GRAPHIC, or UTF-16 or UCS-2 VARGRAPHIC
variable. The actual length of the contents of the variable must be between
6 and 127 inclusive or must be an empty string. If an empty string is specified,
the default encryption password is set to no value.</li>
<li>Must not be the null value.</li>
<li>All characters are case-sensitive and are not converted to uppercase characters.</li></ul>
</dd>
<dt class="bold"><var class="pv">password-string-constant</var></dt>
<dd>A character constant. The length of the constant must be between 6 and
127 inclusive or must be an empty string. If an empty string is specified,
the default encryption password is set to no value. The literal form of the
password is not allowed in static SQL or REXX.
</dd>
<dt class="bold">WITH HINT</dt>
<dd>Indicates that a value is specified that will help data owners remember
passwords (for example, 'Ocean' as a hint to remember 'Pacific'). If a hint
value is specified, the hint is used as the default for encryption functions.
The hint can subsequently be retrieved for an encrypted value using the GETHINT
function. If this clause is not specified and a hint is not explicitly specified
on the encryption function, no hint will be embedded in encrypted data result.
<dl class="parml">
<dt class="bold"><var class="pv">hint-variable</var></dt>
<dd>Specifies a variable that contains an encryption password hint.
<p>The variable: </p>
<ul>
<li>Must be a CHAR, VARCHAR, UTF-16 or UCS-2 GRAPHIC, or UTF-16 or UCS-2 VARGRAPHIC
variable. The actual length of the contents of the variable must not be greater
than 32. If an empty string is specified, the default encryption password
hint is set to no value.</li>
<li>Must not be the null value.</li>
<li>All characters are case-sensitive and are not converted to uppercase characters.</li></ul>
</dd>
<dt class="bold"><var class="pv">hint-string-constant</var></dt>
<dd>A character constant. The length of the constant must not be greater
than 32. If an empty string is specified, the default encryption password
hint is set to no value.
</dd>
</dl>
</dd>
</dl>
<a name="wq1762"></a>
<h3 id="wq1762"><a href="rbafzmst02.htm#ToC_1311">Notes</a></h3>
<p><span class="bold">Password protection:</span> To prevent inadvertent access
to the encryption password, do not specify <var class="pv">password-string-constant</var> in
the source for a program, procedure, or function. Instead, use a variable.</p>
<p>When connected to a remote relational database, the specified password
itself is sent "in the clear". That is, the password itself is not encrypted.
To protect the password in these cases, consider using a communications encryption
mechanism such as IPSEC (or SSL if connecting between iSeries&trade; systems).</p>
<p><span class="bold">Transaction considerations:</span> The SET ENCRYPTION PASSWORD
statement is not a commitable operation. ROLLBACK has no effect on the default
encryption password or default encryption password hint.</p>
<p><span class="bold">Initial encryption password value:</span> The initial value
of both the default encryption password and the default encryption password
hint is the empty string ('').</p>
<p><span class="bold">Encryption password scope:</span> The scope of the default
encryption password and default encryption password hint is the activation
group and connection.</p>
<a name="wq1763"></a>
<h3 id="wq1763"><a href="rbafzmst02.htm#ToC_1312">Example</a></h3>
<p>Set the ENCRYPTION PASSWORD to the value in :hv1.</p>
<pre class="xmp"><span class="bold">SET ENCRYPTION PASSWORD</span> :hv1</pre>
<hr /><br />
[ <a href="#Top_Of_Page">Top of Page</a> | <a href="rbafzsetdescr.htm">Previous Page</a> | <a href="rbafzmstsoption.htm">Next Page</a> | <a href="rbafzmst02.htm#wq1">Contents</a> |
<a href="rbafzmstindex.htm#index">Index</a> ]
<a id="Bot_Of_Page" name="Bot_Of_Page"></a>
</body>
</html>