Re: Synonyms

From: Vishal Gupta <vishal_at_vishalgupta.com>
Date: Thu, 2 Dec 2010 11:13:31 +0000
Message-ID: <B1984B84-F0DD-4B17-8556-BFCFAE2AECCF_at_vishalgupta.com>



Hard coding the scheme name when referencing the objects is generally not a good practice. Especially if you want to host multiple copies of same application in the same database.

If you are worried about not having to remember schema passwords, then as a DBA account you could issue following command before running release scripts.

Alter session set current_schema = <schemaowner>;

Few caveats with this approach though. Following will still not work when statements in another schema from another account.

  • creating private synonym in another schema
  • manipulating DBMS_jobs in another schema.

Regards,
Vishal

On 1 Dec 2010, at 14:54, "Sheehan, Jeremy" <JEREMY.SHEEHAN_at_nexteraenergy.com> wrote:

> --- Surely it's not really public synonyms but granting unnecessary privileges on those objects to public.
>
> Even then, public synonyms are frowned upon. We're pretty serious about SOX here and that's what has been declared. So we follow the rules, you know?
>
> -- Is it SOX compliant to have a post release script to remove all public synonyms and replace them with private synonyms for all users?
>
> That's been done in the past, but for most things, we have the folks just start modifying their code to it references the table in the "owner.table" format. Makes it easier for deploying code, too. Not as many passwords to remember (everything can be run by the DBA and not the schema owner).
>
> Jeremy
>
>
>
> -----Original Message-----
> From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Dominic.Brooks_at_barclayscapital.com
> Sent: Wednesday, December 01, 2010 9:36 AM
> To: oracle-l_at_freelists.org
> Subject: RE: Synonyms
>
> I love those declarations.
>
> Surely it's not really public synonyms but granting unnecessary privileges on those objects to public.
>
> Is it SOX compliant to have a post release script to remove all public synonyms and replace them with private synonyms for all users?
>
> -----Original Message-----
> From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Sheehan, Jeremy
> Sent: 01 December 2010 14:30
> To: Thomas.Mercadante_at_labor.ny.gov; jd_at_commandprompt.com; oracle-l_at_freelists.org
> Subject: RE: Synonyms
>
> It's been declared that public synonyms are bad for any SOX databases where I work. That means that the DBA's have to comb through any code that needs to be promoted for the forbidden words 'create public synonym'. It really sucks when a 3rd party application relies heavily on them. We have to constantly push code back to them for revision.
>
> Jeremy
>
>
> -----Original Message-----
> From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Mercadante, Thomas F (LABOR)
> Sent: Wednesday, December 01, 2010 9:20 AM
> To: jd_at_commandprompt.com; oracle-l_at_freelists.org
> Subject: RE: Synonyms
>
> Josh,
>
> I use them all the time. Standard practice here. I used to use public synonyms but now use private syns. The schema who owns the objects creates private syns for the users who need them.
>
> Tom
>
>
> -----Original Message-----
> From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Joshua D. Drake
> Sent: Tuesday, November 30, 2010 7:31 PM
> To: oracle-l_at_freelists.org
> Subject: Synonyms
>
> Hello,
>
> Kind of out of left field here but I was curious about how many people
> here use Synonyms and the types of synonyms they are normally using,
> i.e; table/view/column?
>
> Sincerely,
>
> Joshua D. Drake
> --
> PostgreSQL.org Major Contributor
> Command Prompt, Inc: http://www.commandprompt.com/ - 509.416.6579
> Consulting, Training, Support, Custom Development, Engineering
> http://twitter.com/cmdpromptinc | http://identi.ca/commandprompt
>
> --
> http://www.freelists.org/webpage/oracle-l
>
>
>
> ��i��0���zX���+��n��{�+i�^
> ��i��0���zX���+��n��{�+i�^
>
> _______________________________________________
>
> This e-mail may contain information that is confidential, privileged or otherwise protected from disclosure. If you are not an intended recipient of this e-mail, do not duplicate or redistribute it by any means. Please delete it and any attachments and notify the sender that you have received it in error. Unless specifically indicated, this e-mail is not an offer to buy or sell or a solicitation to buy or sell any securities, investment products or other financial product or service, an official confirmation of any transaction, or an official statement of Barclays. Any views or opinions presented are solely those of the author and do not necessarily represent those of Barclays. This e-mail is subject to terms available at the following link: www.barcap.com/emaildisclaimer. By messaging with Barclays you consent to the foregoing. Barclays Capital is the investment banking division of Barclays Bank PLC, a company registered in England (number 1026167) with its registered office at 1 Churchill Place, London, E14 5HP. This email may relate to or be sent from other members of the Barclays Group.
> _______________________________________________
> !���
> 0~���+-����
> ������rW�
> †Ûiÿü0ÁúÞzX¬¶Ê+ƒün– {ú+iÉ^
i0zX+n{+i^ Received on Thu Dec 02 2010 - 05:13:31 CST

Original text of this message