How to export Targets and Target Groups from one DA Customer's Address Manager and import into another DA Customer's Address Manager

book

Article ID: 100059863

calendar_today

Updated On:

Description

Description

Targets and Target Groups can be created in two locations in Enterprise Vault (EV) Discovery Accelerator (DA):

- Custodians | Address Manager. All Cases can use the Targets and/or Target Groups create here. These can be imported into a new DA Customer.
- Within a Case | Address Manager. Only this Case can use the Targets created here. However, a Target Group created here can select from the Targets created in the Case and under Custodians | Address Manager. These cannot be imported into a new DA Customer.

Targets and Target Groups under Custodians | Address Manager can be exported from one DA Customer (source) and imported into another DA Customer (destination) that is not a Custodian Manager Customer (Custodian Manager uses directory synchronisation to import its users from Active Directory or Domino Directory).


Here are the steps:


===== Step 1 - Export the existing Targets and Target Groups from the source DA Customer

1. The first step is to run the ImportExport utility to export all the information from the source. Run the ImportExport command from the Accelerator installation folder via command prompt on the DA server to export the information from the source DA Customer. Provide the necessary information as prompted. Here is an example:

C:\Program Files (x86)\Enterprise Vault Business Accelerator>ImportExport.exe
Welcome to the Accelerator Export Tool

Select Import or Export (default E):
Enter 'I' for Import or 'E' for Export:E

Enter the customer ID ("?" for Customer list): ?

CustomerID      Customer Type   Customer Name
-----------------------------------------------------------------------------------------------------------------------
1               Discovery       DACustomer
2               Custodian Manager       DACustodian
3               Discovery       DATestCustomer01


Enter the customer ID ("?" for Customer list): 1

Enter the name of the export file (Default ConfigurationData.xml): C:\ExportTargetsGroups01.xml

Do you want to create a log file? (Default Y)
Enter 'Y' for Yes or 'N' for No:Y

Enter the name of the Log file (default ExportTargetsGroups01.log): C:\ExportTargetsGroups01.log

Do you want to connect to the Accelerator server? (Default Y)
Enter 'Y' for Yes or 'N' for No:Y

Do you want to log the processes to the Accelerator Database? (Default N)
Enter 'Y' for Yes or 'N' for No:N
"Export will start with the following parameters:

Export File: C:\ExportTargetsGroups01.xml
Log File: C:\ExportTargetsGroups01.log
Overwrite Files: False
Use Service: True
Log to DB: False
Leave DB Log: False
Show Only Errors: False
Customer ID: 1"

Do you want to run the tool with these parameters? (Default Y)
Enter 'Y' for Yes or 'N' for No:Y

ImportExport: Loading DTrace
ImportExport: Diagnostics assembly is KVS.EnterpriseVault.Runtime, Version=X, Culture=neutral, PublicKeyToken=26c5e2ccf2b9267c



C:\Program Files (x86)\Enterprise Vault Business Accelerator>


2. The export .xml file will contain a large amount of information from the Customer database. Not all of the information is needed. Review the export .xml file for the required Targets and Target Groups in Custodians | Address Manager information. Look for the section containing lines starting with and ending with . Each of these entries will list the information for each Target along with their email addresses (ApplicationTargetEmailAddress). Then look for the section containing lines starting with and ending with . Each of these entries will list the information for each Target Group and their member Targets (ApplicationTargetMember).


===== Step 2 - Create the import .xml file

There are 2 methods of doing this. The first is to manually create a anew import .xml file using the data from the export .xml file. The second is to use a SQL query to create the import .xml file. Note the SQL query method may not work if the import .xml file syntax has changed in newer versions.

1. Method 1 - Create a new text file with the following header and footer:

1.1. Header syntax:



 

1.2. Footer syntax:

 

1.3. Save the text file with a name that reflects the import and change the file type to XML. For example, ImportTargets01.xml. When editing the import .xml file as below, be sure to save the file regularly.

1.4. All data will be added between the header and footer lines. The sequence will be as follows:

- All entries.
- All entries.

Note - This sequence is IMPORTANT and should NOT be changed. Targets need to be created first before being added to Target Groups.

1.5. For the Targets and Target Groups in Custodians | Address Manager, copy the lines from the export .xml starting with and ending with that contain the information for each Target into the import .xml file under the header. Then copy the lines from the export .xml starting with and ending with that contain the information for each Target Group and their member Targets into the import .xml file under the section containing the entries. Note this data is NOT yet ready to be imported - that will occur in the next section. Also note that Targets and Target Groups from a Case | Address Manager cannot be imported into a new DA Customer.

2. Method 2 - Use a SQL query to create the import .xml file.

2.1. Execute the following query against the source Customer database. The output should list the Targets and Target Groups in Custodians | Address Manager from the source database in for .xml format required for the import. Note this data is NOT yet ready to be imported. That will occur in the next section.

DECLARE @DiscoverySystemCaseID int;
EXEC @DiscoverySystemCaseID = fx_GetDiscoverySystemCase;
DECLARE -- Targets
@AddressOwnerID int
, @FirstName nvarchar(200)
, @Surname nvarchar(200)
, @DisplayName nvarchar(1000)
, @EmployeeID nvarchar(100)
, @Address nvarchar(1000)
, @AddressTypeID smallint;
DECLARE -- Target Groups
@TargetGroupID int
, @GroupName nvarchar(250)
, @GroupDescription nvarchar(1000)
, @CustGroupID nvarchar(100);
-- Header
PRINT '

  ';
-- Get Targets
DECLARE Targets CURSOR FOR -- Get each Target
SELECT
tau.AddressOwnerID
, tau.FirstName
, tau.Surname
, tau.DisplayName
, tau.EmployeeID
FROM tblAddressUser AS tau
JOIN tblIntTarget AS tint ON tau.AddressOwnerID = tint.AddressOwnerID
WHERE tint.CaseID = @DiscoverySystemCaseID;
OPEN Targets;
FETCH NEXT FROM Targets INTO @AddressOwnerID, @FirstName, @Surname, @DisplayName, @EmployeeID;
WHILE @@FETCH_STATUS = 0
BEGIN;
    PRINT'    ';
    DECLARE TargetEmails CURSOR FOR -- Get emails for each Target
    SELECT
    Address
    , AddressTypeID
    FROM tblAddress
    WHERE AddressOwnerID = @AddressOwnerID
    ORDER BY AddressID;
    OPEN TargetEmails;
    FETCH NEXT FROM TargetEmails INTO @Address, @AddressTypeID;
    WHILE @@FETCH_STATUS = 0
    BEGIN;
        PRINT '      ';
        FETCH NEXT FROM TargetEmails INTO @Address, @AddressTypeID;
    END;
    CLOSE TargetEmails;
    DEALLOCATE TargetEmails;
    PRINT '    
';
    FETCH NEXT FROM Targets INTO @AddressOwnerID, @FirstName, @Surname, @DisplayName, @EmployeeID;
END;
CLOSE Targets
DEALLOCATE Targets;
-- Get Target Groups
DECLARE TargetGroups CURSOR FOR -- Get each Target Group
SELECT ttg.TargetGroupID, ttg.Name, ttg.Description, ttg.CustGroupID
FROM tblTargetGroup AS ttg
JOIN tblintTargetGroup AS titg ON ttg.TargetGroupID = titg.TargetGroupID
WHERE titg.CaseID = @DiscoverySystemCaseID
OPEN TargetGroups;
FETCH NEXT FROM TargetGroups INTO @TargetGroupID, @GroupName, @GroupDescription, @CustGroupID;
WHILE @@FETCH_STATUS = 0
BEGIN; 
    PRINT '    ';
    DECLARE TargetGroupTargets CURSOR FOR -- Get each Target in Target Group
    SELECT tau.EmployeeID
    FROM tblAddressUser AS tau
    JOIN tblIntTargetToTargetGroup AS titttg ON tau.AddressOwnerID = titttg.AddressOwnerID
    WHERE titttg.TargetGroupID = @TargetGroupID;
    OPEN TargetGroupTargets;
    FETCH NEXT FROM TargetGroupTargets INTO @EmployeeID;
    WHILE @@FETCH_STATUS = 0
    BEGIN;
        PRINT '      ';
        FETCH NEXT FROM TargetGroupTargets INTO @EmployeeID;
    END;
    CLOSE TargetGroupTargets;
    DEALLOCATE TargetGroupTargets;
    PRINT '    
';
    FETCH NEXT FROM TargetGroups INTO @TargetGroupID, @GroupName, @GroupDescription, @CustGroupID;
END;
CLOSE TargetGroups;
DEALLOCATE TargetGroups;
-- Footer
PRINT '  

';

2.2. Save the output into a text file with a name that reflects the import and change the file type to XML. For example, ImportTargets01.xml. When editing the import .xml file as below, be sure to save the file regularly.


===== Step 3 - Edit the import .xml file to list unique values based on the destination Customer

1. For each Target in Custodians | Address Manager (ApplicationTarget):

1.1. Verify each Target has the following information and edit the CustTargetID as follows

- FirstName: First name of the Target. Should not need to be edited.

- Surname: Last name of the Target. Should not need to be edited.

- Display name: Display name of the Target. Should not need to be edited.

- CustTargetID: This is a unique string per Target and will likely need to be edited, depending on the existing entries in the destination Customer database. To determine the CustTargetID value to be used, first execute the following query against the destination Customer database to list the current values:

SELECT * FROM tblAddressUser;

The output should list the EmployeeID unique values for each Target that is currently present. Each Target in the text file needs to have a unique and sequential value for the CustTargetID (which is also the EmployeeID in tblAddressUser). Review the EmployeeID column in tblAddressUser and find the highest EmployeeID listed. Increment that by 1 and use for the CustTargetID. E.G., if the highest EmployeeID in tblAddressUser is Employee28, use Employee29 as the next CustTargetID in the text file. If multiple Targets need to be added, each Target will require a unique, incremental CustTargetID. If no entries are present in tblAddressUser, use Employee1 as the first entry in the text file.

- CustID: Discovery System. Do NOT edit this value.

- Remove: false. Do NOT edit this value.

1.2. Verify each Target has the required email address information. This will be in the line for each Target and should contain:

- CustTargetID: This is the same unique string per Target and should be edited as listed above.

- Address: Email address. Should not need to be edited.

- AddressTypeID: 1. This may be another value. Should not need to be edited.

- Remove: false. Do NOT edit this value.

2. For each Target Group in Custodians | Address Manager (ApplicationTargetGroup):

2.1. Verify each Target has the following information and edit the CustTargetGroupID as follows:

- CustTargetGroupID: This is a unique string per Target Group and will likely need to be edited, depending on the existing entries in the destination Customer database. To determine the CustTargetGroupID value to be used, first run the following query against the destination Customer database to list the current values:

SELECT * FROM tblTargetGroup;

The output should list the CustGroupID unique values for each Target Group that is currently present. Each Target Group in the text file needs to have a unique and sequential value for the CustTargetGroupID (which is also the CustGroupID in tblTargetGroup). Review the CustGroupID column in tblTargetGroup and find the highest CustGroupID listed. Increment that by 1 and use for the CustTargetID. E.G., if the highest CustGroupID in tblTargetGroup is TargetGroup4, use TargetGroup5 as the next CustTargetID in the text file. If multiple Target Groups need to be added, each Target Group will require a unique, incremental CustTargetGroupID. If no entries are present in tblTargetGroup, use TargetGroup1 as the first entry in the text file.

- Description: Target Group description (optional field). Should not need to be edited.

- Name: Target Group name. Should not need to be edited.

- CustID: Discovery System. Do NOT edit this value.

- Remove: false. Do NOT edit this value.

2.2. Verify each Target in the Target Group has the required information. This will be in the line for each Target and should contain:

- CustTargetID: This is the same unique string per Target and should be edited as listed above.

- CustTargetGroupID: This is the same unique string per Target Group and should be edited as listed above.

- Remove: false. Do NOT edit this value.

3. Review the final import .xml file before attempting an import.

3.1. Example of the .xml file format syntax:




 



   

     
   



   

     
   


 


3.2. Example of an import .xml file syntax with 6 Targets and 2 Target Groups in Custodian | Address Manager, and 1 Case with 5 Address Manager Targets and 2 Target Groups:



 
   
     
   

   
     
   

   
     
   

   
     
   

   
     
   

   
     
   

   
     
     
   

   
     
     
     
   

 


===== Step 4 - Import the modified import .xml file into the destination DA Customer

It is recommended to test whichever method is used in a test DA Customer database before implementing in any production DA Customer databases. There are 2 methods to import the file - either method can be used.

1. Method 1 - DA Client

1.1. Connect to the destination DA Customer using the DA Client, then go to the Configuration tab and click on the Import Configuration sub-tab.

1.2. Select the Clear log before import option.

1.3. Click Browse and browse to the location of the XML file.

1.4. Click Import.

1.5. Click on the down arrow next to the The import completed successfully message or the message indicating a failure to display the Import Log tab for review. Correct any failures in the XML file and re-try the import.

2. Method 2 - ImportExport utility:

Run the ImportExport command from the Accelerator installation folder via command prompt on the DA server to export the information from the source DA Customer. Provide the necessary information as prompted. Here is an example:

C:\Program Files (x86)\Enterprise Vault Business Accelerator>ImportExport.exe
Welcome to the Accelerator Export Tool

Select Import or Export (default E):
Enter 'I' for Import or 'E' for Export:I

Enter the customer ID ("?" for Customer list): ?

CustomerID      Customer Type   Customer Name
-----------------------------------------------------------------------------------------------------------------------
1               Discovery       DACustomer
2               Custodian Manager       DACustodian
3               Discovery       DATestCustomer01

Enter the customer ID ("?" for Customer list): 3

Enter the name of the import file (Default ConfigurationData.xml): C:\ImportTargetsGroups01.xml

Do you want to create a log file? (Default Y)
Enter 'Y' for Yes or 'N' for No:Y

Enter the name of the Log file (default ImportTargetsGroups01.log): C:\ImportTargetsGroups01.log

Do you want to connect to the Accelerator server? (Default Y)
Enter 'Y' for Yes or 'N' for No:Y

Do you want to log the processes to the Accelerator Database? (Default N)
Enter 'Y' for Yes or 'N' for No:N

Validate XML before import? (Default Y)
Enter 'Y' for Yes or 'N' for No:Y

Commit only on full success? (Default N)
Enter 'Y' for Yes or 'N' for No:Y
Import will starts with the following parameters:

Input FileC: C:\ImportTargetsGroups01.xml
Log File: C:\ImportTargetsGroups01.log
Overwrite Files: False
Use Service: True
Log to DB: False
Leave DB Log: False
XML Validation: True
Show Only Errors: False
Customer ID: 3
Commit only on success: True

Do you want to run the tool with these parameters? (Default Y)
Enter 'Y' for Yes or 'N' for No:Y

ImportExport: Loading DTrace
ImportExport: Diagnostics assembly is KVS.EnterpriseVault.Runtime, Version=X, Culture=neutral, PublicKeyToken=26c5e2ccf2b9267c



C:\Program Files (x86)\Enterprise Vault Business Accelerator>


Possible Errors

- Finished with errors: Exception of type 'System.OutOfMemoryException' was thrown.

The most common cause of this error is having a very large number of Targets and/or Target Groups in one import .xml file. Run the following query against the source Customer database to determine the number of Targets and Targets in Target Groups under Custodians | Address Manager and Case | Address Manager:

DECLARE @DiscoverySystemCaseID int;
EXEC @DiscoverySystemCaseID = fx_GetDiscoverySystemCase;
;WITH 
AppTargets AS (SELECT AddressOwnerID, CaseID
FROM tblIntTarget (NOLOCK)
WHERE CaseID = @DiscoverySystemCaseID)
, CaseTargets AS (SELECT AddressOwnerID, CaseID
FROM tblIntTarget (NOLOCK)
WHERE CaseID != @DiscoverySystemCaseID)
, AppTargetGroups AS (SELECT IntTargetGroupID, CaseID, TargetGroupID
FROM tblintTargetGroup (NOLOCK)
WHERE CaseID = @DiscoverySystemCaseID)
, CaseTargetGroups AS (SELECT IntTargetGroupID, CaseID, TargetGroupID
FROM tblintTargetGroup (NOLOCK)
WHERE CaseID != @DiscoverySystemCaseID)
SELECT
'Custodians | Address Manager Targets' AS 'Targets_Location'
, COUNT(at.AddressOwnerID) AS 'Target_Count'
, '' AS 'TargetGroup_Name'
, '' AS 'TargetGrop_Description'
, '' AS 'TargetGroup_CustGroupID'
, '' AS 'TargetGroupID'
, '' AS 'CaseID'
, '' AS 'Case_Name'
FROM AppTargets AS at
UNION ALL
SELECT
'Custodians | Address Manager Target Groups'
, COUNT(titttg.AddressOwnerID)
, ttg.Name
, ttg.Description
, ttg.CustGroupID
, CONVERT(nvarchar(25), atg.TargetGroupID)
, ''
, ''
FROM AppTargetGroups AS atg
JOIN tblTargetGroup AS ttg (NOLOCK) ON atg.TargetGroupID = ttg.TargetGroupID
JOIN tblIntTargetToTargetGroup AS titttg (NOLOCK) ON atg.TargetGroupID = titttg.TargetGroupID
GROUP BY atg.TargetGroupID, ttg.Name, ttg.Description, ttg.CustGroupID
UNION ALL
SELECT
'Case | Address Manager Targets'
, COUNT(ct.AddressOwnerID)
, ''
, ''
, ''
, ''
, CONVERT(nvarchar(25), ct.CaseID)
, tc.Name
FROM CaseTargets AS ct
JOIN tblCase AS tc ON ct.CaseID = tc.CaseID
GROUP BY ct.CaseID, tc.Name
UNION ALL
SELECT
'Case | Address Manager Target Groups'
, COUNT(titttg.AddressOwnerID)
, ttg.Name
, ttg.Description
, ttg.CustGroupID
, CONVERT(nvarchar(25), ctg.TargetGroupID)
, CONVERT(nvarchar(25), ctg.CaseID)
, tc.Name
FROM CaseTargetGroups AS ctg
JOIN tblTargetGroup AS ttg (NOLOCK) ON ctg.TargetGroupID = ttg.TargetGroupID
JOIN tblIntTargetToTargetGroup AS titttg (NOLOCK) ON ctg.TargetGroupID = titttg.TargetGroupID
JOIN tblCase AS tc ON ctg.CaseID = tc.CaseID
GROUP BY ctg.TargetGroupID, ttg.Name, ttg.Description, ttg.CustGroupID, ctg.CaseID, tc.Name
ORDER BY 'Targets_Location' DESC, 'Case_Name', 'TargetGroup_Name';

It may be needed to break up the import .xml file into smaller files. For example, create 5 files containing the Targets with Surnames A to E, F to J, K to O, P to T, U to Z. Alternately create multiple files with each file containing X number of Targets. Target Groups can be imported via another import .xml file after the Targets have been added. Testing will need to be done in the environment to determine how best to break up the Targets and how many import.xml files will be needed.

Another common cause is not having enough memory (RAM) on the DA server. Verify there is adequate RAM on the DA server and that pagefile is correctly configured per Microsoft's specifications.
 

 

Issue/Introduction

How to export Targets and Target Groups from one DA Customer's Address Manager and import into another DA Customer's Address Manager