Check for the existing index

I'm a DBA working with 3 application developers, they want to know how to check for existing indexes for some columns
in a table in their schema.

a friend told me to check the existing index for some column you have to query
view dba_ind_columns so you must be a sysdba user

but I don't want to give the developers of the application of the privilege sysdba

but my friend told me, to avoid sysdba grant for application developers, they can query the user_indexes view in their scheme, but after watching the user_indexes view,.

It gives me a lot of data but does not give me the NAME of COLUMN

How can I solve this problem, which is:

Let application developers check existing indexes for some columns in their schema without granting them sysdba privilege.

user_ind_columns

Tags: Database

Similar Questions

  • Check for the existing XML element

    Hi all

    I'm writing a simple script first check if an XML element exists and creating so if it's not. I tried to change a piece of code that I used previously to do the same for paragraph styles, but apparently it's not that simple. Currently, all I get is the error "Unable to run the script in the 'main' target engine!" Without checking them, adding the XML element based on the result of the search works very well.

    /* Find all instances of the word "Superscript" */
    app.findTextPreferences.findWhat = "Superscript";
    var mySuperscript = myDocument.findText(); // Save search result for future reference
    
    /* See if an XML element named "Superscript" already exists, and create it if that's not the case; then add it to all instances of the word "Superscript" */
    var myXMLElementSuper = myDocument.xmlElements.item("Superscript");
    try {
    var myName = myXMLElementSuper.name;
    }
    catch (myError){
        var myXMLElementSuper = myDocument.xmlElements.add({markupTag:"Superscript", xmlContent:mySuperscript[i]});}
    

    Any help would be greatly appreciated!

    Regards and thanks in advance.

    Julian

    The myDocument.xmlElements always has a single element - the root element.

    If you want your element directly below that, you have to work a level down.

    To try-catch for such situations regular aid is bad because you spend so usually the ESTK option stop on exceptions and real problems don't miss. Use the isValid property.

    var rootXE = myDocument.xmlElements.item(0);
    var superXE = rootXE.xmlElements.itemByName("Superscript");
    if( !superXE.isValid )
      superXE = rootXE.xmlElements.add(...
    else
     superXE = superXE.getElements()[0]; // take first of potentially multiple elements
    
  • Syntax for the existing index based on a function

    Hello:

    I'm on 10.2.0.3.

    Below is the list of indexes and the columns in the index on one of the tables. Aparantly one of the columns (SYS_NC00220$) is actually a function-based index.

    Anyone know how to get the SQL syntax for this index? TIA.

    INDEX_NAME UNIQUENES COLUMN_NAME POSITION_COLONNE
    ------------------------------ --------- ------------------------------ ---------------
    PS0BI_HDR not BILL_TO_CUST_ID 1
    PS0BI_HDR don't BUSINESS_UNIT 2
    PS0BI_HDR only SYS_NC00220$ 3
    PS1BI_HDR not BILL_STATUS 1
    PS1BI_HDR don't BUSINESS_UNIT 2
    PS1BI_HDR only SYS_NC00220$ 3
    PS2BI_HDR not CONTRACT_NUM 1
    PS2BI_HDR don't BUSINESS_UNIT 2
    PS2BI_HDR only SYS_NC00220$ 3
    NON-UNIQUE PSABI_HDR BILL 1
    PSABI_HDR don't BILL_TO_CUST_ID 2
    PSABI_HDR don't BUSINESS_UNIT 3
    PSABI_HDR not BILL_STATUS 4
    UNIQUE PROCESS_INSTANCE PSBBI_HDR 1
    UNIQUE BUSINESS_UNIT PSBBI_HDR 2
    INVOICE SINGLE PSBBI_HDR 3
    UNIQUE BUSINESS_UNIT PS_BI_HDR 1
    UNIQUE SYS_NC00220 PS_BI_HDR $ 2

    query user_ind_expressions and search for COLUMN_EXPRESSION.

    This will give you an expression.

  • Windows cannot check for the error code 80070424 updates.

    I have windows vista premium x 64
    Windows Update stopped working and when I they do it manually it says windows cannot check for the error code 80070424 updates.
    I searched everywhere for an answer... Please help

    ----

  • our company had Adobe CS 3, we ship adobe creative cloud member of more than 2 years now. How can I get credit for the existing customer.

    our company had Adobe CS 3, we ship adobe creative cloud member of more than 2 years now. But we must all credit for the existing customer.

    There is no current discount for loyal customers.  You must have missed the opportunity to get a discount at the end of May.  Before that if you were an owner of Creative Suite, you can get the first year at a reduced rate.

  • For the loop index rebuild

    DB version 10.2
     BEGIN
          FOR vIdxList IN (select INDEX_NAME from user_indexes where table_name in('PORT') and index_type='NORMAL')
          LOOP
       EXECUTE IMMEDIATE 'ALTER INDEX ' || vIdxList.INDEX_NAME || ' REBUILD nologging parallel 4 ';
          5      dbms_output.put_line('-----------------');
             --EXECUTE IMMEDIATE 'ALTER INDEX ' || vIdxList.INDEX_NAME || 'NOPARALLEL';
          END LOOP;
          begin
         FOR vIdxList IN (select INDEX_NAME from user_indexes where table_name in('PORT') and index_type='NORMAL')
         LOOP
         EXECUTE IMMEDIATE 'ALTER INDEX ' || vIdxList.INDEX_NAME || 'NOPARALLEL';
         end loop;
         end;
       END;
       /
    When I try to do more high I am hit with ORA-02242 after reconstitution with nologging parallel 4. But when I run manually
     ALTER INDEX'  <index_name> NOPARALLEL 
    then ok.

    Some can help me please

    ERROR on line 1:
    ORA-02242: no option specified for the ALTER INDEX statement
    ORA-06512: at line 11 level
    BEGIN
          FOR vIdxList IN (select INDEX_NAME from user_indexes where table_name in('EMPLOYEES') and index_type='NORMAL')
          LOOP
              EXECUTE IMMEDIATE 'ALTER INDEX ' || vIdxList.INDEX_NAME || ' REBUILD nologging parallel 4 ';
              EXECUTE IMMEDIATE 'ALTER INDEX ' || vIdxList.INDEX_NAME || ' NOPARALLEL ';
           END LOOP;
    END;
    / 
    
  • How to check for the two first digits?

    Can someone please... There is demand to have a hidden field on the form that will be filled with data. It's going to be 6 digits long and could start with 02 or 04. I need to check on the DocReady event, for the first two digits. If the first two digits are 02, the presentation of the form will remain as it is. If the first two numbers are 04, I'll have to show two hidden subforms. Can someone please provide an explanation on how to check for the first two digits of field 6 digits and do some actions.

    Thank you very much

    No, only in the event: Exchange.

  • [JS CS5.5] Sort order for the topic index messes up script

    I'm stumped on this one. If anyone has a suggestion, I would appreciate it!

    The following script iterates through my index and works very well if none of the index entries have "sort by" text that causes the entry down the list in alphabetical order. It works fine if the text ' sort by ' causes the index entry back into the list alphabetically.

    = CODE

    var myTopics = myDoc.indexes [0] .allTopics;

    for (var i = myTopics.length - 1; I > - 1; i--) {/ / for each subject index...}

    for (var j = myTopics [i].pageReferences.length - 1; j > - 1; j--) {/ / for each reference page in the topic...}

    var myAttributeValue = topic_path (myTopics [i], myTopics [i] .name);

    var myInsertionPoint is myTopics [i] [j] .pageReferences, .sourceText;. THIS LINE THROWS ERROR

    Do something at the insertion point.

    }

    }

    }

    Create the subject string. Subheadings are separated by "#".

    function topic_path (top, str) {}

    If (top.parent.constructor.name == 'Index') {}

    return str;

    }

    else {}

    Return topic_path (top.parent, top.parent.name + ', ' + str);

    }

    }

    = END OF CODE

    So it seems to me that given that the script is an iteration through the bottom-up index entries and page references, happens to a topic that is displayed below the list in, but it is actually "" upward earlier in the list alphabetically, so the script can not get corresponds to the page in the source text reference.

    Is it possible to iterate through index entries other than what I do? I don't see any alternative workaround.

    No, you nothing is missing! Sorry, I had assumed just because you can add script tags to practically anything, you could add them to the topics as well. But now that I checked, it turns out that you can't. Two ways out that could be

    (1) temporarily add sort by name of the item, separated by a single, empty string field to sort by. Subsequently restore the field sort by and the name of the topic.

    (2) If for any reason, you can add the value of sorting by name, you will need to build a table with the topic names and sort by values, blank the sort by fields, then restore them later using the table.

    Complicated, but nothing else I can think.

    Peter

  • Check for the presence of malware

    How can I check for viruses/malware on my iMac with OS X El Capitan

    Go to http://www.etresoft.com/etrecheck , download and run EtreCheck, copy paste here the status report.  If there is any malware/adware on your system, it will appear, and then we'll tell you how to dispose of it here.

  • I also get the error code 80070005 when you try to use Windows Update to check for the updates

    I get this error code as soon as I try to check updates. It does not even say there are updates tells me to enable updates, but when I try it gives the code. I used Microsoft Fix and now it says everything is fixed and ok but it is not. So now what?

    Hello

    1. what Microsoft fixit did you run?
    2. don't you make changes to the computer before the show?

    I suggest you try the steps from the following link:

    Error: 0x80070005 when you try to install updates by using Microsoft Update or Windows Update
    http://support.Microsoft.com/kb/968003

    Note: When you perform a virus scan Malware, you will lose data that are affected by the virus. Microsoft is not responsible for the loss of this data.

  • The details of the max/min for the spatial index

    Hello

    I am new to Oracle Spatial and perhaps this is a stupid question, but when I create an index for a table of geo, I always manually insert a line into the USER_SDO_GEOM_METADATA table. The DIMINFO table contains the bounding box, which are in my case X min/max / coordinated full geo (Lat/Long) of the table.

    The SDO_GEOMETRY column in my table of geo contains some polygons. How can I automatically query the table of geo to return the desired max/min X / Y coordinates? I'm looking for something like maxX (geo_data) SELECT... OF geo_table. Is this possible?

    Thank you!

    Hello Hans,.

    Well, I think that the old gods of Oracle Spatial of ages had intended a workflow by which metadata records were filled with knowledge not stored in the database or the spatial column.  Thus, for example the tolerance whence?  He comes to your head or your documentation that you hold outside the database, etc..  I mean that you put in this recording in order to enter the database.  So I would say that generally metadata was never intended to be created from the data.

    Now, we must know that the values stored in USER_SDO_GEOM_METADATA min/max are largely informative to my knowledge.  You can insert values garbage if you love without worrying much Oracle Spatial.  The only function I can think of who actually reads these values is the MD without papers. HHENCODE (everyone knows others?).  But that being said its always a good idea to avoid the garbage and properly document your spatial layers.

    So, in terms of generation of these values. I would say that your DIMINFO values should ideally include the size of your current data more any new data you could insert as part of your workflow.  So I would not shake this until your min/max values accurate unless your data is very, very static.  It could well be.  Still, usually I if I had a layer of data to the United States mainland that the values that run in the South enough to cover all the Florida keys, etc. (with some tampons too).  Even if I have no data for Florida keys in that exact moment.  It's rather subjective, to deduce the data, it must come from your documentation and your needs.

    But you probably still want something.  Good then, voila.

    SELECT
    a.bef || a.dim_xy || a.dim_3 || a.aft AS dim_info
    FROM (
      SELECT
       'MDSYS.SDO_DIM_ARRAY(' AS bef
      ,'MDSYS.SDO_DIM_ELEMENT(''X'',' || MDSYS.SDO_GEOM.SDO_MIN_MBR_ORDINATE(aa.shape,1) || ',' || MDSYS.SDO_GEOM.SDO_MAX_MBR_ORDINATE(aa.shape,1) || ',0.05)'
       ||
       ',MDSYS.SDO_DIM_ELEMENT(''Y'',' || MDSYS.SDO_GEOM.SDO_MIN_MBR_ORDINATE(aa.shape,2) || ',' || MDSYS.SDO_GEOM.SDO_MAX_MBR_ORDINATE(aa.shape,2) || ',0.05)'
       AS dim_xy
      ,CASE
       WHEN aa.shape.get_dims() > 2
       AND  aa.shape.get_lrs_dim() = 0
       THEN
          ',MDSYS.SDO_DIM_ELEMENT(''Z'',' || MDSYS.SDO_GEOM.SDO_MIN_MBR_ORDINATE(aa.shape,3) || ',' || MDSYS.SDO_GEOM.SDO_MAX_MBR_ORDINATE(aa.shape,3) || ',0.001)'
       ELSE
          NULL
       END AS dim_3
      ,')' AS aft
      FROM (
         SELECT
         MDSYS.SDO_AGGR_MBR(a.shape) AS shape
         FROM
         my_table a
      ) aa
    ) a;
    

    Note again once the tolerances must be hard-coded.

    And also it will not work for the LRS geometries.

    I respect the old gods and not go this route.

    See you soon,.

    Paul

  • How to bulk to check for the import?

    I'm new to LR and am importing photographs from a master file disk.  Is there a way to bulk select for import, without using the audit of all the / check option no or checking them one at a time?  For example, I want to import 100 to 200 photos in a folder.  How can I bulk check the 100 without having to do them one at a time? I would normally expect a selected choice of context for "check images", but I don't see that anywhere.

    Select the first. SHIFT selects the last. Hit the SPACEBAR to check all the.

  • Check for the empty table row before adding the date

    On the form below, when I click on the green button (extreme right) plus a new row in the table is created with today's date. the user can then enter more text to the right of the date. Problem is when the form is saved and reopened, the text that the user entered is removed and today new is added because it is in the intialize event. How do I script to check and make sure that each dated line is empty before you add today's date?

    https://Acrobat.com/#d=qTINfyoXA-U6cDxOGgcSEw

    Thank you

    ~ Gift

    Hi Don,

    One possibility would be to use the box caption of the textfield for the date and leave the value part free for the user to enter their data:

    if (xfa.resolveNode("this.caption.value.#text").value === "") {
              this.caption.value.text = util.printd("[mm/dd/yy] ", new Date() );
    }
    

    See here: https://acrobat.com/#d=VjJ-YsXLKmV6QU84JrAAIw.

    Hope that helps,

    Niall

  • How to check for the application ID in a function of connection?

    Hello

    I have a connection procedure which is something like this:
    wwv_flow_custom_auth_std.login(
        P_UNAME       => :P58_USERNAME,
        P_PASSWORD    => :P58_PASSWORD,
        P_SESSION_ID  => v('APP_SESSION'),
        P_FLOW_PAGE   => :APP_ID||':15'
        );
    And the authentication procedure is this:
    create or replace
    FUNCTION  "ACL_CUSTOM_AUTH" (
        p_username IN VARCHAR2,
        p_password IN VARCHAR2
        )
    RETURN BOOLEAN IS
    BEGIN
      FOR c1 IN (SELECT 1 
                  FROM acl_employees
                 WHERE upper(userid) = upper(p_username)
                   AND mot_de_passe = p_password)
      LOOP
        RETURN TRUE;
      END LOOP;
      RETURN FALSE;
    END;
    I want to check for an application in the acl_employees table ID, because I want to check if this user is credited for THIS specific APP_ID, adding a following kind of code to the function of authentication:
    AND application_id = :app_id)
    The problem is that the connection API takes in charge only two parameters for custom authentication: user name and password. How can I switch the APP_ID to authentication?

    Thank you for your help.

    Christian

    Published by: France Christian February 23, 2010 06:23

    Published by: France Christian February 23, 2010 06:24

    It is sometimes easier to check the user before calling the connection custom Apex then past just a password to NULL to the connection works if the check fails. Something like that before the connection:

    DECLARE
    v_dummy NUMBER;
    BEGIN
    SELECT 1
    INTO v_dummy
    FROM acl_employees
    WHERE upper(userid) = upper(p_username)
    AND application_id = :app_id;
    EXCEPTION WHEN NO_DATA_FOUND THEN :P58_PASSWORD := NULL;
    END;
    
  • Function to check for the existence of the table

    Hi all

    Is there a direct function that can let me know whether or not a particular Table exists in Oracle DB.

    TIA

    See you soon,.
    Parag

    There is no function to check, but we can write our own logic to check if it exists or not.

    CREATE OR REPLACE FUNCTION CHK_TABLE(P_TABLE_NAME IN VARCHAR2) RETURN VARCHAR2 AS
    M_EXISTS VARCHAR2 (1);
    NUMBER OF M_CNT;
    BEGIN
    SELECT COUNT (1) IN M_CNT
    FROM USER_TABLES HAS
    WHERE A.TABLE_NAME = UPPER (P_TABLE_NAME);
    IF NVL(M_CNT,0) = 0 THEN
    M_EXISTS: = 'N';
    ON THE OTHER
    M_EXISTS: = 'Y ';
    END IF;
    RETURN NVL(M_EXISTS,'N');
    END CHK_TABLE;
    /

    Satyam.

Maybe you are looking for

  • "The certificate is not reliable because no issuer channel was provided."

    When you try to access a site, get the message: "the certificate is not reliable because no issuer channel was provided." I was able to access the site with no problems until yesterday.There is no option that allows me to continue to the page, so I t

  • HP Pavilion g6

    Hello! I reinstalled my windows 7 on my laptop, after that I have failed to activate the wi - fi. I tried to install HP connection manager and HP support assistant. HP support assistant says - I don't have valid drivers. I installed them, but its sti

  • remove a microsoft commercial!

    Recently I had to remove a "Comercial".  This "Comercial" was advertising Windows XP Microsoft Security suite. Infact, it disabled my anti-virus, firewall, Spybot Search & Destroy, all my exe files...  Indeed, he screwed me.  And all she wanted was f

  • I have Windows XP Home Edition and Windows XP Professional on my computer. I would like to delete the XP Home.

    I have Windows XP Home and XP Professional on my computer at home. It creates a nuisance for me and almost every time I restart the computer I need to boot from the CD of XP Professional. I would like to reformat the drive and install only XP Profess

  • How to enable Lightroom? [was: How can I start?]

    LR works with Mac o/s Yosemite? I can't open the develop module in LR. I get a message telling me to buy a license, I did today. It will not always be open.