Here’s a quick little post on some errata in the DRM documentation. I was recently looking at setting up a process to unload versions as part of my automation scripts. I was using regular batch utility execution, instead of the configuration file method (see here).
According to the documentation, the way to do this is:
I set up a test version to test the execution out.
And, the code that I use looks like this:
1 2 |
D:\Oracle\Middleware\EPMSystem11R1\products\DataRelationshipManagement\client\batch-client\drm-batch-client.exe /u=unlkadmin /pw=PeteRox /url=net.tcp://localhost:5210/Oracle/Drm/ProcessManager /op=CloseVersion /abbrev=UNLK_VERSION >> D:\Admin\Logs\test.log echo Error code is %ERRORLEVEL% >> D:\Admin\Logs\test.log |
When I run the script, though, nothing happens. The version remains loaded.
I wasn’t sure why this was. Using a configuration file does give me the right results though. I then realized that I should probably check the logs.
In most applications, 0 indicates successful completion. This is also how it is for DRM. There are some other result codes as well collected in the documentation. For instance, the documentation tells us that 210 is reserved for incorrect parameters.
The DRM batch log also tells us that there is a problem with a parameter.
I couldn’t figure what I was doing wrong and I tried a few different things, like putting double quotes around the version name and the like. But no dice. I then realized that anywhere that the version name is referred to, in the documentation, the switch used is “/vabbrev”. As an example:
So, I changed the switch from “/abbrev” to “/vabbrev”…
1 2 |
D:\Oracle\Middleware\EPMSystem11R1\products\DataRelationshipManagement\client\batch-client\drm-batch-client.exe /u=unlkadmin /pw=PeteRox /url=net.tcp://localhost:5210/Oracle/Drm/ProcessManager /op=CloseVersion /vabbrev=UNLK_VERSION >> D:\Admin\Logs\test.log echo Error code is %ERRORLEVEL% >> D:\Admin\Logs\test.log |
…and it worked!
So there you have it. A bit of errata on the Oracle documentation that probably needs to be corrected in case you run into the same issue that I did.