The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
SSH not able to connect - Need help Sathy153 Shell Programming and Scripting 2 01-14-2008 04:47 AM
MSSQL JDBC Driver Single Sign On Auth from Unix 0.1 (Default branch) iBot Software Releases - RSS News 0 01-12-2008 03:10 AM
How to connect to oracle ?? divyesh shah Shell Programming and Scripting 2 01-04-2007 12:40 AM
cant connect Combat Form UNIX for Dummies Questions & Answers 6 05-01-2004 06:06 PM
Cannot connect to my ISP coolteach UNIX for Dummies Questions & Answers 8 09-26-2001 03:56 PM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-17-2005
Registered User
 

Join Date: Aug 2005
Location: Bangalore
Posts: 196
connect to mssql

Hi - can any one tell me is it possible to connect to mssql and fetch the data from unix shell scripts
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 10-17-2005
Moderator
 

Join Date: Sep 2002
Location: Hong Kong, China
Posts: 1,418
Install UnixODBC + FreeTDS, and use the isql utility. Try something like

isql -H hostname -U user < filename.sql

But if you would like to get the return resultset, probably you should place that part of the program in Perl instead, as it can be used with the Perl ODBC package to get the resultset through the DBI just as other database backends.
Reply With Quote
  #3 (permalink)  
Old 10-18-2005
Registered User
 

Join Date: Aug 2005
Location: Bangalore
Posts: 196
hi, i have done this, but still i am getting error "[ISQL]ERROR: Could not SQLConnect" i guess this requires a dsn which i am not aware of how to create one. thanks for letting me know that.

Cheers,
Waseem
Reply With Quote
  #4 (permalink)  
Old 10-18-2005
Moderator
 

Join Date: Sep 2002
Location: Hong Kong, China
Posts: 1,418
I didn't use a DSN for connect when I used it. I just specified the host, port number, username and password and it worked for me. Make sure the SQL server accepts standard (password) authentication. i.e. mixed authentication mode rather than just Windows authentication. Maybe check the firewall also if that matters.

I will just say try to use the MSSQL Enterprise Manager or Query Analyzer to test the connection first, then if that's okay try do so with isql/tsql.
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 04:26 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0