Results 1 to 3 of 3

Thread: create user

  1. #1
    Join Date
    Oct 2003
    Location
    southend-on-sea
    Posts
    3

    Cool Unanswered: create user

    I want to write a stored procedure or function that I can use to create users for an oracle database. I seem to recall that this can be achieved by using a dbms package but I cant remeber which one. Can anybody help please. Thanks

  2. #2
    Join Date
    Oct 2003
    Location
    southend-on-sea
    Posts
    3

    Thumbs up Re: create user

    Originally posted by OGONDO
    I want to write a stored procedure or function that I can use to create users for an oracle database. I seem to recall that this can be achieved by using a dbms package but I cant remeber which one. Can anybody help please. Thanks
    Sorted no worries. I have conquered my amnesia: the pachage is dbms_utility.

  3. #3
    Join Date
    Sep 2003
    Location
    The Netherlands
    Posts
    311
    hi,

    in oracle versions prior to oracle 8i, u can use the DBMS_SQL package.
    In newer version u can use Native Dynamic SQL, which is far easier to use.
    Inside your code u write:

    lv_statement := 'Create user scott identified by tiger default tablespace users temporary tablespace temp';
    execute immediate lv_statement;

    U can use this also for granting connect to that user.

    Hope this helps
    Edwin van Hattem
    OCP DBA / System analyst

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •