Sponsored Content
Operating Systems Linux Red Hat Sql query through shell script Post 302804827 by vidyadhar85 on Thursday 9th of May 2013 08:25:47 AM
Old 05-09-2013
You cant use val_1 before it gets populated thats why its not working..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Executing a SQL query from a shell script

I cannot figure out how to run a SQL script, or just a sqlplus query, from a shell script (bash or ksh). Basically, I need to su - oracle from root and run a query, then test the exit status. (3 Replies)
Discussion started by: 98_1LE
3 Replies

2. UNIX for Advanced & Expert Users

Connecting DB in the Shell Script to do SQL Query

Any link or example to write shell script for the Connecting Oracle for Quering through SQL thanks in advance ... Cheers !! Mehul Doshi (3 Replies)
Discussion started by: mehuldoshi
3 Replies

3. Shell Programming and Scripting

Executing Sql Query Using Shell Script

HI ALL i have a requirement like this. i have to write a shell script to run a sql query. DB is oracle. once the query is run, the results of the query has to be published in a data file. can you please advice me how to go about it. i am absolutely new to shell scripts and this is a part of my job. (14 Replies)
Discussion started by: ragha81
14 Replies

4. Shell Programming and Scripting

executing a SQL query in shell script

Hi ALL, I need an help in connecting to oracle database, executing a select query and printing it on the screen. Can any one please write a simple code or psuedo code and let me know. select query returns multiple values( say select name from emp) Thanks in advance LM (1 Reply)
Discussion started by: lijju.mathew
1 Replies

5. Shell Programming and Scripting

query sql using shell script

query sql using shell script, is it possible? my friend told me to do a file.sql and link to my shell script, but can i query sql using shell script? thanks in advance! (2 Replies)
Discussion started by: kingpeejay
2 Replies

6. UNIX for Dummies Questions & Answers

Regarding executing sql query in shell script

Hi, I have one SQL file prepared in UNIX and one script that is executing that. In SQL i have Update and create queries. I want to introduce conditions in SQL file (in UNIX) that if either of the create or update query failes whole transaction should be rollback. I just have 1 create... (2 Replies)
Discussion started by: abhii
2 Replies

7. Shell Programming and Scripting

Convert the SQL Query in Shell Script

Hi All, I have a query with output below select 'create synonym "'||TABLE_NAME||'" for '||Table_owner||'."'||table_name||'"'||chr(59) from user_synonyms; ================== create synonym "RV_SBC_SIG" for WFCONTROLLER_TE."RV_SBC_SIG"; create synonym "AQM_TASK" for AWQM_TE."AQM_TASK";... (2 Replies)
Discussion started by: pvmanikandan
2 Replies

8. Shell Programming and Scripting

How to embed sql query into our shell script?

Hi I would like to embed a sql query in my shell script. Also, before any the sql query is executed, i would like to validate username and password. (1 Reply)
Discussion started by: arghadeep adity
1 Replies

9. Shell Programming and Scripting

How do I read sql query into shell script?

Hello All, I'm trying to put together a shell script that will: 1. connect to an oracle database 2. execute a query 3. save the output to a csv file I know that I can execute the sqlplus -s user/pass @dbsid and get logged in. What I would like to do is have my query in a separate text... (9 Replies)
Discussion started by: bbbngowc
9 Replies

10. Shell Programming and Scripting

Shell script to execute sql query.

Hi Experts, Need your support. Not able to use sql query alias in shell script. Could you please help me in finding right way to use alias with sql query in shell script. Below is the code i am using. #!/bin/bash sqlplus -s abc/abc@abc << EOF> bcd.csv set trimspool on select zone_id... (4 Replies)
Discussion started by: as7951
4 Replies
cvsd-buildroot(8)					      System Manager's Manual						 cvsd-buildroot(8)

NAME
cvsd-buildroot - create a chrooted directory structure for use in cvsd. SYNOPSIS
cvsd-buildroot DIRECTORY DESCRIPTION
cvsd-buildroot creates and populates a directory that can be used as a chroot jail for running cvsd (see cvsd(8) ) in. This script should be run as the root user since the creation of devices and the changing of ownership and permissions require this. The script gives warnings about files that it's not expecting. cvsd-buildroot creates the following directory structure: /bin This directory is populated with the cvs binary that is found on the system. /lib This directory is populated with all the libraries that are required for running programs in the /bin directory as well as some predefined required libraries that are present on the system. /dev Here null and zero devices are created. /etc In this directory a passwd file is created that is used for matching user id's with usernames. The root and cvsd user are added to this file if they're not there yet. The passwd file is checked for consistency with the system /etc/passwd to prevent mistakes. The passwd file is also populated with users referenced in the repository directories. Note that no password data from /etc/passwd or any other file is stored in the generated passwd file, all password entries are set to 'x'. /usr Here symbolic links are placed to /bin and /lib for some common library and binary directories found on the system. This is done for systems that have hard-coded paths for libraries. /libexec and /usr/libexec Symbolic links for these directories are created if they are present on the system. /tmp This directory is cleaned out on systems that have tmpreaper. After the directories are created and populated ownership and rights are set to a reasonable value (root:root,umask=022). OPTIONS
cvsd-buildroot takes one argument, namely a directory in which the chroot jail will be created. The directory should be specified with an absolute path. NOTES
Creating a chroot environment is a terribly non-portable thing to do and therefore you may experience problems with missing libraries and system files. For more information see the FAQ and the README. If you have to install libraries or perform actions not covered by cvsd-buildroot please report your findings to <cvsd-users@lists.arthurdejong.org>. Rerunning cvsd-buildroot after you have created your repository is advised since the repositories are checked for references to userid's and lockfile directories. SEE ALSO
cvsd(8) README FAQ AUTHOR
Arthur de Jong <arthur@arthurdejong.org>. Version 1.0.24 Jun 2012 cvsd-buildroot(8)
All times are GMT -4. The time now is 12:23 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy