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.
Comments
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
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..
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
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
Sveinur
What is the reason?
p.s.
I have: Nav 4.03, Sql2005, Windows7, (on WinXp it crashes also).
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Are there really no cons? does it copy all data?
And there is a con: while the script is running, no one should work on the 2 companies involved.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Will it work with blob, pictures, bigtext ?
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
About the remark of "Referential Integrity". If the generated script writes all the data into the new tables the this is ok too..