Operating System - HP-UX
1833904 Members
1838 Online
110063 Solutions
New Discussion

Re: problrm running script

 
Cathy Arora
Frequent Advisor

problrm running script

Thanks all,
I already had changed the permissions
(apologize for incomplete info)
However i added the location of my script with in the script and still I get the same error
and script looks like this
name of the script whoami

cd /home/kchinsky/scripts
show user
select * from global_name
exit

I logon to sqlplus
user/pasword
@whoami
and I get
SP2-0310: unable to open file "whoami.sql"
any help is appreciated
raj
10 REPLIES 10
Mark Greene_1
Honored Contributor

Re: problrm running script

If I am reading what you wrote correctly, it appears that you need to rename the script from whoami to whoami.sql

mark
the future will be a lot like now, only later
Umapathy S
Honored Contributor

Re: problrm running script

By the way why are you naming a script on the lines of a unix command. It may confuse sometimes :-).

HTH,
Umapathy
Arise Awake and Stop NOT till the goal is Reached!
Jean-Luc Oudart
Honored Contributor

Re: problrm running script

If your file is not whoami.sql but whoami.xxx you can also call :
sqlplus user/ @whoami.xxx

if no ext. is given .sql is assumed, hence the error message.

Rgds,
JL
fiat lux
Michael Schulte zur Sur
Honored Contributor

Re: problrm running script

Hi Cathy,

why is there a unix command in the sql script? Otherwise the others are correct. Without extension .sql ia assumed.

greetings,

Michael
Alberto Ochoa
Advisor

Re: problrm running script

Cathy,

When in sqlplus, try running your script writing all the path (e.g. @/home/kchinsky/scripts/whoami.sql)
Also comment the cd /home/kchinsky/scripts line.

If you still have problems, if you have permissions, try running your script loging as oracle user and changing your scripts owner and group to match those of unix oracle user and try,just to be sure your script is running fine.

Alberto.
Learn-Share-Help, in any order.
Cathy Arora
Frequent Advisor

Re: problrm running script

HI all after a long break.
I took the unix code out of the script.
reason I had it to locate path for script but that was wrong. any how I tried to give a path as i was suggested but i still have a same error.
I did not quite undesrtand oracle user login etc.
I am logged on unix box with unix id/password, then I logged in sqlplus with oracle id and password.
and here I tried to run the script @/home/kchinsky/scripts/whoami.sql
and I have same error.
thanks again for your help.
any sugessions are welcome.
Regards,
raj
Cathy Arora
Frequent Advisor

Re: problrm running script

THnaks all. Problem fixed.
raj
Michael Schulte zur Sur
Honored Contributor

Re: problrm running script

Hi Cathy,

would you please be so kine to award some points for the ones, who helped to solve the problem?

thanks,

Michael
Michael Schulte zur Sur
Honored Contributor

Re: problrm running script

Hi Cathy,

would you please be so kine to award some points for the ones, who helped to solve the problem?

thanks,

Michael
Dave La Mar
Honored Contributor

Re: problrm running script

Cathy -
Forget the points. Could you post the solution?

Regards,
dl
"I'm not dumb. I just have a command of thoroughly useless information."