DB Access Command Line Utility


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting DB Access Command Line Utility
# 1  
Old 03-18-2011
DB Access Command Line Utility

To read/write to a DB from Java or Perl, you usually have to install/reference several drivers and write a whole bunch of boilerplate DB access code.

I'm curious if someone has written a command line utility for Unix/Linux for simple database access for the major providers, something like:

udbaccess -t [DB type] -c [connection string for db] -u [user id and password] -s [SQL script]

and it just executes the SQL script, and returns something. I would think that something like this would exist, but haven't found it.
# 2  
Old 03-19-2011
If i undersatand your question correctly, you want to execute a sql script,sql query or a procedure in unix from command line. Right?

That is done easily.
Is there something more to your question?
# 3  
Old 03-19-2011
As far as I know there's no such utility, mostly because whoever developed such a software would have to keep track of the development and protocols used by all major DBs to be independent of the specific drivers.
# 4  
Old 05-25-2011
DBI is your lib of choice

... and it has a command line util called dbish

DBI is a generic Database Access Layer written in Perl. I can't post URLs it seems, so you will have to look for DBI and dbish.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Issue in running a command line utility in CRON

Hi Everyone! I am facing an issue in running a command line utility from the CRON. This utility displays IPC statistics on UNIX message queues: The "queue name" and the "count" of messages in the queue. When running this utility from prompt, it will provide an output on the screen, like the... (4 Replies)
Discussion started by: vai_sh
4 Replies

2. Red Hat

Problem in access the internet through command line

Hi Folks, I have installed Centos-6.4 in my VMware. I have enabled the proxy settings in the network and I am able to access the internet through GUI, but unable to browse via the command line. I did the below options as: 1) Added the proxy setting in /etc/environment file.export... (4 Replies)
Discussion started by: gsiva
4 Replies

3. Homework & Coursework Questions

About menu using dd command utility

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Please help about these script... i dont have a problem in option 1. But when it comes to options 2 and options 3... (2 Replies)
Discussion started by: amneytia1
2 Replies

4. Homework & Coursework Questions

How to invent new command utility

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Develop a utility that will enhance the current file management and organization functions of Linux. You... (3 Replies)
Discussion started by: stephanielana1
3 Replies

5. UNIX for Dummies Questions & Answers

FTP command-line utility usage

Hi, Using command-line utility "ftp or sftp", I want to transfer files across Windows and UNIX. Can you please tell me from where I need to connect to ftp and how do I specify the hostname, credentials and how do I get and put files between DOS and UNIX? Please provide me as much... (10 Replies)
Discussion started by: Dev_Dev
10 Replies

6. Linux

The dot command-line utility?

Hi, What else is the dot used beside relative filepaths in bash? Is it a shell utility as well? No man entry for dot (.)... (3 Replies)
Discussion started by: varelg
3 Replies

7. Programming

top command line utility

I'm writing a monitoring application. I'd like to periodically get the information provided by the 'top' command line utility from within my code and write the output of 'top' to a file. Wondering if anyone has already done something like this. Doing system("top > someFile"); does not create... (6 Replies)
Discussion started by: antoniomorandi
6 Replies

8. Programming

command line socket read utility

HI I have a messaging s/w daemon(TIBCO rvrd) provided by vendor which will accept connections from various clients and routes messages to the destinations. In order to route it internally uses two ports(one tcp adn one udp). I want to know on which port(tcp/udp) it is transmitting... (3 Replies)
Discussion started by: axes
3 Replies

9. Shell Programming and Scripting

Compound command with 'find' utility?

I'm trying to write a script using the 'find' command and it's -exec option to run a compound command against the files found. Example: find . -name "*.conf" -exec cat {} | grep "#" > /tmp/comments.list \; Of course the above doesn't work. So I experimented for a bit to see if there was... (6 Replies)
Discussion started by: deckard
6 Replies
Login or Register to Ask a Question