Allow user to select data, see the tables list but not view the table/view/stored procs definition

Hi,
May I know how to achieve the above ? Please enlighten me.
TIA !

So you want users to be able to see the name of the table, but not the definition? I am afraid that this is not possible. You can give users access to a table and hide the definition, but the name is considered part of the definition.
Olaf mentioned VIEW DEFINITION. What he did not say is that when you have SELECT permission (or EXECUTE permission on a stored procedure), the permission VIEW DEFINITION is implied by the stronger permission. For this reason you need to explicitly DENY this
permission as shown in the script below.
In the script I create a user without a login and then impersonate a user. This is an excellent way to test permissions.
[sql]
CREATE TABLE tabbe (a int NOT NULL)
go
CREATE USER usse WITHOUT LOGIN
go
GRANT SELECT ON tabbe TO usse
DENY VIEW DEFINITION ON tabbe TO usse
go
EXECUTE AS USER = 'usse'
go
SELECT * FROM tabbe
go
SELECT name FROM sys.objects WHERE type = 'U'
EXEC sp_help tabbe
go
REVERT
go
DROP USER usse
DROP TABLE tabbe
{/sql]
Note: rather than denying VIEW DEFINITION on an individual object you can leave out "ON tabbe" to deny the permission across the database.
Erland Sommarskog, SQL Server MVP, [email protected]

Similar Messages

  • How to restrict user to select date from the calendar into a text item

    Hi All,
    I am using oracle 10g.IN a form i am having a block 'client_block' in that i am having a text_item ' entry_date' which is a datebase item and i have set enabled false in property palette and i created an image item on the same form and i have an calendar icon on it .In when_image_pressed trigger for image item i have written this code
    SET_ITEM_PROPERTY('CLIENT_BLOCK.ENTRY_DATE',ENABLED,PROPERTY_TRUE);
    DATE_LOV.Get_Date(sysdate,'CLIENT_BLOCK.ENTRY_DATE');
    This is working perfectly but user can enter or delete date into the text_item through keyboard i want to restrict that they can only select date from calendar.
    I have tried setting item property enabled false in triggers but it is not working.
    Can someone help me what trigger i have to use and how?.
    Thanks
    Sri

    Hi,
    This is working perfectly but user can enter or delete date into the text_item >>>through keyboard i want to restrict that they can only select date from calendarSet Insert allowed to 'NO' in property pallete of item ENTRY_DATE.
    In ON-ERROR Trigger::
    BEGIN
    DECLARE
    err_code CONSTANT NUMBER := error_code;
    err_type CONSTANT VARCHAR2(3) := error_type;
    BEGIN
    IF (err_type = 'FRM'
    AND err_code IN (40200)) THEN
    Message('Updates Not allowed, Please Select Your Date from Calendar');
    Message(' ');
    ELSE
    NULL;
    END IF;
    END;
    END;
    Thanks,
    Bhujendra

  • Allow users to select Fields that the resulting report would be sorted on

    Is it possible to make available to the users some specific fields from the database that they would be allowed to select themselves which fields they would like the resulting report sorted upon?

    The suggestion that was provided seems to have worked.  But right now I have a situation where I would like to give the users the option to select the desired sort order from 6 different fields.
    Invoice Date
    Due Date
    TransDate
    PO Num
    Invoice No
    Status.
    Right now I have a Sort Parameter created
    Then I also have a Sort Formula generated as follows.
    If {?SortField} = "DueDate" Then {APMASTER.DUE_DATE}
    Else
         If {?SortField} = "TransDate" Then {APMASTER.TRANS_DT}
         Else
              if{?SortField} = "InvDate" Then {APMASTER.INVDATE}
    as soon as I attempt to add another line to this formular that would be for the Invoice No as shown below.
    Else
                 if{?SortField} = "InvNo" Then {APMASTER.INVNO}
    I keep receiving a "A date-Time is required here"  I am assuming it must be because CR is not allowing me to create a formula and/or parameter that is using a mixture of Date and Text fields. 
    If you have any suggestion for a work around, it would be appreciated.

  • TechTool Pro 5 data recovery lets me search but not view or save

    I have booted from TechTool Pro 5 disk.  I'm trying to recover files, pics and such after having to reformat my mac.  I can see the files I'm looking for but I can't view, store or save them.  Am I missing a step?  I have an external drive attached to save/store files.  I have thing saved to my drive already.  Do I need to partition my external drive first?  I've looked online for a user guide/help but to no avail; only where to purchase or I need to call their technical support (can't get thur because I don't have serial number & volume-******).
    Thanks ahead of time.
    PS
    Unable to update software including most up to date version of 10.6

    I have booted from TechTool Pro 5 disk.  I'm trying to recover files, pics and such after having to reformat my mac.  I can see the files I'm looking for but I can't view, store or save them.  Am I missing a step?  I have an external drive attached to save/store files.  I have thing saved to my drive already.  Do I need to partition my external drive first?  I've looked online for a user guide/help but to no avail; only where to purchase or I need to call their technical support (can't get thur because I don't have serial number & volume-******).
    Thanks ahead of time.
    PS
    Unable to update software including most up to date version of 10.6

  • Is that possible to display the user selection data in the printable page?

    Hi All,
    I'm going to add a printablepage button on my page.
    Here comes a questions.
    Is that possible to display the user selection data in the printable page?
    For example,
    I have a table in the page,with 10 records.User select 5 of them.Can I display these 5 records in the printable page?
    Please help.

    Hi Yannick,
    Thanks a lot for the information. It worked.
    The portlet data can be accessible using bindings, but parameter name can be different.
    Meanwhile I have got one more scenario, where the Portlet and Task Flow placed in different pages of WCP Application. On change of data in the Portlet the application should navigate to another page where the Task Flow placed and displays selected data.
    Basically I can not use any button for navigation. The navigation should happen once I do some action in Portlet.
    Is this possible? If yes can you please let me know the steps?
    Thanks in advance!
    Somnath
    Edited by: Somnath Basak on Dec 20, 2011 9:41 AM

  • How to select data from a table using a date field in the where condition?

    How to select data from a table using a date field in the where condition?
    For eg:
    data itab like equk occurs 0 with header line.
    select * from equk into table itab where werks = 'C001'
                                                      and bdatu = '31129999'.
    thanks.

    Hi Ramesh,
    Specify the date format as YYYYMMDD in where condition.
    Dates are internally stored in SAP as YYYYMMDD only.
    Change your date format in WHERE condition as follows.
    data itab like equk occurs 0 with header line.
    select * from equk into table itab where werks = 'C001'
    and bdatu = <b>'99991231'.</b>
    I doubt check your data base table EQUK on this date for the existince of data.
    Otherwise, just change the conidition on BDATU like below to see all entries prior to this date.
    data itab like equk occurs 0 with header line.
    select * from equk into table itab where werks = 'C001'
    and <b> bdatu <= '99991231'.</b>
    Thanks,
    Vinay
    Thanks,
    Vinay

  • Reading selected data in the table control

    Hi Friends,
    I have final data in my table control now the user wants to select only few records from the displayed data, for that I kept a check box for selection, But my question is I am unable to read the selected data.
    Actually user requirement is he has to update only the selected data from the displayed data in the table control.
    Can any one tell me how to read the selected records after displaying in the table control.
    Thanx in advance,
    Line

    Hi
    If your table control has a check box, your internal table should have a field for it. Its value will be X if the checkbox is setted else it'll be SPACE.
    So in the PAI u should read only the records where that flag is X:
    LOOP AT ITAB WHERE MARK = 'X'.
    ENDLOOP.
    Max

  • Selecting data in the table control

    Hi Friends,
    I have final data in my table control now the user wants to select only few records from the displayed data, for that I kept a check box for selection, But my question is I am unable to read the selected data.
    Actually user requirement is he has to update only the selected data from the displayed data in the table control.
    Can any one tell me how to read the selected records after displaying in the table control.
    Thanx in advance,
    Line

    Hello Line,
    As gopi has suggested do the following..
    for the table control properties u have an option called W/SelColumn.
    Give in some name (ROW_SEL)to that and also include a field CHK in the internal which is being passed to the table control.
    and in the PAI of the table control module wirte like this...
    Then in your code..
    PROCESS BEFORE OUTPUT.
    PBO FLOW LOGIC FOR TABLECONTROL 'TABCONTROL'
    MODULE TABCONTROL_CHANGE_TC_ATTR.
    MODULE TABCONTROL_CHANGE_COL_ATTR.
    LOOP AT lt_final
    INTO lw_final
    WITH CONTROL tabcontrol
    CURSOR tabcontrol-current_line.
    MODULE tabcontrol_get_lines.
    MODULE TABCONTROL_CHANGE_FIELD_ATTR
    ENDLOOP.
    MODULE status_0101.
    PROCESS AFTER INPUT.
    PAI FLOW LOGIC FOR TABLECONTROL 'TABCONTROL'
    LOOP AT lt_final.
    MODULE read_data.
    MODULE tabcontrol_user_command.
    ENDLOOP.
    MODULE TABCONTROL_CHANGE_TC_ATTR.
    MODULE TABCONTROL_CHANGE_COL_ATTR.
    MODULE user_command_0101.
    MODULE tabcontrol_user_command input.
    if lt_final-chek = 'X'.
    *put your logic here something like
    move corresponding lt_final to gt_final.
    *now you have selcted rows data in gt_final.
    endif.
    endmodule.
    Regards

  • DateField: Restrict user to select date only from the calender control ??

    How can I restrict user to select date only by using the Calender control, not by typing.
    Abhinav

    Hi,
    This is working perfectly but user can enter or delete date into the text_item >>>through keyboard i want to restrict that they can only select date from calendarSet Insert allowed to 'NO' in property pallete of item ENTRY_DATE.
    In ON-ERROR Trigger::
    BEGIN
    DECLARE
    err_code CONSTANT NUMBER := error_code;
    err_type CONSTANT VARCHAR2(3) := error_type;
    BEGIN
    IF (err_type = 'FRM'
    AND err_code IN (40200)) THEN
    Message('Updates Not allowed, Please Select Your Date from Calendar');
    Message(' ');
    ELSE
    NULL;
    END IF;
    END;
    END;
    Thanks,
    Bhujendra

  • In the Date Picker, How can I default to select * dates if the user does ..

    In the Date Picker, How can I default to select * dates if the user does not select a date.
    Thanks,
    Doug

    Doug,
    Now lets say l want everythingCould you post some sample data and the output that you want to get..? It would be much easy to understand the requirements...
    When you mean everything, I am assuming you need all possible dates possible between date1 and date2.
    you can use... (from asktom.oracle.com).
      1  select to_date('12-jan-2009','DD-MON-YYYY') + rownum -1
      2    from ALL_OBJECTS
      3    where rownum <= (to_date('20-jan-2009','dd-mon-yyyy') -
      4*                     to_date('12-jan-2009','DD-MON-YYYY') +1 )
    sql> /
    TO_DATE('
    12-JAN-09
    13-JAN-09
    14-JAN-09
    15-JAN-09
    16-JAN-09
    17-JAN-09
    18-JAN-09
    19-JAN-09
    20-JAN-09
    9 rows selected.
    For your case, since you have date1 and date2...
    select to_date(:p12_date1,'DD-MON-YYYY') + rownum -1
      from ALL_OBJECTS
      where rownum <= (to_date(:p12_date2,'dd-mon-yyyy') -
                        to_date(:p12_date1,'DD-MON-YYYY') +1 )Should work.. in my opinion...Haven't tested the second one in Apex .
    Is this what you were looking for ..?? If not, please elaborate...
    Thanks,
    Rajesh.

  • Selecting data from two tables

    I am trying to select data from two tables.  The only problem that I am running into, is that i am only seeing results from my 'uploads' table.  there is also a record in documents where user = 1 that should show up.  here is my sql:
    $userIDNum = 1;
    $sql="Select *
    from uploads, documents
    WHERE uploads.user = documents.user AND uploads.user = $userIDNum
    ORDER BY uploads.title ASC, documents.title ASC";

    You'll need to explain a little more about your data and what you are trying to accomplish. Your current sql will select all columns from both the uploads and documents tables but only rows where the user id in both tables match, AND the user id equals 1. Is that not what you are seeing? Where's the code that outputs the results?

  • ORA-13773: insufficient privileges to select data from the cursor cache

    We are trying to create STS using the below query:
    exec sys.dbms_sqltune.create_sqlset(sqlset_name => 'TEST_STS', -
    sqlset_owner => 'SCOTT');
    The below procedure will load sql starting with 'select /*MY_CRITICAL_SQL*/%' from cursor cache into STS TEST_STS.
    DECLARE
    stscur dbms_sqltune.sqlset_cursor;
    BEGIN
    OPEN stscur FOR
    SELECT VALUE(P)
    FROM TABLE(dbms_sqltune.select_cursor_cache(
    'sql_text like ''select /*MY_CRITICAL_SQL*/%''',
    null, null, null, null, null, null, 'ALL')) P;
    dbms_sqltune.load_sqlset(sqlset_name => 'TEST_STS',
    populate_cursor => stscur,
    sqlset_owner => 'SCOTT');
    END;
    We were getting the following error: ORA-13761: invalid filter
    After granting the below privileges to the user we are getting the below error:
    Err msg:
    ERROR at line 1:
    ORA-13773: insufficient privileges to select data from the cursor cache
    ORA-06512: at "SYS.DBMS_SQLTUNE", line 2957
    ORA-06512: at line 10
    For SQL Tuning Sets:
    GRANT ADMINISTER ANY SQL TUNING SET TO scott;
    For Managing SQL Profiles:
    GRANT CREATE ANY SQL PROFILE TO scott;
    GRANT ALTER ANY SQL PROFILE TO scott;
    GRANT DROP ANY SQL PROFILE TO scott;
    For SQL Tuning Advisor:
    GRANT ADVISOR TO scott;
    Others:
    GRANT SELECT ON V_$SQL TO SCOTT;
    GRANT SELECT ON V_$SQLAREA TO SCOTT;
    GRANT SELECT ON V$SQLAREA_PLAN_HASH TO SCOTT;
    GRANT SELECT ON V_$SQLSTATS TO SCOTT;
    grant select on sys.DBA_HIST_BASELINE to SCOTT;
    grant select on sys.DBA_HIST_SQLTEXT to SCOTT;
    grant select on sys.DBA_HIST_SQLSTAT to SCOTT;
    grant select on sys.DBA_HIST_SQLBIND to SCOTT;
    grant select on sys.DBA_HIST_OPTIMIZER_ENV to SCOTT;
    grant select on sys.DBA_HIST_SNAPSHOT to SCOTT;
    Any info from your end to resolve the issue will be of great help.
    Thanks

    What is the alert log reporting. Are you seeing any other errors than these in the alert log too?

  • Select data from two tables...!

    HI Experts...!
    i m a beginner user and i want to select data from two tables proj and prps.....using joins.....and internal tables i have written a code...
    SELECT prps~pspnr
           prps~objnr
           prps~psphi
           proj~ernam
           proj~erdat
           proj~pspnr
    INTO  table itab   -
    itab is internal table
    FROM prps inner join proj
    WHERE pspnr in p_no and prpspsphi = projpspnr.
    but there is error in from clause ..please help me....
    Advance thanx....

    Hi,
    check the sample code bellow above two reply will solve out your problem but one more extra line in your code pointed out bellow.
    TABLES: prps, proj.
    TYPES:  BEGIN OF ty_test,
            pspnr LIKE prps-pspnr,
            objnr LIKE prps-objnr,
            psphi LIKE prps-psphi,
            ernam LIKE proj-ernam,
            erdat LIKE proj-erdat,
            END OF ty_test.
    DATA: itab TYPE STANDARD TABLE OF ty_test WITH HEADER LINE.
    SELECT-OPTIONS: p_no FOR prps-pspnr.
    SELECT  prps~pspnr
            prps~objnr
            prps~psphi
            proj~ernam
            proj~erdat
    *        proj~pspnr " No need for this you have selected this in
    *     the first line because it is commone so you only need to select from any one
            INTO TABLE itab
    FROM prps INNER JOIN proj ON ( prps~pspnr = proj~pspnr  )
    WHERE prps~pspnr IN p_no.
    Best Regards,
    Faisal
    Edited by: Rob Burbank on Dec 24, 2009 12:24 PM

  • Allow user to select rows

    Is there any way we can allow Users to select rows in a report so that they can print the details present for that report from an underlying details sub-report?
    Dhananjay Rele

    It is possible but might prove unscalable. SSRS reports provide 3 mechanisms for handling click events.
    Hyperlinks. You can format text placeholders to interpret basic HTML, including hyperlinks.
    Action. Most SSRS controls have an Action property that has 4 possible methods to handle the click event: None (ignore, default behavior), Go to report, Go to bookmark, Go to URL.
    Visibility (Display can be toggled by this report item). You can specify another report control that, when clicked, toggles the visibility of this report control.
    The first 2 might be used to reload the current report with updated parameter settings. For instance, I create a parameter called @PrintThis. When I click a row in a tablix, I am clicking on a textbox in one of the colloumns of that row. I can set the action
    property of that text box to open the current report, passing all the same parameter values in except that I set @PrintThis to @PrintThis+";"+Fields!MyCell.Value. This parameter is used to display the details of the row I clicked plus any previously clicked
    rows. With this approach, you would need a text box with the action property set to pass "" to @PrintThis so the user can clear that property to start over. Or set up a table that displays each value of the @PrintThis parameter with the action property set
    to remove that value from @PrintThis (@PrintThis = Replace(@PrintThis, Fields!ClickedCell.Value+";","")).
    The 3rd option could be used if the report already has a separate details subreport embedded for each row in the main report's tablix with it's Visibility set to Hide and with "Display can be toggled by this report item" set to the appropriate row's clickable
    cell. It will likely take longer to run the report initially but the toggling of the subreports is near instantaneous. Using Action or hyperlink will be quicker initially but each click will have a similar delay to the initial report rendering.
    So this will include certain details as determined by the "clicks" a user selects
    "You will find a fortune, though it will not be the one you seek." -
    Blind Seer, O Brother Where Art Thou
    Please Mark posts as answers or helpful so that others may find the fortune they seek.

  • Error while selecting date from external table

    Hello all,
    I am getting the follwing error while selecting data from external table. Any idea why?
    SQL> CREATE TABLE SE2_EXT (SE_REF_NO VARCHAR2(255),
      2        SE_CUST_ID NUMBER(38),
      3        SE_TRAN_AMT_LCY FLOAT(126),
      4        SE_REVERSAL_MARKER VARCHAR2(255))
      5  ORGANIZATION EXTERNAL (
      6    TYPE ORACLE_LOADER
      7    DEFAULT DIRECTORY ext_tables
      8    ACCESS PARAMETERS (
      9      RECORDS DELIMITED BY NEWLINE
    10      FIELDS TERMINATED BY ','
    11      MISSING FIELD VALUES ARE NULL
    12      (
    13        country_code      CHAR(5),
    14        country_name      CHAR(50),
    15        country_language  CHAR(50)
    16      )
    17    )
    18    LOCATION ('SE2.csv')
    19  )
    20  PARALLEL 5
    21  REJECT LIMIT UNLIMITED;
    Table created.
    SQL> select * from se2_ext;
    SQL> select count(*) from se2_ext;
    select count(*) from se2_ext
    ERROR at line 1:
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-04043: table column not found in external source: SE_REF_NO
    ORA-06512: at "SYS.ORACLE_LOADER", line 19

    It would appear that you external table definition and the external data file data do not match up. Post a few input records so someone can duplicate the problem and determine the fix.
    HTH -- Mark D Powell --

Maybe you are looking for

  • Adobe Actions in Photoshop elements

    I have recently acquired a program that was originally designed on Adobe Photoshop. I am using Adobe Photoshop Elements, bot most features are included One difference is that Photosop Element does not have an 'action button' to load the action script

  • Bullets and Numbering "Text After" attribute

    Hi Everyone, I need to grab "Text After" attribute of and existing bullet list in InDesign document and change it to my text. I think, I need to get access to "kBNBulletTextAfterBoss", but I don't know which boss agregates it. Thanks

  • 3D Picture Control: Find Object function closes scene reference when it has no children

    I am using Labview 8.2 The "Find Object.vi" function is causing me some problems as it is closing the reference to the Scene Object passed into it when that Scene object does not contain any child objects.  The attached screengrab shows the relevant

  • Me32k is there any bapi for this transction  ?

    i want to add lines and text for agreement ,  is there bapi for it ? i sow some bapi's that look fit but thay are not good for me32k . the following list not good as i know  : U can make use of the following BAPI: 2034 Business Object Customer Contra

  • Over-riding OS Keyboard commands

    I am doing a little remedial self training on keyboard commands. I went to F10 to do an overwrite edit and instead got the grey out/window separating action as in the OS. How can I over-ride this when I am working in FCP and then reconnect the OS com