Problem while creating index for temporary table...

Hi,
i have created index for a temporary table and this script should used by multiusers.So when second user connecting to it is giving index i mean object already exists.
So what i need is when the second user connected the script should create one more index on temporary table.Will sql server provide any random way of creating indexes if the index exists already with that name??
Thank You,

Nope..
SQL Server is cleaver enough to handel this situation.
When you create a index or constraint on the Temp Table, eventhough the index name is duplicate it will allow.
But it only possible on temp tables (prefixed with single #).
To Test this,
Open Two window,
Execute the below window on the opened 2 window..
create table #test
            id int
Insert Into #test values(1);
Insert Into #test values(2);
Create clustered index testindex on #test(id)
Now you wont get any error on any of the window. Rite?
To fetch the created index details, execute the below code on any one of the window..
select * from sysindexes where name like '%test%'
Now you can see the 2 rows with same indexname but refereing with different table. Yes. all the temp tables (#) will be suffixed with unique number to avoid the object already found error while multiple users connects.
 

Similar Messages

  • Problem while creating PO for Calibration order PR

    Hi,
    I am facing following problem while create PO for calibration order PR:
    "Comparison of the field selection strings from the G/L account 8000010800 and the account assignment category F reveals that there is an incompatible combination of field selections for the field selection group 'Network'.
    The G/L account field selection is stored in table T004F; that for the account assignment is stored in table T162K."
    Can anybody help me urgently.
    Regards,
    Mew

    Hi,
    Check the field selection for account assignment category & Field status group of G/L 8000010800.
    Compare both & set the field selection equally in both.
    Regards,
    Piyush

  • How to create index for particular table in R3

    Hi
    My load is taking too much time and it leads to process over due error. Does creating indexes on table in r3 side will solve this issue? If so how can we find out on which table does this particular data source depend. I went to maintain extract structure and findout only one table is supplying data for this data source.
    Is there any other factors depend to solve this.
    Thanks
    kk

    Hi,
    it will depend on the table.... Having an index created will speed up the loading but slow down the insert therefore slowing some process perhaps...
    May I ask which table it is? And which fields would you need to index?
    Are you sure that bottleneck is located in R/3? Analyze your loading time in the monitor and see if this is really the case.
    Otherwise you can create index for a table in Tx SE11; first check if an index is not already created...
    hope this helps,
    Olivier.

  • When do I really need to create indexes for a table?

    Once I was talking to a dba in a conference.
    He told me that not always I have to create indexes for a single table, it depends of its size.
    He said that Oracle read registers in blocks, and for a small table Oracle can read it fully, in a single operation, so in those cases I don't need indexes and statistcs.
    So I would like to know how to calculate it.
    When do I really need to create indexes for a table?
    If someone know any documment that explain that, or have some tips, I'd aprecciate.
    Thanks.
    P.S.: The version that I'm using is Oracle 9.2.0.4.0.

    Hi Vin
    You mentioned so many mistakes here, I don't know where to begin ...
    vprabhu_2000 wrote:
    There are different kinds of Index. B-tree Index is by default. Bit map index, function based index,index organized table.
    B-tree index if the table is large This is incorrect. Small tables, even those consisting of rows within just one block, can benefit from an index. There is no table size too small in which an index might not be benefical. William Robertson in his post references links to my blog where I discuss this.
    and if you want to retrieve 10 % or less of data then B-tree index is good. This is all wrong as well. A FTS on a (say) million row table could very well be more efficient when retrieving (say) just 1% of data. An index could very well be more efficient when retrieving 100% of data. There's nothing special about 10% and there is no such magic number ...
    >
    Bit Map Index - On low cardinality columns like Sex for eg which could have values Male,Female create a bit map index. Completely and utterly wrong. A bitmap index might be the perfect type of index, better than a B-Tree, even if there are (say) 100,000 distinct values in the table. That a bitmap index is only suitable for low cardinality columns is just not true. And what if it's an OLTP application, with lot's of concurrent DML on the underlining table, do you really think a bitmap index would be a good idea ?
    >
    You can also create an Index organized table if there are less rows to be stored so data is stored only once in index and not in table. Not sure what you mean here but an IOT can potentially be useful if you have very large numbers of rows in the table. The number of rows has nothing to do with whether an IOT is suitable or not.
    >
    Hope this info helps. Considering most of it is wrong, I'm not sure it really helps at all :(
    Cheers
    Richard Foote
    http://richardfoote.wordpress.com/

  • A query related to creating Indexes for a table

    Hi ,
    I am in a J2EE Banking Project using Oracle 10g as our Database .
    We have created Indexes on some tables .
    But this this is not called by any of our Java class .
    Could anybody please let me know how these Indexes will actually improve the Performance .
    Waiting for your replies .
    Thanks in advance .

    But in our safety database (huge & ofcourse Oracle), we use indexes just because to avoid duplicates, improve data retrieval and so on.As you pointed out indexes can do 2 things for you: enforce uniqueness and (hopefully) improve data retrieval. Enforcing uniqueness is pretty basic, but indexes don't always improve performance. Under the wrong condtions indexes can hurt performance. The ideas below refer to B-TREE indexes; other kinds of indexes have other considerations
    Indexes add overhead to insert, delete, and (hopefully not - updating index columns is a Bad Idea), enough so that if you're inserting a lot of rows into a large table it is sometimes helpful to drop the indexes, load the data, and recreate the indexes when done to help performance. The more indexes a table has the more overhead DML statements need to maintain them.
    Indexes help query performance under a couple of conditions. When using them as join keys to retrieve a small percentage of rows in a table (< 20% maybe; there is no firm number) indexes can help. When a query can read its columns from an index only (such as counts against a primary key index) index access can be faster than table access.
    Indexes can hurt performance by adding overhead for maintenance if the index is never actually used or if used to read most of the rows in a table when a full table scan would be more efficient (why go through the extra effort to read the index and then table when you'll have to read most of the rows in the table anyway?).

  • Checking the initiality of the fields while creating  entries for a table

    While creating entries using table maintenance generator(TMG) i need to check the initiality of the fields.Are there any such events?
    I know i can go and change in the screen by making it mandatory or by writing a module in the PAI of the screen of table maintenance generator. Both of cases i have to change the TMG which is generated by SAP system. I want to know is there a way to achieve this with out changing the TMG possible events?

    hi rahul,
    as far as i know, you have to do your initial valifdation in TMG and you have to change your TMG. However, if you have checked the initial flag while defining the field, you will not have initial value for that particular field.... (if the field is key field, by default it is not initial)
    hope this helps....
    thanks and regards,
    tanmaya

  • Problems on Creating INDEX for ORDSYS.ORDDOC type

    I have a table 'docs'
    CREATE TABLE "TEST"."DOCS"
    ("ID" VARCHAR2(2048 byte) NOT NULL,
    "DOCUMENT" "ORDSYS"."ORDDOC",
    "DUMMY" CHAR(1 byte) NOT NULL)
    The field DOCUMENT contains a number of documents a mixture of .doc and .pdf files. These where uploaded using the code wizards for the web toolkit. Now I want to INDEX DOCUMENT so I can implement a web search facility.
    I'm currently following the xamples on http://download-west.oracle.com/otndoc/oracle9i/901_doc/text.901/a90121/cdatadi3.htm#43365 NESTED_DATASTORE Example (Intermedia Documentation)
    I did this
    ctx_ddl.create_preference('ntds','nested_datastore');
    ctx_ddl.set_attribute('ntds','nested_column', 'dummy');
    ctx_ddl.set_attribute('ntds','nested_type', 'ordsys.orddoc');
    ctx_ddl.set_attribute('ntds','nested_lineno','source');
    ctx_ddl.set_attribute('ntds','nested_text', 'comments');
    when creating the index using ntds it is complaining about ordsys.orddoc
    create index docindx on docs(dummy) indextype is ctxsys.context parameters('data
    store ntds')
    ERROR at line 1:
    ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    ORA-20000: Oracle Text error:
    DRG-50857: oracle error in dricon.get_type_data_type
    ORA-20000: Oracle Text error:
    DRG-12801: invalid type: ORDSYS.ORDDOC
    ORA-06512: at "CTXSYS.DRUE", line 157
    ORA-06512: at "CTXSYS.TEXTINDEXMETHODS", line 176
    I'm not convince on the 'nested_lineno' parameter can anybody tell me how this can be done.

    I'm forced to use ordsys.orddoc since 'interMedia Code Wizard for the PL/SQL Gateway' won't generate the code for a clob it only recognizes intermedia objects.
    since orddoc.comments is a clob I cannot see why there shouldn't be a way to index it. What's the use of storing documents in ORDDOC when you can't search them??

  • Things to consider while Creating Indexes in the tables

    Hi All,
    We have some application slow issues becasue of the tables which it is calling are Heap. There are Primary keys created on few tables though. I have to think and design the indexing on those tables. What are different things need to check to design the Indexes?
    Thanks
    Swapna

    Hi All,
    We have some application slow issues becasue of the tables which it is calling are Heap. There are Primary keys created on few tables though. I have to think and design the indexing on those tables. What are different things need to check to design the Indexes?
    Thanks
    Swapna
    Adding to what others have said create an index and check execution plan whether it is being used by optimizer or not if it is used and query runs fast that index can be kept
    You should also take help of DMV
    sys.dm_index_usage_stats to see whether index is being utilized or not. refer to user seek user update and user scan col. If Update is very much greater that seek/scan index is probably not utilized , you can consider removing it
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it.
    My TechNet Wiki Articles

  • Problem while creating generic DataSource using table

    Hello all,
    I am creating a generic DataSource using table EKBE. It is giving error " invalid extract structure template EKBE ". The reason is " The system tried to generate an extract structure with the template structure EKBE. This operation failed, because the template structure quantity fields or currency fields, for example, field MENGE refer to a different table (EKPO)".
    Could you suggest how to approach?
    Thanks,
    Zak.

    hi zahir,
    In your case the reference table used for quantity is ekko and the field is meins.
    and the reference table used for currency is ekpo and the field is waers.
    So you are not taking data from a single table. so you better create a view give the table name ekbe and select the corresponding fields you want.
    Add MEINS and WAERS and as well your required field in the view for example Zview and for Quantity field mention Zview as reference table and reference field as MEINS same for WAERS.
    try this if it doent work, tell me what error you are facing.
    with regards!
    ramesh

  • Do we need any precautions while creating index in MV rather than tables?

    Do we need any precautions while creating index in MV rather than tables?
    Could you please someone tell me is there we need specifically follows while creation on MVs

    MV is a seprate object. You might need to create an indexes on MViews based on how you are accessing that MV. You need to take a same preacutions what you take to create an index on the table,
    I do not know what you mean by your 2nd questions. Read this for better understanding
    http://docs.oracle.com/cd/B28359_01/server.111/b28326/repmview.htm

  • Don't have primary Key in Target table getting errror while creating index

    Hi All,
    I don't have primary key column in target table, while exicuting mapping I got a error while creating INDEX.
    Could you please help how to slove this

    Hi,
    That is a process definition issue.
    If you don't have a PK then:
    1) or you don't execute updates
    2)or you have an alternate Key to update it.
    Case 1) just change the KM to IKM Control Append
    Case 2) at interface, go to each column what is Alternate Key and check it as key (click at column and check the box Key at bottom of propriety window).
    Does it work to you?

  • Hi all, i'm new and facing a problem while creating a new file for Xcode. I can't select the box "with XIB for user interface" if the subclass is "UIViewController".this problem happen after i upgrade Xcode to 4.6 version.Appreciate for any help rendered.

    Hi all, i'm new to Mac book & Xcode. I'm learning and facing problems while creating a new file for Xcode. Before i upgrade the software, i have no issue to create simple steps in apps. After upgrade Xcode to 4.6 version, i'm facing lot's of issue eg.
    1) "the identity "iphone developer" doesn't match any valid certificate/ private key pair",
    2) can't select the box "with XIB for user interface" if the subclass is "UIViewController"..
    Appreciate for any help rendered.

    Mikko777 wrote:So what is the best?
    I wouldn't judge. I've been to Arch for a week, you know? But as said, it's VERY close to it.
    What I dislike after a week is makepkg not handling dependencies automatically (which would be overhead, so probably not appropriate).
    Mikko777 wrote:Also theres KDEmod for modular kde, dunno if its for 64 bits tho.
    Don't actually need that as said ... I see no real benefit of having that other than not beeing a KDE user or having Gentoos useflags.
    Mikko777 wrote:PS:You produce a lot of text and welcome smile
    Yeah. Wonder why I'm still employed? So do I ...

  • Creating index for standard SAP tables

    Hi!
    What are the advantages and disadvantages of creating addtional indexes for tables with massive amount of data (BSEG, BKPF, COEP, etc...).
    If I create a new index it supposed to make the table access faster, for the cost of hard disk space.
    Am I right?
    Thank you
    Tamá

    Hi,
    Primary and secondary indexes
    Index: Technical key of a database table.
    Primary index: The primary index contains the key fields of the table and a pointer to the non-key fields of the table. The primary index is created automatically when the table is created in the database.
    Secondary index: Additional indexes could be created considering the most frequently accessed dimensions of the table.
    Structure of an Index
    An index can be used to speed up the selection of data records from a table.
    An index can be considered to be a copy of a database table reduced to certain fields. The data is stored in sorted form in this copy. This sorting permits fast access to the records of the table (for example using a binary search). Not all of the fields of the table are contained in the index. The index also contains a pointer from the index entry to the corresponding table entry to permit all the field contents to be read.
    When creating indexes, please note that:
    An index can only be used up to the last specified field in the selection! The fields which are specified in the WHERE clause for a large number of selections should be in the first position.
    Only those fields whose values significantly restrict the amount of data are meaningful in an index.
    When you change a data record of a table, you must adjust the index sorting. Tables whose contents are frequently changed therefore should not have too many indexes.
    Make sure that the indexes on a table are as disjunctive as possible.
    (That is they should contain as few fields in common as possible. If two indexes on a table have a large number of common fields, this could make it more difficult for the optimizer to choose the most selective index.)
    Accessing tables using Indexes
    The database optimizer decides which index on the table should be used by the database to access data records.
    You must distinguish between the primary index and secondary indexes of a table. The primary index contains the key fields of the table. The primary index is automatically created in the database when the table is activated. If a large table is frequently accessed such that it is not possible to apply primary index sorting, you should create secondary indexes for the table.
    The indexes on a table have a three-character index ID. '0' is reserved for the primary index. Customers can create their own indexes on SAP tables; their IDs must begin with Y or Z.
    If the index fields have key function, i.e. they already uniquely identify each record of the table, an index can be called a unique index. This ensures that there are no duplicate index fields in the database.
    When you define a secondary index in the ABAP Dictionary, you can specify whether it should be created on the database when it is activated. Some indexes only result in a gain in performance for certain database systems. You can therefore specify a list of database systems when you define an index. The index is then only created on the specified database systems when activated
    Thanks and Regards
    Arun Joseph

  • Performance problem while creating table at runtim

    I have pl/sql block like
    Begin
    Exceute immediate 'drop table x '
    Execute immediate 'create table x as select .... stament (complex select by joining 7-8 tables);
    Execute immediate ('create index ind1 on table x'); -- i am not writing the full syntax
    End;
    The select statement used in create table is fetching 10 millions of rows (approx).
    The above pl/sql block is taking 30-45 minutes.
    Without going in depth of query used in select (as i have to explain the functionality otherwise),
    Could any one please suggest to create a table in fatset way like nolooging or seperate tablespace with bigger block size or any change in any DB parameter etc.
    The db server is having excelent hardware configuration 32GB ram , multi CPU (16 CPUs) , Huge hardisk.
    Thanks

    CREATE OR REPLACE VIEW VW_CUST_ACCT_BUS_REQ AS
    SELECT FC.V_CUST_NUMBER,
    FC.V_ACCT_NUMBER,
    FC.V_ACCT_CUST_ROLE_CODE
    from Fct_Acct_Cust_Roles FC --current schema table
    join dim_jurisdiction DC on DC.V_JURISDICTION_CODE = FC.V_SRC_CNTRY_CODE
    JOIN VW_APPLN_PARAMS APP ON APP.V_PARAM_CATEGORY = 'KYC'
    AND APP.V_PARAM_IDENTIFIER =
    'KYC_PROCESSING_DATE'
    AND APP.N_CNTRY_KEY = DC.N_JURISDICTION_KEY
    AND FC.FIC_MIS_DATE = APP.d_Param_Date
    UNION
    SELECT BUS_CUST_ACCT.CUST_INTRL_ID,
    BUS_CUST_ACCT.ACCT_INTRL_ID,
    BUS_CUST_ACCT.CUST_ACCT_ROLE_CD
    FROM BUS_CUST_ACCT --another schema's table containing rows in millions.
    --Can you tell me any other method to acheive the above select
    CREATE TABLE vw_kyc_dr_ip as
    SELECT FCU.V_SRC_CNTRY_CODE JRSDCN_CD,
    FCU.V_CUST_NUMBER v_cust_id,
    FACRS.V_CUST_NUMBER v_ip_cust_id,
    ROLS.F_CONTROLLING_ROLE f_cntrl_role
    FROM VW_CUST_BUS_REQ FCU -- This is another Mview it contains data approx 50,000
    JOIN VW_CUST_ACCT_BUS_REQ FACR/* see above view definition, contains rows in millions */ ON FCU.V_CUST_NUMBER = FACR.V_CUST_NUMBER
    JOIN VW_CUST_ACCT_BUS_REQ FACRS ON FACR.V_ACCT_NUMBER = FACRS.V_ACCT_NUMBER
    JOIN DIM_ACCT_CUST_ROLE_TYPE ROLS ON ROLS.V_ACCT_CUST_ROLE_CODE =FACRS.V_ACCT_CUST_ROLE_CODE
    UNION
    (SELECT FCU.V_SRC_CNTRY_CODE JRSDCN_CD,
    FCU.V_CUST_NUMBER v_cust_id,
    FCR.V_RELATED_CUST_NUMBER v_ip_cust_id,
    'N' f_cntrl_role
    FROM VW_CUST_BUS_REQ FCU
    JOIN VW_CUST_CUST_BUS_REQ FCR ON FCU.V_CUST_NUMBER =
    FCR.V_CUST_NUMBER
    JOIN VW_APPLN_PARAMS P ON P.V_PARAM_IDENTIFIER = 'KYC_PROCESSING_DATE'
    AND P.V_PARAM_CATEGORY = 'KYC'
    AND FCR.D_RELATIONSHIP_EXPIRY_DATE >=
    P.D_PARAM_DATE
    JOIN DIM_JURISDICTION ON DIM_JURISDICTION.N_JURISDICTION_KEY =
    P.N_CNTRY_KEY
    AND DIM_JURISDICTION.V_JURISDICTION_CODE =
    FCU.V_SRC_CNTRY_CODE
    MINUS
    SELECT DISTINCT FCU.V_SRC_CNTRY_CODE JRSDCN_CD,
    FCU.V_CUST_NUMBER v_cust_id,
    FACRS.V_CUST_NUMBER v_ip_cust_id,
    'N'
    FROM VW_CUST_BUS_REQ FCU
    JOIN VW_CUST_ACCT_BUS_REQ FACR ON FCU.V_CUST_NUMBER =
    FACR.V_CUST_NUMBER
    JOIN VW_CUST_ACCT_BUS_REQ FACRS ON FACR.V_ACCT_NUMBER =
    FACRS.V_ACCT_NUMBER
    JOIN DIM_ACCT_CUST_ROLE_TYPE ROLS ON ROLS.V_ACCT_CUST_ROLE_CODE =
    FACRS.V_ACCT_CUST_ROLE_CODE
    AND ROLS.F_CONTROLLING_ROLE = 'Y'
    UNION
    (SELECT FCU.V_SRC_CNTRY_CODE JRSDCN_CD,
    FCU.V_CUST_NUMBER v_cust_id,
    FCR.V_CUST_NUMBER v_ip_cust_id,
    'N' f_cntrl_role
    FROM VW_CUST_BUS_REQ FCU
    JOIN VW_CUST_CUST_BUS_REQ FCR ON FCU.V_CUST_NUMBER =
    FCR.V_RELATED_CUST_NUMBER
    JOIN VW_APPLN_PARAMS P ON P.V_PARAM_IDENTIFIER = 'KYC_PROCESSING_DATE'
    AND P.V_PARAM_CATEGORY = 'KYC'
    AND FCR.D_RELATIONSHIP_EXPIRY_DATE >=
    P.D_PARAM_DATE
    JOIN DIM_JURISDICTION ON DIM_JURISDICTION.V_JURISDICTION_CODE =
    FCU.V_SRC_CNTRY_CODE
    AND DIM_JURISDICTION.N_JURISDICTION_KEY =
    P.N_CNTRY_KEY
    MINUS
    SELECT DISTINCT FCU.V_SRC_CNTRY_CODE JRSDCN_CD,
    FCU.V_CUST_NUMBER v_cust_id,
    FACRS.V_CUST_NUMBER v_ip_cust_id,
    'N'
    FROM VW_CUST_BUS_REQ FCU
    JOIN VW_CUST_ACCT_BUS_REQ FACR ON FCU.V_CUST_NUMBER =
    FACR.V_CUST_NUMBER
    JOIN VW_CUST_ACCT_BUS_REQ FACRS ON FACR.V_ACCT_NUMBER =
    FACRS.V_ACCT_NUMBER
    JOIN DIM_ACCT_CUST_ROLE_TYPE ROLS ON ROLS.V_ACCT_CUST_ROLE_CODE =
    FACRS.V_ACCT_CUST_ROLE_CODE
    AND ROLS.F_CONTROLLING_ROLE = 'Y'
    Kindlt advice me on technical side , i think it is difficult to make you understand functionality.

  • Module pool ---Problem in finding the line index for the table control

    Hi Friends,
    I am working in Module pool programming.
    My requirement is when i select any record on the lead selection I need to find out the index of the line on which  row i have selected.
    Could any one please suggest me the proper solution how to get the line index for the table control in module pool programming.
    Thanks
    Satish Raju

    Hi Raju,
    Follow the steps
    <li>U should take one variable in your internal table or in structure which is used for table control fields.
          DATA :BEGIN OF itab OCCURS 0 ,
                mark TYPE c ,
                matnr LIKE mara-matnr ,
                matkl LIKE mara-matkl,
                maktx LIKE makt-maktx,
            END OF itab .
       controls: tabc types tableview using screen 100.
    <li>This mark variable should be given in Table control properties. follow the path
    double click on the table control-->attributes .->select w/SelColumn and in that give itab-mark.
    <li>Flow logic of the screen
       process before output.
         MODULE status_0100.
         LOOP AT itab with control tabc
         endloop.
       process after input.
         module cancel at exit-command.
         LOOP AT itab.
           MODULE read_table_control.
         ENDLOOP.
         MODULE user_command_0100.
    <li>read_table_control module code
         MODULE read_table_control INPUT.
         MODIFY itab INDEX tabc-current_line."this will update the itab table
                                             "mark field with 'X ' whatever we
                                             "have selected on table control
         ENDMODULE.
    <li>If you want to Delete some of the records from Table control follow this code u2026Create one pushbutton and give Fucnction code to that and write below code
       CASE okcode.
         WHEN 'DELETE'.
           LOOP AT itab WHERE mark = 'X'.
             DELETE itab.
           ENDLOOP.
       ENDCASE.
    I hope that it helps you.
    Thanks
    Venkat.O

Maybe you are looking for

  • Extended Characters not showing up in DM Studio text.

    Hello, For some reason when I'm entering text into DM Studio (text area, label, etc) and my text contains a special character (® or ©, for instance), it shows up as a small box, indicating it can't represent that character. It used to show up just fi

  • DPM 2012 R2 catalog failing, not all database items are available for restore

    I recently started protecting my SharePoint 2013 site using DPM 2012 R2.  I was able to get item level recovery working, but not all of the database items are showing in the recovery section.  I go get the warning "DPM failed to gather item level cat

  • Changing background colour of pdf to white to save ink when printing

    I am a Uni student and study from home. I have to print my lecture notes (always in PDF) so i can follow with the lecture online. But the tutor always uses a bright colourful background which looks great but sucks the ink out of my printer. How do i

  • Burning Music Videos to DVD

    Hi, I have bought Red Hot Chili Peppers "The Videos" and made a playlist. Now I want to burn a dvd, but can not find a way on how doing this. I also have Nero 7 Premium, but the tracks have DRM and Nero can not burn it therefor Any help is welcome Th

  • Attaching ByteArrayOutputStream to Mail Message

    I can attach a file to a javamail message easily: DataSource source = new FileDataSource("test.pdf"); messageBodyPart.setDataHandler(new DataHandler(source)); Is there anyway however to attach a ByteArrayOutStream to a mail message and then give it a