.ora-code.com

Links
Home
Oracle DBA Forum
Frequent Oracle Errors
TNS:could not resolve the connect identifier specified
Backtrace message unwound by exceptions
invalid identifier
PL/SQL compilation error
internal error
missing expression
table or view does not exist
end-of-file on communication channel
TNS:listener unknown in connect descriptor
insufficient privileges
PL/SQL: numeric or value error string
TNS:protocol adapter error
ORACLE not available
target host or object does not exist
invalid number
unable to allocate string bytes of shared memory
resource busy and acquire with NOWAIT specified
error occurred at recursive SQL level string
ORACLE initialization or shutdown in progress
archiver error. Connect internal only, until freed
snapshot too old
unable to extend temp segment by string in tablespace
Credential retrieval failed
missing or invalid option
invalid username/password; logon denied
unable to create INITIAL extent for segment
out of process memory when trying to allocate string bytes
shared memory realm does not exist
cannot insert NULL
TNS:unable to connect to destination
remote database not found'>ora-02019
exception encountered: core dump
inconsistent datatypes
no data found
TNS:operation timed out
PL/SQL: could not find program
existing state of packages has been discarded
maximum number of processes exceeded
error signaled in parallel query server
ORACLE instance terminated. Disconnection forced
TNS:packet writer failure
see ORA-12699
missing right parenthesis
name is already used by an existing object
cannot identify/lock data file
invalid file operation
quoted string not properly terminated
ksh select value into variable from v$ view

ksh select value into variable from v$ view

2005-07-24       - By Radoulov, Dimitre
Reply:     1     2     3     4     5     6     7     8     9     10  

It seems that you cannot comunicate with the Oracle instance via ipc on
uwin(I don't know what it is:)),
try it via OracleNet:

sqlplus system/manager@(protected)



HTH
Dimitre Radoulov



-- -- Original Message -- --
From: "Ram K" <lambu999@(protected)>
To: "Radoulov, Dimitre" <cichomitiko@(protected)>
Cc: "oracle-l" <oracle-l@(protected)>
Sent: Sunday, July 24, 2005 6:52 PM
Subject: Re: ksh select value into variable from v$ view


Thank you.

I have installed both uwin and cygwin at my home machine on WIndows.

I am able to log into Sql plus from cygwin, while trying to log into
sqlplus from uwin generates the following error:

-- ---- ---- ---- ---- ---- ---- ---- ---- ---
SQL*Plus: Release 9.2.0.1.0 - Production on Sun Jul 24 12:44:32 2005

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

Enter user-name: system
Enter password:
ERROR:
ORA-12560 (See ORA-12560.ora-code.com): TNS:protocol adapter error
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -----

I tried modifying the path ( adding most of the path in cygwin), set
$ORACLE_SID in ksh and so on, but still same problem.

The thing is ksh is able to see Oracle running:

  -- ---- ---- ---- ---- ------
$ ps -ef | grep ora

 daemon  54912   7040 03:14:38 ?            0
d:\oracle\ora92\bin\ORACLE.EXE PRO9IGP
   root   9984  25856 12:43:09 ?            0
"D:\oracle\ora92\bin\sqlplusw.exe"    <---- Windows sqlplus
   root  52736   9346 12:53:38 tty10        0 grep ora
 -- ---- ---- ---- ---- ---- ---- -----



=============================

On 7/24/05, Radoulov, Dimitre <cichomitiko@(protected)> wrote:
> Yes.
> here is an example for both of them:
>
> $ func () {
> sqlplus -s  '/ as sysdba' << !
> set echo off feed off head off time off timing off
> $stmt
> exit
>  !
> }
> export stmt="select sysdate from dual;"
> $ func | tail -1| while read var; do export VAR=$var;echo $VAR; done
> 24-JUL-05
>
>
> Regards
> Dimitre Radoulov
>
>
>
> -- -- Original Message -- --
> From: "Ram K" <lambu999@(protected)>
> Cc: "oracle-l" <oracle-l@(protected)>
> Sent: Sunday, July 24, 2005 11:29 AM
> Subject: Re: ksh select value into variable from v$ view
>
>
> > Hi all,
> >
> >   Trying to learn.
> >
> >   1) Is it possible to pass a variable (or more than one) to the SQL
> > from shell script.
> >
> >   2)  Is it possible to return more than one value from the SQL to the
> > script?
> >
> > Thanks,
> > Ram.
> >
> >        -- ------
> >
> > On 7/22/05, Barbara Baker <barb.baker@(protected)> wrote:
> >> Solaris 9  Oracle 9.2.0.4
> >> Hi!  I'm trying to grab a process id from the database and store it in
> >> a variable.  This syntax works if I'm not using a v$ view.  If I use a
> >> v$ view, it ignores what's after the $.  I've tried v\$ and v_\$ , but
> >> neither work.
> >>
> >> Any ideas?
> >> Thanks!
> >>
> >> SCRIPT:
> >>
> >> #!/bin/ksh
> >> set -xv
> >>        VALUE=`sqlplus -s scott/tiger <<END
> >>        set pagesize 0 feedback off verify off heading off echo off
> >> trimspool on
> >>        col timecol new_value timestamp noprint
> >>        select to_char(sysdate,'.MMDDYY') timecol from dual;
> >>        spool persist&timestamp
> >>        select process from v\$process p, v\$session s
> >>        where p.addr=s.paddr
> >>        and s.username='PERSIST';
> >>        spool off;
> >>        exit;
> >>        END`
> >>        if [ -z "$VALUE" ]; then
> >>          echo "No rows returned from database"
> >>          exit 0
> >>        else
> >>          echo $VALUE
> >>        fi
> >>
> >>
> >> WHEN I RUN IT:
> >>
> >>        ENDVALUE=
> >>        select process from v p, v s
> >>                                 *
> >> ERROR at line 1:
> >> ORA-00942 (See ORA-00942.ora-code.com): table or view does not exist
> >>        if [ -z "$VALUE" ]; then
> >>
> >>
> >> THIS WORKS:
> >>
> >> select max(adno) from ad;
> >> spool off;
> >>        exit;
> >>        END`
> >> + + sqlplus -s scott/tiger
> >> + 0< /tmp/sh3845.2
> >> VALUE=
> >>   6687530
> >> --
> >> http://www.freelists.org/webpage/oracle-l
> >>
> >
> > --
> > Thanks,
> > Ram.
> > --
> > http://www.freelists.org/webpage/oracle-l
>
>


--
Thanks,
Ram.

--
http://www.freelists.org/webpage/oracle-l