Using the Copy Plans Database Tool
- Last UpdatedSep 10, 2024
- 4 minute read
Copy plot plans between two databases
This database tool can perform a set of operations to copy plot plans from one OSM database to another OSM database.
Requirements
-
Both databases must be on the same OSM versions.
-
Both databases will be set in upgrade mode and therefore no users can be connected.
-
Plot plans must exist in source database and will be created in target database.
-
Areas must be active if linking between areas.
-
Area codes linked to plot plans in source database must exist in target database if Link plot plans to areas checkbox is selected.
Guidelines
-
Only active plot plans in the source database will be copied.
-
Plot plans that have its name or title starting with 99 will not be copied from source, regardless of whether they are active or inactive. If you want to prevent a plot plan from copying, you can add 99 to the beginning of name or title.
-
Plot plans that are copied to the target database will be set to inactive.
-
If plot plan already exists, then plot plan will be renamed with the postfix "-TRF" (an abbreviation of transfer).
-
Button in the lower right corner will change its name according to different options on the right side of the window.
-
Check boxes are not selectable, but are used to indicate which operations have been performed.

Steps
The following steps are performed.
Step 1. Connect to source database
This step will connect to the source database where plot plans will be copied from.
The user name is preset to cow_owner and cannot be changed.
-
Click Connect source.
-
Enter credentials for target database.
-
Click Logon.

Step 2. Connect to target database
This step will connect to the target database where plot plans will be copied to.
-
Click Connect target.
-
Enter credentials for target database.
-
Click Logon.

Step 3. Turn on upgrade mode
This step will set both OSM databases in upgrade mode and create a database link between the databases.
-
Click Turn ON.

Step 4. Create database link
This operation will create a database link on target database. The link will be from target to source database.
-
Since the link is created on target database, the target server (physical/vm server) must also have the possibility to connect to source database.
-
There is no need to create an entry in tnsnames.ora file on target server to be able to connect to source database.
-
The only condition is that target server can connect to source server. Be aware that even if source and target databases are on the same server, then these connection values are required.
-
Enter the Host for source server.
-
Enter the Port number for source server.
-
Click Create link.

Step 5. Verify conditions
This step will verify whether conditions are met or not.
-
Asset codes are mandatory. Asset code is a Site code.
-
Area codes are optional.
-
Enter the Asset code and Area code for source server.
-
Enter the Asset code and Area code for target server.
-
Click Verify.

Step 6. Copy plot plans
This operation will copy existing plot plans linked to one asset in source database to another asset in target database.
-
You can limit the set of plot plans to be copied by entering an area code that exists in the source asset. If so, then only plot plans linked to given area will be copied.
-
If an area code is entered for target asset, the plot plans linked to source area code will also be linked to target area code.
-
If no area code is entered for target asset, the plot plans linked to source area will be copied to the target asset itself (not linked to an area).
-
The entered target area code does not need to be equal to source area code when copying only plot plans for one given area. They can be different.
-
(Optional) Select the Link plot plans to areas checkbox. When selected, the linking between plot plans and areas in source database will be created in target database. Selecting this checkbox will also remove any entered values for the area codes.
-
Click Copy plans.

Step 7. Turn off upgrade mode
This step will turn off upgrade mode and set both OSM databases back into operational mode.
-
The database link between the databases will be deleted.
-
The connections to the databases will be terminated.
-
Click Turn OFF.
-
Click Finish to close the tool.
