- Print
- DarkLight
- PDF
How to Copy the Live Database to the Demo Database for On-Premises
I need to refresh the data in my demo database, and I am an on-premises customer, how can I do that?
Answer:
The steps in this article pertain to FIMS on-premises. If your FIMS database is hosted in NPact's Azure Cloud, please see the following:
How do we copy our Live database to our Demo database in Azure Cloud?
What is the demo\test\test and learn database?
The demo\test\test and learn database is a copy of your live production database that you can use to test issues and practice.
Note that the terms Demo, Test and Test and Learn are all used interchangeably and refer to the same database.
Summary:
- In order to copy the live database to demo a shortcut needs to be configured on the desktop of the FIMS database server which uses a batch file.
- This batch file turns off the demo database, makes an online backup of the live database, erases the demo database, rebuilds the demo database, restores the live database backup to the demo database, and finally, turns on the demo database.
- Setting up the copy of live data to demo\test must be done from the FIMS database server. It cannot be done on a workstation or remote desktop server.
- This article assumes that you have only one demo\test database and that its path is NPO\Demo\dbfiles and that the name of the demo\test database broker is 'demo' which is the default setting. See the bottom part of this article to configure copy live to test for multiple databases.
- DO NOT stop your Live database before you run this program. Your Live database must be up and running for the task to work. Users do not need to log out of the FIMS live database in order to update your Test database, but they will be kicked out of the Demo database while the task runs if they happen to be logged into demo.
How to set up Copy live to demo shortcut if you do not already have one. If you do have one, be sure that it is configured correctly:
2. Find the file called 'copytestopen.bat'
3. Right click on the 'copytestopen.bat' and select 'Send to Desktop-Create shortcut'
4. On the desktop, right-click the shortcut that was created and click "Properties".
5. In the "Target" field, add the paths to the Live database, Demo database, and the dlc directory.
The examples below are using C. Note that the NPO folder on your server may be on another drive other than C:
- Target= c:\npo\found\FIMS\copytestopen.bat c:\npo\found\dbfiles\found c:\npo\demo\dbfiles\found c:\npo\dlc
- Start In= c:\npo\found\FIMS
6. Click Apply and OK
7. Right-click on the shortcut and rename it to 'copy live to test' or copy live to demo'
8. Right-click on the shortcut you just created above and select Run as Administrator.
9. You will see this first window appear that shows that the test\demo database was stopped. You will then press a key to continue
10. The process then creates an online back up of the live database:
11. You will see a list of files and a prompt to enter Y and the return key on your keyboard:
12. You will see a list of files being created:
13. At this point, the online backup of your live data is restored to the test\demo database:
14. Test\Demo database is restarted. Press any key to continue and the process is complete:
Server Moves: If you have moved servers, be sure your copytestopen.bat file located in npo\found\fims has the correct DLC path set if the new server has a different path than the old server did. To check that edit the bat file in Notepad and check this line which is about 18 lines down in the bat file. It should appear as below. You will need to change the drive letter for where the DLC folder is on your server if its not on C:
set dlc=c:\npo\dlc
How to Configure Copy live to Demo\Test if you have multiple demo databases
You may have more than one live database and subsequently more than one demo database. You may have a demo database for each live database that you have.
You will need a copy live to demo shortcut for each demo database you have, and you will also need a custom copytestopen.bat file for each demo database. The instructions above are if you only have one live database and one demo database.
The following are just examples. Your 2nd demo database may not be named demo 2, you would use the name in these examples that would correspond to what the name is for your 2nd database and so on for each additional demo database.
1. Go to npo\found\fims
2. Find the copytestopen.bat file
3. Right click on that file and select copy
4. Paste the copy into npo\found\fims
5. Re-name the copy, for example, copytestopen_demo2.bat
6. Edit the new copytestopen_demo2.bat in notepad
7. The DLC directory will not change from the instructions above, it will be wherever your dlc directory is located on your server, for example:
set dlc=c:\npo\dlc
8. Set the demo broker name for this 2nd database. You will need to look in openedge explorer to find what the name is for that 2nd demo database, for example:
set demoBroker=demo2
Note: In OpenEdge explorer, each database has its own specific database broker
How can I Find the Name of the OpenEdge Database Broker for my Database?
9. Save the copytestopen_demo2.bat file
10. Create a shortcut on the desktop to npo\found\fims\copytestopen_demo2.bat
- You can do this by right-clicking that file in the \npo\found\FIMS folder and click "Send-To" > "Desktop"
- You would point the target to that custom copytestopen_demo2.bat file for the 2nd demo database and then would point to the location where the 2nd demo database files were located.
- You would also edit the path to where your 2nd live database is located so that the files from that 2nd live database are copied to your corresponding 2nd demo database.
- Target= c:\npo\found\FIMS\copytestopen_demo2.bat c:\npo\found\dbfiles_livedatabase2\found c:\npo\demo2\dbfiles\found c:\npo\dlc
- Start In= c:\npo\found\FIMS