Professional Web Applications Themes

index problem - Microsoft SQL / MS SQL Server

Hello, I have a table with a primary key on two fields. When I run sp_helpindex 'tablename', I get a record with the index with the two fields. So correct information. When I run sp_indexes_rowset 'tablename', I get only one of the two columns. So incorrect information. If I do the same on another database with the same database structure, I get correct information. Does anyone know what the problem is with this database? Thanks in advance, Peter...

  1. #1

    Default index problem

    Hello,

    I have a table with a primary key on two fields.

    When I run sp_helpindex 'tablename', I get a record with the index with the
    two fields. So correct information.

    When I run sp_indexes_rowset 'tablename', I get only one of the two columns.
    So incorrect information.

    If I do the same on another database with the same database structure, I get
    correct information.

    Does anyone know what the problem is with this database?

    Thanks in advance,

    Peter


    Peter Notebaert Guest

  2. #2

    Default index problem

    Peter:

    Looking at the text of sp_indexes_rowset, I see that the
    user executing sp_indexes_rowset needs permissions on the
    table or column to have the column included in the output.
    Could you have different permissions in the two databases?

    Vern
    >-----Original Message-----
    >Hello,
    >
    >I have a table with a primary key on two fields.
    >
    >When I run sp_helpindex 'tablename', I get a record with
    the index with the
    >two fields. So correct information.
    >
    >When I run sp_indexes_rowset 'tablename', I get only one
    of the two columns.
    >So incorrect information.
    >
    >If I do the same on another database with the same
    database structure, I get
    >correct information.
    >
    >Does anyone know what the problem is with this database?
    >
    >Thanks in advance,
    >
    >Peter
    >
    >
    >.
    >
    Vern Rabe Guest

  3. #3

    Default Re: index problem

    Peter Notebaert (penomailme.org) writes:
    > I have a table with a primary key on two fields.
    >
    > When I run sp_helpindex 'tablename', I get a record with the index with
    > the two fields. So correct information.
    >
    > When I run sp_indexes_rowset 'tablename', I get only one of the two
    > columns. So incorrect information.
    >
    > If I do the same on another database with the same database structure, I
    > get correct information.
    >
    > Does anyone know what the problem is with this database?
    All I can say is interesting...

    Anyway, I had a look at the source code for sp_indexes_rowset, and it
    is just one plain SELECT. I would suggest that you extract this SELECT
    and see which of the conditions in the WHERE clause that may be the
    cause.

    You can get the source, by using the Object Browser in Query yzer (press
    F8), and then right-click the procedure and choose "Open as CREATE".


    --
    Erland Sommarskog, SQL Server MVP, [email]sommaralgonet.se[/email]

    Books Online for SQL Server SP3 at
    [url]http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp[/url]
    Erland Sommarskog Guest

  4. #4

    Default Re: index problem

    No, permissions are not the problem. I am using the sa account for one and
    secondly, I would expect to have no information at all. I get one of the two
    columns.

    I think I need to 'rebuild' or 'refresh' somethink, but I don't know what.

    Peter

    "Vern Rabe" <vernrabe.net> wrote in message
    news:045401c344dc$57d84130$a501280aphx.gbl...
    > Peter:
    >
    > Looking at the text of sp_indexes_rowset, I see that the
    > user executing sp_indexes_rowset needs permissions on the
    > table or column to have the column included in the output.
    > Could you have different permissions in the two databases?
    >
    > Vern
    >
    > >-----Original Message-----
    > >Hello,
    > >
    > >I have a table with a primary key on two fields.
    > >
    > >When I run sp_helpindex 'tablename', I get a record with
    > the index with the
    > >two fields. So correct information.
    > >
    > >When I run sp_indexes_rowset 'tablename', I get only one
    > of the two columns.
    > >So incorrect information.
    > >
    > >If I do the same on another database with the same
    > database structure, I get
    > >correct information.
    > >
    > >Does anyone know what the problem is with this database?
    > >
    > >Thanks in advance,
    > >
    > >Peter
    > >
    > >
    > >.
    > >

    Peter Notebaert Guest

Similar Threads

  1. array index problem
    By anitha in forum Macromedia Flex General Discussion
    Replies: 0
    Last Post: April 23rd, 04:03 AM
  2. Problem with locked index.htm
    By Alex Mariño in forum Macromedia Contribute General Discussion
    Replies: 4
    Last Post: January 23rd, 02:25 PM
  3. Z-index problem
    By bhaktik in forum Dreamweaver AppDev
    Replies: 2
    Last Post: April 8th, 03:08 PM
  4. 3D model z-index problem
    By Markol in forum Macromedia Director 3D
    Replies: 1
    Last Post: September 7th, 01:28 PM
  5. large index problem
    By Bill Peterson in forum Adobe Indesign Windows
    Replies: 0
    Last Post: June 28th, 03:24 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139