Replicate Data to second database on event
nofear87
Member Posts: 7
Hello my name is Robert and I'am new to Nav.
I have installed NAV Testversion. Now I plan to write a Script which replicates filtered data (for example only the articles) on a special event (for example a new article is created) to a second database in ms sql server. is this possible? Where I should start searching for information which help me to solve this problem?
Thanks!
Robert
I have installed NAV Testversion. Now I plan to write a Script which replicates filtered data (for example only the articles) on a special event (for example a new article is created) to a second database in ms sql server. is this possible? Where I should start searching for information which help me to solve this problem?
Thanks!
Robert
0
Answers
-
Hi Robert,
Welcome from Mibuso. I guess you are trying to transfer the data between Two Navision database. If yes, you can use WS for your requirement if you are using 2009 and above. You can use ADO .net if you want to transfer from your Navision database to other database (Not navision database).
Here is WS documentation https://msdn.microsoft.com/en-us/library/dd355398.aspx
Regards,
Yukon
Make Simple & Easy0 -
Hi Yukon.
I have created a separate database in MS SQL (so it is not a nav database I want to sync/replicate?) How I get the business logic to replicate all items to the new database when a new item is created? Are there watchers or something and replicate services? Does ADO use the business logic?0 -
I've done such things in the past using 2 different approaches:
-Small to medium no. of records: Let both Navision Systems talk together with help of Webservices. Advantage is, your business logic is already implemented and it is bidirectional. But it gets slow for larger replication data.
- MS-SQL Replication: you can configure tables and even fields that get replicated into a temporary database which holds all records that are changed. This is because i dont want a external procedure to write into the NAV database. You then create a Codeunit in the Target NAV System which will connect to the temporary Database with ADO and checks for new entries (Timestamp). If you replicate multiple tables you can do it with recref and fieldrefs. Its very fast for large data, but you need to create the interface (codeunit) and pass the data to the target table (with validates for business logic). Also you need to implement an error handling routine / logfile for traceability.0 -
[Topic moved from 'NAV Tips & Tricks' forum to 'NAV Three Tier' forum]
Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
thank you very much. i have only one nav system. the data should be written in a second database for another softwaretool. so the first way isn't practicable for me?
The second way sounds interesting too me. But there is no business logic controlling my data? Its important to me, because I will write the temporary data back to nav.
You would do this with ADO, too?0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 251 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions