Results 1 to 4 of 4
  1. #1
    Join Date
    May 2005
    Posts
    6

    Unanswered: SQL script switching between multiple users

    I once created a script that switched from a privileged non-external user to another non-external schema/user then back.

    Used hidden script variables for temporary password storage.

    Think the initial privileged user reset the other users password for the duration then set it back.

    Trying to recover the details.

    Any clues appreciated.

    Thanks,

    Tom

  2. #2
    Join Date
    Jul 2003
    Posts
    2,296
    you don't need a password to run stuff as a specific schema owner:

    alter session set current_schema=SCHEMA_OWNER;
    - The_Duck
    you can lead someone to something but they will never learn anything ...

  3. #3
    Join Date
    Nov 2003
    Posts
    2,933
    Provided Answers: 12
    Quote Originally Posted by The_Duck
    you don't need a password to run stuff as a specific schema owner:

    alter session set current_schema=SCHEMA_OWNER;
    That's not really the same. That will only change the default schema, but will not give the current user other privileges which is - as far as I understood - what the OP wanted.

  4. #4
    Join Date
    May 2005
    Posts
    6
    Using ALTER SESSION does mean objects created are then owned by the new schema.
    And it is possible to change back to the privileged user.
    Interestingly the new user also has more access to the data dictionary.
    This will probably work since my intent is a script to build multi-schema apps.

    I am still interested however in the syntax to save and reuse information (in this case passwords) in a hidden manner (worked in 9i).

    Thanks very much.

    Tom

Posting Permissions

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