From: just_real on
Hi

I was trying to set up a test job in Enterprise manager and I got this
error when it tried running the script.

I've created the script on a RAC cluster . It contains the following:

#!/bin/ksh

.. /oracle/.kshrc

env >> /tmp/t.txt
which sqlplus >> /tmp/t.txt

sqlplus scott/abc(a)ORACLE123<<-!
set serveroutput on size 1000000
select 'Hello World' from dual
/
!

I've ran this successfully via the command line. Could someone advise
as to what I am missing or did wrong?

I had a look at metalink and check the points given there but I seem
to have them covered.

Regards

Justin
From: ddf on
On Dec 14, 10:41 pm, just_real <jth...(a)gmail.com> wrote:
> Hi
>
> I was trying to set up a test job in Enterprise manager and I got this
> error when it tried running the script.
>
> I've created the script on a RAC cluster . It contains the following:
>
> #!/bin/ksh
>
> . /oracle/.kshrc
>
> env >> /tmp/t.txt
> which sqlplus >> /tmp/t.txt
>
> sqlplus scott/abc(a)ORACLE123<<-!
> set serveroutput on size 1000000
> select 'Hello World' from dual
> /
> !
>
> I've ran this successfully via the command line. Could someone advise
> as to what I am missing or did wrong?
>
> I had a look at metalink and check the points given there but I seem
> to have them covered.
>
> Regards
>
> Justin

Which O/S user created the script? Which O/S users can actually
execute this script?


David Fitzjarrell
From: just_real on
On Dec 16, 12:32 am, ddf <orat...(a)msn.com> wrote:
> On Dec 14, 10:41 pm, just_real <jth...(a)gmail.com> wrote:
>
>
>
> > Hi
>
> > I was trying to set up a test job in Enterprise manager and I got this
> > error when it tried running the script.
>
> > I've created the script on a RAC cluster . It contains the following:
>
> > #!/bin/ksh
>
> > . /oracle/.kshrc
>
> > env >> /tmp/t.txt
> > which sqlplus >> /tmp/t.txt
>
> > sqlplus scott/abc(a)ORACLE123<<-!
> > set serveroutput on size 1000000
> > select 'Hello World' from dual
> > /
> > !
>
> > I've ran this successfully via the command line. Could someone advise
> > as to what I am missing or did wrong?
>
> > I had a look at metalink and check the points given there but I seem
> > to have them covered.
>
> > Regards
>
> > Justin
>
> Which O/S user created the script?  Which O/S users can actually
> execute this script?
>
> David Fitzjarrell

Hi David

I am little raw to this. When you say which O/S user created the
script - how would I go about finding that out? How do I go about
finding out which O/S users can actually execute this script?

When I do an ls -l on the command line - rwx is the first set of three
letters shown. Not sure if that's what you were asking.
From: just_real on
On Dec 16, 12:32 am, ddf <orat...(a)msn.com> wrote:
> On Dec 14, 10:41 pm, just_real <jth...(a)gmail.com> wrote:
>
>
>
> > Hi
>
> > I was trying to set up a test job in Enterprise manager and I got this
> > error when it tried running the script.
>
> > I've created the script on a RAC cluster . It contains the following:
>
> > #!/bin/ksh
>
> > . /oracle/.kshrc
>
> > env >> /tmp/t.txt
> > which sqlplus >> /tmp/t.txt
>
> > sqlplus scott/abc(a)ORACLE123<<-!
> > set serveroutput on size 1000000
> > select 'Hello World' from dual
> > /
> > !
>
> > I've ran this successfully via the command line. Could someone advise
> > as to what I am missing or did wrong?
>
> > I had a look at metalink and check the points given there but I seem
> > to have them covered.
>
> > Regards
>
> > Justin
>
> Which O/S user created the script?  Which O/S users can actually
> execute this script?
>
> David Fitzjarrell

Hi David

Thanks for the reply. I am still new to this. How would I go about
finding out Which O/S user created the script? Which O/S users can
actually
execute this script?

When executing ls -l at the command line, the first set of three
letters for the script was rwx. Not sure if this was what you were
after?


From: ddf on
On Dec 15, 5:40 pm, just_real <jth...(a)gmail.com> wrote:
> On Dec 16, 12:32 am, ddf <orat...(a)msn.com> wrote:
>
>
>
>
>
> > On Dec 14, 10:41 pm, just_real <jth...(a)gmail.com> wrote:
>
> > > Hi
>
> > > I was trying to set up a test job in Enterprise manager and I got this
> > > error when it tried running the script.
>
> > > I've created the script on a RAC cluster . It contains the following:
>
> > > #!/bin/ksh
>
> > > . /oracle/.kshrc
>
> > > env >> /tmp/t.txt
> > > which sqlplus >> /tmp/t.txt
>
> > > sqlplus scott/abc(a)ORACLE123<<-!
> > > set serveroutput on size 1000000
> > > select 'Hello World' from dual
> > > /
> > > !
>
> > > I've ran this successfully via the command line. Could someone advise
> > > as to what I am missing or did wrong?
>
> > > I had a look at metalink and check the points given there but I seem
> > > to have them covered.
>
> > > Regards
>
> > > Justin
>
> > Which O/S user created the script?  Which O/S users can actually
> > execute this script?
>
> > David Fitzjarrell
>
> Hi David
>
> Thanks for the reply. I am still new to this. How would I go about
> finding out Which O/S user created the script?  Which O/S users can
> actually
> execute this script?
>
> When executing ls -l at the command line, the first set of three
> letters for the script was rwx. Not sure if this was what you were
> after?- Hide quoted text -
>
> - Show quoted text -

No, I'm 'after' the owner and group for that script, as well as the
permissions for anyone other than the owner. The example below
describes how an ls -l record is arranged and which information I
requested:

o g w owner group
v v v v v
-rwx------ 1 oracle dba 685 Nov 19 06:17
get_version_all.sh

There are 10 characters in the first string, a 'special' character to
indicate things like named pipes, directories, special files, etc.
and, most commonly, three sets of 'rwx' or placeholders. The example
above lists that the OWNER has full rights to the script; the group
and the rest of the world have no rights whatsoever. Other
combinations might be:

-rw-rw-rw- 1 oracle dba 685 Nov 19 06:17
get_version_all.sh

giving the owner, group and rest of the 'world' read and write
permissions, but no execute privilege. Yet another possibility is:

-rwxr-xr-x 1 oracle dba 685 Nov 19 06:17
get_version_all.sh

giving the owner full privileges, and the group and world read and
execute, but no write privilege. It appears that someone other than
'oracle' wrote this script of yours and the permissions mask is set to
750, which translates to:

-rwxr-x--- 1 nackle dorf 685 Nov 27 16:39
grompenflommetz.sh

so the owner has full rights to read, write and execute the script,
the group has rights to read and execute the script and the rest of
the world can't do anything with it at all. In this situation
'oracle' is part of the 'rest of the world' and is left out in the
cold, so to speak. This could cause the 'permission denied' error you
are experiencing. Of course no one will know that until you can post
the information I've requested.


David Fitzjarrell