Re: help: dropping synonyms

From: Sridhar Subramaniam <avion_at_ozemail.com.au>
Date: 1996/10/31
Message-ID: <32788BEC.27D_at_ozemail.com.au>#1/1


Eric Anthony Spear wrote:
>
> I have created a whole bunch of public synonyms that I would now like to drop. I'd rather not have to explicitly drop each one.
>
> Instead, can I drop them all at once?
>
> They are all owned by the same user (who has been dropped, by the way).
>
> Thanks in advance.
Eric,

Public synonyms don't get dropped when you drop the user creating them. You will need to drop them individually. Try the foll in sql+ :

select 'drop public synonym ' || synonym_name || ';' from sys.dba_synonyms
where table_owner = the user you've already dropped.

Spool this to a file and run the script generated. You will need to run this query logged in as a privileged user

-- 
Cheers

Sridhar Subramaniam
Avion Consulting Services
Sydney - Australia
Email : avion_at_ozemail.com.au

Disclaimer : All opinions are truly and just mine.
Received on Thu Oct 31 1996 - 00:00:00 CET

Original text of this message