CO_IMPORT - Company Export/Import


What is

This enables the import of selected ITAS tables from a remote server to your local server.

The process is split into two main parts.

Co_Import

Co_Import is the part of the process that runs on the local machine. 
A very important component of this process is the activation of  FTP services on both the Local and Remote servers, this is a windows setup issue and nothing to do with the ITAS installation/implementation. Whilst loading the CO_IMPORT form the process will endeavour to check that the Local server does have the suitable FTP service active and will provide an appropriate message.
The user can request that the DOCMAN folders on the local server for the Company being imported are to be removed (tick-box feature). It is suggested that the local (old) version of company data is always removed before refresh with remote data for that company. This is actioned by the IMPORT process when all tables have been requested for import! The tables are truncated.

Before Co_import can be used, various settings must be configured
  • Tables to import. The list of tables that are to be imported is setup in S01>View>Data Import Tables. All tables that have a tick in the ‘Include’ column will be selected for import. The ‘Default Inclusions’ checkbox at the bottom of the form automatically selects only a list of commonly import tables.
     
 The following ‘gf’ tables are also included in the export:
      gf_ctrl02, gf_ctrl03, gf_ctrl04, gf_ctrl06, gf_ctrl07, gf_ctrl20, gf_ctrl30, gf_ctrl35, gf_ctrl40, gf_ctrl41, gf_ctrl50, gf_ctrl51, gf_ctrl60, gf_ctrl70.
  • Remote FTP IP address. This is the IP address (Application Server) used to connect to the remote servers ftp site. This is entered in S01 on the Miscellaneous tab ‘IP Address’ of the company to be exported{ctrol02_ipaddress}. This is usually setup as part of ITAS installation AND the user of CO_IMPORT can enter the correct details at run time.


  • Local IP Address (Application Server) is set up in S01>right click>Overall Control>IP Address (ctrl10_ipaddress} This is usually setup as part of ITAS installation AND the user of CO_IMPORT can enter the correct details at run time.

 Local SQL Database IP address. This is the IP address of the SQL server that is used on the local site. Local SQL IP database address is set up in S01>right click>Overall Control>Database Server Name / IP. {ctrl10_dbserver} This is usually setup as part of ITAS installation

  • The physical folder ‘Import’ must be present in the itas\ directory with a virtual FTP root pointing to its locations allowing read/write access. This can be configured on Windows Server 2003 through Internet Information Services (IIS). Full details on configuring IIS can be seen here http://msdn.microsoft.com/en-us/library/6ws081sa.aspx

When the user activates CO_IMPORT, they will be prompted to enter the Local FTP IP details which are sent (in encrypted format) to the remote site so the remote process has the IP address to return files.  Similarly the target site FTP details need to be entered by the user, which will subsequently be kept for the next activation. Messages will flow back to the local process as the status of the request.

Co_Export

Co_Export is the export part of the process that is run on the remote machine. Co_Export requires the following settings to be configured:-
  • The ITASServer service must be running on the remote machine. ITAS Server processes the Activate file and activates the Co_Export process on the remote machine.
  • SQL Database IP address. This is the IP address of the SQL server that the remote site uses. SQL IP database address is set up on the remote site in S01>right click>Overall Control>Database Server Name / IP. {ctrl10_dbserver}  This is usually setup as part of ITAS installation
  • The physical folders ‘Export’ and ‘RemoteJobs’ must be present in the itas\ directory with a virtual FTP root pointing to these locations allowing read/write access.
Once the above settings have been configured Co_Import can be run.

The Co_Import process sends two txt files to the remote machine:
  • A Table file which contains the information to enable the remote machine to access the local server and it contains the list of table names to export.
            The Table file is sent to the ‘Export’ folder on the remote machine.
  • An Activate file that is processed by ITAS server and triggers the export to start on the remote machine.
      The Activate file is sent to the ‘RemoteJobs’ folder on the remote machine.
Once the process has started the remote machine sends a series of messages back to the local machine to give updates on the export status. These are displayed at the bottom of the Co_Import form and are received in the following sequence:-
            "REMOTE STATUS : Tables File Processed on remote machine..."
            "REMOTE STATUS : Export Started on remote machine..."
            "REMOTE STATUS : Creating text files on remote machine..."
            "REMOTE STATUS : Export Completed on remote machine..."
            "REMOTE STATUS : Creating Zip File on remote machine..."
            "REMOTE STATUS : Zip File now being sent..."
            "Zip File Received from remote machine"
If the export process encounters a problem and needs to stop an error message will be displayed in the following format.
            "REMOTE STATUS : FAIL – Description of error displayed here"
Once the zip file has been received from the remote machine the zip file is extracted and the importing of data begins.
NOTE:  If, for whatever reason, the zip file has not been exported to the local server via CO_EXPORT; it can be copied manually to the local  directory /Import. Then the user can activate CO_IMPORT again and the process ‘Complete from .zip’ can be requested and the user types .zip file name and the process will continue.
The current data tables for the company will be dropped i.e. deleted and a new empty version of the table will then be created and populated with the new data. So after the import process, only data contained in the data file will be available in the table. This ensures a fresh copy that will duplicate the data held on the source server.
Once the import process has be completed the company name is updated to show the date and time that the import look place i.e. ‘TF –‘tf’ @ 20Feb09 10:02’.
A unique log file is created when Co_Import is run and is given a file name made up of the company being imported and the date and time the process was started e.g. ‘S81_Co_Import_tf_20090220_1725.log’ and is located in the ‘itas\log’ directory. The log file can be opened by clicking ‘View Log File’ at any time once the ‘Start Import’ button has been clicked.

There are 2 other log files that can be viewed/printed to confirm the number of rows per table that have been exported and the number that have been successfully imported.
Finally the user is prompted to run FKChecker to check data integrity. This is very IMPORTANT because there is server specific data e.g. TCCM, FXR, COUNTRIES that may not be consistent with the exported data.

Was this helpful?
Thanks for your feedback