Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2003
    Posts
    81

    Question Unanswered: Dynamic View (using different DB_LINKS)

    I have a database that can only be accessed by one specific user (PWPROD). From this database, I want to create database links to another database, where there are many users. In the first database I have the name of the system user (not Oracle user!). I want to create a dynamic view based on these informations.

    Example:

    PWDATABASE:
    ORACLE-USER =PWPROD
    PWUSER = KFC
    DBLINK = KFC_DBLINK (connects to the database VDS with the user KFC and his password).

    Desired view:

    create view AMT as
    select * from AMT@KFC_DBLINK;

    where KFC is dynamic, so when the PWUSER is JSM, then the view is based on AMT@JSM_DBLINK;

    I was hoping to do this by creating a function that can return the name of the DB_LINK, but after this I am stuck.

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    Your dynamic imagination exceeds reality.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    May 2014
    Location
    World Wide On The Web
    Posts
    16
    Quote Originally Posted by kfc@vd.dk View Post
    Desired view:

    create view AMT as
    select * from AMT@KFC_DBLINK;
    So how many views do you desire? Would you like to have 1000 views created using 1000 DB_LINKs for 1000 users?

    I suggest you should first think about what you really want to achieve before jumping over implementation.
    Regards,
    Lalit

  4. #4
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    when you say the system user is not oracle user, what type of database are you connecting to?
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

Posting Permissions

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