Showing posts with label row. Show all posts
Showing posts with label row. Show all posts

Sunday, March 25, 2012

Cannot read the next data row for the data set abc.

Dear All.

I am facing the above mentioned error quite frequently. I am using SQL 2005 reporting services and my database is in SQL 2005. I am using a stored procedure and pass the parameters to the SP through the report. The SP returns the results in about 4-5 seconds at max but when the report is run, it usually takes a long time for processing and then it throws the following error:

Cannot read the next data row for the data set ABC. A severe error occurred on the current command. The results, if any, should be discarded.

Can anyone from Microsoft please specify the exact reason for this error and how can we solve it?

Also there is another problem, some of my reports use SPs. When the SPs are run independantly, they return the results efficiently in about 2-3 seconds but when the report is run using the same SPs, the report returns the results in 2-3 minutes. Any reasons? Any configuration change that may be required for reporting server?

Thanks in advance.

Kashif

Hello,

I have similar problem. My RS 2005 report is based on query like dataset but it uses UDFs to recive some data. When I run it sometimes I get such a result:

  • An error has occurred during report processing. (rsProcessingAborted)

  • Cannot read the next data row for the data set MainDataSource. (rsErrorReadingNextDataRow)

  • Transaction (Process ID 62) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.|||

    You might try to add a NOLOCK hint to your joins.

    Or you can 'set transaction isolation level read uncommitted' for procs where you don't want to issue read locks.

    That might help.

    Jarret

    |||

    Dear Jarret.

    i have already tried the read uncommitted isolation level but no use. The problem is intermittant and we dont exactly know when and why does this occur. sometimes the report runs fine and at other times, it generates this problem. I hope to get an answer from Microsoft as this is starting to create problems for us as the number of report users increase, the error is occurring more frequently.

    Regards

    |||

    I think it's caused by Reporting Services not by SQL Server itself. When I run my report query from Management Studio I always get results. The error with deadlock occurs only in Reporting Services...

    I've also noticed that this error frequency rises with the number of users using the database (but that should be obvious).

    Regards

    Maciej

    |||

    Has the problem been solved yet? I too am having the same problem -- I'm wondering if it's associated with the upgrade to SQL Server 2005 SP2?

    --Peter

  • Cannot read the next data row for the data set abc.

    Dear All.

    I am facing the above mentioned error quite frequently. I am using SQL 2005 reporting services and my database is in SQL 2005. I am using a stored procedure and pass the parameters to the SP through the report. The SP returns the results in about 4-5 seconds at max but when the report is run, it usually takes a long time for processing and then it throws the following error:

    Cannot read the next data row for the data set ABC. A severe error occurred on the current command. The results, if any, should be discarded.

    Can anyone from Microsoft please specify the exact reason for this error and how can we solve it?

    Also there is another problem, some of my reports use SPs. When the SPs are run independantly, they return the results efficiently in about 2-3 seconds but when the report is run using the same SPs, the report returns the results in 2-3 minutes. Any reasons? Any configuration change that may be required for reporting server?

    Thanks in advance.

    Kashif

    Hello,

    I have similar problem. My RS 2005 report is based on query like dataset but it uses UDFs to recive some data. When I run it sometimes I get such a result:

  • An error has occurred during report processing. (rsProcessingAborted)

  • Cannot read the next data row for the data set MainDataSource. (rsErrorReadingNextDataRow)

  • Transaction (Process ID 62) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.|||

    You might try to add a NOLOCK hint to your joins.

    Or you can 'set transaction isolation level read uncommitted' for procs where you don't want to issue read locks.

    That might help.

    Jarret

    |||

    Dear Jarret.

    i have already tried the read uncommitted isolation level but no use. The problem is intermittant and we dont exactly know when and why does this occur. sometimes the report runs fine and at other times, it generates this problem. I hope to get an answer from Microsoft as this is starting to create problems for us as the number of report users increase, the error is occurring more frequently.

    Regards

    |||

    I think it's caused by Reporting Services not by SQL Server itself. When I run my report query from Management Studio I always get results. The error with deadlock occurs only in Reporting Services...

    I've also noticed that this error frequency rises with the number of users using the database (but that should be obvious).

    Regards

    Maciej

    |||

    Has the problem been solved yet? I too am having the same problem -- I'm wondering if it's associated with the upgrade to SQL Server 2005 SP2?

    --Peter

  • Cannot read the next data row for the data set abc.

    Dear All.

    I am facing the above mentioned error quite frequently. I am using SQL 2005 reporting services and my database is in SQL 2005. I am using a stored procedure and pass the parameters to the SP through the report. The SP returns the results in about 4-5 seconds at max but when the report is run, it usually takes a long time for processing and then it throws the following error:

    Cannot read the next data row for the data set ABC. A severe error occurred on the current command. The results, if any, should be discarded.

    Can anyone from Microsoft please specify the exact reason for this error and how can we solve it?

    Also there is another problem, some of my reports use SPs. When the SPs are run independantly, they return the results efficiently in about 2-3 seconds but when the report is run using the same SPs, the report returns the results in 2-3 minutes. Any reasons? Any configuration change that may be required for reporting server?

    Thanks in advance.

    Kashif

    Hello,

    I have similar problem. My RS 2005 report is based on query like dataset but it uses UDFs to recive some data. When I run it sometimes I get such a result:

  • An error has occurred during report processing. (rsProcessingAborted)
  • Cannot read the next data row for the data set MainDataSource. (rsErrorReadingNextDataRow)
  • Transaction (Process ID 62) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.|||

    You might try to add a NOLOCK hint to your joins.

    Or you can 'set transaction isolation level read uncommitted' for procs where you don't want to issue read locks.

    That might help.

    Jarret

    |||

    Dear Jarret.

    i have already tried the read uncommitted isolation level but no use. The problem is intermittant and we dont exactly know when and why does this occur. sometimes the report runs fine and at other times, it generates this problem. I hope to get an answer from Microsoft as this is starting to create problems for us as the number of report users increase, the error is occurring more frequently.

    Regards

    |||

    I think it's caused by Reporting Services not by SQL Server itself. When I run my report query from Management Studio I always get results. The error with deadlock occurs only in Reporting Services...

    I've also noticed that this error frequency rises with the number of users using the database (but that should be obvious).

    Regards

    Maciej

    |||

    Has the problem been solved yet? I too am having the same problem -- I'm wondering if it's associated with the upgrade to SQL Server 2005 SP2?

    --Peter

    sql
  • Cannot read the next data row for the data set

    Hi,

    My report runs fine when I view in VS, data shows fine when I run the query in the data window, but when I publish it to the server, I get the above error. I am running SQL server 2005 RTM and I have re-deployed the entire solution.

    Any ideas?

    Found the problem.

    This is a problem that is down to a bug in reporting services, and I sincerely hope that "they" fix it in the first sp!

    Occasionally, reporting services will change your parameter types to string. This is sooooo annoying, and normally fails when you view, but in this case, it took my parameters (date/time) that were already in the parameter boxes (I am altering an existing report) and ran the report happily. I just happened to see that there were no calendar boxes next to the parameters on my web server.

    ^%$£"$%^&*&%£$%^&(*&^%$ is all I can say - this has wasted 2 hours of my time.

    Please please Microsoft, fix this bug! A hot fix would be good.....beg beg

    |||

    Hi,

    I experienced similar problems with some of my RS reports and find a solution for my case

    I tried to explain the problem and solution at the article http://www.kodyaz.com/articles/article.aspx?articleid=53

    For my situation, it seemed that the NULL values within aggregate functions were causing the problem.

    Actually although the sql code runs successsfully the warning message "Warning: Null value is eliminated by an aggregate or other SET operation." returned from the sql server was causing the Reporting Services to fire the below error:

    An error occured during report processing.
    Cannot read the next data row for the data set Dataset1.
    A sever error occured on the current command. The results, if any, should be discarded.

    A simple way to get rid of the problem is running the t-sql codes between "SET ANSI_WARNINGS OFF" and "SET ANSI_WARNINGS ON" commands.

    Eralper

    http://www.kodyaz.com

    |||Rather than beg microsoft to fix their own mistakes wouldn't you rather use a system that if it had a mistake you could: contact the programmers or fix the mistake yourself?

    Using open source ruby (in any OS) you can contact the community or alter the code yourself. Ruby can do anything this reporting services can do.

    I've found quite a few bugs in Reporting Services, but rather than beg MS to listen to me I've stopped using MS. I post the bugs to a hacker site, this is much more likely to get MS's attention.

    Cannot read the next data row for the data set

    Hello all. I am getting the error "Cannot read the next data row for the data set" Then it further states "ERROR [IM001][Microsoft][ODBC Driver Manager] Driver does not support this function"

    I am trying to connect to an ODBC database that I have set up through Transoft ODBC 3.10.00.303 from 3/30/1999.

    I am able to execute my query and receive data from my source, but when I try to preview my report I receive this error.

    Thanks!

    BJ

    I have a simular error now with a navision database (3.60) connected trough ODBC.
    Did anyone find a solution to this?
    |||

    This for me was caused by an old version of an ODBC driver that was not supported. If you are having this then your ODBC driver is either not supported or you need to update it.

    BJ

    Cannot read the next data row for the data set

    Hello all. I am getting the error "Cannot read the next data row for the data set" Then it further states "ERROR [IM001][Microsoft][ODBC Driver Manager] Driver does not support this function"

    I am trying to connect to an ODBC database that I have set up through Transoft ODBC 3.10.00.303 from 3/30/1999.

    I am able to execute my query and receive data from my source, but when I try to preview my report I receive this error.

    Thanks!

    BJ

    I have a simular error now with a navision database (3.60) connected trough ODBC.
    Did anyone find a solution to this?|||

    This for me was caused by an old version of an ODBC driver that was not supported. If you are having this then your ODBC driver is either not supported or you need to update it.

    BJ

    Cannot read the next data row for the data set

    Hi,

    My report runs fine when I view in VS, data shows fine when I run the query in the data window, but when I publish it to the server, I get the above error. I am running SQL server 2005 RTM and I have re-deployed the entire solution.

    Any ideas?

    Found the problem.

    This is a problem that is down to a bug in reporting services, and I sincerely hope that "they" fix it in the first sp!

    Occasionally, reporting services will change your parameter types to string. This is sooooo annoying, and normally fails when you view, but in this case, it took my parameters (date/time) that were already in the parameter boxes (I am altering an existing report) and ran the report happily. I just happened to see that there were no calendar boxes next to the parameters on my web server.

    ^%$£"$%^&*&%£$%^&(*&^%$ is all I can say - this has wasted 2 hours of my time.

    Please please Microsoft, fix this bug! A hot fix would be good.....beg beg

    |||

    Hi,

    I experienced similar problems with some of my RS reports and find a solution for my case

    I tried to explain the problem and solution at the article http://www.kodyaz.com/articles/article.aspx?articleid=53

    For my situation, it seemed that the NULL values within aggregate functions were causing the problem.

    Actually although the sql code runs successsfully the warning message "Warning: Null value is eliminated by an aggregate or other SET operation." returned from the sql server was causing the Reporting Services to fire the below error:

    An error occured during report processing.
    Cannot read the next data row for the data set Dataset1.
    A sever error occured on the current command. The results, if any, should be discarded.

    A simple way to get rid of the problem is running the t-sql codes between "SET ANSI_WARNINGS OFF" and "SET ANSI_WARNINGS ON" commands.

    Eralper

    http://www.kodyaz.com

    |||Rather than beg microsoft to fix their own mistakes wouldn't you rather use a system that if it had a mistake you could: contact the programmers or fix the mistake yourself?

    Using open source ruby (in any OS) you can contact the community or alter the code yourself. Ruby can do anything this reporting services can do.

    I've found quite a few bugs in Reporting Services, but rather than beg MS to listen to me I've stopped using MS. I post the bugs to a hacker site, this is much more likely to get MS's attention.

    Cannot read the next data row for the data set

    Hi,

    My report runs fine when I view in VS, data shows fine when I run the query in the data window, but when I publish it to the server, I get the above error. I am running SQL server 2005 RTM and I have re-deployed the entire solution.

    Any ideas?

    Found the problem.

    This is a problem that is down to a bug in reporting services, and I sincerely hope that "they" fix it in the first sp!

    Occasionally, reporting services will change your parameter types to string. This is sooooo annoying, and normally fails when you view, but in this case, it took my parameters (date/time) that were already in the parameter boxes (I am altering an existing report) and ran the report happily. I just happened to see that there were no calendar boxes next to the parameters on my web server.

    ^%$£"$%^&*&%£$%^&(*&^%$ is all I can say - this has wasted 2 hours of my time.

    Please please Microsoft, fix this bug! A hot fix would be good.....beg beg

    |||

    Hi,

    I experienced similar problems with some of my RS reports and find a solution for my case

    I tried to explain the problem and solution at the article http://www.kodyaz.com/articles/article.aspx?articleid=53

    For my situation, it seemed that the NULL values within aggregate functions were causing the problem.

    Actually although the sql code runs successsfully the warning message "Warning: Null value is eliminated by an aggregate or other SET operation." returned from the sql server was causing the Reporting Services to fire the below error:

    An error occured during report processing.
    Cannot read the next data row for the data set Dataset1.
    A sever error occured on the current command. The results, if any, should be discarded.

    A simple way to get rid of the problem is running the t-sql codes between "SET ANSI_WARNINGS OFF" and "SET ANSI_WARNINGS ON" commands.

    Eralper

    http://www.kodyaz.com

    |||Rather than beg microsoft to fix their own mistakes wouldn't you rather use a system that if it had a mistake you could: contact the programmers or fix the mistake yourself?

    Using open source ruby (in any OS) you can contact the community or alter the code yourself. Ruby can do anything this reporting services can do.

    I've found quite a few bugs in Reporting Services, but rather than beg MS to listen to me I've stopped using MS. I post the bugs to a hacker site, this is much more likely to get MS's attention.sql

    Cannot read the next data row for the data set

    I have followed all the links posted on this forum regarding this error and done evrything that has been suggested, but still I am getting this error.

  • An error has occurred during report processing.
  • Cannot read the next data row for the data set dsXXXXX.
  • Invalid attempt to NextResult when reader is closed.

    Please help.

    In the Report Manager in the upper right hand corner, click on the “Site Settings”.
    On the resulting page in the textbox labeled “Limit report execution to the
    following number of seconds: ” Increase this time out setting to 4000 (or adjust
    this time as necessary).

    Also refer : http://msdn2.microsoft.com/en-us/library/aa274413(SQL.80).aspx

    |||

    I have followed the documentation and changed the timeout setting to 6000. It was running for a while but at the end it gave me the below error.

  • An error has occurred during report processing.
  • Cannot read the next data row for the data set dsTestMbrtEarn.
  • Invalid attempt to NextResult when reader is closed.
  • Cannot read the next data row for the data set

    Hello all -
    Our users are getting the above error when trying to execute a report.
    Permission has been granted to the security group that they belong to, for
    the report folder and report (browser permissions), as well as the Analytical
    Services database and the associated data warehouse database (db_datareader).
    The report uses two parameters, which have default values set (year and
    month).
    Any ideas as to what may be the problem?
    Thanks!
    Pam RichardsonIn case anyone else runs into this problem, here's the answer. In the
    analysis services database, the Reader role/Cell Data had the "Enable read
    permissions" checkbox checked, but nothing was in the "Allow reading of cube
    content" textbox. Unchecking this checkbox solved the problem.
    Thanks,
    Pam Richardson
    "Pam Richardson" wrote:
    > Hello all -
    > Our users are getting the above error when trying to execute a report.
    > Permission has been granted to the security group that they belong to, for
    > the report folder and report (browser permissions), as well as the Analytical
    > Services database and the associated data warehouse database (db_datareader).
    > The report uses two parameters, which have default values set (year and
    > month).
    > Any ideas as to what may be the problem?
    > Thanks!
    > Pam Richardson

    Sunday, March 11, 2012

    Cannot Make Inserts at Subscribers

    I'm getting this error message when trying to insert a row on some
    tables in my database.
    The identity range managed by replication is full and must be updated
    by a replication agent. The INSERT conflict occurred in database 'XXX',
    table 'tblContact', column 'Number'. Sp_adjustpublisheridentityrange can
    be called to get a new identity range.
    These subscribers have been running for several months with out issue
    and they are now all getting these errors as of yesterday. Running the
    merge agent does not remedy the problem and that stored procedure seems
    to only work for the publisher which is running just fine.
    Running dbcc checkident ('tblContact', NORESEED) returns
    Checking identity information: current identity value '94005', current
    column value '94005'.
    This will increase by one if I try an insert, but the insert fails.
    I took everything down. Deleted the databases on the subscribers and
    disabled publishing on the publisher, and started from scratch.
    After setting up the replication again, some of the tables that were
    giving me the problem are now working, but the majority of the tables
    are still giving me this error.
    I've run out of things to try. I would appreciate any further
    suggestions.
    Thank you,
    David
    Basically you have blown your identity range.
    http://www.simple-talk.com/sql/database-administration/the-identity-crisis-in-replication/
    Automatic identity range management has a check constraint which constrains
    the possible identity values which can be used on your publisher and
    subscriber. If you do an insert the check constraint will kick back the
    insert when you blow the range and increment the current identity value.
    the proc Sp_adjustpublisheridentityrange will adjust the identity range on
    the Publisher, but not the subscriber. To fix this on your subscribers you
    have to sample each one and figure out where they are. Then run the merge
    agent one by one. One of the first things it will do when it detects the
    range has been blown is to adjust it.
    If this fails to work you may have to manually intervene and reset it based
    on what all your subscribers are at and the values stored in select * from
    distribution.dbo.MSmerge_identity_range_allocation s
    You may also need to run your merge agents more frequently or bump up the
    ranges to account for the max amount of data inserted on the subscriber at
    any one time between syncs.
    Hilary Cotter
    Looking for a SQL Server replication book?
    http://www.nwsu.com/0974973602.html
    Looking for a FAQ on Indexing Services/SQL FTS
    http://www.indexserverfaq.com
    "David TMS" <IdontlikeSpam@.nospam.com> wrote in message
    news:MPG.20636a6d184a3e8a989680@.msnews.microsoft.c om...
    > I'm getting this error message when trying to insert a row on some
    > tables in my database.
    > The identity range managed by replication is full and must be updated
    > by a replication agent. The INSERT conflict occurred in database 'XXX',
    > table 'tblContact', column 'Number'. Sp_adjustpublisheridentityrange can
    > be called to get a new identity range.
    > These subscribers have been running for several months with out issue
    > and they are now all getting these errors as of yesterday. Running the
    > merge agent does not remedy the problem and that stored procedure seems
    > to only work for the publisher which is running just fine.
    > Running dbcc checkident ('tblContact', NORESEED) returns
    > Checking identity information: current identity value '94005', current
    > column value '94005'.
    > This will increase by one if I try an insert, but the insert fails.
    > I took everything down. Deleted the databases on the subscribers and
    > disabled publishing on the publisher, and started from scratch.
    > After setting up the replication again, some of the tables that were
    > giving me the problem are now working, but the majority of the tables
    > are still giving me this error.
    > I've run out of things to try. I would appreciate any further
    > suggestions.
    > Thank you,
    > David
    |||Running the merge agent did not fix this problem for me. The identity
    ranges on the subscribers were also more than large enough. They had
    room for 10,000 inserts on each table and were not able to make any on
    most of the tables, but other tables seemed to work just fine. Deleting
    the publication and disabling replication, but keeping the original
    database seemed to make the problem recur immediately after setting up
    the replication. I'm still not sure of the cause of this problem, but I
    seem to have a work around. I started a new database with a fresh
    schema. I then imported the data from the old database. I set
    everything back up using this new database name and it went fairly
    smoothly.
    Thanks,
    Dave
    In article <#2pv#P8ZHHA.4720@.TK2MSFTNGP06.phx.gbl>,
    hilary.cotter@.gmail.com says...
    > Basically you have blown your identity range.
    > http://www.simple-talk.com/sql/database-administration/the-identity-crisis-in-replication/
    > Automatic identity range management has a check constraint which constrains
    > the possible identity values which can be used on your publisher and
    > subscriber. If you do an insert the check constraint will kick back the
    > insert when you blow the range and increment the current identity value.
    > the proc Sp_adjustpublisheridentityrange will adjust the identity range on
    > the Publisher, but not the subscriber. To fix this on your subscribers you
    > have to sample each one and figure out where they are. Then run the merge
    > agent one by one. One of the first things it will do when it detects the
    > range has been blown is to adjust it.
    > If this fails to work you may have to manually intervene and reset it based
    > on what all your subscribers are at and the values stored in select * from
    > distribution.dbo.MSmerge_identity_range_allocation s
    > You may also need to run your merge agents more frequently or bump up the
    > ranges to account for the max amount of data inserted on the subscriber at
    > any one time between syncs.
    >

    Friday, February 24, 2012

    Cannot insert row into table

    Hello

    Although I am able to delete a row from CatA table, I am unable to insert a row into the same table.

    The rows are from 1 to 241, I accidentally deleted row 41, together with row 42 which I wanted to delete. But I can't reinsert row 41.

    I see this message:

    INSERT INTO [dbo].[CatA]([CatA_ID], [LName], [Auto], [Advertising], [Antiques], [Art], [Astrology])
    VALUES(41, N'JSmith', '(null)', '(null)', '(null)', '(null)', '(null)')

    Error: Query(1/2) Cannot insert explicit value for identity column in table 'CatA' when IDENTITY_INSERT is set to OFF.

    Below are the settings for this table, I have tried to change the settings but I am prevented.

    CatA_ID = Primary Key

    Parameter and Value:

    Identity = yes

    Identity Seed = 1

    Identity Increment = 1

    IsRowGuidCol = No

    What do I need to do, how do I reinsert the row 41 or insert a new row in the future?

    Please advise.

    Regards

    Lynn

    with an auto-incrementing field, you never use that field in your insert statement - it, by it's name, auto-increments whenever a row is added to the database table. You can't insert to a specific row, using the auto-increment table.

    If you deleted item 41 and item 42 - the next item inserted will be item 43. You really don't need to worry that the auto-incrementing fields are not fully sequential - if they are missing some numbers, it doesn't matter at all.

    remember, when inserting into the table, do not use the identity/auto-incrementing field in your insert statement.

    |||

    Hello augustwind

    Thanks for the reply. When I was creating the tables, I just ticked the boxes. Is there a way I can undo this?

    I don't mind if the numbers are not sequential, but I just can't insert a row.

    If I try to insert using the next number in sequence or number 42 I get the error mentioned in my first post.

    My database is SQL 2000 and I am editing with Aqua Data Studio.

    I have the option to insert data directly into the table, but when I tried without inserting a number I saw this error.

    INSERT INTO [dbo].[CatA]()
    VALUES()

    Error: Query(1/1) Line 2: Incorrect syntax near ')'.


    How do I insert a row? If I need to use syntax, what is the correct syntax required?

    Or how do I remove the auto insert in my table?

    Thanks.

    Regards

    Lynn

    |||

    Hi

    If you accidentally delete a record with an identity column you could follow those to restore it:

    Set the Identity Specification(is Identity) of the identity column toNo -->insert the record you deleted -->Set the Identity Specification(is Identity) of the identity column toyes

    Hope this helps.

    |||

    Hello

    Thanks for your reply and help.

    I now know that I am unable to insert data directly into the row.

    Below is the syntex which I have found to work and which might assist other sql beginners.

    SET IDENTITY_INSERT CatA OFF

    INSERT INTO CatA ( [LName])
    VALUES( N'SJones')

    GO

    Thanks

    Lynn

    |||Hi Lynn, the error message you mentioned in the first post should give you some promptSmile, you can temporarily turn onIDENTITY_INSERT when you want to insert a row with specifying identity number:

    SET IDENTITY_INSERT?CatA ON

    INSERT INTO [dbo].[CatA]([CatA_ID], [LName], [Auto], [Advertising], [Antiques], [Art], [Astrology])
    VALUES(41, N'JSmith', '(null)', '(null)', '(null)', '(null)', '(null)')

    SET IDENTITY_INSERT?CatA OFF

    Cannot insert duplicate key row in object......

    Hi,
    I am facing following error in transaction replication.
    Cannot insert duplicate key row in object 'TableName'
    with unique index 'PKConstraintName
    Can any one help on this?
    Thanks,
    Manoj
    Is it the distribution agent that is failing with that error? Then it means
    that the subscriber already has a row, but the distribution agent is trying
    to insert it again.
    Have you been making any changes to the subscribing tables? Could it be that
    someone inserted a row to the subscribing table, before that row existed on
    the publishing table?
    Vyas, MVP (SQL Server)
    http://vyaskn.tripod.com/
    "Manoj Raheja" <manoj_raheja@.hotmail.com> wrote in message
    news:2e1ad01c46af7$0a435df0$a501280a@.phx.gbl...
    > Hi,
    > I am facing following error in transaction replication.
    > Cannot insert duplicate key row in object 'TableName'
    > with unique index 'PKConstraintName
    > Can any one help on this?
    > Thanks,
    > Manoj
    >
    |||Thanks Vyas,
    The subscriber has more number of records than publisher.
    Thanks,
    Manoj
    >--Original Message--
    >Is it the distribution agent that is failing with that
    error? Then it means
    >that the subscriber already has a row, but the
    distribution agent is trying
    >to insert it again.
    >Have you been making any changes to the subscribing
    tables? Could it be that
    >someone inserted a row to the subscribing table, before
    that row existed on
    >the publishing table?
    >--
    >Vyas, MVP (SQL Server)
    >http://vyaskn.tripod.com/
    >
    >"Manoj Raheja" <manoj_raheja@.hotmail.com> wrote in
    message
    >news:2e1ad01c46af7$0a435df0$a501280a@.phx.gbl...
    >
    >.
    >

    Cannot insert duplicate key row in object 'MSmerge_tombstone'

    Hi,
    I have made a replication since 2004-08-21. it works well, but recently i
    got a problem. When i want to delete some records in a table, an error
    occur. the message is:
    Cannot insert duplicate key row in object 'MSmerge_tombstone' with unique
    index 'uc1MSmerge_tombstone'
    The statement has been terminated.
    whatever how i do, even clear up all the records in table MSmerge_tombstone.
    but when i try to delete the records in the table. i still got the error
    message. i have searched more web pages for try to got some explain and
    solution. but my work is useless. my boss is pressing me to solve this
    problem in this week. Friends. Please help and save my life.
    Regards
    Jackson Chan
    My personal opinion is that your unique index 'uc1MSmerge_tombstone' has gone
    a bit funny.
    Couple of sugestions, delete your unique index
    run a checkdb on your database
    Re-establish your index.
    Peter
    "We are all worms. But I believe that I am a glow-worm."
    Winston Churchill
    "Jackson BF" wrote:

    > Hi,
    > I have made a replication since 2004-08-21. it works well, but recently i
    > got a problem. When i want to delete some records in a table, an error
    > occur. the message is:
    > Cannot insert duplicate key row in object 'MSmerge_tombstone' with unique
    > index 'uc1MSmerge_tombstone'
    > The statement has been terminated.
    > whatever how i do, even clear up all the records in table MSmerge_tombstone.
    > but when i try to delete the records in the table. i still got the error
    > message. i have searched more web pages for try to got some explain and
    > solution. but my work is useless. my boss is pressing me to solve this
    > problem in this week. Friends. Please help and save my life.
    > Regards
    > Jackson Chan
    >
    >
    >

    Cannot insert duplicate key row in object MSmerge_tombstone

    MSMerge_tombstone is a System Table used for Replication
    information. It would appear as though you arent getting
    rid of Replication totally after the first time you run
    it. Are you dropping the Publication after the first run?

    >--Original Message--
    >I am working with a VB.Net Windows app that creates a
    >publication/subscription on the fly. Essentially, it
    takes a database backup
    >in a zip file, unzips it, restores the database to the
    same server as the
    >other database in the setup, creates a publication to the
    first database,
    >then a subscription from the first database to the new
    one, and attempts to
    >run it.
    >The first time this runs, on a fresh setup of all
    databases involved, the
    >process works fine. On subsequent runs, however, when we
    get to the data
    >synchronization part, the following error message comes
    up in the agent's
    >session detail:
    >The schema script \\ROSTERDEV\C$\Program Files\Microsoft
    SQL
    >Server\MSSQL\ReplData\unc\ROSTERDEV_Case_mgt_HQ_c ase_mgt_H
    Q\20040924000502\O
    >ffice_78.sch could not be propagated to the subscriber.
    >(Source: Merge Replication Provider (Agent); Error
    number: -2147201001)
    >----
    --
    >--
    >Cannot insert duplicate key row in object
    MSmerge_tombstone with unique
    >index uc1MSmerge_tombstone.
    >(Source: ROSTERDEV (Data source); Error number: 2601)
    >----
    --
    >--
    >The schema script file might be different, but the
    message itself is the
    >same. We're currently testing, so the exact same zip file
    is getting reused
    >on both first and subsequent attempts. I wouldn't think
    this would cause a
    >data conflict, but it appears to be.
    >Any assistance would be welcome. Thanks.
    >--
    >Kenneth S. McAndrew
    >Software Developer, Information Concepts
    >kmcandrew@.infoconcepts.com
    >
    >.
    >
    The pull subscription, publication, and database published from are all
    being removed, in that order, by the vb.net code. I don't see any left-over
    tendrils.
    Kenneth S. McAndrew
    Software Developer, Information Concepts
    kmcandrew@.infoconcepts.com
    "ChrisR" <anonymous@.discussions.microsoft.com> wrote in message
    news:239d01c4a241$308282d0$a401280a@.phx.gbl...[vbcol=seagreen]
    > MSMerge_tombstone is a System Table used for Replication
    > information. It would appear as though you arent getting
    > rid of Replication totally after the first time you run
    > it. Are you dropping the Publication after the first run?
    >
    > takes a database backup
    > same server as the
    > first database,
    > one, and attempts to
    > databases involved, the
    > get to the data
    > up in the agent's
    > SQL
    > Q\20040924000502\O
    > number: -2147201001)
    > --
    > MSmerge_tombstone with unique
    > --
    > message itself is the
    > is getting reused
    > this would cause a

    Sunday, February 19, 2012

    Cannot insert duplicate key row in object

    i am trying to replicate a database in SQL 2000 using transactional
    replication and on one of the tables, i recieve the following error
    Cannot insert duplicate key row in object 'F98611' with unique index
    'F98611_PK'.
    (Source: JDEBACKUP (Data source); Error number: 2601)
    ------
    Function sequence error
    (Source: JDEBACKUP (ODBC); Error number: S1010)
    ------
    Can anyone tell me what i need to do to have replication succeed, i am not
    very knowledgable of SQL as i am a network admin,...so if you could explain
    in basic terms i would greatly appreciate...you can email me at
    malejandro@.armadillohomes.com
    Thanks in advance
    Mark,
    this is because the subscriber has been treated in a read-write fashion, and
    this needs to be explored to ensure it doesn't recur and to check the
    differences between publisher and subscriber data. To get things up and
    going though, you can add 2601 to the SkipErrors parameter of the
    distribution agent profile and restart it.
    Rgds,
    Paul Ibison SQL Server MVP, www.replicationanswers.com/default.asp
    (recommended sql server 2000 replication book:
    http://www.nwsu.com/0974973602p.html)
    |||Paul,
    thank you i have gone ahead and added 2601 to skiperrors in the distribution
    profile. what do you mean by the 'subscriber has been treated in a readwrite
    fashion' . i know what the subscriber is, but the rest is a little foreign to
    me. I greatly appreciate your help and knowledge
    "Paul Ibison" wrote:

    > Mark,
    > this is because the subscriber has been treated in a read-write fashion, and
    > this needs to be explored to ensure it doesn't recur and to check the
    > differences between publisher and subscriber data. To get things up and
    > going though, you can add 2601 to the SkipErrors parameter of the
    > distribution agent profile and restart it.
    > Rgds,
    > Paul Ibison SQL Server MVP, www.replicationanswers.com/default.asp
    > (recommended sql server 2000 replication book:
    > http://www.nwsu.com/0974973602p.html)
    >
    >
    |||Mark,
    for normal transactional replication, there is an implication that the
    subscriber is read-only. If users start adding, deleting or updating data on
    the subscriber in this type of replication, that can mess things up for when
    data from the publisher is synchronized, as you have seen. If the subscriber
    needs to be changed directly, normally a different subscription model is
    chosen - immediate updating subscribers or queued updating subscribers.
    Rgds,
    Paul Ibison SQL Server MVP, www.replicationanswers.com/default.asp
    (recommended sql server 2000 replication book:
    http://www.nwsu.com/0974973602p.html)
    |||Ok, got that, but nobody is accessing the subscriber, we are using it for
    failover purposes, Ive tried transactional and snapshot. Both fail at the
    same table...
    i have even tried to delete the table and have the snapshot recreate it, but
    i get the same result.
    "Paul Ibison" wrote:

    > Mark,
    > for normal transactional replication, there is an implication that the
    > subscriber is read-only. If users start adding, deleting or updating data on
    > the subscriber in this type of replication, that can mess things up for when
    > data from the publisher is synchronized, as you have seen. If the subscriber
    > needs to be changed directly, normally a different subscription model is
    > chosen - immediate updating subscribers or queued updating subscribers.
    > Rgds,
    > Paul Ibison SQL Server MVP, www.replicationanswers.com/default.asp
    > (recommended sql server 2000 replication book:
    > http://www.nwsu.com/0974973602p.html)
    >
    >
    |||Mark,
    in the name comflicts section of the article properties, is it set to drop
    the table if it exists? It should be, but perhaps in this case it isn't.
    Also, have a look at this article:
    http://support.microsoft.com/default...b;en-us;813494 which may be
    relevant.
    Rgds,
    Paul Ibison SQL Server MVP, www.replicationanswers.com/default.asp
    (recommended sql server 2000 replication book:
    http://www.nwsu.com/0974973602p.html)
    |||Pual,
    Yes, it was set to 'drop the existing table and recreate it'. anything else
    i can look into?
    "Paul Ibison" wrote:

    > Mark,
    > in the name comflicts section of the article properties, is it set to drop
    > the table if it exists? It should be, but perhaps in this case it isn't.
    > Also, have a look at this article:
    > http://support.microsoft.com/default...b;en-us;813494 which may be
    > relevant.
    > Rgds,
    > Paul Ibison SQL Server MVP, www.replicationanswers.com/default.asp
    > (recommended sql server 2000 replication book:
    > http://www.nwsu.com/0974973602p.html)
    >
    >
    >
    |||Mark,
    unless the article helps, I'm almost out of ideas
    In your situation, I'd remove the publication and delete the table then
    recreate the publication. I'd enable logging
    (http://support.microsoft.com/?id=312292) then run the distribution agent to
    see at what stage things go wrong (if they do in this case).
    Rgds,
    Paul Ibison SQL Server MVP, www.replicationanswers.com/default.asp
    (recommended sql server 2000 replication book:
    http://www.nwsu.com/0974973602p.html)
    |||In article <52127098-74C0-4993-A721-BB3E07BD3716@.microsoft.com>,
    MarkAlejandro@.discussions.microsoft.com says...
    > Pual,
    > Yes, it was set to 'drop the existing table and recreate it'. anything else
    > i can look into?
    > "Paul Ibison" wrote:
    >
    I have had the exact same error when by mistake, i put the same table in
    two different publications to the same subscriber db.
    You need to right click each publication and look at the articles in
    it. Make sure no publication has the same table in it.
    select * from sysobjects where replinfo <>0 will give you a list of
    replicated tables but not if they are in two different publications.

    cannot insert duplicate key row in msrepl_transactions

    We have an issue that our SQL Replication between our Application Server (holding 13 months of data) and our Reporting Server (holding 5-6 years of data).

    Both systems are running on NT4, SQL Server 7 Ent SP3.

    Our issue is that we used to run SQL Replication but then stopped using it, and used another method of replicating our data from the App Svr to Rpt Svr. However, we have now been told that we have to use SQL Replication.

    We set it up as usual, but when the log reader starts up, it finds the 1st transaction and moves it into the distribution database, but it then fails when attempting to do the 2nd transaction with the error "Cannot insert duplicate key row in object MSrepl_transactions with unique index ucMSrepl_transactions.

    We have checked the tables in the publisher db and they don't hold any duplicates, so I can only assume the key it is talking about is the key field in the distribution database, but this is a Binary field which I believe is populated by replication itself!! Is this correct?

    If so, why is it trying to enter duplicates? And can we resync replication to fix it?Are you doing transactional or merge? Either way it will kick off a snapshot first to sync it. I believe you probably unchecked the initialization when you set it up. But the bottomline is that you have two server contain different data right now so the replication will not work, yet if you sync it, it will erase the historic data on your report server. My take will be to let the snapshot replicate down to a new database on your report server and load the historic data into the database(not a easy task).