hello
how to run shell script to excute oracle queries on remote db ?
i have tried as following
sqlplus -s user/password@remote_server "select query;"
but not working
also this one
sqlplus -s user/password@remote_server `select query;`
not working :(
i add this line to run another... (4 Replies)
Hi,
I have a requirement as below which needs to be done viz UNIX shell script
(1) I have to connect to an Oracle database
(2) Exexute "SELECT field_status from table 1" query on one of the tables.
(3) Based on the result that I get from point (2), I have to update another table in the... (6 Replies)
Hello,
If I run this command on the server it works.
# dbc "update config set radio_enabled = 0;"
how can I execute the same command in perl. I have defined the dbc path. Can any one please correct the last line.
#!/usr/bin/perl
#database path
$dbc='/opt/bin/psql -Userver... (0 Replies)
I need to run sql script from shell script which takes the input from a file and contents of file will be like :
12345
34567
78657
and query will be like :
select seq_nbr from bus_event where event_nbr='12345';
select seq_nbr from bus_event where event_nbr='34567';
select seq_nbr... (1 Reply)
Hi,
I need to query Oracle database for 100 users. I have these 100 users in a file. I need a shell script which would read this User file (one user at a time) & query database.
For instance:
USER CITY
--------- ----------
A CITY_A
B CITY_B
C ... (2 Replies)
I've been sent the following script to finish. It's supposed to connect to an oracle database, query it, and send an email if the query result value is one or more. Currently it isn't connecting properly, just giving the following error:
ERROR: ORA-01017: invalid username/password; logon denied... (2 Replies)
Hi, this's Pom. I'm quite a new one for shell script but I have to do sql on shell script to query some information from database.
I found a concern to get a new line...When I run my script, it retrieves all data as wondering but it's shown in one line :(
What should I do? I'm not sure that... (2 Replies)
Hi,
I have a query regarding execution of a sql query having long listing of parameters ..I need to execute this query inside a shell script.
The scenario is like....
Suppose I have a file abc.txt that has the card numbers..it could be in thousands..
then I need to fire a query like
... (12 Replies)
I want to run sql query in shell script and output data save as delimited text (delimited text would be comma)
Code:
SPOOL_FILE=/pgedw/dan.txt
SQL=/pgedw/dan.sql
sqlplus -s username/password@myhost:port/servicename <<EOF
set head on
set COLSEP ,
set linesize 32767
SET TRIMSPOOL ON
SET... (8 Replies)
Discussion started by: Jaganjag
8 Replies
LEARN ABOUT NETBSD
cnpollc
CONS(9) BSD Kernel Developer's Manual CONS(9)NAME
cnbell, cnflush, cngetc, cngetsn, cnhalt, cnpollc, cnputc -- console access interface
SYNOPSIS
#include <dev/cons.h>
void
cnbell(u_int pitch, u_int period, u_int volume);
void
cnflush(void);
int
cngetc(void);
int
cngetsn(char *cp, int size);
void
cnhalt(void);
void
cnpollc(int on);
void
cnputc(int c);
DESCRIPTION
These functions operate over the current console device. The console must be initialized before these functions can be used.
Console input polling functions cngetc(), cngetsn() and cnpollc() are only to be used during initial system boot, e.g., when asking for root
and dump device or to get necessary user input within mountroothooks. Once the system boots, user input is read via standard tty(4) facili-
ties.
The following is a brief description of each function:
cnbell() Ring a bell at appropriate pitch, for duration of period milliseconds at given volume. Note that the volume value is ignored com-
monly.
cnflush() Waits for all pending output to finish.
cngetc() Poll (busy wait) for an input and return the input key. Returns 0 if there is no console input device. cnpollc() must be called
before cngetc() could be used. cngetc() should be used during kernel startup only.
cngetsn() Read one line of user input, stop reading once the newline key is input. Input is echoed back. This uses cnpollc() and cngetc().
Number of read characters is size at maximum, user is notified by console bell when the end of input buffer is reached.
<Backspace> key works as expected. <@> or <CTRL>-u make cngetsn() discard input read so far, print newline and wait for next
input. cngetsn() returns number of characters actually read, excluding the final newline. cp is not zero-ended before return.
cngetsn() should be used during kernel startup only.
cnhalt() Terminates the console device (i.e. cleanly shuts down the console hardware.)
cnpollc() Switch the console driver to polling mode if on is nonzero, or back to interrupt driven mode if on is zero. cnpollc() should be
used during kernel startup only.
cnputc() Console kernel output character routine. Commonly, kernel code uses printf(9) rather than using this low-level interface.
EXAMPLES
This waits until a <Enter> key is pressed:
int c;
cnpollc(1);
for(;;) {
c = cngetc();
if ((c == '
' || (c == '
')) {
printf("
");
break;
}
}
cnpollc(0);
SEE ALSO pckbd(4), pcppi(4), tty(4), wscons(4), wskbd(4), printf(9), spl(9), wscons(9)BSD June 8, 2010 BSD