none
Invalid Descriptor Index error

    Question

  • I'm testing db to db transactional replication on a box ( all on the same box ) and the distribution agent fails with the above error. I know it's something to do with the physical server as this test works on other servers fine. SQL2k Ent  sp4 on w2k3 ent sp1. ( clustered )

    Server and Agent accounts are in local admins, tried push and pull, named and anonymous. Replication also fails if I use the default snapshot location. I suspect policy restrictions ( maybe on the sql service accounts ) Any pointers would be helpful - there are no errors other than above, sadly.

    Monday, October 02, 2006 9:54 AM

Answers

  • This looks like a mismatch of distribution database version (SP, QFE not applied correctly?). Can you do a distribution..sp_helptext 'sp_MSadd_distribution_history' to see if the parameters are lined up properly? If you have a working environment, you may also want to compare the text of the sp_MSadd_distribution_history proc and see if you can find any suspicious differences.

    -Raymond

    Monday, October 09, 2006 8:19 PM

All replies

  • can you cut/paste the entire agent error output?
    Wednesday, October 04, 2006 3:27 AM
    Moderator
  • The distribution Job fails with this message   " Invalid Descriptor Index.  The step failed."
     
    There are no other error messages within any of the logs. Have re-applied replication over 12 times now.
    Wednesday, October 04, 2006 7:12 AM
  •  

    I am having the same issue and wondered if you had found out what was causing the problem.   In my case it is a brand new publication but I have built the same one on another server without this error.   Thanks

    Sunday, October 08, 2006 11:38 PM
  • Do you know if the distrib.exe process was able to start at all when you start the SQL Server Agent job? (May be tricky to find out from taskmgr.exe...) If possible, can you manually run the distrib.exe executable using the command-line from msdb..sysjobsteps with -OutputVerboseLevel 2 and post the (sanitized) output here? Thanks.

    -Raymond

    Monday, October 09, 2006 1:12 AM
  • Ah cool ! I looked at the job and thought "what runs this - I should get to the command line"

    Microsoft SQL Server Distribution Agent 8.00.2039
    Copyright (c) 2000 Microsoft Corporation

    Connecting to Subscriber 'MyServer'
    Connecting to Subscriber 'MyServer.ServerAdmin'

    Server: MyServer
    DBMS: Microsoft SQL Server
    Version: 08.00.2040
    user name: dbo
    API conformance: 2
    SQL conformance: 1
    transaction capable: 2
    read only: N
    identifier quote char: "
    non_nullable_columns: 1
    owner usage: 31
    max table name len: 128
    max column name len: 128
    need long data len: Y
    max columns in table: 1024
    max columns in index: 16
    max char literal len: 524288
    max statement len: 524288
    max row size: 524288

    [10/9/2006 9:38:46 AM]MyServer.ServerAdmin: {?=call sp_helpsubscription_properties (N'MyServer', N'SouthWind', N'')}
    Distributor security mode: 1, login name: sa, password: ********.
    alternate snapshot folder: .working directory: .use ftp?: 0.
    Server: MyServer
    DBMS: Microsoft SQL Server
    Version: 08.00.2040
    user name: dbo
    API conformance: 2
    SQL conformance: 1
    transaction capable: 2
    read only: N
    identifier quote char: "
    non_nullable_columns: 1
    owner usage: 31
    max table name len: 128
    max column name len: 128
    need long data len: Y
    max columns in table: 1024
    max columns in index: 16
    max char literal len: 524288
    max statement len: 524288
    max row size: 524288

    Connecting to Distributor 'MyServer'
    Connecting to Distributor 'MyServer.'
    [10/9/2006 9:38:46 AM]MyServer.: exec sp_helpdistpublisher N'MyServer'
    [10/9/2006 9:38:46 AM]MyServer.distribution: select @@SERVERNAME

    Server: MyServer
    DBMS: Microsoft SQL Server
    Version: 08.00.2040
    user name: dbo
    API conformance: 2
    SQL conformance: 1
    transaction capable: 2
    read only: N
    identifier quote char: "
    non_nullable_columns: 1
    owner usage: 31
    max table name len: 128
    max column name len: 128
    need long data len: Y
    max columns in table: 1024
    max columns in index: 16
    max char literal len: 524288
    max statement len: 524288
    max row size: 524288

    [10/9/2006 9:38:46 AM]MyServer.distribution: execute sp_server_info 18

    ANSI codepage: 1
    [10/9/2006 9:38:46 AM]MyServer.distribution: select datasource, srvid from master..sysservers where upper(srvname) = upper(N'MyServer')
    [10/9/2006 9:38:46 AM]MyServer.distribution: select datasource, srvid from master..sysservers where upper(srvname) = upper(N'MyServer')
    [10/9/2006 9:38:46 AM]MyServer.distribution: {call sp_MShelp_distribution_agentid(0, N'SouthWind', NULL, 0, N'ServerAdmin', 1)}
    Agent message code 20046. Invalid Descriptor Index
    [10/9/2006 9:38:46 AM]MyServer.distribution: {call sp_MSadd_distribution_history(1, 6,  ?, ?, 0, 0, 0.00, 0x01, 1, ?, -1, 0x01, 0x01)}
    Adding alert to msdb..sysreplicationalerts: ErrorId = 2,
    Transaction Seqno = 0000000000000000000000000000, Command ID = -1
    Message: Replication-Replication Distribution Subsystem: agent MyServer-SouthWind-MyServer-1 failed. Invalid Descriptor Index[10/9/2006 9:38:46 AM]MyServer.distribution: {call sp_MSadd_repl_alert(3, 1,  2, 14151, ?, -1, N'MyServer', N'SouthWind', N'MyServer', N'ServerAdmin', ?)}
    [10/9/2006 9:38:46 AM]MyServer.ServerAdmin: exec dbo.sp_MSupdatelastsyncinfo N'MyServer',N'SouthWind', N'', 1, 6, N'Invalid Descriptor Index'
    Disconnecting from Subscriber 'MyServer'
    Disconnecting from Distributor History 'MyServer'

    Monday, October 09, 2006 8:45 AM
  •  

    Here is the results I am getting.  I am sorry to say this didn't help me much.  I also have someone checking a possible issue with the xprepl.dll file on the publisher - it seems to be an older file.   Most of the web searches I have done mention SP3a or SP2 being needed but I have the same replication working on another server with the same SQL Server versions on publisher and subscriber so I don't think that is causing my issue.   Thanks for any ideas you have.

    Microsoft SQL Server Distribution Agent 8.00.760
    Copyright (c) 2000 Microsoft Corporation
    Microsoft SQL Server Replication Agent: USALCOT-DB02-TCSC-subscriber-3

    Startup Delay: 3702 (msecs)
    Connecting to Distributor 'publisher'
    Connecting to Distributor 'publisher.'
    [10/9/2006 9:29:23 AM]publisher.: exec sp_helpdistpublisher N'publisher'
    [10/9/2006 9:29:23 AM]publisher.distribution: select @@SERVERNAME

    Server: publisher
    DBMS: Microsoft SQL Server
    Version: 08.00.0760
    user name: dbo
    API conformance: 2
    SQL conformance: 1
    transaction capable: 2
    read only: N
    identifier quote char: "
    non_nullable_columns: 1
    owner usage: 31
    max table name len: 128
    max column name len: 128
    need long data len: Y
    max columns in table: 1024
    max columns in index: 16
    max char literal len: 524288
    max statement len: 524288
    max row size: 524288

    [10/9/2006 9:29:24 AM]publisher.distribution: execute sp_server_info 18

    ANSI codepage: 1
    [10/9/2006 9:29:24 AM]publisher.distribution: select datasource, srvid from master..sysservers where upper(srvname) = upper(N'subscriber')
    [10/9/2006 9:29:24 AM]publisher.distribution: {?=call sp_MShelp_subscriber_info (N'publisher', N'subscriber')}
    Subscriber security mode: 0, login name: sa.
    [10/9/2006 9:29:24 AM]publisher.distribution: select datasource, srvid from master..sysservers where upper(srvname) = upper(N'publisher')
    [10/9/2006 9:29:24 AM]publisher.distribution: {call sp_MShelp_distribution_agentid(0, N'TCSC', NULL, 2, N'tcsc', 0)}
    Agent message code 20046. Invalid Descriptor Index
    [10/9/2006 9:29:24 AM]publisher.distribution: {call sp_MSadd_distribution_history(3, 6,  ?, ?, 0, 0, 0.00, 0x01, 1, ?, -1, 0x01, 0x01)}
    Adding alert to msdb..sysreplicationalerts: ErrorId = 9,
    Transaction Seqno = 0000000000000000000000000000, Command ID = -1
    Message: Replication-Replication Distribution Subsystem: agent publisher-TCSC-subscriber-3 failed. Invalid Descriptor Index[10/9/2006 9:29:24 AM]publisher.distribution: {call sp_MSadd_repl_alert(3, 3,  9, 14151, ?, -1, N'publisher', N'TCSC', N'subscriber', N'tcsc', ?)}
    ErrorId = 9, SourceTypeId = 4
    ErrorCode = 'S1002'
    ErrorText = 'Invalid Descriptor Index'
    [10/9/2006 9:29:24 AM]publisher.distribution: {call sp_MSadd_repl_error(9, 0,  4, ?, N'S1002', ?)}

    Category:ODBC
    Source:  ODBC SQL Server Driver
    Number:  S1002
    Message: Invalid Descriptor Index
    Disconnecting from Distributor History 'publisher'

    Monday, October 09, 2006 3:44 PM
  • This looks like a mismatch of distribution database version (SP, QFE not applied correctly?). Can you do a distribution..sp_helptext 'sp_MSadd_distribution_history' to see if the parameters are lined up properly? If you have a working environment, you may also want to compare the text of the sp_MSadd_distribution_history proc and see if you can find any suspicious differences.

    -Raymond

    Monday, October 09, 2006 8:19 PM
  • You are my hero !! doh ! how could I be so stupid as to not consider checking the distribution template database create date.

    I checked against another box and it appears the templates had never been updated, copied the mdf and ldf from another box and lo it works!!!

    Raymond I owe you a beer big time!! ( it's also the first time in around 2 or 3 years I've actually had a problem solved on a forum ) I will store this information as a crucial peice of information.  This explains the "re-apply service pack" solution but has never explained the reasoning behind it.

    Thanks again!

    Tuesday, October 10, 2006 8:14 AM
  • Its seems like this may also be the problem I am having.  What I wondered if there is anyway to do this without rebuilding the replication?  I will need to do this work on the weekend again if I have to resend the snapshot.   

    This is the first time I have ever added information to a forum so the fact that I got the answer so quickly is real impressive to me. 

    Thanks to both of you for your help!!!

     

    Tuesday, October 10, 2006 8:08 PM
  • you don't have to rebuild anything, just try reapply the last service pack/QFE that was attempted.
    Wednesday, October 11, 2006 4:13 AM
    Moderator
  • in my case I couldn't apply the sp so I just moved the files. Thanks for clarifying the point Greg.

    Still sort of worrying about the SP though.

    Wednesday, October 11, 2006 9:21 AM