Skip to content

Switching File Attachment Storage

In previous posts I have talked about the File Attachment storage options in PeopleSoft. The three basic options are Database, FTP or HTTP. My organization initially went with HTTP, but now we are looking to move to Database storage. The requirement is to move not only future file attachments, but attachments from the past as well. At first I thought this would require a lot of work, including custom conversion AE programs, etc. However, there is a delivered process called Copy File Attachements that does all the heavy lifting for you. There is an online and batch method to run this, but I highly recommend the batch mode. There are a few other steps needed to fully convert all attachments, but it is fairly straight forward. Below are the steps I used in FSCM 9.2.17, PeopleTools 8.54.18.

Create new File Attachment Server

  1. Navigate to Main Menu > Set Up Financials/Supply Chain > Common Defictions > File Attachments > Administer File Attachments
  2. Click Add Database Server
  3. Record Name will default to PV_ATT_DB_SRV. The default is fine, but change if you would like.
  4. Set Pick Active Server to match the ID of your new server.
  5. Save. Future File Attachments will now be stored in your database.

Copy File Attachments

  1. If needed, create new URL for Database storage – PeopleTools > Utilities > Administration > URLs. Values URL Identifier: PSA_ATT_DB, URLID:record://PV_ATT_DB_SRV
  2. Navigate to run control page PeopleTools > Utilities > Administration > Administer File Processing > Copy File Attachments (Batch)
  3. Values Source: URL.PSA_ATT_HTTP, Destination:URL.PSA_ATT_DB
  4. Run the App Engine COPYATTS through Process Scheduler.
  5. This will take a long time to run, possibly hours depending on your attachment count.
  6. After completion, you will want to review the trace file AE_COPYATTS_[PIN].trc file. The AE should produce this automatically.
  7. I used this trick to generate a log of ONLY errors from the trace:

    grep "EvalCopyAttachments: failed getting file" AE_COPYATTS_*.trc > AE_COPYATTS.errors

  8. Take action on any errors that occurred.

Update previous File Attachment URL

  1. These steps point the old HTTP server setup to point to the new DB server.
  2. Navigate to PeopleTools > Utilities > Administration > URLs. Values URL Identifier
  3. Open the URL used for the previous File Attachment Server setup. Example: PSA_ATT_HTTP
  4. Change the URLID value to the new Database server URL values. Example: record://PV_ATT_DB_SRV
  5. I recommend adding comments describing this conversion process – especially if HTTP or FTP is in the URL ID and it now points to the DB. This can help avoid confusion in the future.

After we completed these steps, we decided to keep our old storage location around just in case we found any issues after the fact. We ended up renaming the directory path, just to make sure nothing was still referencing the old location. After a few weeks of no issues, we went ahead and destroyed this old storage location. As mentioned above, this was done in the FSCM application which has its own File Attachment framework built on top of the one Tools delivers. You should be able to take a similar approach with other applications, but the Create new File Attachment Server section above won’t be relevant. Instead, you can simply complete the Update previous File Attachment URL steps after your copy is complete.

5 thoughts on “Switching File Attachment Storage”

  1. Pingback: #29 – DPK Successes and Shortcomings –

  2. Hi Dan/Kyle,
    May be slightly off-topic : have you ever encountered the below error?

    736 08.06.23 0.000000 ExecutePutAttachment (error): Error: URL Identifier not provided. Use URL Identifier to connect.
    737 08.06.23 0.000000 EvalPutAttachment (error): return code (1) indicates attempt to upload file to storage failed.
    738 08.06.23 0.000000 EvalPutAttachment: finishing and returning 1.

    When an AE tries to attach a file using PutAttachment and GetAttachment?

    Tried searching, but couldn’t get any information. 🙁

    Please do let me know, if you’ve encountered this issue before.

  3. Mani,

    I’m not sure I have seen the exact error before. I would recommend making sure you have the PS_FILEDIR variable set correctly on your process scheduler server. Also, make sure a valid URL Definition is provided in the PeopleCode function calls, and that the definition is configured correctly.

  4. Thanks for responding, Kyle!

    As you had mentioned in one of your earlier posts, the issue was being caused by a URL string instead of a URL definition used for the PutAttachment and GetAttachment functions for SFTP.

    I replaced the URL String variables with the actual URL definitions and it worked!

    Thanks a lot for taking time to respond to my questions !


  5. You might also need to run the following, if going from URL to Database. (FSCM Example).

    Also, the Server ID may have changed.

    update ps_pv_attachments
    set SERVER_ID = 2, SERVER_TYPE = ‘D’

Leave a Reply

Your email address will not be published. Required fields are marked *