Home » SQL & PL/SQL » SQL & PL/SQL » User alias
User alias [message #248307] Thu, 28 June 2007 10:46 Go to next message
akdiggy
Messages: 4
Registered: June 2007
Junior Member
We have reports that have schema_name.object_name embedded in them. Due to some newly revealed security issues, we are investigating if there is a way to setup an alias for a schema to point to another schema. Is that possible?
Re: User alias [message #248308 is a reply to message #248307] Thu, 28 June 2007 10:46 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
1/ synonym
2/ alter session set current_schema

Regards
Michel
Re: User alias [message #248595 is a reply to message #248308] Fri, 29 June 2007 12:40 Go to previous messageGo to next message
akdiggy
Messages: 4
Registered: June 2007
Junior Member
Thank you! I will give the set current_schema a try!
Re: User alias [message #248607 is a reply to message #248307] Fri, 29 June 2007 13:18 Go to previous messageGo to next message
akdiggy
Messages: 4
Registered: June 2007
Junior Member
When I did research on alter session set current_schema, it mentioned unqualified references to schema objects. Does that mean that the reports will have to have the schema owner removed?
Re: User alias [message #248608 is a reply to message #248607] Fri, 29 June 2007 13:20 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Yes, this is the purpose: to have queries independent of schema implementation.

Regards
Michel
Re: User alias [message #248610 is a reply to message #248307] Fri, 29 June 2007 13:28 Go to previous messageGo to next message
Bill B
Messages: 1482
Registered: December 2004
Senior Member
Be aware of one thing. The alter session set current_schema will only change the schema pointer. The original schema will still need privileges granted on the new schema's objects.
Re: User alias [message #248902 is a reply to message #248608] Mon, 02 July 2007 11:11 Go to previous message
akdiggy
Messages: 4
Registered: June 2007
Junior Member
Thank you for the clarification! I tested the alter session command, and it works as advertised. We will have to resolve having the schema name included in the reports.
Previous Topic: what a few things mean
Next Topic: printing on sam eline in a loop
Goto Forum:
  


Current Time: Sat Dec 03 20:07:42 CST 2016

Total time taken to generate the page: 0.09062 seconds