Win a copy of liveProject: Protecting User Data with Spring Security and OAuth2 this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • paul wheaton
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • Mikalai Zaikin
  • Himai Minh

Execute SQL scripts in Unix

 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 820
IntelliJ IDE VI Editor Tomcat Server
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 VI Editor Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you planning to use Java for this ?

What kind of database do you want to connect to?
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.

 
You've gotta fight it! Don't give in! Read this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic