Hi ,
I want to pass parameters from a shell script to a sql script and use the parameter in the sql query ..and then I want to spool a particular select query on to my unix box... for 4 different locations by writing only one sql script
Right now no file is generated on the unix box...it is a... (2 Replies)
I have a script which connects to different database servers using sqlplus. Is there a way by which I can run a shell command on that host from sqlplus?
I know about 'host' command but it runs script on the local machine where the original script is running. Is there a way to run command on the... (9 Replies)
i'm having real problems retrieving the returncode of my sqlplus-call. I found a lot of informations on the net, but havn't been able to get it running so far, so now i ask for some help ;)
I do start the sqlplus out of my shell script with the parameters stored in the proc_clips.sql, which is... (6 Replies)
Can anybody help me out in sending parameters from sql*plus script to unix shell script without using flat files..
Initially in a shell script i will call sql*plus and after getting some value from some tables, i want that variable value in unix shell script. How can i do this?
Please tell me... (2 Replies)
Hi,
I am writing a script to test database connection. If the first try fails, it will wait for 1 minutes and then try again. The script is as following:
........
for i in $ORACLE_SID
do
$ORACLE_HOME/bin/sqlplus $username/$password@$i <<! >/dev/null
select * from tab;
exit
if ; then... (3 Replies)
Hi,
I need help urgently for following issue. Pls help me to resolve this issue.
I am calling sql script file(file1.sql) from UNIX Shell Script(script1.ksh) using sql plus and trying to create flat file that contains all records returned from SQL query in SQL script(file1.sql)
I given... (6 Replies)
Hi All,
How i will use sqlplus in shell script?
Can any one provide sample code which explain following:
1. Connect to oracle DB
2. Exceute select * from tablename
3. Release connection to the DB
4. Append output in file everytime when query executes.
Thanks in advance (1 Reply)
sql_rows=`sqlplus -s / <<EOF
set heading off
set pagesize 1000
set tab off
set linesize 120 wrap off
column "Path" format a15
--column "No_Of_files" format a10
select tablespace_name, substr(file_name,1,instr(file_name,'/',1,2)) as "Path" , count(*) as "No_Of_files" from dba_data_files
... (7 Replies)
Hi All,
Please let me know what i am missing in the following code (part of my script)
Schemas=(AWQM WFCONTROLLER PROVCO PRISM)
for s in "${Schemas}"
do
sch="${s}_$tol"
if || ;then
echo "This is AD or TD region"
sqlplus -s $sch/$tpwd@$ttns <<EOF... (7 Replies)
Discussion started by: pvmanikandan
7 Replies
LEARN ABOUT DEBIAN
mongo
MONGO(1) Mongo Database MONGO(1)NAME
mongo - the Mongo command-line tool
SYNOPSIS
mongo [OPTIONS] [DB_ADDRESS] [FILE+]
DESCRIPTION
mongo is a JavaScript shell (with GNU readline capabilities). It supports interactive and non-interactive use. When used interactively,
JavaScript can be used to query the database or perform any other function normally available with SpiderMonkey. Database output is dis-
played in JSON format.
If JavaScript files are specified on the command line, the shell will run non-interactively, running each one in sequence and then exiting.
EXAMPLES
mongo start the shell, connecting to the server at localhost:27017 and using the test database
mongo foo
start the shell using the foo database at localhost:27017
mongo 192.169.0.5/foo
start the shell using the foo database at 192.169.0.5:27017
mongo 192.169.0.5:9999/foo
start the shell using the foo database at 192.169.0.5:9999
mongo script1.js script2.js script3.js
run three scripts and exit
OPTIONS --shell
run the shell after executing files
--help show usage information
--host HOST
server to connect to (default HOST=localhost)
--port PORT
port to connect to (default PORT=27017)
--nodb do not connect to mongod
--eval SCRIPT
evaluate JavaScript
-u USERNAME
specify user to log in as
-pPASSWORD
specify password of user (notice there is no space)
COPYRIGHT
Copyright 2007-2009 10gen
SEE ALSO
For more information, please refer to the MongoDB wiki, available at http://www.mongodb.org.
AUTHOR
Kristina Chodorow
10gen June 2009 MONGO(1)