<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: RdB; Inability to execute complex queries in detached process in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/rdb-inability-to-execute-complex-queries-in-detached-process/m-p/5168715#M26423</link>
    <description>SYS$SCRATCH is also used by Rdb for sortworks and temporary files.&lt;BR /&gt;&lt;BR /&gt;JF</description>
    <pubDate>Wed, 08 Apr 2009 11:31:58 GMT</pubDate>
    <dc:creator>Jean-François Piéronne</dc:creator>
    <dc:date>2009-04-08T11:31:58Z</dc:date>
    <item>
      <title>RdB; Inability to execute complex queries in detached process</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/rdb-inability-to-execute-complex-queries-in-detached-process/m-p/5168713#M26421</link>
      <description>Environment: Alpha, OpenVMS 7.3-2, RdB 7.1&lt;BR /&gt;We run a CGI-based webservice, accessed after authentication. The user is passing a URL that contains a query to be executed, including the database on which the query is to be executed, and its parameters. The actual database access is done by a (locally created) procedure, containing all required assignments and definitions, which is next executed in a subprocess under the user that issued the request - thoug username is still the user under which the webserver runs: &lt;BR /&gt;&lt;BR /&gt;$ run/uic=(UIC of  remote_user)/INPUT=(command&lt;BR /&gt;procedure)/OUTPUT=(output-spec) sys$system:loginout &lt;BR /&gt;&lt;BR /&gt;This works fine, but some users encounter a problem when queries become more complex. Tracing revealed this error on execution of the query: &lt;BR /&gt;&lt;BR /&gt;! RDB Message Vector: &lt;BR /&gt;! 013881b4 00000000 056ec054 00000000 000184c4 00000908 ! %RDB-F-SYS_REQUEST, error from system services request? &lt;BR /&gt;%COSI-F-CREATERR, cannot create file? &lt;BR /&gt;%RMS-F-DEV, error in device name or inappropriate device type for operation? &lt;BR /&gt;%SYSTEM-W-NOSUCHDEV, no such device available &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Since the query is complex, we anticipate RDB will need to create a (temporary) workfile and fails - because a logical is improperly&lt;BR /&gt;defined, or a device is completely missing. But we couldn't locate anything that may cause the problem. &lt;BR /&gt;&lt;BR /&gt;However, if this user runs the very same query interactively, nothing is wrong. We have checked the logicals in both environments, for one user, and found no difference. &lt;BR /&gt;&lt;BR /&gt;My questions: &lt;BR /&gt;&lt;BR /&gt;Is a difference in behaviour between interactive and deteached processes?  &lt;BR /&gt;What device may be expected here?  &lt;BR /&gt;Is there some data, inside or outside the database, by which the location of workfiles is controlled? &lt;BR /&gt;&lt;BR /&gt;(Crossposted on Oracle metalink forum) &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 08 Apr 2009 10:50:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/rdb-inability-to-execute-complex-queries-in-detached-process/m-p/5168713#M26421</guid>
      <dc:creator>Willem Grooters</dc:creator>
      <dc:date>2009-04-08T10:50:23Z</dc:date>
    </item>
    <item>
      <title>Re: RdB; Inability to execute complex queries in detached process</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/rdb-inability-to-execute-complex-queries-in-detached-process/m-p/5168714#M26422</link>
      <description>Willem,&lt;BR /&gt;&lt;BR /&gt;You can try to defined RDMS$RUJ, if I remember correctly it is needed for a detached process.&lt;BR /&gt;&lt;BR /&gt;JF</description>
      <pubDate>Wed, 08 Apr 2009 11:28:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/rdb-inability-to-execute-complex-queries-in-detached-process/m-p/5168714#M26422</guid>
      <dc:creator>Jean-François Piéronne</dc:creator>
      <dc:date>2009-04-08T11:28:02Z</dc:date>
    </item>
    <item>
      <title>Re: RdB; Inability to execute complex queries in detached process</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/rdb-inability-to-execute-complex-queries-in-detached-process/m-p/5168715#M26423</link>
      <description>SYS$SCRATCH is also used by Rdb for sortworks and temporary files.&lt;BR /&gt;&lt;BR /&gt;JF</description>
      <pubDate>Wed, 08 Apr 2009 11:31:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/rdb-inability-to-execute-complex-queries-in-detached-process/m-p/5168715#M26423</guid>
      <dc:creator>Jean-François Piéronne</dc:creator>
      <dc:date>2009-04-08T11:31:58Z</dc:date>
    </item>
    <item>
      <title>Re: RdB; Inability to execute complex queries in detached process</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/rdb-inability-to-execute-complex-queries-in-detached-process/m-p/5168716#M26424</link>
      <description>Willem,&lt;BR /&gt;&lt;BR /&gt;if this is reproducable, you may want to try the LNM$SDA SDA extension to trace logical name usage to find out, which logical name may be involved.&lt;BR /&gt;&lt;BR /&gt;$ ANAL/SYS&lt;BR /&gt;SDA&amp;gt; LNM ! for help&lt;BR /&gt;&lt;BR /&gt;Volker.</description>
      <pubDate>Wed, 08 Apr 2009 11:58:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/rdb-inability-to-execute-complex-queries-in-detached-process/m-p/5168716#M26424</guid>
      <dc:creator>Volker Halle</dc:creator>
      <dc:date>2009-04-08T11:58:20Z</dc:date>
    </item>
    <item>
      <title>Re: RdB; Inability to execute complex queries in detached process</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/rdb-inability-to-execute-complex-queries-in-detached-process/m-p/5168717#M26425</link>
      <description>&amp;gt;&amp;gt;&amp;gt; run/uic=(UIC of remote_user)/INPUT=(command&lt;BR /&gt;procedure)/OUTPUT=(output-spec) sys$system:loginout&lt;BR /&gt;&lt;BR /&gt;Others have pointed to the logical names for the RUJ and potentially for the scratch area and such.   You can get SYS$SCRATCH and SYS$LOGIN and such defined with the /AUTHORIZE qualifier.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://labs.hoffmanlabs.com/node/318" target="_blank"&gt;http://labs.hoffmanlabs.com/node/318&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;And a second rule of thumb here: Anytime you have the option of specifying a process quota list, specify the full list.&lt;BR /&gt;&lt;BR /&gt;Personally, I'd probably avoid the whole construct here, and toss the (vetted!) command over to a pool of locally-written servers waiting to perform the specified commands.  Database connection times have dropped significantly over the years, but this sequence is still a comparatively heavyweight sequence for processing commands.&lt;BR /&gt;&lt;BR /&gt;I'll presume you're familiar with SQL injection, too.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 08 Apr 2009 12:37:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/rdb-inability-to-execute-complex-queries-in-detached-process/m-p/5168717#M26425</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2009-04-08T12:37:59Z</dc:date>
    </item>
    <item>
      <title>Re: RdB; Inability to execute complex queries in detached process</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/rdb-inability-to-execute-complex-queries-in-detached-process/m-p/5168718#M26426</link>
      <description>JFP:&lt;BR /&gt;We found SYS$SCRATCH already, and have that defined. But it didn't help much. RDMS$RUJ seems not a requirement; the process where the query succeeds doesn't have it defined. But it might be an idea to put it in as well.&lt;BR /&gt;VH: good idea - if this can be checked that way&lt;BR /&gt;SH: You're right on the quota list - but that is not the problem here (or RdB would give the wrong value). What on login procedures: are they executed when specified RUN/UIC in DCL? I think so, since quite a lot of logicals setup in the login sequence are actully defined (well, I didn't see SYS$SCRATCH, but that isn't defined in my interactive process either).&lt;BR /&gt;Oh: SQL injection: not an issue here, because part of the executable is checking the validity of the SQL. Plus: it's a closed environment :)</description>
      <pubDate>Wed, 08 Apr 2009 13:11:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/rdb-inability-to-execute-complex-queries-in-detached-process/m-p/5168718#M26426</guid>
      <dc:creator>Willem Grooters</dc:creator>
      <dc:date>2009-04-08T13:11:33Z</dc:date>
    </item>
    <item>
      <title>Re: RdB; Inability to execute complex queries in detached process</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/rdb-inability-to-execute-complex-queries-in-detached-process/m-p/5168719#M26427</link>
      <description>Check around for any of the Rdb logs and dumps, and ensure that SYS$LOGIN, SYS$LOGIN_DEVICE, and SYS$SCRATCH are present (which is what /AUTHORIZE gets you), and ensure the RDMS$RUJ logical name and directory is present.&lt;BR /&gt;&lt;BR /&gt;I'm loathe to use the /UIC and SET UIC knobs in general, as wacky things can happen; the old RSX-style UIC slam just doesn't map fully into the OpenVMS environment.&lt;BR /&gt;&lt;BR /&gt;And I found that specifying the process quotas (and big enough) got rid of a very large percentage of the Rdb weirdness and database corruptions and crashes and hangs I'd been tussling with.  YMMV, of course.</description>
      <pubDate>Wed, 08 Apr 2009 14:08:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/rdb-inability-to-execute-complex-queries-in-detached-process/m-p/5168719#M26427</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2009-04-08T14:08:34Z</dc:date>
    </item>
    <item>
      <title>Re: RdB; Inability to execute complex queries in detached process</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/rdb-inability-to-execute-complex-queries-in-detached-process/m-p/5168720#M26428</link>
      <description>If I recall correctly SYLOGIN doesn't get executed when RUN/DETACH is used (just in case there is any RDB setup calls in there).&lt;BR /&gt;&lt;BR /&gt;Craig</description>
      <pubDate>Wed, 08 Apr 2009 14:43:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/rdb-inability-to-execute-complex-queries-in-detached-process/m-p/5168720#M26428</guid>
      <dc:creator>Craig A</dc:creator>
      <dc:date>2009-04-08T14:43:57Z</dc:date>
    </item>
    <item>
      <title>Re: RdB; Inability to execute complex queries in detached process</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/rdb-inability-to-execute-complex-queries-in-detached-process/m-p/5168721#M26429</link>
      <description>Willem,&lt;BR /&gt;&lt;BR /&gt;  How many times does this need to be stated in public fora?&lt;BR /&gt;&lt;BR /&gt; $ RUN/UIC=some-random-UIC &lt;ANYTHING&gt;&lt;BR /&gt;&lt;BR /&gt;DOES NOT do what you think it does. &lt;BR /&gt;You get a detached process with YOUR username, and a DIFFERENT UIC. This construct doesn't make much sense on OpenVMS, leads to all manner of odd behaviours and should be avoided. Logical names don't line up properly, rights lists are wrong, etc... It's not worth trying to "fix" all the potential issues when there are supported means for achieving what you want.&lt;BR /&gt;&lt;BR /&gt;You seem to know that, so why don't you suspect that is the cause of this problem?&lt;BR /&gt;&lt;BR /&gt;&amp;gt;However, if this user runs the very same &lt;BR /&gt;&amp;gt;query interactively, nothing is wrong. &lt;BR /&gt;&lt;BR /&gt;  Most likely because when they run it interactively they ARE that user. When run with your RUN/UIC command THEY ARE NOT!&lt;BR /&gt;&lt;BR /&gt;  If you want a detached process running under a different USERNAME from the issuing process, the simplest supported means to achieving it is to encapsulate your RUN/DETACHED command in a command procedure (WITHOUT "/UIC=") and "SUBMIT/USER=username" that procedure.&lt;BR /&gt;&lt;BR /&gt;You then get a brief batch job running CORRECTLY as your target user, which then starts the detached process CORRECTLY.&lt;BR /&gt;&lt;BR /&gt;Please try your test using RUN/USER.&lt;/ANYTHING&gt;</description>
      <pubDate>Wed, 08 Apr 2009 21:11:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/rdb-inability-to-execute-complex-queries-in-detached-process/m-p/5168721#M26429</guid>
      <dc:creator>John Gillings</dc:creator>
      <dc:date>2009-04-08T21:11:40Z</dc:date>
    </item>
    <item>
      <title>Re: RdB; Inability to execute complex queries in detached process</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/rdb-inability-to-execute-complex-queries-in-detached-process/m-p/5168722#M26430</link>
      <description>&amp;gt;If you want a detached process running under a different USERNAME from the issuing process, the simplest supported means to achieving it is to encapsulate your RUN/DETACHED command in a command procedure (WITHOUT "/UIC=") and "SUBMIT/USER=username" that procedure.&lt;BR /&gt;&lt;BR /&gt;The approach I've used (also fully documented and supported) is an application image that uses the persona system services to assume my way over to the target user context, launch the new process, and then use the persona call to revert. &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 08 Apr 2009 21:55:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/rdb-inability-to-execute-complex-queries-in-detached-process/m-p/5168722#M26430</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2009-04-08T21:55:33Z</dc:date>
    </item>
    <item>
      <title>Re: RdB; Inability to execute complex queries in detached process</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/rdb-inability-to-execute-complex-queries-in-detached-process/m-p/5168723#M26431</link>
      <description>Hi John,&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;BR /&gt;If you want a detached process running under a different USERNAME from the issuing process, &lt;BR /&gt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&lt;BR /&gt;&lt;BR /&gt;I don't think he does; I think Willem is just one of many trying to implement a very poor-man's server. &lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;BR /&gt;the simplest supported means to achieving it is to encapsulate your RUN/DETACHED command in a command procedure (WITHOUT "/UIC=") and "SUBMIT/USER=username" that procedure.&lt;BR /&gt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&lt;BR /&gt;&lt;BR /&gt;Perhaps the simplest but yet another poor choice that has been discussed many times. Poor in performance, o/head, error-handling, and functionality. Why not go crazy and actually write a little program? I know it's not scripting and no one does it anymore but just $persona_assume and the $creprc and off you go. VMSNOTES circa 6.2 15 years ago?&lt;BR /&gt;&lt;BR /&gt;But let me go out on a limb here and suggest that what Willem really wants is to have a setup where he has transparent multi-threading and an active pool of VMS processes serving a far greater number of clients yet have the servers "become" the client whilst performing work on their behalf?&lt;BR /&gt;&lt;BR /&gt;Look for t3$persona_assume in the attached file. And all with *not one* additional VMS privilege required for the server process!&lt;BR /&gt;&lt;BR /&gt;Of course what goes hand in hand with VMS personae is the very useful rdb "session authorization" functionality as in: -&lt;BR /&gt;&lt;BR /&gt;SQL&amp;gt; set session authorization persona :ws_integer&lt;BR /&gt;&lt;BR /&gt;The problem unfortunately is that Rdb engineering (or at least one person in Rdb engineering) refuses to add the "persona" syntax and demands that you lug around VMS passwords *in the clear*.! A real shame :-(&lt;BR /&gt;&lt;BR /&gt;Cheers Richard Maher</description>
      <pubDate>Wed, 08 Apr 2009 22:14:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/rdb-inability-to-execute-complex-queries-in-detached-process/m-p/5168723#M26431</guid>
      <dc:creator>Richard J Maher</dc:creator>
      <dc:date>2009-04-08T22:14:49Z</dc:date>
    </item>
    <item>
      <title>Re: RdB; Inability to execute complex queries in detached process</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/rdb-inability-to-execute-complex-queries-in-detached-process/m-p/5168724#M26432</link>
      <description>Consider it known that this solution isn't the brightest one. But I was called in too late to change matters. I just have to work around it. Sorry guys, but these things happen ;)&lt;BR /&gt;&lt;BR /&gt;The problem is not that queries are not executed. They are - for ANY user. Just those that contained subqueries failed - depending on the size of the dataset. Simple as that.&lt;BR /&gt;&lt;BR /&gt;The matter is: why.&lt;BR /&gt;&lt;BR /&gt;Crossposting does have advantages. See the solution found.&lt;BR /&gt;</description>
      <pubDate>Fri, 10 Apr 2009 17:23:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/rdb-inability-to-execute-complex-queries-in-detached-process/m-p/5168724#M26432</guid>
      <dc:creator>Willem Grooters</dc:creator>
      <dc:date>2009-04-10T17:23:57Z</dc:date>
    </item>
    <item>
      <title>Re: RdB; Inability to execute complex queries in detached process</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/rdb-inability-to-execute-complex-queries-in-detached-process/m-p/5168725#M26433</link>
      <description>Since teh problem happened on complex queries, thoughts were a lack of workspace. Since the program runs in a detached process, SYS$LOGIN, SYS$LOGIN_DEVICE, and SYS$SCRATCH are not defined. RDMS$RUJ seemed not needed (it's read-only).&lt;BR /&gt;&lt;BR /&gt;Adding:&lt;BR /&gt;&lt;BR /&gt;$ define/nolog sortfile0 &lt;TEMPDIR&gt;&lt;BR /&gt;$ define/nolog sortfile1 &lt;TEMPDIR&gt;&lt;BR /&gt;$ define/nolog sortfile2 &lt;TEMPDIR&gt;&lt;BR /&gt;...&lt;BR /&gt;$ define/nolog rdms$bind_work_file &lt;HIGHEST number=""&gt;&lt;BR /&gt;&lt;BR /&gt;before running the executable, as suggested on Oracle Metalink, solved the issue.&lt;/HIGHEST&gt;&lt;/TEMPDIR&gt;&lt;/TEMPDIR&gt;&lt;/TEMPDIR&gt;</description>
      <pubDate>Fri, 10 Apr 2009 17:29:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/rdb-inability-to-execute-complex-queries-in-detached-process/m-p/5168725#M26433</guid>
      <dc:creator>Willem Grooters</dc:creator>
      <dc:date>2009-04-10T17:29:42Z</dc:date>
    </item>
  </channel>
</rss>

