DBAsupport.com Forums - Powered by vBulletin
Results 1 to 7 of 7

Thread: how can i create a schema alias?

  1. #1
    Join Date
    Apr 2004
    Location
    ny,ny
    Posts
    24

    how can i create a schema alias?

    the application is pointing to RABBIT.EMPLOYEES

    the data has been migrated to another db pointing to BUGSBUNNY.EMPLOYEES

    it ist possible to have BUGSBUNNY look like RABBIT so the code in the application doen't have to change?

    thanks

  2. #2
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    no

    hardcoding the owner is a crap0la

  3. #3
    Join Date
    Oct 2002
    Posts
    807
    Pando - why do you say no? Technically it is feasible, right? I agree that the design/architecture is crapola.

    Simply create a view over a dblink and then a synonym for it. Finito.

  4. #4
    Join Date
    Jul 2002
    Location
    Lake Worth, FL
    Posts
    1,492
    Or without the db link:

    On the 'another' db:

    CREATE USER RABBIT ...

    CONN BUGGSBUNNY/BBPW

    GRANT ALL ON EMPLOYEES TO RABBIT;

    CONN RABBIT/RPW

    CREATE SYNONYM EMPLOYEES FOR BUGSBUNNY.EMPLOYEES;

    "The person who says it cannot be done should not interrupt the person doing it." --Chinese Proverb

  5. #5
    Join Date
    Oct 2002
    Posts
    807
    The reason I didn't suggest that was the application will need to be modified to point to the new database. S/he seemed reluctant to touch the application. Given that, the dblink will work 'best'. (Although performance goes for a toss).

  6. #6
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    Of couse it's feasible but then again are we gonna do that for every single table now and every single new tables?

  7. #7
    Join Date
    Oct 2002
    Posts
    807
    yes

Posting Permissions

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


Click Here to Expand Forum to Full Width