Re: Q: session current_user vs user_tables etc



Malcolm Dew-Jones wrote:
I can use
	alter session set current_schema=xxx

and then queries such as
select * from table_name_no_schema will find the table in the xxx schema, just as if I was xxx to begin with.


However, if I do queries such as
select * from user_tables
then I see my own tables, not the xxx tables (which is understandable, I'm not questioning that).


My question is, are there any views similar to the user_* views but to
access things within the current_schema, or must I use the all_* views and
filter everything by sys_context('USERENV','CURRENT_SCHEMA')  ?

Feedback appreciated.

malcolm

Not aware of any views that do what you are asking.

But this is a great time to remind people to check out user_all_tables.
--
Daniel A. Morgan
http://www.psoug.org
damorgan@xxxxxxxxxxxxxxxx
(replace x with u to respond)
.



Relevant Pages

  • Re: PyTable?
    ... A database plan ... Normally the schema is created in Python code, ... queries, for instance. ... As to BasicProperty, its purpose is to allow for defining rich ...
    (comp.lang.python)
  • Re: Link server very slow
    ... DDL = Data Definition Language. ... It's basically the schema of the ... DML = Data Manipulation Language. ... It's the queries that you're running ...
    (microsoft.public.sqlserver.server)
  • Re: New datawarehouse
    ... Adhoc queries are contending with transactional inserts/updates ... The OLTP is slowly down due to volume of data and the OLTP doesn't need the ... Queries are to hard for users to create against the complex OLTP schema. ... The usual system development life cycle and operational techniques and ...
    (microsoft.public.sqlserver.datawarehouse)
  • Re: Testing Performance of Queries
    ... The number of other users can change performance. ... By starting with a sound data model, then implementing a schema in 5NF ... This makes it easy to write queries ...
    (microsoft.public.sqlserver.programming)
  • Re: Oracle schema
    ... You will also have to put the schema name into the TTable ... > I have an application to convert to Oracle database. ... all SQL queries doesn't qualify table names. ...
    (borland.public.delphi.database.ado)