Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics SL (Archived)

Dbbuild - Error Code: -2146232060

(0) ShareShare
ReportReport
Posted on by 380

We are moving from 6.5 to SL 2011.

When updating the databases, all application databases gets the error messages indicated in the above header, and they seem all to be related to the invalid object name 'SolomonSystem..usergrp' (see attachment).

Please note that SolomonSystem is the old 6.5 system database (the new one is SLSystem).

Looking through earlier articles I have so far taken the following action;

  • verified that ServerName in the Domain table is correct,
  • cleared out old Registration information,
  • cleared out Customizations.
The error message in dbbuild.log is nonetheless there.

Grateful for your input.

*This post is locked for comments

  • aliRana Profile Picture
    aliRana 5 on at
    RE: Dbbuild - Error Code: -2146232060

    {System.Data.SqlClient.SqlException (0x80131904): The INSERT statement conflicted with the FOREIGN KEY constraint "FK_Order_Details_Orders". The conflict occurred in database "Northwind", table "dbo.Orders", column 'OrderID'.
    The statement has been terminated.
    at WindowsFormsApplication.NorthwindDataSet1TableAdapters.TableAdapterManager.UpdateAll(NorthwindDataSet1 dataSet) in c:\Users\aliRana\Documents\Visual Studio 2012\Projects\WindowsFormsApplication\WindowsFormsApplication\NorthwindDataSet1.Designer.cs:line 16491
    at WindowsFormsApplication.order_form.ordersBindingNavigatorSaveItem_Click(Object sender, EventArgs e) in c:\Users\aliRana\Documents\Visual Studio 2012\Projects\WindowsFormsApplication\WindowsFormsApplication\order_form.cs:line 28
    ClientConnectionId:fe5b7fc2-eb61-4bb7-b00d-95fc66b031cd}

  • Svante Kandel Profile Picture
    Svante Kandel 380 on at
    RE: Dbbuild - Error Code: -2146232060

    Yes, Dwight's answer directed me to the solution.

    Fortunately I had a few db’s that where in shape (no master in sql scripting) from which I could create a script to correct the views in vs_userrec (and vs_acctxref which also showed out to have the same issue).

    Thanks a lot for your assistance!

  • RE: Dbbuild - Error Code: -2146232060

    With Dwight's assistance were you able to resolve this issue, or do you need further assistance?

  • Svante Kandel Profile Picture
    Svante Kandel 380 on at
    RE: Dbbuild - Error Code: -2146232060

    Thanks Dwight,

    Your query return the following;

    name                       xtype text

    -------------------------- ----- ---------------------------------------------------------------
    vs_usergrp                 V     CREATE VIEW vs_usergrp AS SELECT * FROM SolomonSystem..usergrp

    (1 row(s) affected)

    Thanks for your assistance

  • Svante Kandel Profile Picture
    Svante Kandel 380 on at
    RE: Dbbuild - Error Code: -2146232060

    Blaine,

    1- The name of our (new) system DB is SLsystem.

    2- Yes, it comes back with the values I would expect to find here. That is, Users and Group Id's as defined in SLsystem.

    3- In our case the script shows;

    CREATE VIEW vs_usergrp AS SELECT * FROM SolomonSystem..usergrp

    which thus the name of the old system DB.

    I have checked Company and Domain and they look just fine, contain all data and ServerName in Domain is correct.

    Thanks for the support.

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Dbbuild - Error Code: -2146232060

    if the name on the system DB has changed you may have this issue many other places.  Run the SQL Script below in each application DB.  It will give you a list of all objects that referance the old system DB name.  Each one will have to be corrected.

    select O.[name],o.xtype,c.[text]

    from sysobjects O

    inner join syscomments C on c.[id] = o.[id]

    where o.xtype in  ('P','V','TR','FN','TF')

    /* V View, P Proc, TR Trigger,FN Scaler Functions, TF Table Functions*/

    and c.[text] like '%SolomonSystem%'

    order by o.name

  • RE: Dbbuild - Error Code: -2146232060

    It looks like there is probably a problem with your vs_usergrp view.  Here are some things to check on:

    1 - What is the name of your SL system DB?

    2 - In SQL, try running the following against that system DB:

    select * from usergrp

    Does this come back with records?  

    3 - On your SL application dartabase, run the following:

    sp_helptext vs_usergrp

    This would normally show "Create View vs_usergrp as select * from nameofsystemDB..usergrp".   Is this showing the correct system database name?  If not, check your company and domain table to make sure those records look OK.  If they do, I would have expected that the "update views" process should have fixed this.  

    Let me know what you find and we can go from there.

  • Svante Kandel Profile Picture
    Svante Kandel 380 on at
    RE: Dbbuild - Error Code: -2146232060

    Blaine,

    There’s an attachment linked to my initial posting. Please let me know if it's not accessible?

    Thanks for the support.

  • RE: Dbbuild - Error Code: -2146232060

    SLK,

    Can you paste the actual errors from the DBBuild log, so I can look at them?

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,466 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans