tn 1372672 - export and import of all data and structures

14
Technote 1372672 - Export and Import of all Data and Structures – v2.0 22 nd May 2017 How to use Export Data and Export Structures to copy a database from one system to another Overview Typically, customers would not need to use this document. This is because they would typically create a copy of their database by other means. For example, they may create a SQL backup of their ‘source’ database and restore it as a new copy (as the ‘target’ database’). Therefore, for most circumstances/customers, the method described inside this document is not necessary. However, there may be a very specific reason why these methods are not suitable, for example: Example #1: Customer wants to migrate their system from Oracle to Microsoft SQL. Example #2: Customer wants to migrate their system from one Oracle environment to a different (incompatible) Oracle environment. For example, it has been seen that using the standard Oracle method ('IMP/EXP' of .dmp file) from Oracle 9i to Oracle 10G on Solaris operating system can fail. The method in this Technote would be a workaround for this. Example #3: Customer wants to migrate their system from on-premise (for example, hosted on their Microsoft SQL server) to IBM Cloud (hosted on IBM's DB2 servers). This document therefore provides an alternate method. Tip: The processes described here will consume a lot of power/processes from the system. o This will naturally impact on other user’s experiences of Controller (e.g. whole system will go slow) Therefore, this process should ideally occur when no other users are using other Controller databases (i.e. other than source / target databases) on the same system o Naturally, there must be no other users inside the source/target databases Warning: After using this document, you *must* test the new database thoroughly, to make sure that all data/settings have transferred correctly. In particular, concentrate on the user/group security.

Upload: others

Post on 14-Apr-2022

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: TN 1372672 - Export and Import of all Data and Structures

Technote 1372672 - Export and Import of all Data and Structures – v2.0

22nd May 2017

How to use Export Data and Export Structures to copy a database from one system to another

Overview

Typically, customers would not need to use this document. This is because they would typically

create a copy of their database by other means. For example, they may create a SQL backup of

their ‘source’ database and restore it as a new copy (as the ‘target’ database’).

Therefore, for most circumstances/customers, the method described inside this document is not necessary.

However, there may be a very specific reason why these methods are not suitable, for example:

• Example #1: Customer wants to migrate their system from Oracle to Microsoft SQL.

• Example #2: Customer wants to migrate their system from one Oracle environment to a

different (incompatible) Oracle environment. For example, it has been seen that using

the standard Oracle method ('IMP/EXP' of .dmp file) from Oracle 9i to Oracle 10G on Solaris operating system can fail. The method in this Technote would be a workaround

for this.

• Example #3: Customer wants to migrate their system from on-premise (for example,

hosted on their Microsoft SQL server) to IBM Cloud (hosted on IBM's DB2 servers).

This document therefore provides an alternate method.

Tip:

• The processes described here will consume a lot of power/processes from the system. o This will naturally impact on other user’s experiences of Controller (e.g. whole

system will go slow)

• Therefore, this process should ideally occur when no other users are using other Controller

databases (i.e. other than source / target databases) on the same system o Naturally, there must be no other users inside the source/target databases

Warning:

After using this document, you *must* test the new database thoroughly, to make sure that all

data/settings have transferred correctly. In particular, concentrate on the user/group security.

Page 2: TN 1372672 - Export and Import of all Data and Structures

Technote 1372672 - Export and Import of all Data and Structures – v2.0

22nd May 2017

Details

Before starting, it is recommended to logon to the ‘source’ database, and perform a database

optimise.

• Make sure you tick all options, for example:

Part One – Exporting Structures from ‘source’ database

(A) ALL STRUCTURES + USER GROUPS

• Launch Controller

• When prompted to choose the database (from the menu), choose the ‘source’ database

• Logon with administrative username/password (for example ADM)

• Ensure no other users on the database

• Click ‘Maintain – User – Single Mode’

• Click ‘Transfer – Export Structures’

• Choose ‘Directory’, select appropriate folder (e.g. C:\Database_Export\Structures)

• Tick ‘Compress Export File’

Page 3: TN 1372672 - Export and Import of all Data and Structures

Technote 1372672 - Export and Import of all Data and Structures – v2.0

22nd May 2017

• Click the ‘Select All’ button (near the lower-right corner):

• Locate the section “Rights”

• Click on the ‘Browse” button

Page 4: TN 1372672 - Export and Import of all Data and Structures

Technote 1372672 - Export and Import of all Data and Structures – v2.0

22nd May 2017

• Choose ‘User Group’ and then ‘select’:

• Select (highlight in blue) *all* the User Groups and click on the green ‘tick’:

• Finally, click on the blue ‘Run’ icon to start the process

NOTE: This process *may* take some time (e.g. perhaps 1 to 30 minutes).

Page 5: TN 1372672 - Export and Import of all Data and Structures

Technote 1372672 - Export and Import of all Data and Structures – v2.0

22nd May 2017

Afterwards, you will receive a report such as:

TIP: It is a good idea to keep a printscreen of all the export logs (like the one above). You can

then compare their contents with the ‘import logs’ (created during the later import process), and

make sure that they are identical.

You will also notice a new file ‘C:\Database_Export\Structures\FstrucController.FZP’ has been

created.

Page 6: TN 1372672 - Export and Import of all Data and Structures

Technote 1372672 - Export and Import of all Data and Structures – v2.0

22nd May 2017

(B) ALL USERS

It is not possible to export users *and* groups simultaneously. Therefore, this section is a

separate one to export all the users:

• Inside the same ‘Export Structures’ window, choose ‘Directory’, select a DIFFERENT appropriate folder (e.g. C:\Database_Export\Users):

• Tick ‘Compress Export File’

• Locate the section “Rights” and tick the box

• Click on the ‘Browse” button

• Choose ‘Single User’ and then ‘select’

• Use your mouse (for example, hold down shift) to highlight *all* users:

• Click on the green ‘tick’:

• Finally, click on the blue ‘Run’ icon to start the process

You will also notice a new file ‘C:\Database_Export\Users\FstrucController.FZP’ has

been created.

Page 7: TN 1372672 - Export and Import of all Data and Structures

Technote 1372672 - Export and Import of all Data and Structures – v2.0

22nd May 2017

Part Two – Exporting Data from ‘source’ database

(A) PERIOD VALUES/JOURNALS

• Click ‘Transfer – Export Data’

• Select ‘Period Values/Journals’ tab

• Choose ‘Directory’, select appropriate folder (e.g. C:\Database_Export\Data\Period_Values)

• Tick ‘Compress Export File’

• Ensure that *all* possible options are ticked/selected (except Periods – see later):

TIPS:

• Choose ‘Company’ (not ‘Group’), because this will allow you to select ALL companies. (If

you chose ‘group’ then you can only select one at a time).

• When click ‘Period’ you will have to ‘expand’ the date range to be able to see more

date/periods

• Do not attempt to export ALL the possible periods in one go. This will cause errors (see later) In general terms, it is recommended to:

o Start by exporting one year at a time (and see if that imports OK)

o Start by exporting the most recent year (and then work backwards)

Page 8: TN 1372672 - Export and Import of all Data and Structures

Technote 1372672 - Export and Import of all Data and Structures – v2.0

22nd May 2017

• Click blue ‘Run’ button

==============================

IMPORTANT:

PLEASE READ THE FOLLOWING CAREFULLY:

To prevent errors (see below) it is recommended that you only export a few periods at a time. - For example, perhaps export data in chunks of a year (12 periods of a month) at once.

If you get an error “The query processor ran out of internal resources and could not produce a

query plan” then you need to choose fewer periods, and re-try. Afterwards, export the other

periods (the ones that you missed).

• For more details, see here: http://www-01.ibm.com/support/docview.wss?uid=swg22003784

If you get an error “The export failed due to an out of memory error on the server” then you need

to reboot the Controller application server, and re-try

• If that fails, then choose fewer periods, and re-try. Afterwards, export the other periods

(the ones that you missed).

• For more details, see here: http://www.ibm.com/support/docview.wss?uid=swg22003791

If you need to repeat the data export for different choices (for example, different Periods because you could not ‘select all’), then (each time you repeat the process) you will have to

modify the ‘File Name’ ==============================

Page 9: TN 1372672 - Export and Import of all Data and Structures

Technote 1372672 - Export and Import of all Data and Structures – v2.0

22nd May 2017

(B) INVESTMENTS REGISTER:

This section is relevant for customers who use the acquisitions functionality.

• Select ‘Investments Register’ tab

• Choose ‘Directory’, select appropriate folder (e.g. C:\Database_Export\Data\Investments)

• Tick ‘Compress Export File’

• Ensure that *all* possible options are ticked/selected:

Important: Increase the number of levels (from default 1) to the number that you require (e.g.

10). Your Controller super-user will know how many levels his/her Controller system has.

NOTE: There will be certain things that you cannot select all of (e.g. Consolidation types).

• In the above example, I have chosen ‘LE’ and named the filename with ‘LE’ to

correspond with it.

Page 10: TN 1372672 - Export and Import of all Data and Structures

Technote 1372672 - Export and Import of all Data and Structures – v2.0

22nd May 2017

• Click blue ‘Run’ button

• Review the log to make sure it was successful:

IMPORTANT: After this has finished:

• Repeat above process for all different choices (e.g. Consolidation Types) which you could not

‘select all’ earlier

• Each time you repeat the process, you will have to modify the ‘File Name’ (for example, append with the consolidation type)

Page 11: TN 1372672 - Export and Import of all Data and Structures

Technote 1372672 - Export and Import of all Data and Structures – v2.0

22nd May 2017

Important Steps Before Proceeding:

(A) TAKE A BACKUP COPY OF THE FILES/FOLDERS THAT YOU CREATED EARLIER (IN PARTS ‘ONE’

AND ‘TWO’)

This is as a precaution.

(B) PREPARE A BRAND NEW ‘BLANK’ DATABASE (AS YOUR ‘TARGET’ DATABASE)

Create a brand new ‘blank’ SQL database (or DB2 database, or Oracle user/schema), then:

• Launch Controller Configuration on the application server

• Create a new database connection (to this database)

• Use ‘Database Conversion’ to ‘Create new database’ and ‘Run Steps’ to convert the database to the required level (e.g. 855 or whatever)

[For more information on how to do this, see product documentation or other Technotes].

(C) PREPARE YOUR DATABASE AND SERVER FOR LARGE LOG GROWTH

• Make sure that there is plenty of free hard drive space left (on all the database server’s

drives)

• Make sure that the transaction logs are not restricted (no maximum cap to their size)

• For example, in DB2, temporarily tick “Enable infinite logging”:

(Remember to reverse the change after the import has completed)

(D) PERFORM A DATABASE OPTIMISE

Launch Controller, and logon to new ‘target’ blank database

• Click ‘Maintain – User – Single Mode’

• Click ‘Maintain – Database – Optimise’

• Tick all options, and run a database optimisation

Page 12: TN 1372672 - Export and Import of all Data and Structures

Technote 1372672 - Export and Import of all Data and Structures – v2.0

22nd May 2017

Part Three – Importing Structures into ‘target’ database

• Launch Controller, and logon to new ‘target’ blank database

• Click ‘Transfer – Import Structures’

• Browse to the relevant folder (for example: C:\Database_Export\Structures )

• Click ‘select all’

• Make sure that all boxes are ticked (except ‘Rename File’ – which is optional):

• Click Run

Best Practice: Before proceeding, run a database optimise (‘Maintain – Database – Optimise’ and tick all options)

Page 13: TN 1372672 - Export and Import of all Data and Structures

Technote 1372672 - Export and Import of all Data and Structures – v2.0

22nd May 2017

Repeat the above process, but this time import the users (e.g. C:\Database_Export\Users)

Best Practice: Before proceeding, run another database optimise (‘Maintain – Database

– Optimise’ and tick all options)

The Launch Controller, and logon to new ‘target’ blank database

• Click ‘Maintain – Configuration – General’

• Tick “Import of Data for Locked Periods Allowed”

Remember to reverse this change after the import has finished!

• Click ‘Maintain – Period Locking – Change Multi Period Locking’

• Tick “Unlock all Periods”

Remember to reverse this change after the import has finished!

Page 14: TN 1372672 - Export and Import of all Data and Structures

Technote 1372672 - Export and Import of all Data and Structures – v2.0

22nd May 2017

Part Four – Importing Data into ‘target’ database

• Click ‘Transfer – Import Data’

• Choose ‘Period Values/Journals’ tab

• Browse to the relevant folder

• Use the wizard to import data

Repeat above section for all ‘Period Values/Journals’ data files that you created

previously.

• Click ‘Transfer – Import Data’

• Choose ‘Investments Register’ tab

• Browse to the relevant folder

• Use the wizard to import data

Repeat above section for all ‘Investments Register’ data files that you created

previously.

Best Practice: Before proceeding, run a database optimise (‘Maintain – Database – Optimise’

and tick all options)

Next, the ‘Server Preferences’ need to be transferred, so you will need to manually copy and

paste the settings (from your source to target databases):

Finally, you will need to revert (undo) some of the earlier changes that you may have made, such

as:

• Change the database transaction log setting

• UNTICK “Import of Data for Locked Periods Allowed”

• UNTICK “Unlock all Periods”

Finish & TEST!