Error Renaming Company with LinkedObjects

Arseni
Member Posts: 9
Dear all,
I have a Dynamics NAV 2009 SP1 database with some tables with the LinkedObject property set to True.
We have differents companies and we want to rename one of these. When we are renaming this company we get the following error:
We have tried to delete the views of the current company and create the new views of the new company name before rename the company. We have tried to create the new views of the new company name before rename the company. But always appear this error.
How can I rename the company???
Thanks and best regards!
I have a Dynamics NAV 2009 SP1 database with some tables with the LinkedObject property set to True.
We have differents companies and we want to rename one of these. When we are renaming this company we get the following error:
We have tried to delete the views of the current company and create the new views of the new company name before rename the company. We have tried to create the new views of the new company name before rename the company. But always appear this error.
How can I rename the company???
Thanks and best regards!
Arseni Hernandez
0
Answers
-
1) In SSMS: Use the built in function "Script view as -> CREATE to -> New Query Editor window" for all these views
2) In SSMS: Delete the views from the DB
3) In NAV: Export the table objects which are views and delete them from NAV
4) In NAV: Increase Object cache to at least 100 MB and rename the company
5) In SSMS: In the created scripts use "Find and Replace" to replace the old company name against the new one.
6) In SSMS: Execute the scripts - the views are recreated
7) In NAV: Import the saved objects
DoneFrank Dickschat
FD Consulting0 -
Thank you Frank,
This is one way to rename a company, but I wanted to know if is possible to do without delete any object in Dynamics NAV.
Is there any way to do it more automatically?
Thanks and best reagrds,
Arseni.Arseni Hernandez0 -
Not that I know of.
A colleague once developed a solution in NAV which could do all of the above: Store the SQL views in a table, drop the views and recreate them (correct with the new company names), save the NAV objects in a table, delete the objects and restore the objects. Only the rename needs to be done manually.
Theoretically it is possible to program the company rename also but only MS knows why it takes ages to change the company name via code while it only takes 20 minutes when done manually. It must have something to do with the object cache:
Rename of any 1 company in a 220GB DB (out of 10 companies):
...............................Manually............By Code
Object Cache 32MB:....~8-9 hours........~8-9 hours
Object Cache 100MB:...~20 minutes.......~8-9 hoursFrank Dickschat
FD Consulting0 -
Thank you again Frank,
I've done it manually and it works well.
Thanks and best regards!Arseni Hernandez0
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