Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Tuesday, November 26, 2024 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Data & Imports Forums - SalesLogix Imports
Forum to discuss general SalesLogix import and data migration topics. View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Imports | New ThreadView:  Search:  
 Author  Thread: Merging two SLX databases
Stuart
Posts: 178
 
Merging two SLX databasesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 14 Aug 07 8:31 AM
I need to merge a subset of the data from one SLX database into another one, so I created a group in the Source database, and tried to use the GroupCopy.exe to copy them. However I'm getting errors on Primary Key and Unique Index violations, like this:

Error! The statement has been terminated. : 
Violation of PRIMARY KEY constraint 'PK_ADDRESS'.
Cannot insert duplicate key in object 'ADDRESS':
ADDRESS Table: ADDRESSID = a6UJ9A004H9I: Unable to insert new record

Error! The statement has been terminated. :
Cannot insert duplicate key row in object 'CONTACT' with unique index 'XPKCONTACT':
CONTACT Table: CONTACTID = C6UJ9A0036BM: Unable to insert new record


These really are duplicate IDs, so do I need to write something to allocate them all new IDs, rather than using GroupCopy?


[Reply][Quote]
Frank Chaffin
Posts: 475
 
Re: Merging two SLX databasesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 14 Aug 07 11:19 AM
I don't think GroupCopy was intended to be used in this way (i.e. with two difference databases). I think you need to develop a custom import, and you need to ensure that new record ids are generated for all records.
[Reply][Quote]
Timmus Agersea
Posts: 328
 
Re: Merging two SLX databasesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 14 Aug 07 1:46 PM
Yes, the short and ugly answer is that you can't do what you are trying to do.

FYI - for all new implementations we create a new primary key seed value that is something other than 6UJ9. If your systems had been set up this way then you could have used group copy. I am not posting this to rub it in but to hopefully prevent the same pain for others.

Timmus
[Reply][Quote]
Stuart
Posts: 178
 
Re: Merging two SLX databasesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 15 Aug 07 2:32 AM
Thanks Frank and Timmus, I thought I wouldn't be able to do this when I realised the primary key seed was the same in both DBs. These two systems were set up by two different BPs, one in the US and the other in the UK, and I guess they both left the default as 6UJ9. I have code to add Accounts/Contacts/Addresses etc already, so this shouldn't be too difficult. But I thought this was going to be sooo easy.

[Reply][Quote]
Stuart
Posts: 178
 
Re: Merging two SLX databasesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 02 Sep 08 3:56 AM
I thought I might as well update this, since it has been referred to elsewhere.

Our new BP told us that what we were trying to do was not possible, so rising to the challenge I wrote a VB program which read all the data from the new DB to be merged into the Host DB, generated new IDs for all the rows, and sorted out all the linking. Since we already had a similar program importing leads from another system, it was pretty easy.

What wasn't easy was users and their security, so we just added the users in the SLX Administrator, and had a mapping table from the old IDs to the new ones.

Sorting out the attachments wasn't too difficult either.
[Reply][Quote]
Khevna Mehta
Posts: 34
 
Re: Merging two SLX databasesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 14 Oct 08 10:58 AM
how do i find the primary ket seed value?
[Reply][Quote]
Timmus Agersea
Posts: 328
 
Re: Merging two SLX databasesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 14 Oct 08 11:09 AM
SELECT SITECODE FROM SYSTEMINFO WHERE DBTYPE = 1
[Reply][Quote]
Phil Parkin
Posts: 819
Top 10 forum poster: 819 posts
 
Re: Merging two SLX databasesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 14 Oct 08 8:28 PM
And SITEKEYS ...
[Reply][Quote]
Khevna Mehta
Posts: 34
 
Re: Merging two SLX databasesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 16 Oct 08 9:27 AM
So basically as long as both the databases have different primary seed key, I shoul dbe able to use GroupCopy to import data?
[Reply][Quote]
Stuart
Posts: 178
 
Re: Merging two SLX databasesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 16 Oct 08 9:46 AM
Yes, I think so, but I have not been able to try it as our databases had different seeds
[Reply][Quote]
Stuart
Posts: 178
 
Re: Merging two SLX databasesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 16 Oct 08 5:06 PM
I meant the same seed
[Reply][Quote]
Khevna Mehta
Posts: 34
 
Re: Merging two SLX databasesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 25 Nov 08 7:48 AM
Group Copy seems to work, but it does not copy the user information to the new datanase. Is there an easy method to do this?
[Reply][Quote]
Stuart
Posts: 178
 
Re: Merging two SLX databasesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 25 Nov 08 7:52 AM
See my reply above

[What wasn't easy was users and their security, so we just added the users in the SLX Administrator, and had a mapping table from the old IDs to the new ones]

I don't think there is any method, let alone an easy method
[Reply][Quote]
Khevna Mehta
Posts: 34
 
Re: Merging two SLX databasesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 26 Nov 08 8:02 AM
Could you give me some insight in mapping user tables...
[Reply][Quote]
Khevna Mehta
Posts: 34
 
Re: Merging two SLX databasesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 26 Nov 08 8:03 AM
Could you give me some insight in mapping user tables...
[Reply][Quote]
Stuart
Posts: 178
 
Re: Merging two SLX databasesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 26 Nov 08 8:12 AM
What I did was add all the users (there were not very many) into the destination database using SLX Admin, then set up a table with the USERID from the souce database and the USERID value from the destination database, and then whenever the program found a USERID column when it was adding
an ACCOUNT/CONTACT etc. row, it would look up the value in the table and store it in the added row.

Something like this:

U6UJ9A00002G U6UJ9A00009K John Smith
...
etc.


[Reply][Quote]
Khevna Mehta
Posts: 34
 
Re: Merging two SLX databasesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 03 Dec 08 10:42 AM
As mentioned earlier, I am using group Copy...After Group copy is done, will simple update statements in SQL server (to replace old userid with new userid) do the trick?
[Reply][Quote]
Stuart
Posts: 178
 
Re: Merging two SLX databasesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Dec 08 2:08 AM
I think that would work, but I haven't tried it.
[Reply][Quote]
RJ Samp
Posts: 973
Top 10 forum poster: 973 posts
 
Re: Merging two SLX databasesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 22 Dec 08 8:52 AM
I have an old script lying around somewhere (yes it is written in Cypress Enable Basic and could be easily rewritten in .....basically it goes and wipesout and inserts a 'Z' in the 6th or 7th position of the ID fields for an entire database.....ID by ID....table by table.....

'6UJ9' means that both databases started out of the EVAL database after version 6.....(A2EK means version 1 (.97a) - 5.2.6)

then you simply bring over the other table(S) as needed.....

FullCopy and GroupCopy are NOT the answer.....

Scribe has been used by us in the past for this.....

The script is at home (just saw it over the weekend as I moved some files over on my server to the new 1 TB drive.....for $100, not bad.)

RJ

[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2024 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 11/26/2024 2:18:09 AM