Re: SQL alteration
From: ddf <oratune_at_msn.com>
Date: Fri, 2 Jul 2010 21:16:57 -0700 (PDT)
Message-ID: <b2c84ee2-3a2a-49f0-98eb-a8288f5945e8_at_x24g2000pro.googlegroups.com>
On Jul 2, 12:52 pm, UXDBA <unixdb..._at_googlemail.com> wrote:
> On Jul 2, 5:21 pm, ddf <orat..._at_msn.com> wrote:
>
>
>
>
>
> > On Jul 2, 10:44 am, UXDBA <unixdb..._at_googlemail.com> wrote:
>
> > > All,
> > > Just one questions. ( I know Oracle is not written this way... but
> > > wanted to see the thread users response/comments )
>
> > > Session #1 from client 1 :
> > > --------------------------------------
>
> > > issues the following:
>
> > > select * from T;
>
> > > Is there any way this SQL can be intercepted in backend and a filter
> > > is added to this query.
> > > something like....
>
> > > where 1=2
>
> > > i.e. Actual sql processed would be
>
> > > select * from T where 1=2;
>
> > > So that no rows are retruned to the user who has issued the above sql.
> > > (mainly wanted to add a predicate which is FALSE hence no results set
> > > is returned.)
>
> > > Thanks
>
> > Is there a particular user you're wanting to restrict with this?
>
> > David Fitzjarrell- Hide quoted text -
>
> > - Show quoted text -
>
> no . single user issues multiple requests and if the quoted SQL is
> issued. we wanted to restrict that SQL alone.- Hide quoted text -
>
> - Show quoted text -
Date: Fri, 2 Jul 2010 21:16:57 -0700 (PDT)
Message-ID: <b2c84ee2-3a2a-49f0-98eb-a8288f5945e8_at_x24g2000pro.googlegroups.com>
On Jul 2, 12:52 pm, UXDBA <unixdb..._at_googlemail.com> wrote:
> On Jul 2, 5:21 pm, ddf <orat..._at_msn.com> wrote:
>
>
>
>
>
> > On Jul 2, 10:44 am, UXDBA <unixdb..._at_googlemail.com> wrote:
>
> > > All,
> > > Just one questions. ( I know Oracle is not written this way... but
> > > wanted to see the thread users response/comments )
>
> > > Session #1 from client 1 :
> > > --------------------------------------
>
> > > issues the following:
>
> > > select * from T;
>
> > > Is there any way this SQL can be intercepted in backend and a filter
> > > is added to this query.
> > > something like....
>
> > > where 1=2
>
> > > i.e. Actual sql processed would be
>
> > > select * from T where 1=2;
>
> > > So that no rows are retruned to the user who has issued the above sql.
> > > (mainly wanted to add a predicate which is FALSE hence no results set
> > > is returned.)
>
> > > Thanks
>
> > Is there a particular user you're wanting to restrict with this?
>
> > David Fitzjarrell- Hide quoted text -
>
> > - Show quoted text -
>
> no . single user issues multiple requests and if the quoted SQL is
> issued. we wanted to restrict that SQL alone.- Hide quoted text -
>
> - Show quoted text -
If you don't want anyone to 'see' any data from T why don't you create a view on T:
create or replace view owner.t_vw as
select * From owner.t where 1=2;
then create a public synonym T for the view you just created:
create public synonym t for owner.t_vw;
At that point only the table owner can see data in table T.
David Fitzjarrell Received on Fri Jul 02 2010 - 23:16:57 CDT