Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
ProjectWise
  • Product Communities
ProjectWise
ProjectWise PowerShell Extensions Forum Import-PWDocuments error codes and shortened path
    • Sign In

    • State Suggested Answer
    • Replies 7 replies
    • Answers 1 answer
    • Subscribers 66 subscribers
    • Views 2685 views
    • Users 0 members are here
    • Import-PWDocuments
    • powershell
    • ProjectWise

    Import-PWDocuments error codes and shortened path

    Ludovick
    Offline Ludovick over 4 years ago

    Hello

    I recently use Import-PWDocuments to import huge folders (275000 files, about 700 Gb)

    It worked quite well but i had 3 different issues,

    • The script send me different warning of some files (12 files)  who were not imported , do you have these 3 error code explanations ?

    WARNING: Error 56049 creating 'xxx.pdf' in \x\x\

    WARNING: Error 50000 creating

    WARNING: Error 58258 creating

    • when i compare the directory tree, i note that some path were shorten in Projectwise in comparition of windows folder

    I have lot of folder in windows with path > 255 car but Import-PWDocuments seems to deal with this correctly

    • I decide to compare pjw statistics for number of files , per main subfoilders

    About 120 files where missing pretty much everywhere , and different king of files (jpg, pdf, ..)  without any errors messages

    perhaps -verbose helped me to have more informations but with more than 275000 files it will be unreadable

    • Sign in to reply
    • Cancel
    • Ludovick
      0 Offline Ludovick Mon, Dec 31 2018 8:47 AM
      PWPS_DAB 1.7.19.0

      -

      Ludovick LAGREVOL

      Projectwise Administrator

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Dan Williams
      0 Offline Dan Williams Mon, Dec 31 2018 3:05 PM

      Searching the ProjectWise SDK header files, I see these for your error codes:

      #define AAERR_DYNSQL_DB_COMMUNICATION_FAILURE  56049

      #define AAERR_NOT_FOUND  50000

      #define AAERR_DMS_ERR_TOO_LONG_FILE_NAME  58258

      You might want to check the log files on the Integration server for the Integration service, perhaps they might give you a clue.

      You might consider targeting a smaller number of files, particularly where you seem to be missing files, use -verbose, and see what turns up.

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Ludovick
      0 Offline Ludovick Wed, Jan 2 2019 2:30 AM in reply to Dan Williams

      Thanks for your answer

      i'll try verbose on another import because the data are now in production

      Too many logs in integration service, i can't find anything relevant

      about ERR_DMS_ERR_TOO_LONG_FILE_NAME

      Do you know the longest path autorized in projectwise ?   ant the longest filename ?

      best regards

      -

      Ludovick LAGREVOL

      Projectwise Administrator

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Dan Williams
      0 Offline Dan Williams Wed, Jan 2 2019 11:58 AM in reply to Ludovick

      When you say "longest filename", that may depend upon what you mean by "filename".

      My understanding is that in Windows the file's name is limited to 255 characters and the path length (including the file's name) is limited to 260 characters.  There is some potential workarounds for longer paths in Windows 10, but I doubt if they have been tested with ProjectWise.

      In ProjectWise, "paths" and a file name size are a bit different.  There is "no limit" on document paths in ProjectWise other than how long you are willing to wait for them to be built via queries to the database or having to browse (navigate) very long paths.  I'm not aware of anyone having slow displays or searches in ProjectWise Explorer because of very long "paths" in ProjectWise. 

      As for the longest file name, well that is limited to the size of the column o_filename in the table dms_doc which is nvarchar(127) in SQL Server which can potentially be a problem if you have actual file names longer than 127 characters.

      Now if you think changing the size of this column in the database will allow you to have longer filenames, don't do it for at least three reasons!!!

      1) Modifications of the database schema are not supported (other than what Bentley Support suggests because of specific problems, and these tend to be indexes, not changes to database tables/columns).

      2) ProjectWise will ignore the "extra" size - my guess is that the memory buffers for filename are "hard coded" to 127.

      3) Unknown "side effects".

      I suspect that your "problems" are likely due to some file paths are longer than what Windows supports.  It is possible to create longer than supported paths in Windows, but then accessing them becomes a problem depending upon how they are accessed.  I would suggest shortening your paths in Windows so that no path to a file, including the file's name is longer than 260 characters.  You should also check to make sure that all the file names (not including the path) are 127 characters or less.

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Reject Answer
      • Cancel
    • Mick Inkster
      0 Offline Mick Inkster Fri, Jan 4 2019 1:00 PM in reply to Dan Williams

      Hi Dan,

      I have also noticed that there appears to be a limit to the length of an individual folder name (approx. 62 characters).

      Can you confirm if that's the case?

      Mick

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    >

    Communities
    • Home
    • Getting Started
    • Community Central
    • Products
    • Support
    • Secure File Upload
    • Feedback
    Support and Services
    • Home
    • Product Support
    • Downloads
    • Subscription Services Portal
    Training and Learning
    • Home
    • About Bentley Institute
    • My Learning History
    • Reference Books
    Social Media
    •    LinkedIn
    •    Facebook
    •    Twitter
    •    YouTube
    •    RSS Feed
    •    Email

    © 2023 Bentley Systems, Incorporated  |  Contact Us  |  Privacy |  Terms of Use  |  Cookies