Sponsored Content
Top Forums UNIX for Beginners Questions & Answers How to use for loop to execute multiple .sql files while using SQLPLUS for db connection.? Post 303031881 by RudiC on Thursday 7th of March 2019 03:56:57 AM
Old 03-07-2019
Please utmost carefully read, understand, and reply to helping posts!


Above errors obviously are NOT the "unexpected EOF", and their solitary presentation doesn't help analysing the problem. When and where do they occur? In the first loop, or later? Is the original error gone?


Please post the entire script, set your shell's -x (--xtrace) option (if available in your shell, which btw you didn't mention), run the script and post the resulting output.
 

10 More Discussions You Might Find Interesting

1. AIX

how can i install sqlplus and execute some sql commands

hi everybody, i am Talip, a begginner at unix based systems and i have a problem (actually, we may think myself as the problem, in this situation). i am not sure if this is the correct platform for my questions. if it is not please forgive me about this inappropriate mail. what i have: *... (2 Replies)
Discussion started by: talipk
2 Replies

2. Shell Programming and Scripting

How to execute the multiple line sql using shell script

Hi All, Please help me to write a shell script to execute the below sql query. select c.account_no,b.bill_no,a.pay_type,(b.total_due + b.recvd + b.adjusted + b.disputed + b.transferred) as amt_not_billed,d.cash_on_delivery, (select j.bill_no from billinfo_T y, bill_t j where... (1 Reply)
Discussion started by: girish.raos
1 Replies

3. UNIX for Dummies Questions & Answers

For Loop to execute a command on a series of files

Hello, I have a set of input data that I split into batches using the following command: split -l 4000000 MyInput.in Split_a Once I get the split files, I run a certain command on the split files that spews an output. So far I have been doing it without a for loop. How can I translate the... (2 Replies)
Discussion started by: Gussifinknottle
2 Replies

4. Shell Programming and Scripting

Execute multiple SQL scripts from single SQL Plus connection

Hi! I would like to do a single connection to sqlplus and execute some querys. Actually I do for every query one connection to database i.e echo 'select STATUS from v$instance; exit' > $SQL_FILE sqlplus user/pass@sid @$SQL_FILE > $SELECT_RESULT echo 'select VERSION from v$instance;... (6 Replies)
Discussion started by: guif
6 Replies

5. Shell Programming and Scripting

SQL query in a loop with single sqlplus connection

Hi, I'm trying to build a shell script that reads a set of accounts from a file. For each account I need to perform a set of sql queries. So I have a loop with a set of sqlplus connections to retrieved my data. Is it possible to have a single sqlplus connection before entering the loop and... (4 Replies)
Discussion started by: lsantacana
4 Replies

6. UNIX and Linux Applications

how to execute multiple .sql scripts from within a shell script using sqlplus

using sqlplus I want to execute a .sql script that has dbms_output statments in rhe script. I want to write the dbms_output statements from .sql file to a log file. is this possible. thanks any help would be appreciated :wall: (1 Reply)
Discussion started by: TRS80
1 Replies

7. Shell Programming and Scripting

Create Multiple UNIX Files for Multiple SQL Rows output

Dear All, I am trying to write a Unix Script which fires a sql query. The output of the sql query gives multiple rows. Each row should be saved in a separate Unix File. The number of rows of sql output can be variable. I am able save all the rows in one file but in separate files. Any... (14 Replies)
Discussion started by: Rahul_Bhasin
14 Replies

8. Shell Programming and Scripting

Need help to write a function in shell scripting to execute sql files

Hi, I am new to shell scripting and i need to write a automation script to execute sql files. I need to check the table if it is there in system tables and need to write a function to call the .sql files. For ex. I have a.sql,b.sql,c.sql files, where the sql file contains DELETE and INSERT... (1 Reply)
Discussion started by: Samah
1 Replies

9. Shell Programming and Scripting

Execute multiple files in multiple folders and also output on same folder

How to execute multiple files in multiple folders and also output to be generated in the same folder? Hello Team, I have a path like Sanity_test/*/* and it has around 100+ folders inside with files. I would like to run/execute those files and output of execution to be placed on same /... (1 Reply)
Discussion started by: pushpabuzz
1 Replies

10. Shell Programming and Scripting

How to execute 10 sql files from a folder through sqlplus in shell script?

I am new to shell scripting and i want to know how to execute the *.sql files from a folder through sqlplus in shell script and files should be execute in sequentially one by one while execution if any ORA error it has to exit from sqlplus session 1) scripts from external folder 2) logs has... (1 Reply)
Discussion started by: sreekanth Reddy
1 Replies
cvm-mysql(8)						      System Manager's Manual						      cvm-mysql(8)

NAME
cvm-mysql - MySQL module SYNOPSIS
cvm-mysql CREDENTIALS
Pass phrase DESCRIPTION
This module queries a MySQL database for the account name, compares the stored pass phrase with the given one using crypt(3). CONFIGURATION VARIABLES
CVM_MYSQL_DEFAULT_FILE The full path of the defaults file to read if the following variable is set. If not set, the file $HOME/.my.cnf will be read (the MySQL default). CVM_MYSQL_DEFAULT_GROUP If set, the module will read connection default options from the named group in the defaults file as above CVM_MYSQL_HOST The hostname or IP of the MySQL server. If not set, a connection to the local host is assumed. CVM_MYSQL_USER The MySQL login ID to connect as. If not set, the invoking user is assumed. CVM_MYSQL_PASS The password for the above user. CVM_MYSQL_DB The database name, must be set. CVM_MYSQL_PORT The port number for the TCP/IP connection (only used if the server is not local). CVM_MYSQL_POSTQ (optional) The SQL query to execute after the credentials have been validated, see cvm-sql(7). CVM_MYSQL_PWCMP (optional) The password comparison module to use. CVM_MYSQL_SOCKET The path to the socket that should be used for connections to a local server. CVM_MYSQL_QUERY (optional) The SQL query to issue to retrieve the row containing the account information from the database, see cvm-sql(7). SEE ALSO
cvm-sql(7), cvm-pgsql(8), cvm-pwfile(8), cvm-qmail(8), cvm-unix(8), cvm-vmailmgr(8), cvm-benchclient(8), cvm-checkpassword(8), cvm-test- client(8) http://untroubled.org/pwcmp/pwcmp.html http://untroubled.org/cvm/cvm.html cvm-mysql(8)
All times are GMT -4. The time now is 03:43 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy