migrate_project is a script I created to compare, copy, export, and build application designer project from a command line (so you can do it in batch). You can download a copy of it here. Place it in your windows directory so you can call it from the command line in any location.
There is some manual set up required for migrate_project before it can be used. The following values need to be changed in the batch file under the environment setup section.
- set pside= to the path of the application designer executable (pside.exe). This is typically found under $PS_HOME\bin\client\winx86\. You'll need to find out where $PS_HOME points in your PeopleSoft environment.
- set compare_path= to the path you want to store compare reports. Default is C:\PS\COMPARE
- set copy_path= to the path you want to files related to a copying project to be stored. Default is C:\PS\COPY.
- set export_path= to the path you want to export your project. Default is C:\PS\EXPORT.
- set dbtype= to the database platform you are using. Default is ORACLE. See PeopleBooks for other options.
These will need to be set before you start. In particular the location of pside.exe as the migrate_project script available from this site does not have this set at all.
This section explains how to use migrate_project. There are five options available:
- Compare. This compares a project and its objects between a source and target database and generates a browser compare report.
- Copy. This copies a project from its source database to its target database.
- Export. This exports a project to a file (XML format) on your filesystem.
- Build. This creates a build script fo the project.
- Migrate. This performs a compare, then a copy, and finally a build of a project. It migrates a project from one environment to the other.
The syntax for running a compare is:
$ migrate_project COMPARE <project> <username> <password> <source_environment> <target_environment>
This will generate browser compare reports in the location you defined as the compare_path which is by default C:\PS\COMPARE. Be aware that a compare will change your upgrade action and flags for the project you are comparing depending on the outcome of the compare report.
The syntax for running a copy is:
$ migrate_project COPY <project> <username> <password> <source_environment> <target_environment>
This will copy the project from the source environment to the target environment based on the upgrade action and the upgrade flag. It will only copy things set to copy, delete or CopyProp. It will not copy anything set to none in the upgrade action settings. It will also not copy anything that does not have the upgrade flag set (ticked). Make sure your upgrade properties are correct before running the copy.
Note that the copy will:
- Set Target Audit flags from the source environment
- Keep target DDL
- Set Portal Registry Permission List references from the source environment
- Set Chartfield display size from the source environment
- Set Database field format from the source environment
Typically, you'll want to do a compare, and then a copy.
The syntax for running an export is:
$ migrate_project EXPORT <project> <username> <password> <source_environment>
A very important point to note is that project upgrade settings must be set to copy for all objects that you want exported. Any object that has an upgrade setting of none or delete will not be exported to a file. You'll need to manually set this through application designer.
Another option is to update the PSPROJECTIEM record and set the UPGRADEACTION field to a value of 0 for copy where the value is currently 2 for none. Also change the TAKEACTION field to a value of 1. This ticks the upgrade flag (a value of 0 indicates that this flag is not ticked). Note in order to see these changes in Application Designer you should log off, clear your cache and then log back in. Otherwise it may use the cache and not show you correct changes.
The syntax for running a build is:
$ migrate_project BUILD <project> <username> <password> <source_environment>
This will generate build script(s) for any records and indexes in your project. The build script is created in your personal temp folder in Windows (%Temp%).
Will be updated soon.
Typically, you'll want to call migrate_project on a number of projects. To do this, you'll need to create a separate batch file that calls migrate project. Here's an example of a batch file you could create to export three projects called PROJECT1, PROJECT2 and PROJECT3.
call migrate_project EXPORT PROJECT1 <username> <password> <source_environment> call migrate_project EXPORT PROJECT2 <username> <password> <source_environment> call migrate_project EXPORT PROJECT3 <username> <password> <source_environment>