Quick Search:
 
 Oracle PL/SQL: Create User Jump to:  
Category: >> Oracle PL/SQL >> Create User  

<< lastnext >>

Snippet Name: Create User

Description: Create the account that will own the database objects required to run
the applications discussed in "Developing Oracle Forms Applications."

Also see:
» USER: connection information
» USER: User Information 2
» USER idle time
» USER Information
» USER active connected users
» USER memory use
» USER: Connected Users
» USER: drop user
» USER: misc queries and commands
» USER system authentication
» USER lock account
» USER password expiration
» USER profile
» USER tablespace quota
» USER temp tablespace
» USER tablespace
» USER password
» USERS: view specific user info
» USERS: view currently connected users
» USERS: view all active users
» USERS: Drop users
» USERS: Lock and Unlock accounts
» USERS: Proxy Users
» USERS: Grant tablespace access
» USERS: Alter a user
» USERS: CREATE USER w/ authentication
» USERS: Creating Users
» CREATE USER
» Drop User example
» Create User example

Comment: (none)

Language: PL/SQL
Highlight Mode: PLSQL
Last Modified: February 27th, 2009

SET VERIFY OFF
ACCEPT sys_pass PROMPT 'Please enter password for user SYSTEM : ' hide
ACCEPT db_name PROMPT  'Enter database name or connection string.  Default is [LOCAL] : '
 
REM CONNECT
CONNECT SYSTEM/&sys_pass@&db_name
ACCEPT u_name       PROMPT  'Enter new user name: '
ACCEPT u_pass       PROMPT  'Enter password: ' HIDE
ACCEPT def_tbs       PROMPT  'Enter default tablespace: '
ACCEPT tmp_tbs       PROMPT  'Enter temporary tablespace: '
ACCEPT u_quota       PROMPT  'Enter user quota (e.g. 100K, or 1M, or UNLIMITED): '
ACCEPT quota_tbs PROMPT  'On tablespace: '
 
CREATE USER &u_name
IDENTIFIED BY &u_pass
DEFAULT TABLESPACE &def_tbs
TEMPORARY TABLESPACE &tmp_tbs
QUOTA &u_quota ON &quota_tbs;
 
GRANT CONNECT, RESOURCE TO &u_name;
 
EXIT;
 
WHENEVER SQLERROR EXIT


 
   Home |    Search |    Code Library |    Sponsors |    Privacy |    Terms of Use |    Contact Us © 2003 - 2024 psoug.org