Is there a way to create tables that can't update rows

Hi
I have an application where security is very importante. I have tables that con only be inserted and queried, not updated or deleted. Is there a way I can tell Oracle to prohibit update and delete on that table.
Regards,
Néstor Boscán

> Is there a way I can tell Oracle to prohibit update and delete on that table.
Yes. Quite easy in fact. It is called FGAC - Fine Grained Access Control.
You create a FGAC function for those tables. These simply returns 1=2 to be added to an UPDATE or DELETE statement's predicate.
Example:
SQL> -- am able to delete from emp
SQL> delete from emp;
17 rows deleted.
SQL> rollback;
Rollback complete.
SQL>
SQL> -- create policy FGAC function
SQL> create or replace function vpdbPolicy( schema varchar2, object varchar2 ) return varchar2 is
2 begin
3 return( '1=2' );
4 end;
5 /
Function created.
SQL>
SQL> -- create FGAC policy
SQL> begin
2 DBMS_RLS.add_policy(
3 object_schema => USER,
4 function_schema => USER,
5 object_name => 'emp',
6 policy_name => 'PROTECT_EMP',
7 policy_function => 'vpdbPolicy',
8 update_check => FALSE,
9 statement_types => 'UPDATE DELETE'
10 );
11 end;
12 /
PL/SQL procedure successfully completed.
SQL>
SQL> -- no longer able to delete from emp
SQL> delete from emp;
0 rows deleted.
SQL> rollback;
Rollback complete.
SQL>

Similar Messages

  • Is there any way  to create table  of more than 30 char length name

    hi all,
    Please tell me is there any way to create table of more than 30 char length name in oracle 10g
    Regards

    Hi,
    If you want table name to be more than 30 Char.
    I am sure,your naming convention is not upto the mark.
    Its not possible in 10g as well as in 11g.
    Thanks
    Yogesh Nagle
    India

  • Is there any way to an index that can be used to include the "OR condition "?

    Hello I have some questions.
    The test was conducted in the following procedure .
    create table test
    c1 varchar2(10),
    c2 varchar2(10),
    primary key(c1)
    create index test_idx1 on test(c2);
    Command> explain select * from test where c1 = 'AAAAAAAAAA' or c2 = 'AAAAAAAAAA';
    Query Optimizer Plan:
      STEP:                1
      LEVEL:               1
      OPERATION:           RowLkRangeScan
      TBLNAME:             TEST
      IXNAME:              TEST
      INDEXED CONDITION:   <NULL>
      NOT INDEXED:         TEST.C2 = 'AAAAAAAAAA' OR TEST.C1 = 'AAAAAAAAAA'
    Command>
    Command> explain select * from test where c1 = 'AAAAAAAAAA' and c2 = 'AAAAAAAAAA'
    Query Optimizer Plan:
      STEP:                1
      LEVEL:               1
      OPERATION:           RowLkRangeScan
      TBLNAME:             TEST
      IXNAME:              TEST
      INDEXED CONDITION:   TEST.C1 = 'AAAAAAAAAA'
      NOT INDEXED:         TEST.C2 = 'AAAAAAAAAA'
    Command>
    By including the "OR condition " in this test does not use the index.
    Is there any way to an index that can be used to include the "OR condition "?
    Thanks.
    GooGyum.

    A database cannot in general use indexes in this way for an 'or' involving two different columns. However, for this specific example one can easily rewrite the query using 'UNION' to use the relevant indexes while still giving the same (correct) result:
    Command> explain select * from test t1 where t1.c1 = 'AAAAAAAAAA' union select * from test t2 where t2.c2 = 'AAAAAAAAAA';
    Query Optimizer Plan:
      STEP:                1
      LEVEL:               1
      OPERATION:           RowLkRangeScan
      TBLNAME:             TEST
      IXNAME:              TEST
      INDEXED CONDITION:   T1.C1 = 'AAAAAAAAAA'
      NOT INDEXED:         <NULL>
      STEP:                2
      LEVEL:               2
      OPERATION:           RowLkRangeScan
      TBLNAME:             TEST
      IXNAME:              TEST_IDX2
      INDEXED CONDITION:   T2.C2 = 'AAAAAAAAAA'
      NOT INDEXED:         <NULL>
      STEP:                3
      LEVEL:               1
      OPERATION:           OrderBy
      TBLNAME:             <NULL>
      IXNAME:              <NULL>
      INDEXED CONDITION:   <NULL>
      NOT INDEXED:         <NULL>
      STEP:                4
      LEVEL:               2
      OPERATION:           UnionMergeSort
      TBLNAME:             <NULL>
      IXNAME:              <NULL>
      INDEXED CONDITION:   <NULL>
      NOT INDEXED:         <NULL>
    Maybe you can apply a similar trick? If you know there is no possibility of duplicate rows then you can further optimise this (in terms of performance) by using UNION ALL.
    Chris

  • Is there a way to create tables in Illustrator?

    I've been reading up on tips to incorporate tables into Illustrator. Unlike Indesign, I don't think illustrator is as adept and equipped with all the sophisticated tools. I read that tables created in Indesign can be copied and pasted onto illustrator - is that correct?
    Suggestions welcome!
    Thanks,
    Susan

    I read that tables created in Indesign can be copied and pasted onto illustrator - is that correct?
    Yes, since ID creates them as native vector objects, this should be no problem. You should however limit yourself to only use basic formatting. At some point it was even possible to copy&paste Excel tables into Adobe programs, but that does not work any longer with newer Office versions. If you are having difficulties, also simply consider printing/ saving a PDF from your calc program and placing or opening it for refinements.
    Mylenium

  • Is there any way to create table inside cell in sapui5??

    Hello experts,
    How do we create table inside cell in ui5??
    something like this::
    Market Activities
    Other Activities
    Header 1
    Header 2
    Header 1
    Header 2
    Header 3
    Header 1
    Header 2
    Header 3
    Then how do we go about binding??
    Thank you,
    Best Regards
    Chetna

    This code is actually for simple table which i have created:
    var dvrData = [
                                   {DealerNo:"",checkedOrd:{checked:false,enabled:false},checkedOrd1:{checked:false,enabled:false},checkedColl:  {checked:false,enabled:false},checkedPromos:{checked :false,enabled:false},
    var newDvrTable = new sap.ui.table.Table({
                         id:"newDvrTableId",
                         visibleRowCount: 1,
                        selectionMode: sap.ui.table.SelectionMode.Single
    //following field comes unser first column (with blank label)
    newDvrTable.addColumn(new sap.ui.table.Column({
    label: new sap.ui.commons.Label({text: " Dealer Code", wrapping : true}),
                         template: new NewTextField({
                               id:"dlrNum",
                               value: "{DealerNo}" ,
    // following columns come under "MARKET ACTIVITIES"
      newDvrTable.addColumn(new sap.ui.table.Column({
                         name : "SHOP ACTIVITY",
                         label: new sap.ui.commons.Label({id:"shopId",text: "SHOP",
                               wrapping : true}),
                               template: new sap.ui.commons.CheckBox("chkShop",{
                                      enabled: "{checkedOrd/enabled}",
                                      checked:"{checkedOrd/checked}",
    newDvrTable.addColumn(new sap.ui.table.Column({
                         name : "Order Related ACTIVITY",
                         label: new sap.ui.commons.Label({id:"shopId",text: "ORDER",
                               wrapping : true}),
                               template: new sap.ui.commons.CheckBox("chkShop",{
                                      enabled: "{checkedOrd1/enabled}",
                                      checked:"{checkedOrd1/checked}",
    //Following two columns must come under Other Activities Column
    newDvrTable.addColumn(new sap.ui.table.Column({
                         name : "CHEQUE COLLECTION",
                         label: new sap.ui.commons.Label({id:"shopId",text: "COLLECTION",
                               wrapping : true}),
                               template: new sap.ui.commons.CheckBox("chkShop",{
                                         enabled: "{checkedColl/enabled}",
                                           checked:"{checkedColl/checked}",
    newDvrTable.addColumn(new sap.ui.table.Column({
                         name : "SCHEME UPDATE",
                         label: new sap.ui.commons.Label({id:"shopId",text: "SCHEME UPDATE",
                               wrapping : true}),
                               template: new sap.ui.commons.CheckBox("chkShop",{
    enabled: "{checkedPromos/enabled}",
                                      checked:"{checkedPromos/checked}",
      var oModel = new sap.ui.model.json.JSONModel();
                  oModel.setData(dvrData);
    var newdata = oModel.getData();
    sap.ui.getCore().setModel(oModel,"newDvr");
                  newDvrTable.setModel(oModel);
                  newDvrTable.bindRows("/");
    Thank you,
    Best Regards,
    Chetna

  • Is there a way to create text that 'writes and scrolls' ?

    Little tricky to explain but we have all seen the sort of thing I mean....
    Ive attached an image to try and make it a bit clearer. Its basically data thats
    spilling out across a computer display...the sort of thing we have seen in loads of movies.
    I have done a hand animated version but wondered if there was a way to do it with the
    type animation tools....?

    See this thread from yesterday in which we discuss this kind of text animation:
    http://forums.adobe.com/thread/793425
    The only element that's different in your example is the the text layer would be animated to move up, probably with Hold keyframes.

  • Is there a way to create a table of contents listing the order of tabs(sheets) in a Numbers document?

    I am planning my wedding and I have this huge Numbers document with 20+ tabs and I have plans to add many more tabs. Is there a way to create a table that has two columns: column 1= order that a tab appears, column 2=tab name? For example, my first three tabs are called Venues, Must Haves, and To Do List (in this order. I'd want this table of contents to be in the first sheet of the document, so it would be like sheet 1. Then I 'd want like the cells of column 1 to be like 2, 3, 4 (2nd, 3rd, 4th sheet in the document), and then the cells of column 2 to say Venues, Must Haves, and To Do List. I can make a tiny table of one cell in each sheet that I copied the name of the sheet and then do like a cell reference for column 2, but I'm having trouble w column 1.

    There is no referential value for the order of the sheets, just the sheet name. Only two things I can think of to suggest:
    Do the same thing for the first column that you do with the second (i.e. put a referential column in the same table as the Name and point to that).
    Seriously consider using a word processor program. Numbers is probably the wrong tool.

  • Is there a way to create "temporary" tables in SAP database?

    Hello,
    Is there a way to create temporary tables in ABAP?
    Here is our scenario:
    1. Invoke a custom RFC that creates a temporary table and returns the name of the table.
    2. Invoke another custom RFC and pass this table name as parameter. This RFC internally does some INNER JOIN with the temporary table.
    3. Invoke the third RFC to delete the temporary table.
    Note that the name of the table cannot be static. We have many users using our application simultaneously and connecting to the SAP server.
    I would appreciate it if you could point me in the right direction.
    Thank you in advance for your help.
    Peter

    I just ran into a similar issue.  While only calling the select statement 2 times, each time had so many entries in the 'for all entries' list, that the compiler converted this into about 700 calls to the select.  Now since the select joined three real tables on the database, the trace shows this one select as being the slowest item in this application.
    I think that happened because 'for all entries' gets converted to an 'IN' clause, and then the total number of characters in any SQL statement has an upper limit.   So the compiler must make the select statement over and over until it covers all entries in the 'for all entries' list.  Is that correct?
    Since every database I ever saw has the concept of db temporary tables, I have used db temp tables many times for this sort of thing.
    The ABAP compiler could determine that more than one IN statement will be need, then use an alternate: write all the FOR ALL ENTRIES to a db temp table, then join on the db temp table, then drop db temp table.  Since the compiler does this sort of thing, no application code needs change to get the speed boost.

  • Is there a way to create a function that concatenates

    Hello,
    I constantly find myself needing to create a forumla tha concatenates employee's ID, last name, and first name.  Is there a way to create a function in Crystal that will allow me to create a function that already has this concatenation in place?  I am using Crystal XiR2.
    Thanks,
    Z

    Hi Zack,
    Custom function is a function that can be used in any report and it doesn't depend on database. We have to provide the values in order to claculate what we want and basing on the values provided it calculates accordingly. We cannot use global variables in custom functions and also evaluation time functions (like whileprintingrecords,whilereadingrecords). So I think it is not possible to get the strings concatenated without passing the values.
    Alternatively you can go for a query using Add Command like this
    select IDFirstNameLastName as value from table
    Regards,
    Raghavendra

  • Is there a way to create a PDF form that ANYONE can fill out and SAVE with their content?

    Is there a way to create a PDF form that ANYONE can fill out and SAVE with their content? By anyone, I mean someone who can download and use the free Adobe Reader, on either a Mac or PC. I have Acrobat Pro, and would like to be able to create forms that can not only be filled out and printed, but saved and emailed, which is not an option with the forms I have created to date. They can be filled out, but not saved, with Adobe Reader.
    TIA,
    Nancy

    To do what Dave indicated you need to do, it depends on what version of Acrobat you have:
    Acrobat 8: Advanced > Enable Usage Rights in Adobe Reader
    Acrobat 9: Advanced > Extend Features in Adobe Reader
    Acrobat 10: File > Save As > Reader Extended PDF > Enable Additional Features
    Acrobat 11: File > Save as Other > Reader Extended PDF > Enable More Tools (includes form fill-in & save)
    I wonder what it will be next time?

  • Is there a way to create three different physical calendars in ical so that I can get a fiscal view of the calendars?

    Is there a way to create three physically different calendars in iCal so that I can view the calendar and events from a fical point of view?

    iCal just shows the calendars you have created in your account(s).  So if you are using iCloud just log into your iCloud account in a web browser and make as many new calendars as you wish to have.  Then enable those in iCal.
    If you use Google accounts or something else for the calendars, then create them as needed, and enable them in iCal.
    I have several separate calendars all displayed in iCal - a couple linked through my Gmail accounts, and one through my iCloud account.  Each uses a different default item color so they are distinct in iCal.

  • Is there a way to create a button that links to a website?

    Is there a way to create a button that links to a website?
    I was reading up that it's possible to this with menus, and tracks but can you do it with a button and how?
    I am hoping to create a button that people viewing my discs on a computer can click on the link and their web browser will pop up and take them to a website.
    Any help is appreciated.
    Thanks.
    -Fraky

    dvd@ccess questions are being asked once a week on this forum, so I'll repeat why it's useless:
    - Mac users have to enable the feature in the preferences of DVD Player in order to for the links to work.
    - PC users have to install a small application on their PC, and they have to reboot the PC in order for the links to work.
    - On top of this, it's still unreliable, and may not work on some computers.
    It's a dog: Don't use it.

  • Is there a way to create a custom screensaver with pics/slides that display for different amounts of time?

    Is there a way to create a custom screensaver with pics/slides that display for different amounts of time? Or even add a "video slide" into the screensaver?
    My business has 3 TVs displayed in our lobby, each with its own apple TV and they are all linked to the same photo stream. Currently the Atv screensaver displays the photostream pictures of our products for the default 3 seconds. We just added pics/slides that now display messages and useful info for our customers but I want that info to be displayed for a longer period of time than the pictures to give people a chance to read it.
    I tried using flickr and powerpoint as a work around but no luck.  I created a slide in powerpoint with play length of 15 secs and saved it as a wmv file.  I added that file to a "screensaver" set in flickr and pointed the Atv screensaver to that flickr set.  It still displays everything, pics and the wmv file at the default 3 sec.
    I know I can increase the duration of all pics in the screensaver to display for longer but the goal is to have the pics display at 3 secs and the info slides to display at 15 secs.

    Welcome to the Apple Community.
    No that's not possible.
    If you have any suggestions that you think might enhance the Apple TV you can send Apple your feedback here 

  • Is there a way to create a project with custom audio settings that are NOT only "Stereo" or "Surround"?

    Is there a way to create a project with custom audio settings that are NOT only "Stereo" or "Surround"?
    Thanks!
    -Adrian

    the old apps are on my computer but they have had upgrades since they were put on the ipod originally.  you think you would get a warning about this when you restored. I was not worried about losing the progress of the apps but i would have been worried about the app it self!!!!!

  • I have created my site with Muse and have uploaded to an external ftp hosting, now my secure log in will not work because I am not using BC. Is there a way to create a secure log in that will work with out being forced to use BC?

    I have created my site with Muse and have uploaded to an external ftp hosting, now my secure log in will not work because I am not using BC. Is there a way to create a secure log in that will work with out being forced to use BC?

    Hi
    Secure Zone login feature will only work if you host your website with Business catalyst.
    Please take a look to this as an alternative
    Password Protect Pages Widget for Adobe Muse
    Also, check this thread,
    Re: Can I create a login/password protection in Muse for a HTML5 page or two?

Maybe you are looking for

  • "BI Content" not displayed in RSA1

    Hello Folks, i have a newly installed SAP BW 7.31 with BI_CONT 747 Patch 3. When opening RSA1 the branch "BI Content" is not displayed, therefore no BI Content can be installed. Do i we have to activate anything? or are there any special options in S

  • CS2 acrobat 7,0 professional will not install

    I have CS2 Premium on XP. Had problems with printer not supporting pdfs. After techs fixed my computer Acrobat 7.0 pro will not work right. after 3 weeks with customer support and waiting days for them to get back to me they say they can't help - don

  • Apple video format.

    Wouldn't it be awesome if, Apple changed their video format to ".flv"? or at least include it? this would mean: less space, lighter decoding, and no more convertion of video files. SUPPORT!!

  • Themes in iDVD 5.0 are not showing up

    None of the themes are showing up, I'm just getting a black screen although the text does show. Even on previous finished projects, when I open them, the theme does not show up. Any help would be appreciated. Thanks.

  • Reg Organisational Structure Creation

    Hi, When Iam trying to  create root Org Unit  in Org Mgmnt Module it is giving the error as "No valid interval found (internal number assignment)". I also tried to maintain the number ranges entries( internal) in spro . I guess I might not be maintai