<?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: Can a sql command be assigned a nice value? in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/can-a-sql-command-be-assigned-a-nice-value/m-p/3510836#M218239</link>
    <description>&lt;BR /&gt;Are you going through tnsnames / the listener or connecting directly and locally? The oracle slaves will inheret the listener attributes.&lt;BR /&gt;&lt;BR /&gt;If I need to renice (or nasty) Oracle slaves, then I tend to need a quick sql script to run over v$sessions and/or v$process&lt;BR /&gt;&lt;BR /&gt;Hien.&lt;BR /&gt;</description>
    <pubDate>Wed, 23 Mar 2005 16:36:52 GMT</pubDate>
    <dc:creator>Hein van den Heuvel</dc:creator>
    <dc:date>2005-03-23T16:36:52Z</dc:date>
    <item>
      <title>Can a sql command be assigned a nice value?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-a-sql-command-be-assigned-a-nice-value/m-p/3510834#M218237</link>
      <description>just wondering...&lt;BR /&gt;&lt;BR /&gt;if a script runs an sql script, does the nice value get passed on to the child process?</description>
      <pubDate>Wed, 23 Mar 2005 16:24:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-a-sql-command-be-assigned-a-nice-value/m-p/3510834#M218237</guid>
      <dc:creator>Joe Robinson_2</dc:creator>
      <dc:date>2005-03-23T16:24:52Z</dc:date>
    </item>
    <item>
      <title>Re: Can a sql command be assigned a nice value?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-a-sql-command-be-assigned-a-nice-value/m-p/3510835#M218238</link>
      <description>This is taken from the nice manpage:&lt;BR /&gt;&lt;BR /&gt;Normally, all processes inherit the system nice value of their parent process when they are spawned. The shell (sh, csh, ksh, etc.) can create a child process with a different priority from the current shell process by spawning the child process via the nice command.&lt;BR /&gt;&lt;BR /&gt;See man nice for more details.&lt;BR /&gt;&lt;BR /&gt;Jim</description>
      <pubDate>Wed, 23 Mar 2005 16:28:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-a-sql-command-be-assigned-a-nice-value/m-p/3510835#M218238</guid>
      <dc:creator>Jim Mallett</dc:creator>
      <dc:date>2005-03-23T16:28:06Z</dc:date>
    </item>
    <item>
      <title>Re: Can a sql command be assigned a nice value?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-a-sql-command-be-assigned-a-nice-value/m-p/3510836#M218239</link>
      <description>&lt;BR /&gt;Are you going through tnsnames / the listener or connecting directly and locally? The oracle slaves will inheret the listener attributes.&lt;BR /&gt;&lt;BR /&gt;If I need to renice (or nasty) Oracle slaves, then I tend to need a quick sql script to run over v$sessions and/or v$process&lt;BR /&gt;&lt;BR /&gt;Hien.&lt;BR /&gt;</description>
      <pubDate>Wed, 23 Mar 2005 16:36:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-a-sql-command-be-assigned-a-nice-value/m-p/3510836#M218239</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2005-03-23T16:36:52Z</dc:date>
    </item>
    <item>
      <title>Re: Can a sql command be assigned a nice value?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-a-sql-command-be-assigned-a-nice-value/m-p/3510837#M218240</link>
      <description>Joe, the oracle shadow process that's going to do all the work for you is the the thing that you'd like to renice (I think).  This gets its value from the tns listener.&lt;BR /&gt;&lt;BR /&gt;Kind of fishing through this list:&lt;BR /&gt;SELECT   vp.spid||' '||vs.sid||' '||vp.pid||' '||vs.username||' '||vs.osuser||' '||vs.machine ||' '|| vs.module||' '||vs.program||' '||vs.process||' '||vs.action&lt;BR /&gt;from FROM v$session vs, v$process vp&lt;BR /&gt;   WHERE vs.paddr = vp.addr(+)&lt;BR /&gt;&lt;BR /&gt;you can come up with a script that will suit your needs.&lt;BR /&gt;The following generates a list to a file that can be run from a unix looping script to renice things for a user connecting as oracle user 'JOER' from OS user  'jrobinson' --&lt;BR /&gt;if it's JOER and user jrobinson -it's reniced to 5, if it's JOER and anyone else, it's reniced to 7, otherwise in the default case it's niced to 9.  These numbers won't make sense for you - you'll have to look at what you want to do to set them properly.  In this example I used single digits b/c it allowed me to cram them on a single line on the screen hoping that they would display the same for the forum readers (it probably won't).&lt;BR /&gt;&lt;BR /&gt;There's another example for a ksmith in there, so you can see how to add more decodes as you need.&lt;BR /&gt;&lt;BR /&gt;set heading off;&lt;BR /&gt;set feedback off;&lt;BR /&gt;set pagesize 500;&lt;BR /&gt;set linesize 280;&lt;BR /&gt;spool reprioritize&lt;BR /&gt;&lt;BR /&gt;SELECT decode(nvl(p.spid,'x'),'x',' ','renice -n ')|| &lt;BR /&gt;decode ( nvl(p.spid,'x'),'x',' ',&lt;BR /&gt;decode ( s.username,&lt;BR /&gt;'JOER',decode(s.osuser,'jrobinson','5','7'),&lt;BR /&gt;'KSMT',decode(s.osuser,'ksmith','8','9'),&lt;BR /&gt;9)) &lt;BR /&gt;||' '||p.spid&lt;BR /&gt;&lt;BR /&gt;exit; &lt;BR /&gt;&lt;BR /&gt;This would create the file reprioritize.lst&lt;BR /&gt;do a chmod on it, and then you can run it to renice that process.  Since it's a renice command, you'd have to run the output file as root (use sudo command).&lt;BR /&gt;&lt;BR /&gt;You can/should of course use others of the columns I indicated in the first generic statment above to make your own rules.&lt;BR /&gt;</description>
      <pubDate>Wed, 23 Mar 2005 17:49:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-a-sql-command-be-assigned-a-nice-value/m-p/3510837#M218240</guid>
      <dc:creator>TwoProc</dc:creator>
      <dc:date>2005-03-23T17:49:08Z</dc:date>
    </item>
  </channel>
</rss>

