Copy Company

Administrator
Member, Moderator, Administrator Posts: 2,506
Copy Company
-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/0 ... 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.
http://www.mibuso.com/dlinfo.asp?FileID=1171
Discuss this download here.
-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/0 ... 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.
http://www.mibuso.com/dlinfo.asp?FileID=1171
Discuss this download here.
0
Comments
-
I also blogged a little bit about it : http://mibuso.com/blogs/kriki/2010/03/24/downgrading-after-accidental-upgrade/Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
Hi
Great tool, we have been looking for something like this..
I have one problemn though, still.. Would it be possible to copy between different SQL servers also??
We are running multi server environment, so it is not enough being able to copy company within database on the same SQL server..0 -
I didn't test this, but you can try it. Probably you need to create a linked server in SQL. Maybe it works in that way.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
Hi again
I have tested it with Linked Server and it works fine.
I had to make a small correction to your form in order to get the SQL query to use the fourpart SQL command [server].[database].[schema]., but then it worked as a charm
Br
Sveinur0 -
I've tried to use it but there is a problem. When I click 'run' the finsql.exe crashes
What is the reason?
p.s.
I have: Nav 4.03, Sql2005, Windows7, (on WinXp it crashes also).http://www.reinwestuj.pl Inwestuj w nieruchomości. Condohotele, aparthotele.0 -
I programmed it with NAV2009 or NAV2009SP1. So if you use it with an older version, it crashes. Try to open it in a NAV2009SP1 or later.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
This looks like a replacement for 2013 backup. Thx. :shock:
Are there really no cons? does it copy all data?0 -
To be honest, I never tried it with NAV2013 R2.
And there is a con: while the script is running, no one should work on the 2 companies involved.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
That's no con, that's normal. Thanks for replying.
Will it work with blob, pictures, bigtext ?0 -
yes it works with those data types as well.0
-
wow, then it is definitely useful.
About the remark of "Referential Integrity". If the generated script writes all the data into the new tables the this is ok too..0
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