Connect to database server and execute sql


 
Thread Tools Search this Thread
Operating Systems AIX Connect to database server and execute sql
# 1  
Old 05-13-2018
Connect to database server and execute sql

I have a requirement and below is the detail.
  1. Create a shell script and needs to run in server "a".
  2. Connect to teradata database server "b".
  3. execute the .sql file from server "a" [sql file has only a select query]
  4. Save the output of the query to a file in server "a"
  5. Schedule this shell script to run every day for every 4 hours
  6. trigger email to specific ids once the .sh execution completes
# 2  
Old 05-13-2018
Welcome to the forum.

Unfortunately, your request is quite generic, fuzzy. Any previous attempts on a solution from your side?

Please become accustomed to provide decent context info of your problem.

It is always helpful to carefully and detailedly phrase a request, and to support it with system info like OS and shell, related environment (variables, options), preferred tools, adequate (representative) sample input and desired output data and the logics connecting the two including your own attempts at a solution, and, if existent, system (error) messages verbatim, to avoid ambiguities and keep people from guessing.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Connect to a SQL server from AIX

Hello aix community, After scouring the internet to find a step by step process, I've exhausted my efforts. Although I have learned a lot which brings me to this forum. I'm totally new and hope to ask the right questions. What is the easiest way to connect to a SQL server from aix? ... (2 Replies)
Discussion started by: TechStudent36
2 Replies

2. UNIX for Advanced & Expert Users

Connect to database through FTP server

Hi All I need to run a query on a remote database through a shell script. I have the query, I have the script ready. I have the details of the database server I need to connect to. Now my problem here is , the server where I run the shell script is an FTP server. ->I do not have Oracle... (4 Replies)
Discussion started by: sparks
4 Replies

3. SuSE

Connect to SQL server from Linux

I am trying to establish connection with SQL server 2008 through ODBC on Linux. First step would be 1. How to verify if ODBC driver for SQL server is installed on Linux OS. PLease let me know how to do it/ if there is any link which could be helpful in this context. thanks in advance (1 Reply)
Discussion started by: cvsanthosh
1 Replies

4. Shell Programming and Scripting

how to Connect from ksh script to SQL server

I need to connect sql server 2008 from korn shell script. Can you please give me the script which connects sql server 2008 from korn shell script. (2 Replies)
Discussion started by: santoshhegde
2 Replies

5. Solaris

connect to SQL server from shell script

Hi all, I need to connect to SQL server from shell script. Then need to execute queries from shell script as below 1. To compare values of an array with SQL table's entry. Kindly let me know on how to do this Thanks, Double post. Continue here (0 Replies)
Discussion started by: amitbhelave
0 Replies

6. Shell Programming and Scripting

Shell Linux to connect to a database and execute store procedure

HI, i want to write a script (Linux) that: 1) connect to a database oracle 2) execute some store procedure. Can anybody help me, please? Thanks a lot Andrew (3 Replies)
Discussion started by: manichino74
3 Replies

7. Shell Programming and Scripting

Different way to connect to database ans execute sql query

Hi Friends, I am using AIX version and sqlplus to connect to database while writing a shell script. I have implemented three ways to connect to database : 1) sqlplus -s <USERNAME>/<PASSWORD> <<! @<SQL FILE TO EXECUTE> exit ! 2) sqlplus -s <USERNAME>/<PASSWORD> <<! -----sql statemenets... (6 Replies)
Discussion started by: gauravgarg
6 Replies

8. Shell Programming and Scripting

Script to connect to a remote server and execute scripts

Hello All I need a script or set of commands which can establish a remote connection with another server and execute some scripts over there. Basically it has to establish the connection with the remote server as an user ,say 'testuser' and then execute the script 'testscript'. and return the... (5 Replies)
Discussion started by: sgbhat
5 Replies

9. Shell Programming and Scripting

Connect to differect server and execute the script

Hello Everyody Please help me with the below problem. I have two servers names server1 and server2. From server1, i have to connect to server2 and execute a script residing on server2. How can i achieve this? (6 Replies)
Discussion started by: vasuarjula
6 Replies

10. Solaris

Connect From VB to SQL Server

Dear All Now I can't connect from VB to Sybase on Unix. How could I do? Please help me. (0 Replies)
Discussion started by: Than Chanroeun
0 Replies
Login or Register to Ask a Question