Solved

Username and password issue in Unix

Posted on 2009-05-05
1
382 Views
Last Modified: 2012-05-06
Hello. I have a .SQL file named employee.sql which contains the statement below :-

load from '/use/local/bin/name.csv' delimiter ',';
insert into employee_access

My only question is how to define the JDBC url with username and password in unix script ? I know it can be done in perl but was wondering if it is possible to be done in a korn shell ?.
If i know how to define my JDBC connection info with username and password i can execute this statement in my script which will insert all the values from the CSV file :-

dbaccess employees < employee.sql
0
Comment
Question by:Micheal_Male
1 Comment
 
LVL 51

Accepted Solution

by:
ahoffmann earned 125 total points
ID: 24313717
each database comes with a client program, such as plsql for Oracle, mysql for MySQL and so on ...
You need to use that client program and pass the proper database, table, username and password. The syntax of these command line arguments is different for each, check your man pages.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Shell script errors 10 141
Unistall fileset without dependecies on AIX 3 70
unix scripting question 1 104
unix in java example 9 72
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question