ibm-information-center/dist/eclipse/plugins/i5OS.ic.cli_5.4.0.1/rzadprestrictions.htm

83 lines
5.1 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="concept" />
<meta name="DC.Title" content="Restrictions for running DB2 UDB CLI in server mode" />
<meta name="DC.subject" content="server mode, restrictions" />
<meta name="keywords" content="server mode, restrictions" />
<meta name="DC.Relation" scheme="URI" content="rzadpsqlapd.htm" />
<meta name="copyright" content="(C) Copyright IBM Corporation 1999, 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1999, 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="rzadprestrictions" />
<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>Restrictions for running DB2 UDB CLI in server mode</title>
</head>
<body id="rzadprestrictions"><a name="rzadprestrictions"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Restrictions for running DB2<sup>®</sup> UDB CLI in server mode</h1>
<div><ul><li>A job must set server mode at the very beginning of processing, before
doing anything else. For jobs that are strictly CLI users, they must use the <samp class="codeph">SQLSetEnvAttr</samp> call
to turn on server mode. Remember to do this right after <samp class="codeph">SQLAllocEnv</samp> but
before any other calls. As soon as the server mode is on, it cannot be turned
off.</li>
<li>All the SQL functions run in the prestart jobs and commitment control.
DO NOT start commitment control in the originating job, either before or after
entering server mode.</li>
<li>Because the SQL is processed in the prestart job, there is no sensitivity
to certain changes in the originating job. This includes changes to library
list, job priority, message logging, and so forth. The prestart is sensitive
to a change of the coded character set identifier (CCSID) value in the originating
job, because this can affect the way data is mapped back to the program of
the user.</li>
<li>When running server mode, the application MUST use SQL commits and rollbacks,
either embedded or by the SQL CLI. They cannot use the CL commands, because
there is no commitment control that is running in the originating job. The
job MUST issue a COMMIT before disconnecting; otherwise an implicit ROLLBACK
occurs.</li>
<li>It is not possible to use interactive SQL from a job in server mode. Use
of STRSQL when in server mode results in an SQL6141 message.</li>
<li>It is also not possible to perform SQL compiles while in server mode.
Server mode can be used when running compiled SQL programs, but must not be
on for the compiles. The compiles fail, if the job is in server mode.</li>
<li>SQLDataSources is unique in that it does not require a connection handle
to run. When in server mode, the program must already have done a connect
to the local database, before using SQLDataSources. Since DataSources is used
to find the name of the RDB for connection, IBM<sup>®</sup> supports passing a NULL pointer for
the RDB name on SQLConnect. This obtains a local connection. This makes it
possible to write a generic program, when there is no prior knowledge of the
system names.</li>
<li>When doing commits and rollbacks through the CLI, the calls to SQLEndTran
and SQLTransact must include a connection handle. When not running in server
mode, one can omit the connection handle to commit everything. However, this
is not supported in server mode, because each connection (or thread) has its
own transaction scoping.</li>
<li>It is not recommended to share connection handles across threads, when
running in SQL server mode. This is because one thread can overwrite return
data or error information that another thread has yet to process.</li>
<li>If any other SQL work has been done in the job before
setting server mode in CLI, then it is impossible to change CLI's environment
to run in server mode. An example of this is the use of embedded SQL before
the call to do any CLI work that attempted to set the server
mode attribute.</li>
</ul>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzadpsqlapd.htm" title="This topic is about why and how you should run your DB2 UDB CLI applications in server mode.">Run DB2 UDB CLI in server mode</a></div>
</div>
</div>
</body>
</html>