Skip to main content

Notifications

Microsoft Dynamics GP (Archived)

cannot insert duplicate key in object dbo.SY07240

Posted on by 4,029 Super User 2024 Season 2

I'm trying to install GP 2010 R2 on my laptop and get this error when running Utilities.  I tried the resolution the error suggests (namely, adding SQL and ODBC Log = True) to the Dex.ini and re-running Utilities) to no avail.  Can anyone point me in the right direction on this?

Thanks!

*This post is locked for comments

  • Frank Hamelly | MVP, MCP, CSA Profile Picture
    Frank Hamelly | MVP... 4,029 Super User 2024 Season 2 on at
    Re: cannot insert duplicate key in object dbo.SY07240

    The server is on my laptop too.  I finally got it to work after cleaning every possible remnant of GP 2010 off the machine, including registry entries and then installed GP 2010 R2.

    Thanks for all your help,

  • Richard Wheeler Profile Picture
    Richard Wheeler 75,730 on at
    Re: cannot insert duplicate key in object dbo.SY07240

    OK, let's try something a little different. I assume you have GP running on your server. So why don't you detach the DYNAMICS and TWO databases off the server and copy them to your laptop. Make sure you do this after hours and reattach immediately after the copy is done. Attach the ddatabases on your laptop then just fire up GP and logging as 'sa' on your laptop and you will have a working copy just like on your server. This is assuming the copy on your server is working and you have the same service pack level on your server and on your laptop.

  • Frank Hamelly | MVP, MCP, CSA Profile Picture
    Frank Hamelly | MVP... 4,029 Super User 2024 Season 2 on at
    Re: cannot insert duplicate key in object dbo.SY07240

    I tried that Richard.  No worky.  I'm guessing there's something lurking in my registry that is giving me fits.  I've uninstalled and reinstalled a number of times and no joy yet.

    Thanks,

  • Richard Wheeler Profile Picture
    Richard Wheeler 75,730 on at
    Re: cannot insert duplicate key in object dbo.SY07240

    If this is the test company why don't you just use GP Utilities to re-add the sample company database. I would go into GP and delete FABRIKAM and then use GP Utilities to recreate.

  • Beat Bucher  GP Geek  GPUG All Star Profile Picture
    Beat Bucher GP Gee... 28,021 Super User 2024 Season 1 on at
    Re: cannot insert duplicate key in object dbo.SY07240

    Hi Frank,

    This table exist in my TWO DB and contains actually 92 rows. Basically there are only two fields : ITEMNMBR and RCTSEQNM...

    Maybe just re-create it from another company or use the script below :

    USE [TWO]

    GO

    /****** Object:  Table [dbo].[IV10202]    Script Date: 08/23/2011 11:40:27 ******/

    SET ANSI_NULLS OFF

    GO

    SET QUOTED_IDENTIFIER ON

    GO

    SET ANSI_PADDING OFF

    GO

    CREATE TABLE [dbo].[IV10202](

    [ITEMNMBR] [char](31) NOT NULL,

    [RCTSEQNM] [int] NOT NULL,

    [DEX_ROW_ID] [int] IDENTITY(1,1) NOT NULL,

    CONSTRAINT [PKIV10202] PRIMARY KEY NONCLUSTERED

    (

    [ITEMNMBR] ASC

    )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]

    ) ON [PRIMARY]

    GO

    SET ANSI_PADDING OFF

    GO

  • Frank Hamelly | MVP, MCP, CSA Profile Picture
    Frank Hamelly | MVP... 4,029 Super User 2024 Season 2 on at
    Re: cannot insert duplicate key in object dbo.SY07240

    Thanks Richard.  That did the trick.  Now, I'm running into an error where Utilities is trying to upgrade IV10202 in Fabrikam, but no such table exists in the database.  Grrrrrrrr.

  • Frank Hamelly | MVP, MCP, CSA Profile Picture
    Frank Hamelly | MVP... 4,029 Super User 2024 Season 2 on at
    Re: cannot insert duplicate key in object dbo.SY07240

    Nope, haven't tried that Richard.  I queried the table for dup records and found none.  I'll give the delete records a try.

    Thanks,

  • Richard Wheeler Profile Picture
    Richard Wheeler 75,730 on at
    Re: cannot insert duplicate key in object dbo.SY07240

    Have you tried deleting all the records out of the SY07240 table? Make a backup first, of course. It should rebuild itself when launching GP.

  • Frank Hamelly | MVP, MCP, CSA Profile Picture
    Frank Hamelly | MVP... 4,029 Super User 2024 Season 2 on at
    Re: cannot insert duplicate key in object dbo.SY07240

    I haven't been able to find anything on PartnerSource about this either.  I'll post a screenshot here of the error I receive when running Utilities -

    Thank you,

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Complete!

🔔 Be sure to subscribe to the new forums you are interested in to stay up to date! 🔔

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,113 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,918 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans