NAV 2017 Upgrade Dependency issues

Roelof
Member Posts: 377
I'm currently upgrading a NAV2015 database to NAV2017, build 10.0.14199.
The database has many custom Stored Procedures and views. During the Sync-NavTenant, after I imported the NAV2017 objectset with customizations, it couldn't compile one of the objects (Item table) due to a dependency error: 'Object xxxItem' cannot be renamed because the object participates in enforced dependencies.'
I basically had to delete all related StoredProcedures,Views and functions before I actually could compile the object.
This is obviously not something I'm waiting for in an upgrade. Is there a way to overcome this problem or does anyone else has similar experiences?
The database has many custom Stored Procedures and views. During the Sync-NavTenant, after I imported the NAV2017 objectset with customizations, it couldn't compile one of the objects (Item table) due to a dependency error: 'Object xxxItem' cannot be renamed because the object participates in enforced dependencies.'
I basically had to delete all related StoredProcedures,Views and functions before I actually could compile the object.
This is obviously not something I'm waiting for in an upgrade. Is there a way to overcome this problem or does anyone else has similar experiences?
Roelof de Jonghttp://www.wye.com
0
Comments
-
Hi
You can run this SQL script to find the dependenciesselect o.name as ObjName, r.name as ReferencedObj from sys.sql_dependencies d join sys.objects o on o.object_id=d.object_id join sys.objects r on r.object_id=d.referenced_major_id where d.class=1 AND r.name = 'Object'
In general you do not need to delete the objects you only need to remove dependency.
Be aware that by "enforced dependencies", it means Schema binding, so you'll have to look specifically for that.
I hope this helps.0 -
Thanks.
I ran the query successfully but it didn't show anything. However when I go to the Item table->right mouse click->Dependencies, I'm getting a list of views, stored procedures with dependencies.
How would I run your query specifically for the Item table?
Roelof de Jonghttp://www.wye.com0 -
Hi
select o.name as ObjName, r.name as ReferencedObj from sys.sql_dependencies d join sys.objects o on o.object_id=d.object_id join sys.objects r on r.object_id=d.referenced_major_id where d.class=1 AND r.name = 'CRONUS International Ltd_$Item' order by r.name
or you can run it for all objects in the databaseselect o.name as ObjName, r.name as ReferencedObj
from sys.sql_dependencies d
join sys.objects o on o.object_id=d.object_id
join sys.objects r on r.object_id=d.referenced_major_id
where d.class=1
order by r.name0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions