GRANT DROP INDEX

Hi,
is it possible to grant DROP and CREATE index on a table of user1 to user2 ?
If yse How ?
Many thanks.

Hi,
You can grant system privileges (CREATE/DROP ANY INDEX), but I think that you want is grant an privilege object. right?
grant index on <table_name> to <user>;Cheers

Similar Messages

  • Dropping index gives ORA-29861

    Hello
    We have an application which reads data from MapInfo Spatialware using MapInfo Professional and upload this data into Oracle Spatial tables using MapInfo Easy Loader utility.
    The constraint is that tables in oracle spatial must not be dropped. So we have written a stored procedure which queries unique and spatial indexes of a feature table, then it drops them and truncates the table.
    Easy loader then uploads fresh data into these truncated tables and re creates spatial and unique indexes.
    This solution is working fine except for 1 feature table "ZONE". The stored procedure is unable to drop the indexes and error log shows error "ORA-29861: domain index is marked LOADING/FAILED/UNUSABLE".
    I looked into discussion forums and they say to drop the indexes specifying keyword "FORCE" but how can i query whether index is corrupt and i must force drop it. Index state is all VALID which i check them...
    below is the stored procedure....
    CREATE OR REPLACE
    PROCEDURE Spa_Initializetables
         (     TNAME          IN     VARCHAR2,
         SPATIALCOL          IN     VARCHAR2,
              ERROR_CODE OUT     NUMBER,
              ERROR_MESSAGE     OUT     VARCHAR2
    IS
    CURSOR c1 IS
    SELECT * FROM user_sdo_index_info WHERE table_name LIKE UPPER(TNAME) AND column_name LIKE UPPER(SPATIALCOL);
    BEGIN
    --Truncate the given table
    EXECUTE IMMEDIATE 'TRUNCATE TABLE ' || TNAME;
    --Loop through all the indexes found and drop them one by one
    FOR cur_ts IN c1 LOOP
    --DBMS_OUTPUT.PUT_LINE(cur_ts.index_name);
    EXECUTE IMMEDIATE 'DROP INDEX '|| cur_ts.index_name;
    END LOOP;
    ERROR_CODE := 0;
    EXCEPTION
         WHEN OTHERS THEN
         ERROR_CODE          :=     1;
         ERROR_MESSAGE     := SQLERRM;     
    END Spa_Initializetables;
    please let me know what best i can do
    Regards
    Sam

    Sorry, but I can't simulate this troulbe. look:
    create table a (id number, lmao mdsys.sdo_geometry)
    INSERT INTO mdsys.sdo_geom_metadata_table (SDO_OWNER,SDO_TABLE_NAME,SDO_COLUMN_NAME,SDO_DIMINFO,SDO_SRID)
    VALUES ('GIS','A','LMAO',SDO_DIM_ARRAY(
    SDO_DIM_ELEMENT('X', -180,180, 5e-4),
    SDO_DIM_ELEMENT('Y', -180,180, 5e-4)), NULL);                         
    create index a_g_idx on a(lmao) indextype is mdsys.spatial_index;
    insert into a values (1,SDO_geometry(2003,NULL,NULL,SDO_elem_info_array(1,1003,3),SDO_ordinate_array(1,1, 2,2)));
    commit;
    truncate table a;
    insert into a values (2,SDO_geometry(2003,NULL,NULL,SDO_elem_info_array(1,1003,3),SDO_ordinate_array(1,1, 2,2)));
    drop table a;
    No errors :(
    I have 10.2.0.3
    May be i didn't understood you ?

  • How to include Drop index in PL/SQL

    Hi,
    In my PL/SQL, I put a drop index statement in between, but it gave me an error of
    "PLS-00103: Encountered the symbol "DROP" when expecting one of the following:
    begin declare exit for goto if loop mod null pragma raise
    return select update while <an identifier>
    <a double-q"
    My statement is structured as:
    DECLARE
    BEGIN
    DROP INDEX index_name;
    COMMIT;
    END;
    Why is this error occuring? When I execute the drop index statement seperately it is ok. When i put it in the PL/SQL it gave me error.
    Do I need special syntax to include a Drop index statement in a PL/SQL?
    Thanks

    Any DDL commands in PL/SQL must be executed using dynamic SQL:
    execute immediate 'drop index index_name';

  • Publish: dropping index when it is used for foreign key constraint enforcement

    Hi,
    I'm trying to update a target schema from a reference database via Publish. Among the changes to apply, there's an index that needs to be dropped. Since it's linked to a foreign key constraint, it cannot be deleted unless the foreign key is temporarily dropped
    (I saw somewhere that disabling the foreign key should be enough but it doesn't seem to work either).
    Since there are other changes to be made on the same table, this foreign key also has to be dropped before the script can delete the table and re-create it. This part of the script is correctly generated. The problem is that this part appears after the 'DROP
    INDEX' instruction.
    So when generating the update script, SSDT tries to drop the index BEFORE dropping the foreign key. And I can't drop the foreign key in my custom pre-deployment script, otherwise the update script would fail when trying to delete it again.
    Shouldn't SSDT be smart enough to drop the constraint before the index? Is it a bug or did I forget to set an option? If it's not a bug, what can I do apart from doing it manually?
    Thank you for your help

    Hi Elsa,
    That sounds like a bug. Could you please file a Connect issue for this at
    https://connect.microsoft.com/SQLServer/feedback/CreateFeedback.aspx using the category "Developer Tools (SSDT, BIDS, etc.)"? We're trying to track all bugs through
    Connect so that you can tell when we have fixed the issue and we can request more information.
    A workaround for this issue might be to write a pre-deployment script for your project to drop the foreign key prior to deployment. A pre-deployment script can be added to your project by right-clicking on the
    project in solution explorer and then clicking on Add > Script... and selecting Pre-Deployment Script from the list.
    Thanks!

  • Dropping Index taking too much time

    Hi, I am trying to drop an index. Its not yet finished... why its taking too much time to drop?
    Please put your suggestions..
    Rgds

    SQL> drop index QS_TEXT_MST_IXCON force;its taking too much time ... after 2 hours i terminated the session.
    When i check that index status ...
    SQL> select index_name,status,DOMIDX_OPSTATUS,DOMIDX_STATUS from user_indexes where table_name='QS_TEXT_MST';
    INDEX_NAME                     STATUS   DOMIDX DOMIDX_STATU
    QS_TEXT_MST_IXCON              VALID    FAILED VALID
    QS_TEXT_MST_PK                 VALID
    SQL> create index MAMPROD.QS_TEXT_MST_IXCON on MAMPROD.QS_TEXT_MST(UPD_FLG) indextype is ctxsys.context
    parameters(' datastore QS_TEXT_MST_IXCON_DST');  2
    create index MAMPROD.QS_TEXT_MST_IXCON on MAMPROD.QS_TEXT_MST(UPD_FLG) indextype is ctxsys.context
    ERROR at line 1:
    ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    ORA-20000: Oracle Text error:
    DRG-10507: duplicate index name: QS_TEXT_MST_IXCON
    ORA-06512: at "CTXSYS.DRUE", line 160
    ORA-06512: at "CTXSYS.TEXTINDEXMETHODS", line 364wot to do?

  • Grant create index question

    How do I grant "create index" on any table to a user.
    Is it "grant create index to <USER1>

    User must be granted with ALTER OR CONTROL Permission to create an index.
    GRANT ALTER,CONTROL ON SCHEMA::SALES TO <User>
    --Prashanth

  • Function Module to drop index

    Hi all,
       Is there any function module which drop index of cube, as that we have a function module to drop the index of ods (SSM_PROCESS_ODS_DROP_INDEXES).
    Any kind of tips will be appreciated.
    Thanks in advance.
    Regards,
    Babu

    Hi,
    Try this 'RSDU_INFOCUBE_INDEXES_DROP'.
    Hope this helps.
    PB

  • DAC - drops indexes in the task but does not create them back

    DAC is dropping indexes for a task but not recreating them. The execution plan drop/create checkbox is checked and other tasks' index drop/create is working correctly. Index setup is checked for drop/create as well.
    Is there somewhere within DAC that controls this function?
    Any suggestions are appreciated.
    Thanks.

    You want a "Drop Box" style folder. You should be able to achieve this by creating a folder and giving it permissions similar to the "Drop Box" folder in your users Public Folder (i.e. write only permissions.)

  • SQL Server CE 3.5 SP2 - SQLCE Toolbox / Automated Database Schema Upgrade Scripting / Drop Index

    I am provisioning for automated database schema upgrades in a Windows Forms Application (VS2010/VB) which uses SQL Server Compact 3.5 SP2.  A portion of the schema upgrade procedure uses TSQL commands passed to SQLCE like the following:
    cmd.CommandText = "DROP INDEX [SaleComps$ProjID]"
    cmd.ExecuteNonQuery()
    However, when this command is processed by the SQLCE engine, I get the following error:
    Command: DROP INDEX [SaleComps].[ProjID]
    Error: The specified index does not exist. [ ProjID ]
    But, if I try to recreate the index (or try to change the index column) I get the following errors which indicate that the index is still there:
    Command: ALTER TABLE [SaleComps] ALTER COLUMN [ProjID] nvarchar(20) NULL
    Error: Cannot alter a column that is part of a key or an index. [ Index Name = SaleComps$ProjID,Column = ProjID ]
    Command: CREATE INDEX "SaleComps$ProjID" ON "SaleComps" ("ProjID" ASC)
    Error: The specified index already exists. [ SaleComps$ProjID ]
    Any ideas why this would not be working? Thanks!
    -BGood

    No, I was guessing at the syntax from reviewing other web postings, some of which were in different SQL dialects. 
    While your SQLCE Toolbox did not provide the DROP INDEX command, it did provide most of the "Schema Diff" scripting commands.  In hindsight, maybe SQLCE Toolbox should recognize when schema differences involve a Column which is used in an index, and
    DROP the index before executing the ALTER COLUMN command, then re-CREATE the index with the modified column.
    Despite this shortcoming, I am very thankful for the help provided by SQLCE Toolbox, and learned a little more about SQL scripting in the process.
    Thanks, ErikEJ!
    -BGood

  • HOW TO DROP INDEX OF OTHER SCHEMA

    hi,
    I want to know how can we refer to objects that are of other schema. i need to drop an index of a table that belongs to some other schema and so if i write :
    drop tablename.indexname; - its not working.
    Please Help
    Thanks

    You are trying to drop an index on a table that belong to a different schema you are connected to.
    Do not add the table name to your command.
    Simply try
    drop index schema_name.index_name;
    Nico P.

  • Do i need to drop index even when i drop data in data target

    Hi ,
       I am having a PC and i am dropping entire data in my data target. do i still need to add drop index to my process chain.
    Can any one tell me what extactly happens if i drop data in a data targets and what happend if i drop the index? which tables it will be affecting.
    Thanks,
    Ram.

    Since you are dropping the whole table then there is no need to keep the index, deleting indexes is necessary only if you are loading data to the cube which has already data so that performance of data load won't be affected. Every time when you have data and don't delete the index, each record need to align properly with the existing indexes which will slow down data load, but if you delete indexes then no time will be spent on aligning exact position of the data and recreating index at the end of the data load doesn't take much.
    thanks.
    Wond

  • URGENT HELP PLEASE - drop index hangs on SAP

    Hi all,
    OS = Linux
    DBVersion = Oracle10.2.0.2
    Need some urgent help advise please on how to get around this problem.
    On a SAP system, am trying to drop six indexes, largest is 300MB and smallest is 50MB.
    I tried running drop index sapusername.index_name on the 50MB index via SQL*Plus and it seems to be taking forever. Can anyone please suggest if there is anything I can check on the database on why it is taking such a long time?
    I can leave it to run overnight but worried that when I come back the next day, it will still be hanged. Is there any quick way of dropping the index, .i.e. drop immediate ... :-)
    Am not using SAP's BRTOOLs as it is also hanging from there and the SAP-ADMIN had approved for the DBA to drop it from our end instead.
    Any response and advise on this will be very much appreciated.
    From Google'ing, I found some that mentioned that the fault could be because of the existence of the constraints on the table that I am dropping the index of.
    Checking the table, it has 17 SYS_ named constraints. None of these constraints have INDEX_NAME that refers to the indexes that am dropping.
    Should I disable the constraints and then run the drop index again?
    Thanks in advance.
    Edited by: user649596 on Apr 13, 2010 11:49 PM

    Should I disable the constraints and then run the drop index again?NO, certainly not !!
    Ask SAP Support on what methods you should use to diagnose the "hang" and what your next step(s) should be.
    Hemant K Chitale

  • Need help for ALE Remote lock while dropping indexes in process chain

    Hi Gurus,
    Object requested is currently locked by ALE Remote is the message i got while dropping indexes from the process chain and is red
    Entire chain is now status R. I tried by repeat still the dropping indexes step fail in the process chain.
    Could u please advise me.
    Thanks,
    Srikar

    Hi,
    Even check any lock is happened for the cube in SM12. If it not rectified with all possible solutions please paste  error log in batch monitor tab.
    Regard's
    Suman

  • DROP INDEX on hsqldb

    Hi,
    As David A. King suggested, HypersonicSQL requires the following syntax:
    DROP INDEX table.index
    Is the update of HSQLDictionary already scheduled/done?
    Regards --

    LOTLINE is the table name?
    It appears to be version-disabled since it's state is DV..
    See:
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14253/long_views.htm#ADWSM03060
    and perhaps querying ALL_WM_VT_ERRORS will give you more clues.

  • DROP INDEX

    Hi!!!
    I need to drop index but I need to know all the necesary for not harm the table.
    Can you help me??
    Thank's and regards

    Is it an unnecessary index? or are u dropping some index arbitarily? keep in mind the performance issues in case if ur dropping a vital index....
    the following syntax should do:
    Drop index <Index_Name>;

Maybe you are looking for

  • How to execute Script in Test Plan with two different System Data Container

    Dear members, I have a requirement. I need to execute one Test Config in a Test Plan with one System Data Container and another Test Config in a Test plan with another SDC. How to achieve this ? Kind regards, Pradeep Edited by: Pradeep Singh Rawat on

  • Problem with Adobe Reader 9 and HTML Help, IE 7 and Firefox

    Hello everyone I have some Problems with the Adobe Reader 9.1.0 and different browsers. If I want to open a PDF document in one of these browser the browser-window freezes for 30 seconds and the document is built-on line by line. The Trouble is that

  • NIO Help - Dividing clients on different threads

    Introduction: I'm currently working on a free time project witch basically accepts connections. As we know with NIO, you can use one thread to listen to many different connections using Selector. I've followed this guide on how to make a non-blocking

  • IB - TableViewController howto

    Hi everybody, please pardon my ignorance but I somehow cannot manage the logics behind TableViewController. I started a fresh new Tab Bar application and want to display table using the provided TableViewController. How should I connect them? It look

  • Export settings from FCP

    What export setings have you found the best from FCP to use in DVD Pro. I keep getting a stretched picture on import.