jump to navigation

Quickly export multiple Projects November 17, 2008

Posted by Duncan in PeopleTools.
trackback

It can be a good idea to frequently take flat-file backups of your App Designer Projects, depending upon how reliable the infrastructure is at your site, and how frequently environments get refreshed from Production.  I’ve often thought “I wish that there was a shortcut for this procedure”, but have never done anything about it.

I recently chanced across the excellent PeopleSoft Wiki and noticed a batch file containing many command lines to control App Designer, including exporting projects to command line.

Now I’m not awfully keen on automating migration between environments (I like to run the compare reports and set the flags myself immediately before migration) but the exporting of projects caught my eye.

Using the same command line we can create a batch file that’ll loop through a list of projects and export them – one at a time – into a directory of your choosing.

Create a file in the same directory as the batch file with a list of the projects you wish to export (one on each line) named project_list.txt.  Then run the following batch file:
set pside=C:\Tools\bin\client\winx86\pside.exe
set export_path=C:\temp\exports\
set dbtype=ORACLE
set user=ddavies
set pwd=******
set srcdb=DEV
FOR /F %%a IN (project_list.txt) DO %pside% -HIDE -PJTF %%a -FP %export_path% -CT %dbtype% -CO %user% -CP %pwd% -CD %srcdb% -QUIET -AF 0 -DDL 1 -PPL 0 -CFD 0 -CFF 0 -LF %export_path%%%a.log
pause

Update: 2nd Feb
Anyone having the same issue as Jeff in the comments (where your project flags are set incorrectly and as a result the project gets copied, but not the objects) can set the flags via SQL.

UPDATE PSPROJECTITEM
SET COPYDONE = 0, TAKEACTION = 1
WHERE PROJECTNAME = ”;

One extra note, when you run the above SQL the results aren’t always immediately visible in App Designer. Sometimes I’ve had to shut it and re-open, and sometimes I’ve had to clear the cache also.

Advertisements

Comments

1. Mayank Bakhru - November 20, 2008

If you were to open a CA job from the upgrade you will find loads of the command line commands to run a compare, copy a project to/from a file/DB, even to build it its pretty neat I was able to automate migration using the same set of command.

.

2. Jeff Strain - January 9, 2009

I think you may have neglected to do a few things though. You need to set all of the objects to copy and set them for upgrade or you will only get the shell of them in the project. We are currently experimenting with doing this in sql.

3. Mayank Bakhru - January 23, 2009

by “you will only get the shell of them in the project” do you mean only the object definitions ? if so I don’t see why would that be a problem.
Doing it with SQL from backend is possible however I doubt the efficiency of the process since you will have to copy into meatdata tables for each object type included in your project.

4. Mayank Bakhru - January 28, 2009

QUestion : does anybody knows what are the flags used in command line to merge multiple projects via pside(command line)?


Sorry comments are closed for this entry

%d bloggers like this: