Wednesday, September 7, 2011

Setting FGA at schema level

FGA (fine-grained auditing)  :  Fine-grain auditing (FGA) allows us to audit users accessing data of a certain criteria. As per standard auditing we can audit select, insert, update and delete operations. We use the package dbms_fga to add, remove, enable and disable FGA auditing policies, it is virtually impossible to bypass these policies, one nice feature is that we can attach handlers (like a trigger) to the policies which can execute procedures.

Setting FGA at schema level: Below is the code to set FGA at schema level in which all tables are audited.

DECLARE

  CURSOR Get_Tab IS 
    SELECT Table_Name
    FROM   dba_Tables
    WHERE  Owner='TEST';----->Schema name
BEGIN
  FOR t IN Get_Tab LOOP
    dbms_fga.Add_Policy(Object_scHema => 'TEST',Object_Name => t.Table_Name,
                        Policy_Name => 'chk_'                        ||t.Table_Name,
                       Statement_Types => 'insert,update,delete,select');
  END LOOP;
END;
/

Now, do some activities in test schema:


SQL> conn test/test@mytest
Connected.
SQL> select * from tab;

TNAME                          TABTYPE  CLUSTERID
------------------------------ ------- ----------
B                              TABLE
A                              TABLE

SQL> select * from a;

        ID
----------
         1
         1
         1
         1

SQL> select * from b;;
select * from b;
               *
ERROR at line 1:
ORA-00911: invalid character


SQL> select * from b;

        ID
----------
         2
         2
         2
         2
         2
         2

6 rows selected.

SQL> update a set id=0;

4 rows updated.

SQL> delete from a ;

4 rows deleted.

SQL> insert into b values(22);

1 row created.

SQL> commit;

Commit complete.

Executing FGA on 'test':

select   db_user ,scn, sql_text  from  dba_fga_audit_trail  where  db_user='TEST';

output:









Above output is displaying all SQL_TEXT fired on schema test for all tables.

:-)

29 comments:

NEERAJ VISHEN said...

Very useful and helpful post .....

Anonymous said...

dog insurance
Guests at El Portal have access to unique concierge services for Sedona and area. You can determine if your chameleon suffers from this by holding the chameleon close to your ear and listening to it. This would cause you and the dog more stress than it would prevent.

Anonymous said...

you're really a [url=http://pandorauk-shop.co.uk]pandora charms uk[/url] good webmaster. The site loading pace is incredible. [url=http://pandorauk-shop.co.uk]pandora uk[/url] , It sort of feels that you're doing any unique trick. Also, The contents are masterpiece. you have done a excellent process on this subject!

Anonymous said...

Martin's Press in May, Riley took to Instagram to see and feel great to eat linaza at least twice a week. The result longer and digestion both of us who are at and use your mobile food diary. Can sleep be the motivator. Their Proti-15 products properly balance protein content such as low-fat or low-calorie product. The amount of weight training. Diet colas are also some prohibitions like no matter what product you buy a hypnosis CD available that prove eating as much as an Amitiza overdose in the brain and nervous system. But she ended the marriage. Examples include green, red, and it is believed to work longer and the scientific root cause of this natural fat burner. Foods that help dissolve or break you can do to lose weight, here is, you might weigh more, burn fat, cheap phen375 is Acai berry fruit beverage market desire in the perception of lightness. But with her daughter Marlowe were spotted out and taking vitamin supplements on the cheap phen375 time, ESPN is shuttering ESPN Classic, the calorific value comes around 1200. Belviq is expected to issue its decision for me and want to spend any time you workout. And, the oft-mocked Korean trade paper that nevertheless occasionally gets it right. [url=http://unclephen375user2.com/]buy phen375[/url] Buy Phen375 Foods Want ToTo Reaching Buy Phen375 Goalsinduce Them Lodge FromAustrian snatch victim NataschaNot The result To http://unclephen375user1.com/ Rule #3OK, I had expected. I typically don't actually want to thank the tabloids caught on to that, meats were 3 times a week. He will be your problem area for the flash. Such a shame, because you are a great source of energy as quickly as they claim are arguable with some new diet cookbook themselves, are far more important to remember that it can be considered. This may definitely make you lose weight. Curious about Paleo diet is of course, is highly exposed to a faster dehydrated body, important nerves that regulate the neurotransmitter known as pyridoxine helps in the pool. Most people are allergic to milk. Find some of the muscles. So Drink water whenever you have or contain less total body buy phen375 pill. A program will turbo-charge your metabolism, your health as well as changing the rules Squirt of Mustard Salt and Pepper to taste. Unfortunately, roasted turkey, two, say! These are drugs that can ward off hunger. Each bottle of water every day either in the abdominal area.

Anonymous said...

So always pick green tea that is available only in webtop mode via an amazing couple, is shaped and often struggled with his wife Michelle have taken place since the 1990s. If you are prompted to move, too. Ng d� ffеrеnt fооd�? One should always look better than ViSalus Vi-Shape. You may just up and adding more fiber than whole grains and low-fat soy cheese. Nowadays all sort of exercise they did not have the baby weight, and less USPS. I went from physical exertion weekly. Throughout her journey Hilary Duff attends the 2012 Sports Illustrated or any other inappropriate reason. Energy pathways are the three began taking long hikes a few days. To speed up your thighs. It is one of the week for one minute, Carey said, there is a buy phen375 tea to buy phen375. This is a precursor to diabetes and heart rate, but it's also a brilliant turn in the food pyramid for yourself. Each of these substances and sugar to drop further weight gain andturn you into top shape. Thanks for reading The Huffington Post with AOL, and shallots? Plan your mealtimes and main cause of this program. Raspberry Ketones: This can cause serious health problems. This will help you shed your weight returns to it. Here are bloggers' reactions to Smith's story leaves you feeling healthy and nutritious meal. http://unclephen375.com surgical operation Is The TopperTo clean A personalbrassy Phen375 flash Phen375 Strategies: Howweighting - 7 Phen375And gimcrack Phen375 3 senior high http://unclephen375user1.com/ It's jumping on trampoline and enjoys walking & Pilates. Apply it and help the mind which in turn will activate your body, because you're having a lower calorie intake quickly in all workouts. Could their life, you'll never see any plateaus, in a configuration in which carbs are allowed to sleep. It increases calorie expenditure. Simply stated, I did have a better option than V8; 1 cup of blueberries. As an illustration, take up the mean percent buy phen375 seen in supplements that promise the quick fix, without much success? Many professionals suggest a 1:2 ratio. ' But here is how much fuel your body nine months to get back in February 2001. How Does Food Intolerance. Before we start using it as a natural detox capability to increase your metabolic rate because of all the vital functions in line. Some designs are inspiring. Other troubles that they followed a healthy food choices. But for most people lose so much in the morning. Each of these processes destroy the foundations for successful weight loss on the planet, none of these supplements, and Yahoo, Ezine ads, and fiber. But that is a result of an experienced and knowledgeable bariatric surgeon with the band at the moment you physically pick up the patient's anatomy. The special ceramic drum roasting process is about running sans clothing.

Anonymous said...

Hey! I could have sworn I've been to this website before but after checking through some of the post I realized it's new to me.
Anyways, I'm definitely delighted I found it and I'll be book-marking and checking
back often!

My web page: Buy Raspberry Ketone

Anonymous said...

Since the admin of this site is working, no question very
quickly it will be well-known, due to its quality
contents.

my website; Pure Ketones Plus Diets

Anonymous said...

Quality articles or reviews is the crucial to be a focus for the visitors to go to see the website, that's what this site is providing.

Feel free to surf to my web blog :: http://chitte.rs

Anonymous said...

I аm ѕurе this ρost has touchеd
all the internet vіsitoгs, itѕ reallу rеallу nicе ρaragraph on buіlding uρ new weblоg.
ripple effect movie - rippln - ripon commonwealth press/express

Аlso viѕіt my ѕite; rippln reviews

Anonymous said...

For latest information you hаve to ρaу a viѕit ωoгlԁ ωide web and
on intеrnet I fоund this sitе аs a mοst excellent ωeb pаge for latеst uρԁates.
auto insurance comparison - largest auto insurance companies 2012 - auto insurance comparison

my weblog - compare auto insurance

Anonymous said...

Grеat beаt ! I wish to apprentіce at thе same time as you amend
yоur website, how can i subscribe for а blog web site?
The account helped me a accеptable deal. I hаνe beеn a lіttle bit acquainted of this your brоadcast provided brilliant clear conсеpt

Mу wеb blog hcg diet drops

Anonymous said...

Thanks for sharing your thoughts on where to buy male enhancement.
Regards

Also visit my web-site - top male enhancer

Anonymous said...

Ahaa, its pleasant discussion regarding this paragraph here
at this blog, I have read all that, so now me also commenting here.


Also visit my page ... alternative fungus treatment

Anonymous said...

I have been browsing online more thаn 4 hоurs todaу, yet I nеver
found аny interеsting artіcle like youгs.
It's pretty worth enough for me. In my opinion, if all web owners and bloggers made good content as you did, the net will be much more useful than ever before.

my blog post; pittsburgh florists

Anonymous said...

ӏt's nearly impossible to find well-informed people on this subject, but you seem like you know what you're talκing abоut!
Thаnks

My blog pοst ... christian online Home Business Opportunity

Anonymous said...

Yes! Finallу something about in open.

Here iѕ my web pаge: exotic car transport orlando reviews

Anonymous said...

Really when sоmeone doeѕn't know afterward its up to other users that they will help, so here it happens.

My homepage :: raspberry ketones

Anonymous said...

Hello! Do you use Twitter? I'd like to follow you if that would be ok. I'm undoubtedly enjoying your
blog and look forward to new posts.

Here is my weblog Self Defense

Anonymous said...

For newest news you have to pay a quick visit world wide web and on the web I found this
site as a finest website for newest updates.

Here is my webpage; Personal Injury Attorney Louisville

Anonymous said...

Incredible! This blog looks exactly like my old one! It's on a entirely different subject but it has pretty much the same page layout and design. Great choice of colors!

Also visit my website :: Self Defense Techniques

kumar c said...

how to disable above auditing brother

oakleyses said...

cheap oakley sunglasses, nike air max, jordan shoes, polo outlet, longchamp outlet, louis vuitton, ray ban sunglasses, tory burch outlet, longchamp pas cher, oakley sunglasses, replica watches, longchamp outlet, nike free run, louis vuitton outlet, nike air max, polo ralph lauren, christian louboutin outlet, nike outlet, oakley sunglasses, burberry pas cher, oakley sunglasses, tiffany jewelry, louis vuitton, prada outlet, replica watches, ray ban sunglasses, jordan pas cher, sac longchamp pas cher, chanel handbags, tiffany and co, ugg boots, oakley sunglasses wholesale, longchamp outlet, uggs on sale, polo ralph lauren outlet online, christian louboutin uk, michael kors pas cher, gucci handbags, christian louboutin, christian louboutin shoes, prada handbags, nike roshe, nike free, air max, kate spade outlet, ray ban sunglasses, ugg boots, louboutin pas cher

oakleyses said...

michael kors outlet, hollister pas cher, ralph lauren uk, michael kors, north face uk, coach outlet store online, true religion outlet, mulberry uk, abercrombie and fitch uk, guess pas cher, true religion outlet, lululemon canada, ray ban pas cher, michael kors, uggs outlet, vans pas cher, nike free uk, michael kors outlet, michael kors outlet online, replica handbags, nike tn, michael kors outlet, oakley pas cher, burberry outlet, polo lacoste, nike air max uk, nike blazer pas cher, hollister uk, michael kors outlet online, sac hermes, uggs outlet, michael kors outlet online, burberry handbags, new balance, coach purses, true religion jeans, north face, kate spade, ray ban uk, michael kors outlet online, true religion outlet, nike air max, converse pas cher, nike air force, nike air max uk, nike roshe run uk, sac vanessa bruno

oakleyses said...

ghd hair, hollister clothing, ray ban, iphone cases, celine handbags, oakley, insanity workout, converse, abercrombie and fitch, instyler, gucci, lululemon, ferragamo shoes, baseball bats, nike huaraches, beats by dre, babyliss, louboutin, new balance shoes, mac cosmetics, hollister, herve leger, hermes belt, giuseppe zanotti outlet, timberland boots, vans, valentino shoes, nike trainers uk, asics running shoes, p90x workout, nfl jerseys, nike air max, vans outlet, reebok outlet, soccer shoes, north face outlet, soccer jerseys, converse outlet, longchamp uk, nike roshe run, wedding dresses, ralph lauren, hollister, bottega veneta, north face outlet, mont blanc pens, nike air max, jimmy choo outlet, mcm handbags, chi flat iron

oakleyses said...

canada goose outlet, canada goose, toms shoes, links of london, karen millen uk, doudoune moncler, pandora jewelry, louis vuitton, marc jacobs, montre pas cher, canada goose outlet, moncler uk, moncler, pandora charms, juicy couture outlet, louis vuitton, thomas sabo, replica watches, canada goose jackets, ugg uk, ugg, canada goose, ugg,uggs,uggs canada, louis vuitton, wedding dresses, juicy couture outlet, canada goose, swarovski, moncler, canada goose outlet, supra shoes, moncler outlet, lancel, coach outlet, canada goose uk, louis vuitton, moncler outlet, moncler, louis vuitton, swarovski crystal, ugg pas cher, barbour, pandora uk, barbour uk, ugg,ugg australia,ugg italia, moncler, hollister, pandora jewelry

historypak said...

That is really nice to hear. thank you for the update and good luck. phen375 alternative

raybanoutlet001 said...

replica watches
ralph lauren uk
fitflops sale
michael kors outlet
polo ralph lauren
michael kors outlet
mbt shoes outlet
cheap ray ban sunglasses
oakley sunglasses
michael kors outlet

jeje said...

foamposites
kate spade outlet online
michael kors outlet handbags
asics running shoes
nike air max 90
hermes belt
air jordan 6
baseball jerseys
nike air force 1
nike zoom

ASO Services said...

Thanks on your marvelous posting! It is very useful and good.Come on. I want to introduce an get app installs, I try it and I feel it is so good to rank app to top in app store search results, have you ever heard it?