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

  • From: Remigiusz Sokolowski <rems@xxxxxxxx>
  • To: Nigel Thomas <nigel_cl_thomas@xxxxxxxxx>
  • Date: Mon, 03 Dec 2007 14:41:17 +0100

Nigel Thomas wrote:
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
shame on us - we haven't even consider it, trying to find out something clever and special
I apologize for sending so simple case to solve
many thanks

Remigiusz

--

------------------------------------------------------------------------
Remigiusz Sokolowski <rems@xxxxxxxx>
WP/PTI/DIP/ZAB (+04858) 52 15 770
MySQL v04.x,05.x; Oracle v10.x

Zastrzezenia:
1. Wylaczenie danej funkcjonalnosci oznacza, ze niezwlocznie przystapimy
  lub juz pracujemy nad jej uruchomieniem
2. Niniejsza wiadomosc stanowi jedynie wyraz prywatnych pogladow autora i nie jest w zadnym wypadku zwiazana ze stanowiskiem przedsiebiorstwa Wirtualna Polska S.A.
------------------------------------------------------------------------



WIRTUALNA POLSKA SA, ul. Traugutta 115c, 80-226 Gdansk; NIP: 957-07-51-216; Sad Rejonowy Gdansk-Polnoc KRS 0000068548, kapital zakladowy 62.880.024 zlotych (w calosci wplacony)
--
//www.freelists.org/webpage/oracle-l


Other related posts: