Re: how to create user from pl/sql in 8.0.6 version

  • From: Nigel Thomas <nigel_cl_thomas@xxxxxxxxx>
  • To: rems@xxxxxxxx, ORACLE-L <oracle-l@xxxxxxxxxxxxx>
  • Date: Mon, 3 Dec 2007 05:20:59 -0800 (PST)

Remigiusz 

Can't test it against 8.0.6, but why not use DBMS_SQL? I'm sure that was 
available then: 

Microsoft Windows XP [Version 5.1.2600] 
(C) Copyright 1985-2001 Microsoft Corp. 
C:\Documents and Settings\Nigel Thomas>sqlplus system/manager 
SQL*Plus: Release 10.2.0.1.0 - Production on Mon Dec 3 13:16:40 2007 
Copyright (c) 1982, 2005, Oracle. All rights reserved. 

Connected to: 
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production 
SQL> DECLARE 
2 v_cursor number; 
3 v_cmd varchar2(100); 
4 v_result integer; 
5 BEGIN 
6 
7 v_cursor := dbms_sql.open_cursor; 
8 v_cmd := 'create user &new_user identified by &new_passwd'; 
9 dbms_sql.parse(v_cursor, v_cmd, DBMS_SQL.NATIVE); 
10 v_result := dbms_sql.execute(v_cursor); 
11 dbms_sql.close_cursor(v_cursor); 
12 END; 
13 / 
Enter value for new_user: xyz 
Enter value for new_passwd: xyz 
old 8: v_cmd := 'create user &new_user identified by &new_passwd'; 
new 8: v_cmd := 'create user xyz identified by xyz'; 
PL/SQL procedure successfully completed. 
SQL> 

Regards Nigel
--
//www.freelists.org/webpage/oracle-l


Other related posts: