private synonyms-request help
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: private synonyms-request help

Hybrid View

  1. #1
    Join Date
    Apr 2002
    Location
    Bangalore
    Posts
    47

    Angry private synonyms-request help

    Hi i have 4 schemas each containing about 800 tables.i am required to create alias users for these schemas and create private synonyms for the corresponding tables.creating the synonyms one by one is nopt practical coz i have oonly one day to do it.i am not familiar with pl/sql.can anyone kindly tell me how to generate the create synonym and grant scripts.

    i am using oracle 8.1.6 on aix4.3.
    Cheers
    Murali

  2. #2
    Join Date
    Jan 2002
    Location
    Up s**t creek
    Posts
    1,525
    If you've granted access to the objects you can use something similar to the following

    Code:
    set heading off pages 0 feedback off
    spool syn_create.sql
    select 
      'CREATE SYNONYM '||table_name||
      ' FOR '||owner||'.'||table_name||';'
    from all_tables
    where owner = owner_of_objects;
    spool off
    Then run the resulting spool file.

    HTH
    Jim
    Oracle Certified Professional
    "Build your reputation by helping other people build theirs."

    "Sarcasm may be the lowest form of wit but its still funny"

    Click HERE to vist my website!

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