Edit D:\app\Administrator\product\11.2.0\dbhome_1\apex\images\doc\AEAPI\apex_util012.htm
<!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" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=us-ascii" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <meta http-equiv="Content-Script-Type" content="text/javascript" /> <title>CREATE_USER Procedure</title> <meta name="generator" content="Oracle DARB XHTML Converter (Mode = ohj/ohw) - Version 5.1" /> <meta name="date" content="2009-04-14T17:32:15Z" /> <meta name="robots" content="noarchive" /> <meta name="doctitle" content="CREATE_USER Procedure" /> <meta name="relnum" content="Release 3.2" /> <meta name="partnum" content="E12510-01" /> <link rel="copyright" href="../dcommon/html/cpyr.htm" title="Copyright" type="text/html" /> <link rel="stylesheet" href="../dcommon/css/blafdoc.css" title="Oracle BLAFDoc" type="text/css" /> <link rel="contents" href="toc.htm" title="Contents" type="text/html" /> <link rel="up" href="preface" title="Home" type="text/html" /> <link rel="up" href="apex_util.htm" title="APEX_UTIL" type="text/html" /> <link rel="up" href="apex_util012.htm" title="CREATE_USER Procedure" type="text/html" /> <link rel="prev" href="apex_util011.htm" title="Previous" type="text/html" /> <link rel="next" href="apex_util013.htm" title="Next" type="text/html" /> </head> <body> <p id="BREADCRUMBING"><a href="preface" title="Home">Home</a> > <a href="apex_util.htm" title="APEX_UTIL">APEX_UTIL</a> > CREATE_USER Procedure</p> <table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="100%"> <col width="86%" /> <col width="*" /> <tr valign="bottom"> <td align="left"></td> <td align="center"><a href="apex_util011.htm"><img src="../dcommon/gifs/leftnav.gif" alt="Previous" /><br /> <span class="icon">Previous</span></a> </td> <td align="center"><a href="apex_util013.htm"><img src="../dcommon/gifs/rightnav.gif" alt="Next" /><br /> <span class="icon">Next</span></a></td> </tr> </table> <p><a id="BABCFBGG" name="BABCFBGG"></a></p> <hr /> <div class="refsect1"> <h1><a name="AEAPI114" id="AEAPI114"></a>CREATE_USER Procedure<a id="sthref68" name="sthref68"></a><a id="sthref69" name="sthref69"></a></h1> <p>This procedure creates a new account record in the Application Express user account table. To execute this procedure, the current user must have administrative privileges.</p> <a id="sthref70" name="sthref70"></a> <p class="subhead2">Syntax</p> <pre xml:space="preserve" class="oac_no_warn"> APEX_UTIL.CREATE_USER( p_user_id IN NUMBER DEFAULT NULL, p_user_name IN VARCHAR2, p_first_name IN VARCHAR2 DEFAULT NULL, p_last_name IN VARCHAR2 DEFAULT NULL, p_description IN VARCHAR2 DEFAULT NULL, p_email_address IN VARCHAR2 DEFAULT NULL, p_web_password IN VARCHAR2, p_web_password_format IN VARCHAR2 DEFAULT 'CLEAR_TEXT', p_group_ids IN VARCHAR2 DEFAULT NULL, p_developer_privs IN VARCHAR2 DEFAULT NULL, p_default_schema IN VARCHAR2 DEFAULT NULL, p_allow_access_to_schemas IN VARCHAR2 DEFAULT NULL, p_account_expiry IN DATE DEFAULT TRUNC(SYSDATE), p_account_locked IN VARCHAR2 DEFAULT 'N', p_failed_access_attempts IN NUMBER DEFAULT 0, p_change_password_on_first_use IN VARCHAR2 DEFAULT 'Y', p_first_password_use_occurred IN VARCHAR2 DEFAULT 'N', p_attribute_01 IN VARCHAR2 DEFAULT NULL, p_attribute_02 IN VARCHAR2 DEFAULT NULL, p_attribute_03 IN VARCHAR2 DEFAULT NULL, p_attribute_04 IN VARCHAR2 DEFAULT NULL, p_attribute_05 IN VARCHAR2 DEFAULT NULL, p_attribute_06 IN VARCHAR2 DEFAULT NULL, p_attribute_07 IN VARCHAR2 DEFAULT NULL, p_attribute_08 IN VARCHAR2 DEFAULT NULL, p_attribute_09 IN VARCHAR2 DEFAULT NULL, p_attribute_10 IN VARCHAR2 DEFAULT NULL); </pre> <a id="sthref71" name="sthref71"></a> <p class="subhead2">Parameters</p> <p><a href="#BABCJCFI">Table: CREATE_USER Procedure Parameters</a> describes the parameters available in the <code>CREATE_USER</code> procedure.</p> <div class="tblformal"><a id="sthref72" name="sthref72"></a><a id="BABCJCFI" name="BABCJCFI"></a> <p class="titleintable">CREATE_USER Procedure Parameters</p> <table class="Formal" title="CREATE_USER Procedure Parameters" summary="This table describes the parameters available in CREATE_USER procedure." dir="ltr" border="1" width="100%" frame="hsides" rules="groups" cellpadding="3" cellspacing="0"> <col width="31%" /> <col width="*" /> <thead> <tr align="left" valign="top"> <th align="left" valign="bottom" id="r1c1-t15">Parameter</th> <th align="left" valign="bottom" id="r1c2-t15">Description</th> </tr> </thead> <tbody> <tr align="left" valign="top"> <td align="left" id="r2c1-t15" headers="r1c1-t15"> <p><code>p_user_id</code></p> </td> <td align="left" headers="r2c1-t15 r1c2-t15"> <p>Numeric primary key of user account</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r3c1-t15" headers="r1c1-t15"> <p><code>p_user_name</code></p> </td> <td align="left" headers="r3c1-t15 r1c2-t15"> <p>Alphanumeric name used for login</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r4c1-t15" headers="r1c1-t15"> <p><code>p_first_name</code></p> </td> <td align="left" headers="r4c1-t15 r1c2-t15"> <p>Informational</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r5c1-t15" headers="r1c1-t15"> <p><code>p_last_name</code></p> </td> <td align="left" headers="r5c1-t15 r1c2-t15"> <p>Informational</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r6c1-t15" headers="r1c1-t15"> <p><code>p_description</code></p> </td> <td align="left" headers="r6c1-t15 r1c2-t15"> <p>Informational</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r7c1-t15" headers="r1c1-t15"> <p><code>p_email_address</code></p> </td> <td align="left" headers="r7c1-t15 r1c2-t15"> <p>Email address</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r8c1-t15" headers="r1c1-t15"> <p><code>p_web_password</code></p> </td> <td align="left" headers="r8c1-t15 r1c2-t15"> <p>Clear text password</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r9c1-t15" headers="r1c1-t15"> <p><code>p_web_password_format</code></p> </td> <td align="left" headers="r9c1-t15 r1c2-t15"> <p>If the value your passing for the <code>p_web_password</code> parameter is in clear text format then use <code>CLEAR_TEXT</code>, otherwise use <code>HEX_ENCODED_DIGEST_V2</code>.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r10c1-t15" headers="r1c1-t15"> <p><code>p_group_ids</code></p> </td> <td align="left" headers="r10c1-t15 r1c2-t15"> <p>Colon separated list of numeric group IDs</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r11c1-t15" headers="r1c1-t15"> <p><code>p_developer_privs</code></p> </td> <td align="left" headers="r11c1-t15 r1c2-t15"> <p>Colon separated list of developer privileges. The following are acceptable values for this parameter:</p> <p><span class="bold">null</span> - To create an end user (a user who can only authenticate to developed applications).</p> <p><span class="bold">CREATE:DATA_LOADER:EDIT:HELP:MONITOR:SQL</span> - To create a user with developer privilege.</p> <p><span class="bold">ADMIN:CREATE:DATA_LOADER:EDIT:HELP:MONITOR:SQL</span> - To create a user with full workspace administrator and developer privilege.</p> <p>Note: Currently this parameter is named inconsistently between the <code>CREATE_USER</code>, <code>EDIT_USER</code> and <code>FETCH_USER</code> APIs, although they all relate to the <code>DEVELOPER_ROLE</code> field stored in the named user account record. <code>CREATE_USER</code> uses <code>p_developer_privs</code>, <code>EDIT_USER</code> uses <code>p_developer_roles</code> and <code>FETCH_USER</code> uses <code>p_developer_role</code>.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r12c1-t15" headers="r1c1-t15"> <p><code>p_default_schema</code></p> </td> <td align="left" headers="r12c1-t15 r1c2-t15"> <p>A database schema assigned to the user's workspace, used by default for browsing.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r13c1-t15" headers="r1c1-t15"> <p><code>p_allow_access_to_schemas</code></p> </td> <td align="left" headers="r13c1-t15 r1c2-t15"> <p>Colon separated list of schemas assigned to the user's workspace to which the user is restricted (leave null for all).</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r14c1-t15" headers="r1c1-t15"> <p><code>p_account_expiry</code></p> </td> <td align="left" headers="r14c1-t15 r1c2-t15"> <p>Date password was last updated, which will default to today's date on creation.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r15c1-t15" headers="r1c1-t15"> <p><code>p_account_locked</code></p> </td> <td align="left" headers="r15c1-t15 r1c2-t15"> <p>'Y' or 'N' indicating if account is locked or unlocked.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r16c1-t15" headers="r1c1-t15"> <p><code>p_failed_access_attempts</code></p> </td> <td align="left" headers="r16c1-t15 r1c2-t15"> <p>Number of consecutive login failures that have occurred, defaults to 0 on creation.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r17c1-t15" headers="r1c1-t15"> <p><code>p_change_password_on_first_use</code></p> </td> <td align="left" headers="r17c1-t15 r1c2-t15"> <p>'Y' or 'N' to indicate whether password must be changed on first use, defaults to 'Y' on creation.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r18c1-t15" headers="r1c1-t15"> <p><code>p_first_password_use_occurred</code></p> </td> <td align="left" headers="r18c1-t15 r1c2-t15"> <p>'Y' or 'N' to indicate whether login has occurred since password change, defaults to 'N' on creation.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r19c1-t15" headers="r1c1-t15"> <p><code>p_attribute_01</code></p> <p><code>...</code></p> <p><code>p_attribute_10</code></p> </td> <td align="left" headers="r19c1-t15 r1c2-t15"> <p>Arbitrary text accessible with an API</p> </td> </tr> </tbody> </table> <br /></div> <!-- class="tblformal" --> <a id="sthref73" name="sthref73"></a> <p class="subhead2">Example 1</p> <p>The following simple example creates an 'End User' called 'NEWUSER1' with a password of 'secret99'. Note an 'End User' can only authenticate to developed applications.</p> <pre xml:space="preserve" class="oac_no_warn"> BEGIN APEX_UTIL.CREATE_USER( p_user_name => 'NEWUSER1', p_web_password => 'secret99'); END; </pre> <a id="sthref74" name="sthref74"></a> <p class="subhead2">Example 2</p> <p>The following example creates a 'Workspace Administrator' called 'NEWUSER2'. Where the user 'NEWUSER2':</p> <ul> <li> <p>Has full workspace administration and developer privilege (<code>p_developer_privs</code> parameter set to '<code>ADMIN:CREATE:DATA_LOADER:EDIT:HELP:MONITOR:SQL</code>').</p> </li> <li> <p>Has access to 2 schemas, both their browsing default '<code>MY_SCHEMA</code>' (<code>p_default_schema</code> parameter set to '<code>MY_SCHEMA</code>') and also '<code>MY_SCHEMA2</code>' (<code>p_allow_access_to_schemas</code> parameter set to '<code>MY_SCHEMA2</code>').</p> </li> <li> <p>Does not have to change their password when they first login (<code>p_change_password_on_first_use</code> parameter set to 'N').</p> </li> <li> <p>Has their phone number stored in the first additional attribute (<code>p_attribute_01</code> parameter set to '123 456 7890').</p> </li> </ul> <pre xml:space="preserve" class="oac_no_warn"> BEGIN APEX_UTIL.CREATE_USER( p_user_name => 'NEWUSER2', p_first_name => 'FRANK', p_last_name => 'SMITH', p_description => 'Description...', p_email_address => 'frank@smith.com', p_web_password => 'password', p_developer_privs => 'ADMIN:CREATE:DATA_LOADER:EDIT:HELP:MONITOR:SQL', p_default_schema => 'MY_SCHEMA', p_allow_access_to_schemas => 'MY_SCHEMA2', p_change_password_on_first_use => 'N', p_attribute_01 => '123 456 7890'); END; </pre> <div align="center"> <div class="inftblnotealso"><br /> <table class="NoteAlso oac_no_warn" summary="" cellpadding="3" cellspacing="0"> <tbody> <tr> <td align="left"> <p class="notep1">See Also:</p> <a href="apex_util027.htm#BABDAHCJ">"FETCH_USER Procedure Signature 3"</a>, <a href="apex_util019.htm#BABGDGJH">"EDIT_USER Procedure"</a>, and <a href="apex_util041.htm#BABFECFJ">"GET_GROUP_ID Function"</a></td> </tr> </tbody> </table> <br /></div> <!-- class="inftblnotealso" --></div> </div> <!-- class="refsect1" --> <!-- Start Footer --> <div class="footer"> <table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="100%"> <col width="86%" /> <col width="*" /> <tr> <td align="left"><span class="copyrightlogo">Copyright © 2003, 2009, Oracle and/or its affiliates. All rights reserved.</span><br /> <a href="../dcommon/html/cpyr.htm"><span class="copyrightlogo">Legal Notices</span></a></td> <td align="center"><a href="apex_util011.htm"><img src="../dcommon/gifs/leftnav.gif" alt="Previous" /><br /> <span class="icon">Previous</span></a> </td> <td align="center"><a href="apex_util013.htm"><img src="../dcommon/gifs/rightnav.gif" alt="Next" /><br /> <span class="icon">Next</span></a></td> </tr> </table> </div> <!-- class="footer" --> </body> </html>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de