Sponsored Content
Top Forums Shell Programming and Scripting connect to SQL server from shell script Post 302480536 by DGPickett on Wednesday 15th of December 2010 08:25:42 AM
Old 12-15-2010
No need for double posting!

There is free JDBC tool JISLQ from xigole that, with free JDBC JARs from MS, gives you command line access.

The unixodbc project has an isql tool, and can hook to freeTDS odbc in UNIX/LINUX.

The freeTDS project has both isql and freebcp tools.

The Sybase isql probably works with SQL Server, because guess where MS bought their database, that they added GUIs and other MS flavored config bits to?

MS SQL Server may have isql command line tools, too, maybe even free to server license holders.

Now, once you have the data out, convert it to tab separated trimmed text using sed or the language of your choice, sort both files, and compare using 'comm'.
 

10 More Discussions You Might Find Interesting

1. 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

2. Shell Programming and Scripting

shell script for how to connect to a remote server by using ssh

i want to connect to a remote server through ssh. i have to also provide password within that script. after connecting to the remote server i want to do some operations like grep,cd etc can u pls help me to wite a script. Thanks (1 Reply)
Discussion started by: millan
1 Replies

3. Programming

How to write a shell script to connect to another server?

Hello friends I want to write a script in which I will connect to my friends network. I want to use SSH. Even they can use the script to log into my network and copy files. ssh user@hostname command I know the following command will help me to log into Google's servers and see all the... (12 Replies)
Discussion started by: Angelo
12 Replies

4. Shell Programming and Scripting

Shell Script to connect to another server and copying files

Hi Unix Gurus, I have a doubt reg file transfer. I have used the below script to connect to another server and find files having modified for the last 24 hours and have to move the file to another server. While i tried i am getting authentication failed, destination path not found issue. ... (2 Replies)
Discussion started by: incepted
2 Replies

5. Shell Programming and Scripting

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. Kindly let me know on how to do this Thanks, Ananthi.U (1 Reply)
Discussion started by: ananthi_ku
1 Replies

6. 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

7. 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

8. Shell Programming and Scripting

Shell script to connect from one server to other

Dear Experts, I am new to the shell scripting. I am looking for a shell script to connect to one Unix/Linux server1 to other Unix/Linux server2 and trigger a SAP Event in that server2 (Which will trigger a job in SAP). Is this possible to connect from one server to the other server securely... (7 Replies)
Discussion started by: Venu V Reddy
7 Replies

9. 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

10. Shell Programming and Scripting

Not able to connect to Oracle server from shell script

Hi, I am facing an issue in connecting to database from Linux shell script. Here is my code export ORACLE_BASE=xxx export ORACLE_SID=xxx export ORACLE_HOME=xxxx DB_PATH=xxx/'yyy@yy' UserId=`sqlplus -s $DB_PATH <<EOF set head off feedback off select max(USER_ID)+1 from USERS;... (6 Replies)
Discussion started by: yuvi
6 Replies
bsqlodbc(1)							 FreeTDS Utilities						       bsqlodbc(1)

NAME
bsqlodbc - batch SQL script processor using ODBC SYNOPSIS
bsqlodbc [-U username] [-P password] [-S server] [-D database] [-i input_file] [-o output_file] [-e error_file] [-t field_term] [-qv] DESCRIPTION
bsqlodbc is a utility program distributed with FreeTDS. bsqlodbc is a non-interactive equivalent of the "isql" utility programs distributed by Sybase and Microsoft. Like them, bsqlodbc uses the command "go" on a line by itself as a separator between batches. The last batch need not be followed by "go". bsqlodbc makes use of the ODBC API provided by FreeTDS. This API is of course also available to application developers. OPTIONS
-U username Database server login name. -P password Database server password. -S server Database server to which to connect. -D database Database to use. -i input_file Name of script file, containing SQL. -o output_file Name of output file, holding result data. -e error_file Name of file for errors. -t field_term Specifies the field terminator. Default is two spaces (' '). Recognized escape sequences are tab (' '), carriage return (' '), newline (' '), and backslash ('\'). -h Print column headers with the data to the same file. -q Do not print column metadata, return status, or rowcount. Overrides -h. -v Verbose mode, for more information about the ODBC interaction. This also reports the result set metadata, including and return code. All verbose data are written to standard error (or -e), so as not to interfere with the data stream. NOTES
bsqlodbc is a filter; it reads from standard input, writes to standard output, and writes errors to standard error. The -i, -o, and -e options override these, of course. EXIT STATUS
bsqlodbc exits 0 on success, and >0 if the server cannot process the query. HISTORY
bsqlodbc first appeared in FreeTDS 0.65. AUTHORS
The bsqlodbc utility was written by James K. Lowden <jklowden@freetds.org> doc 13 November 2011 bsqlodbc(1)
All times are GMT -4. The time now is 07:26 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy