General downloads

Copy Company

Author
kriki  
Category
General downloads
Date
23/03/2010
Size
17,83 KB
Downloads
3231
MD5 digest
E8462FE609B513089817090558A08DDA
Rating
54321
Popularity
Downloaded 3 times in the last two weeks

-Copy data from 1 company to another (in the same or another DB) directly in SQL.
-You can select the tables you want to copy (also "DataPerCompany=No"-tables)

- based on: http://mibuso.com/blogs/ara3n/2009/12/08/baking-uptransfering-company-specific-data-through-sql-for-dynamics-nav/#comment-98

-how to use:
    -create a new company (in the same DB or a new DB)
    -define from and to - database+Company
    -give a name for the script
    -decide to include or not the "DataPerCompany=No"-tables
    -decide if you want 1 big transaction or a transaction per table
    -filter the tables you want to copy
    -generate the script
    -run the script in SSMS

-Warning:
    -do NOT use this method as a backup-tool in production. Referential Integrity is NOT guaranteed.