Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Execute SQL scripts in Unix

 
Abhishek Kanchan
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a requirement in my project where I am supposed to execute SQL scripts on Unix server and the SQL server is hosted on a different windows M/C. We are looking for a suitable bridge / driver that can be installed on Unix so that the scripts can be executed.
Also, Is it possible to install the SQL client on Unix server ?

Thanks.
 
Tim McGuire
Ranch Hand
Posts: 820
IntelliJ IDE Tomcat Server VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess you need to give more details. Do you want a unix user to type SQL commands into a command prompt or something more? What do you want to happen after the scripts are executed? Is it good enough to have them output to the screen?
And then I think the steps would be different for each database vendor. What are you using? SQL Server? Check this out: http://stackoverflow.com/questions/149395/what-are-some-ways-of-accessing-microsoft-sql-server-from-linux

 
Abhishek Kanchan
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Tim for you reply.

Yes, we just want to fetch data through SQL queries and the output on the screen is fine.

Thanks,
Abhishek
 
Tim McGuire
Ranch Hand
Posts: 820
IntelliJ IDE Tomcat Server VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you planning to use Java for this ?

What kind of database do you want to connect to?
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You still did not say what database you are using. When you type "SQL server", do you mean the product called Microsoft SQL Server? If so, there is a type-4 JDBC driver that runs just fine on Linux. As far as command line tools go, I don't know of any Linux command line tools that work with SQL Server (though doing a search for "SQL Server" in your distro's package manager might bring something up). But once you have the JDBC driver, then just about any Java-based tools should let you make those queries.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic