<?xml version="1.0" encoding="utf-8"?>
<ManualTopic ID="/baanerp/archiving/Copyparametersandmasterdata" xml:lang="en">
   <Header>
      <Title>Copy parameters and master data</Title>
      <Keyword type="header" order="d1e1181">
         <Level1>Copy parameters and master data</Level1>
         <Level2>archiving</Level2>
      </Keyword>
      <Keyword type="header" order="d1e1186">
         <Level1>Archiving</Level1>
         <Level2>copy parameters and master data</Level2>
      </Keyword>
   </Header>
   <GeneralSection>
      <Paragraph>For the archive company to function, some
		mandatory basic data such as master data and parameter data, must be present in
		the archive company. General data represents static data, required to ensure
		the references of the archived data. Usually, general data will be copied with
		the relevant archiving session. The process of copying general data is usually
		performed each time an archiving session is started and, depending on the
		amount of general data to be copied, can take a long time. The following
		sections provide various hints to reduce the time it takes to archive this
		general data.</Paragraph>
      <Paragraph>Most archiving sessions have an <GUIRef href="/baanerp/wh/inh/whinh1255m000#arch.gen.data" role="manual">Archive General Data</GUIRef> check box, which allows you to
		specify if general data must be archived. For example, when you have put
		multiple archiving sessions in a single job, it is sufficient to archive
		general data only once for a specific functional domain, such as <GUIRef href="/baanerp/wh" role="package">Warehousing</GUIRef>. You then only
		select the check box for the first session of a functional domain and leave the
		check box cleared for subsequent sessions within the job. This will prevent a
		repeated archiving of the same master data and reduce the time it takes to
		archive general data.</Paragraph>
      <Note>
         <SectionTitle>Note</SectionTitle>
         <Paragraph>Instead of using the <GUIRef href="/baanerp/wh/inh/whinh1255m000#arch.gen.data" role="manual">Archive General Data</GUIRef> check box in multiple archiving
		  sessions, we recommend that you archive <Emphasis>all</Emphasis> general data
		  using the <GUIRef href="/baanerp/tc/com/tccom0250m000" role="session">Archive General Data (tccom0250m000)</GUIRef> session. For more information, refer to <Link href="/baanerp/archiving/ArchivingGeneralData" role="manual">Archiving General Data</Link>.</Paragraph>
      </Note>
      <List>
         <ListIntro>Alternatively, you can make use of more direct database
		  utilities to archive general data. When you do so, you create flat files from
		  the general data of your operational company and import these flat files in the
		  archive company. Two methods are available for doing this:</ListIntro>
         <ListItem>
            <Paragraph>Method 1: Copy general data using regular
			 sessions</Paragraph>
            <Paragraph>Export data from the operational company using the <GUIRef href="/baanerp/tt/aad/ttaad4226m000" role="session">Create Sequential Dump of Table (ttaad4226m000)</GUIRef> session, and then import this data in
			 the archive company using the <GUIRef href="/baanerp/tt/aad/ttaad4227m000" role="session">Create Table from Sequential Dump (ttaad4227m000)</GUIRef> session. One disadvantage of this
			 method is you must repeat this process many times because the involved tables
			 are not within a continuous range.</Paragraph>
         </ListItem>
         <ListItem>
            <Paragraph>Method 2: Copy general data using bdbpre and bdbpost
			 tools</Paragraph>
            <Paragraph>If you are familiar with the use of bdbpre and bdbpost
			 commands, this saves time.</Paragraph>
         </ListItem>
      </List>
      <Note>
         <SectionTitle> Note</SectionTitle>
         <List>
            <ListIntro>The following tables must <Emphasis>not</Emphasis> be copied
			 from the operational company to the archive company:</ListIntro>
            <ListItem>Financial Companies by Group Company (tfgld001)</ListItem>
            <ListItem>Group Company Parameters (tfgld003)</ListItem>
            <ListItem>Financial Companies (tfgld004)</ListItem>
         </List>
         <Paragraph> For more information, refer to the <GUIRef href="/baanerp/tf/gld/tfgld0503m000" role="session">Company Parameters (tfgld0503m000)</GUIRef> session and the <GUIRef href="/baanerp/tf/gld/tfgld0501m000" role="session">Group Company Parameters (tfgld0501m000)</GUIRef> session in this section.</Paragraph>
      </Note>
   </GeneralSection>
   <GeneralSection>
      <SectionTitle>Method 1: Copy general data using regular
		sessions</SectionTitle>
      <Paragraph> 
         <GUIRef href="" role="manual">Path: // Tools / Database Management / Database Utilities</GUIRef>
      </Paragraph>
      <ProcedureSection>
         <SectionTitle>Instruction (in operational or 000 company)</SectionTitle>
         <Steps>
            <Step>
               <StepTitle/>
               <List>
                  <ListIntro>Export data from the operational company to a dump file
				  using the <GUIRef href="/baanerp/tt/aad/ttaad4226m000" role="session">Create Sequential Dump of Table (ttaad4226m000)</GUIRef> session:</ListIntro>
                  <ListItem>Specify the (operational) company and enter one table or
				  a range of the tables for which you want to create a dump file.</ListItem>
                  <ListItem>On the second tab of the session, specify the file name
				  for the dump, and a file name for an error log. These two files will be written
				  to your home directory or the directory entered in the <GUIRef href="/baanerp/tt/aad/ttaad4226m000#dirt" role="manual">Directory for Table Files</GUIRef> field.</ListItem>
               </List>
               <Paragraph>An extension will be automatically added
				to the file name of the dump; a dot followed by the company number.</Paragraph>
            </Step>
            <Step>
               <StepTitle/>
               <Paragraph>Import the data which you exported in the
				previous step into the archive company:</Paragraph>
               <Paragraph> 
                  <GUIRef href="" role="manual">Path: // Tools / Database Management / Database Utilities</GUIRef>
               </Paragraph>
            </Step>
         </Steps>
      </ProcedureSection>
      <GeneralSection>
         <SectionTitle>Instruction (in operational or 000 company)</SectionTitle>
         <Paragraph>The <GUIRef href="/baanerp/tt/aad/ttaad4227m000" role="session">Create Table from Sequential Dump (ttaad4227m000)</GUIRef> session allows you to load the
		  previously created dump into the archive company, as shown below.</Paragraph>
         <ProcedureSection>
            <Steps>
               <Step>
                  <StepTitle/>
                  <Paragraph>Select the <GUIRef href="/baanerp/tt/aad/ttaad4227m000#dfco.yeno" role="manual">Create Tables for Different Company</GUIRef> check box and enter the company number of
				  the new archive company.</Paragraph>
                  <Paragraph>You must select the <GUIRef href="/baanerp/tt/aad/ttaad4227m000#igri.yeno" role="manual">Ignore Referential Integrity Constraints</GUIRef> check box; if not the result could
				  be a 606 error when you create the table from the sequential dump. Therefore,
				  the system may return the bdpost6.2 error message.</Paragraph>
               </Step>
               <Step>
                  <StepTitle/>
                  <Paragraph>Repeat this action for all dumps for the
				  mandatory tables you created in the previous section. You must also specify a
				  file name for the error log file that will be created when reading in the
				  dump.</Paragraph>
                  <Paragraph>You must select the <GUIRef href="/baanerp/tt/aad/ttaad4227m000#igri.yeno" role="manual">Ignore Referential Integrity Constraints</GUIRef> check box; if not, the result could
				  be a 606 error when you create the table from the sequential dump. Therefore,
				  the system may return the bdpost6.2 error message.</Paragraph>
                  <Paragraph>In case of error “Error in running
				  bdbpost6.2”, the errors file in the home directory shows the exact error
				  message, which could look like the following:</Paragraph>
                  <Paragraph> 
                     <Emphasis>Default separator ('\0')
				  taken</Emphasis>
                  </Paragraph>
                  <Paragraph> 
                     <Emphasis>Table M Idx RowCount
				  Messages</Emphasis>
                  </Paragraph>
                  <Paragraph>----------- - --- --------
				  ----------------------</Paragraph>
                  <Paragraph>tcmcs010999 R 1 1 write error
				  606</Paragraph>
               </Step>
               <Step>
                  <StepTitle/>
                  <Paragraph>Run the <GUIRef href="/baanerp/tt/aad/ttaad4225m000" role="session">Reorganize Tables (ttaad4225m000)</GUIRef> session with the <GUIRef href="/baanerp/tt/aad/ttaad4225m000#ttgen.refint" role="groupbox">Reference Integrity</GUIRef> and <GUIRef href="" role="manual">Repair Reference Counter</GUIRef> check boxes selected, as shown
				  below. The company number must be the company number of the archive company.</Paragraph>
               </Step>
            </Steps>
         </ProcedureSection>
      </GeneralSection>
   </GeneralSection>
   <GeneralSection>
      <SectionTitle>Method 2: Copy general data using bdbpre and bdbpost
		tools</SectionTitle>
      <Paragraph>To copy the parameters mentioned previously and
		the general data from your operational company into the archive company, you
		can compose an ASCII file such as copy.erpln.data, in which all required tables
		are listed. With this file and the bdbpre command, you can dump the tables in a
		dump file.</Paragraph>
      <Paragraph>With the bdbpost command, you can create tables
		from the dump file as shown:</Paragraph>
      <GeneralSection>
         <SectionTitle>Instruction (UNIX or Windows system level)</SectionTitle>
         <ProcedureSection>
            <Steps>
               <Step>
                  <StepTitle/>
                  <Paragraph>List the names of the tables specified
				  in appendices A and B in one or more ASCII files, such as
				  copy.erpln.data.</Paragraph>
               </Step>
               <Step>
                  <StepTitle/>
                  <Paragraph>Using the syntax described below, export
				  the data from the operational company (bdbpre) and then import the data into
				  the archive company (bdbpost).</Paragraph>
                  <Paragraph> 
                     <GUIRef href="" role="manual">UNIX</GUIRef>
                  </Paragraph>
                  <List>
                     <ListIntro>At the command prompt, enter the
					 following:</ListIntro>
                     <ListItem>export BSE= <Emphasis>path</Emphasis>
                     </ListItem>
                     <ListItem>export BSE_TMP=$BSE/tmp</ListItem>
                     <ListItem>set USER= <Emphasis>user name of operational
					 company</Emphasis>
                     </ListItem>
                     <ListItem>bdbpre6.2 –Icopy.erpln.data –Oerplndata001.dmp
					 –C001</ListItem>
                     <ListItem>bdbpost6.2 –R –f –n –c901 –Ierplndata001.dmp</ListItem>
                  </List>
                  <Paragraph>This will copy the data of the provided
				  tables from company 001 to company 901.</Paragraph>
                  <Paragraph> 
                     <GUIRef href="" role="manual">Windows</GUIRef>
                  </Paragraph>
                  <List>
                     <ListIntro>On the server, at the command prompt, enter the
					 following:</ListIntro>
                     <ListItem>In the <Emphasis>$BSE\bin</Emphasis> directory:
					 fillenv</ListItem>
                     <ListItem>set user= <Emphasis>user name of operational
					 company</Emphasis> bdbpre –Icopy.erpln.data –Oerplndata001.dmp –C001</ListItem>
                     <ListItem>bdbpost –R –f –n –c901 –Ierplndata001.dmp</ListItem>
                  </List>
                  <Paragraph>This will copy the data of the provided
				  tables from company 001 to company 901</Paragraph>
                  <TABLE border="1" width="70%" borderstyle="default"
                         space-and-orientation="indented-estimated">
                     <TBODY noTR="4">
                        <TR no="1" isLast="false">
                           <TD width="142" rowspan="1" colspan="1">copy.erpln.data</TD>
                           <TD width="433" rowspan="1" colspan="1">The ASCII file that contains the list of
						  table names to be exported. <List>
                                 <ListIntro>Part of the contents might look like this:</ListIntro>
                                 <ListItem>tcccp000</ListItem>
                                 <ListItem>tccom999</ListItem>
                                 <ListItem>tcibd000</ListItem>
                                 <ListItem>tcmcs000</ListItem>
                              </List>
                           </TD>
                        </TR>
                        <TR no="2" isLast="false">
                           <TD width="142" rowspan="1" colspan="1">001</TD>
                           <TD width="433" rowspan="1" colspan="1">The company number of the operational
						  company.</TD>
                        </TR>
                        <TR no="3" isLast="false">
                           <TD width="142" rowspan="1" colspan="1">erplndata001.dmp</TD>
                           <TD width="433" rowspan="1" colspan="1">The name of the dump file.</TD>
                        </TR>
                        <TR no="4" isLast="true">
                           <TD width="142" rowspan="1" colspan="1">901</TD>
                           <TD width="433" rowspan="1" colspan="1">The company number of the archive
						  company.</TD>
                        </TR>
                     </TBODY>
                  </TABLE>
               </Step>
               <Step>
                  <StepTitle/>
                  <List>
                     <ListIntro>After you post the dump to the archive company,
					 reorganize the tables using the <GUIRef href="/baanerp/tt/aad/ttaad4225m000" role="session">Reorganize Tables (ttaad4225m000)</GUIRef> session. In this session, select the following check
					 boxes:</ListIntro>
                     <ListItem> 
                        <GUIRef href="/baanerp/tt/aad/ttaad4225m000#ttgen.refint" role="groupbox">Reference Integrity</GUIRef>
                     </ListItem>
                     <ListItem> 
                        <GUIRef href="" role="manual">Repair Reference Counter</GUIRef>
                     </ListItem>
                  </List>
                  <Paragraph>This is required because the bdbpost
				  option –n (Ignore referential integrity constraints) is used.</Paragraph>
                  <Paragraph>Options for the bdbpre and bdbpost
				  commands are in the Infor Enterprise Server 8 - Technical Manual.</Paragraph>
               </Step>
            </Steps>
         </ProcedureSection>
      </GeneralSection>
   </GeneralSection>
</ManualTopic>