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

509 lines
19 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="data access indication, SQL statements" />
<title>SQL statement data access indication in routines</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="accind"></a>
<h2 id="accind"><a href="rbafzmst02.htm#ToC_1488">SQL statement data access indication in routines</a></h2><a id="idx3396" name="idx3396"></a><a id="idx3397" name="idx3397"></a>
<p>The following table indicates whether or not an SQL statement (specified
in the first column) is allowed to execute in a function or procedure with
the specified SQL data access indication. If an executable SQL statement
is encountered in a function or procedure defined with NO SQL, SQLSTATE 38001
is returned. For other executions contexts, SQL statements that are not supported
in any context return SQLSTATE 38003. For other SQL statements not allowed
in a CONTAINS SQL context, SQLSTATE 38004 is returned and in a READS SQL DATA
context, SQLSTATE 38002 is returned. During creation of an SQL function or
SQL procedure, a statement that does not match the SQL data access indication
will cause SQLSTATE 42895 to be returned.</p>
<a name="wq1927"></a>
<table id="wq1927" width="100%" summary="" border="1" frame="hsides" rules="rows">
<caption>Table 83. SQL Statement and SQL Data Access Indication</caption>
<thead valign="bottom">
<tr>
<th id="wq1928" width="33%" align="left">SQL Statement</th>
<th id="wq1929" width="16%" align="center">NO SQL</th>
<th id="wq1930" width="16%" align="center">CONTAINS SQL</th>
<th id="wq1931" width="16%" align="center">READS SQL DATA</th>
<th id="wq1932" width="16%" align="center">MODIFIES SQL DATA</th>
</tr>
</thead>
<tbody valign="top">
<tr>
<td headers="wq1928">ALLOCATE DESCRIPTOR</td>
<td align="center" headers="wq1929">&nbsp;</td>
<td align="center" headers="wq1930">&nbsp;</td>
<td align="center" headers="wq1931">Y</td>
<td align="center" headers="wq1932">Y</td>
</tr>
<tr>
<td headers="wq1928">ALTER ...</td>
<td align="center" headers="wq1929">&nbsp;</td>
<td align="center" headers="wq1930">&nbsp;</td>
<td align="center" headers="wq1931">&nbsp;</td>
<td align="center" headers="wq1932">Y</td>
</tr>
<tr>
<td headers="wq1928">BEGIN DECLARE SECTION</td>
<td align="center" headers="wq1929">Y<sup>1</sup></td>
<td align="center" headers="wq1930">Y</td>
<td align="center" headers="wq1931">Y</td>
<td align="center" headers="wq1932">Y</td>
</tr>
<tr>
<td headers="wq1928">CALL</td>
<td align="center" headers="wq1929">&nbsp;</td>
<td align="center" headers="wq1930">Y</td>
<td align="center" headers="wq1931">Y</td>
<td align="center" headers="wq1932">Y</td>
</tr>
<tr>
<td headers="wq1928">CLOSE</td>
<td align="center" headers="wq1929">&nbsp;</td>
<td align="center" headers="wq1930">&nbsp;</td>
<td align="center" headers="wq1931">Y</td>
<td align="center" headers="wq1932">Y</td>
</tr>
<tr>
<td headers="wq1928">COMMENT</td>
<td align="center" headers="wq1929">&nbsp;</td>
<td align="center" headers="wq1930">&nbsp;</td>
<td align="center" headers="wq1931">&nbsp;</td>
<td align="center" headers="wq1932">Y</td>
</tr>
<tr>
<td headers="wq1928">COMMIT<sup>3</sup></td>
<td align="center" headers="wq1929">&nbsp;</td>
<td align="center" headers="wq1930">Y</td>
<td align="center" headers="wq1931">Y</td>
<td align="center" headers="wq1932">Y</td>
</tr>
<tr>
<td headers="wq1928">CONNECT (Type 1 and Type 2)<sup>3</sup></td>
<td align="center" headers="wq1929">&nbsp;</td>
<td align="center" headers="wq1930">&nbsp;</td>
<td align="center" headers="wq1931">&nbsp;</td>
<td align="center" headers="wq1932">&nbsp;</td>
</tr>
<tr>
<td headers="wq1928">CREATE ...</td>
<td align="center" headers="wq1929">&nbsp;</td>
<td align="center" headers="wq1930">&nbsp;</td>
<td align="center" headers="wq1931">&nbsp;</td>
<td align="center" headers="wq1932">Y</td>
</tr>
<tr>
<td headers="wq1928">DEALLOCATE DESCRIPTOR</td>
<td align="center" headers="wq1929">&nbsp;</td>
<td align="center" headers="wq1930">&nbsp;</td>
<td align="center" headers="wq1931">Y</td>
<td align="center" headers="wq1932">Y</td>
</tr>
<tr>
<td headers="wq1928">DECLARE CURSOR</td>
<td align="center" headers="wq1929">Y<sup>1</sup></td>
<td align="center" headers="wq1930">Y</td>
<td align="center" headers="wq1931">Y</td>
<td align="center" headers="wq1932">Y</td>
</tr>
<tr>
<td headers="wq1928">DECLARE GLOBAL TEMPORARY TABLE</td>
<td align="center" headers="wq1929">&nbsp;</td>
<td align="center" headers="wq1930">&nbsp;</td>
<td align="center" headers="wq1931">&nbsp;</td>
<td align="center" headers="wq1932">Y</td>
</tr>
<tr>
<td headers="wq1928">DECLARE PROCEDURE</td>
<td align="center" headers="wq1929">Y<sup>1</sup></td>
<td align="center" headers="wq1930">Y</td>
<td align="center" headers="wq1931">Y</td>
<td align="center" headers="wq1932">Y</td>
</tr>
<tr>
<td headers="wq1928">DECLARE STATEMENT</td>
<td align="center" headers="wq1929">Y<sup>1</sup></td>
<td align="center" headers="wq1930">Y</td>
<td align="center" headers="wq1931">Y</td>
<td align="center" headers="wq1932">Y</td>
</tr>
<tr>
<td headers="wq1928">DECLARE VARIABLE</td>
<td align="center" headers="wq1929">Y<sup>1</sup></td>
<td align="center" headers="wq1930">Y</td>
<td align="center" headers="wq1931">Y</td>
<td align="center" headers="wq1932">Y</td>
</tr>
<tr>
<td headers="wq1928">DELETE</td>
<td align="center" headers="wq1929">&nbsp;</td>
<td align="center" headers="wq1930">&nbsp;</td>
<td align="center" headers="wq1931">&nbsp;</td>
<td align="center" headers="wq1932">Y</td>
</tr>
<tr>
<td headers="wq1928">DESCRIBE</td>
<td align="center" headers="wq1929">&nbsp;</td>
<td align="center" headers="wq1930">&nbsp;</td>
<td align="center" headers="wq1931">Y</td>
<td align="center" headers="wq1932">Y</td>
</tr>
<tr>
<td headers="wq1928">DESCRIBE INPUT</td>
<td align="center" headers="wq1929">&nbsp;</td>
<td align="center" headers="wq1930">&nbsp;</td>
<td align="center" headers="wq1931">Y</td>
<td align="center" headers="wq1932">Y</td>
</tr>
<tr>
<td headers="wq1928">DESCRIBE TABLE</td>
<td align="center" headers="wq1929">&nbsp;</td>
<td align="center" headers="wq1930">&nbsp;</td>
<td align="center" headers="wq1931">Y</td>
<td align="center" headers="wq1932">Y</td>
</tr>
<tr>
<td headers="wq1928">DISCONNECT<sup>3</sup></td>
<td align="center" headers="wq1929">&nbsp;</td>
<td align="center" headers="wq1930">&nbsp;</td>
<td align="center" headers="wq1931">&nbsp;</td>
<td align="center" headers="wq1932">&nbsp;</td>
</tr>
<tr>
<td headers="wq1928">DROP ...</td>
<td align="center" headers="wq1929">&nbsp;</td>
<td align="center" headers="wq1930">&nbsp;</td>
<td align="center" headers="wq1931">&nbsp;</td>
<td align="center" headers="wq1932">Y</td>
</tr>
<tr>
<td headers="wq1928">END DECLARE SECTION</td>
<td align="center" headers="wq1929">Y<sup>1</sup></td>
<td align="center" headers="wq1930">Y</td>
<td align="center" headers="wq1931">Y</td>
<td align="center" headers="wq1932">Y</td>
</tr>
<tr>
<td headers="wq1928">EXECUTE</td>
<td align="center" headers="wq1929">&nbsp;</td>
<td align="center" headers="wq1930">Y<sup>2</sup></td>
<td align="center" headers="wq1931">Y<sup>2</sup></td>
<td align="center" headers="wq1932">Y</td>
</tr>
<tr>
<td headers="wq1928">EXECUTE IMMEDIATE</td>
<td align="center" headers="wq1929">&nbsp;</td>
<td align="center" headers="wq1930">Y<sup>2</sup></td>
<td align="center" headers="wq1931">Y<sup>2</sup></td>
<td align="center" headers="wq1932">Y</td>
</tr>
<tr>
<td headers="wq1928">FETCH</td>
<td align="center" headers="wq1929">&nbsp;</td>
<td align="center" headers="wq1930">&nbsp;</td>
<td align="center" headers="wq1931">Y</td>
<td align="center" headers="wq1932">Y</td>
</tr>
<tr>
<td headers="wq1928">FREE LOCATOR</td>
<td align="center" headers="wq1929">&nbsp;</td>
<td align="center" headers="wq1930">Y</td>
<td align="center" headers="wq1931">Y</td>
<td align="center" headers="wq1932">Y</td>
</tr>
<tr>
<td headers="wq1928">GET DESCRIPTOR</td>
<td align="center" headers="wq1929">&nbsp;</td>
<td align="center" headers="wq1930">&nbsp;</td>
<td align="center" headers="wq1931">Y</td>
<td align="center" headers="wq1932">Y</td>
</tr>
<tr>
<td headers="wq1928">GET DIAGNOSTICS</td>
<td align="center" headers="wq1929">&nbsp;</td>
<td align="center" headers="wq1930">Y</td>
<td align="center" headers="wq1931">Y</td>
<td align="center" headers="wq1932">Y</td>
</tr>
<tr>
<td headers="wq1928">GRANT ...</td>
<td align="center" headers="wq1929">&nbsp;</td>
<td align="center" headers="wq1930">&nbsp;</td>
<td align="center" headers="wq1931">&nbsp;</td>
<td align="center" headers="wq1932">Y</td>
</tr>
<tr>
<td headers="wq1928">HOLD LOCATOR</td>
<td align="center" headers="wq1929">&nbsp;</td>
<td align="center" headers="wq1930">Y</td>
<td align="center" headers="wq1931">Y</td>
<td align="center" headers="wq1932">Y</td>
</tr>
<tr>
<td headers="wq1928">INCLUDE</td>
<td align="center" headers="wq1929">Y<sup>1</sup></td>
<td align="center" headers="wq1930">Y</td>
<td align="center" headers="wq1931">Y</td>
<td align="center" headers="wq1932">Y</td>
</tr>
<tr>
<td headers="wq1928">INSERT</td>
<td align="center" headers="wq1929">&nbsp;</td>
<td align="center" headers="wq1930">&nbsp;</td>
<td align="center" headers="wq1931">&nbsp;</td>
<td align="center" headers="wq1932">Y</td>
</tr>
<tr>
<td headers="wq1928">LABEL</td>
<td align="center" headers="wq1929">&nbsp;</td>
<td align="center" headers="wq1930">&nbsp;</td>
<td align="center" headers="wq1931">&nbsp;</td>
<td align="center" headers="wq1932">Y</td>
</tr>
<tr>
<td headers="wq1928">LOCK TABLE</td>
<td align="center" headers="wq1929">&nbsp;</td>
<td align="center" headers="wq1930">Y</td>
<td align="center" headers="wq1931">Y</td>
<td align="center" headers="wq1932">Y</td>
</tr>
<tr>
<td headers="wq1928">OPEN</td>
<td align="center" headers="wq1929">&nbsp;</td>
<td align="center" headers="wq1930">&nbsp;</td>
<td align="center" headers="wq1931">Y</td>
<td align="center" headers="wq1932">Y</td>
</tr>
<tr>
<td headers="wq1928">PREPARE</td>
<td align="center" headers="wq1929">&nbsp;</td>
<td align="center" headers="wq1930">Y</td>
<td align="center" headers="wq1931">Y</td>
<td align="center" headers="wq1932">Y</td>
</tr>
<tr>
<td headers="wq1928">REFRESH TABLE</td>
<td align="center" headers="wq1929">&nbsp;</td>
<td align="center" headers="wq1930">&nbsp;</td>
<td align="center" headers="wq1931">&nbsp;</td>
<td align="center" headers="wq1932">Y</td>
</tr>
<tr>
<td headers="wq1928">RELEASE CONNECTION<sup>3</sup></td>
<td align="center" headers="wq1929">&nbsp;</td>
<td align="center" headers="wq1930">&nbsp;</td>
<td align="center" headers="wq1931">&nbsp;</td>
<td align="center" headers="wq1932">&nbsp;</td>
</tr>
<tr>
<td headers="wq1928">RELEASE SAVEPOINT</td>
<td align="center" headers="wq1929">&nbsp;</td>
<td align="center" headers="wq1930">&nbsp;</td>
<td align="center" headers="wq1931">&nbsp;</td>
<td align="center" headers="wq1932">Y</td>
</tr>
<tr>
<td headers="wq1928">RENAME</td>
<td align="center" headers="wq1929">&nbsp;</td>
<td align="center" headers="wq1930">&nbsp;</td>
<td align="center" headers="wq1931">&nbsp;</td>
<td align="center" headers="wq1932">Y</td>
</tr>
<tr>
<td headers="wq1928">REVOKE ...</td>
<td align="center" headers="wq1929">&nbsp;</td>
<td align="center" headers="wq1930">&nbsp;</td>
<td align="center" headers="wq1931">&nbsp;</td>
<td align="center" headers="wq1932">Y</td>
</tr>
<tr>
<td headers="wq1928">ROLLBACK<sup>3</sup></td>
<td align="center" headers="wq1929">&nbsp;</td>
<td align="center" headers="wq1930">Y</td>
<td align="center" headers="wq1931">Y</td>
<td align="center" headers="wq1932">Y</td>
</tr>
<tr>
<td headers="wq1928">ROLLBACK TO SAVEPOINT</td>
<td align="center" headers="wq1929">&nbsp;</td>
<td align="center" headers="wq1930">&nbsp;</td>
<td align="center" headers="wq1931">&nbsp;</td>
<td align="center" headers="wq1932">Y</td>
</tr>
<tr>
<td headers="wq1928">SAVEPOINT</td>
<td align="center" headers="wq1929">&nbsp;</td>
<td align="center" headers="wq1930">&nbsp;</td>
<td align="center" headers="wq1931">&nbsp;</td>
<td align="center" headers="wq1932">Y</td>
</tr>
<tr>
<td headers="wq1928">SELECT INTO</td>
<td align="center" headers="wq1929">&nbsp;</td>
<td align="center" headers="wq1930">&nbsp;</td>
<td align="center" headers="wq1931">Y</td>
<td align="center" headers="wq1932">Y</td>
</tr>
<tr>
<td headers="wq1928">SET CONNECTION<sup>3</sup></td>
<td align="center" headers="wq1929">&nbsp;</td>
<td align="center" headers="wq1930">&nbsp;</td>
<td align="center" headers="wq1931">&nbsp;</td>
<td align="center" headers="wq1932">&nbsp;</td>
</tr>
<tr>
<td headers="wq1928">SET SESSION AUTHORIZATION</td>
<td align="center" headers="wq1929">&nbsp;</td>
<td align="center" headers="wq1930">&nbsp;</td>
<td align="center" headers="wq1931">Y</td>
<td align="center" headers="wq1932">Y</td>
</tr>
<tr>
<td headers="wq1928">SET CURRENT DEBUG MODE</td>
<td align="center" headers="wq1929">&nbsp;</td>
<td align="center" headers="wq1930">&nbsp;</td>
<td align="center" headers="wq1931">Y</td>
<td align="center" headers="wq1932">Y</td>
</tr>
<tr>
<td headers="wq1928">SET CURRENT DEGREE</td>
<td align="center" headers="wq1929">&nbsp;</td>
<td align="center" headers="wq1930">&nbsp;</td>
<td align="center" headers="wq1931">Y</td>
<td align="center" headers="wq1932">Y</td>
</tr>
<tr>
<td headers="wq1928">SET DESCRIPTOR</td>
<td align="center" headers="wq1929">&nbsp;</td>
<td align="center" headers="wq1930">&nbsp;</td>
<td align="center" headers="wq1931">Y</td>
<td align="center" headers="wq1932">Y</td>
</tr>
<tr>
<td headers="wq1928">SET ENCRYPTION PASSWORD</td>
<td align="center" headers="wq1929">&nbsp;</td>
<td align="center" headers="wq1930">Y</td>
<td align="center" headers="wq1931">Y</td>
<td align="center" headers="wq1932">Y</td>
</tr>
<tr>
<td headers="wq1928">SET OPTION</td>
<td align="center" headers="wq1929">Y<sup>1</sup></td>
<td align="center" headers="wq1930">Y</td>
<td align="center" headers="wq1931">Y</td>
<td align="center" headers="wq1932">Y</td>
</tr>
<tr>
<td headers="wq1928">SET PATH</td>
<td align="center" headers="wq1929">&nbsp;</td>
<td align="center" headers="wq1930">Y</td>
<td align="center" headers="wq1931">Y</td>
<td align="center" headers="wq1932">Y</td>
</tr>
<tr>
<td headers="wq1928">SET RESULT SETS</td>
<td align="center" headers="wq1929">&nbsp;</td>
<td align="center" headers="wq1930">Y</td>
<td align="center" headers="wq1931">Y</td>
<td align="center" headers="wq1932">Y</td>
</tr>
<tr>
<td headers="wq1928">SET SCHEMA</td>
<td align="center" headers="wq1929">&nbsp;</td>
<td align="center" headers="wq1930">&nbsp;</td>
<td align="center" headers="wq1931">Y</td>
<td align="center" headers="wq1932">Y</td>
</tr>
<tr>
<td headers="wq1928">SET TRANSACTION</td>
<td align="center" headers="wq1929">&nbsp;</td>
<td align="center" headers="wq1930">Y</td>
<td align="center" headers="wq1931">Y</td>
<td align="center" headers="wq1932">Y</td>
</tr>
<tr>
<td headers="wq1928">SET variable</td>
<td align="center" headers="wq1929">&nbsp;</td>
<td align="center" headers="wq1930">Y</td>
<td align="center" headers="wq1931">Y</td>
<td align="center" headers="wq1932">Y</td>
</tr>
<tr>
<td headers="wq1928">SIGNAL</td>
<td align="center" headers="wq1929">&nbsp;</td>
<td align="center" headers="wq1930">Y</td>
<td align="center" headers="wq1931">Y</td>
<td align="center" headers="wq1932">Y</td>
</tr>
<tr>
<td headers="wq1928">UPDATE</td>
<td align="center" headers="wq1929">&nbsp;</td>
<td align="center" headers="wq1930">&nbsp;</td>
<td align="center" headers="wq1931">&nbsp;</td>
<td align="center" headers="wq1932">Y</td>
</tr>
<tr>
<td headers="wq1928">VALUES</td>
<td align="center" headers="wq1929">&nbsp;</td>
<td align="center" headers="wq1930">&nbsp;</td>
<td align="center" headers="wq1931">&nbsp;</td>
<td align="center" headers="wq1932">&nbsp;</td>
</tr>
<tr>
<td headers="wq1928">VALUES INTO</td>
<td align="center" headers="wq1929">&nbsp;</td>
<td align="center" headers="wq1930">&nbsp;</td>
<td align="center" headers="wq1931">Y</td>
<td align="center" headers="wq1932">Y</td>
</tr>
<tr>
<td headers="wq1928">WHENEVER</td>
<td align="center" headers="wq1929">Y<sup>1</sup></td>
<td align="center" headers="wq1930">Y</td>
<td align="center" headers="wq1931">Y</td>
<td align="center" headers="wq1932">Y</td>
</tr>
</tbody>
</table>
<a name="wq1933"></a>
<div class="notelisttitle" id="wq1933">Notes:</div>
<ol type="1">
<li>Although the NO SQL option implies that no SQL statements can be specified,
non-executable statements are not restricted.</li>
<li>It depends on the statement being executed. The statement specified for
the EXECUTE statement must be a statement that is allowed in the context of
the particular SQL access level in effect. For example, if the SQL access
level in effect is READS SQL DATA, the statement must not be an INSERT, UPDATE,
or DELETE.</li>
<li>Connection management and transaction statements are not allowed in a
procedure running on a remote server. COMMIT and ROLLBACK are not allowed
in an ATOMIC SQL procedure.</li>
</ol>
<hr /><br />
[ <a href="#Top_Of_Page">Top of Page</a> | <a href="rbafzmstactallow.htm">Previous Page</a> | <a href="rbafzmstdiftab2.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>