Question: How Do I Connect Unix Shell Script to Database?
Contents How Do You Connect to a Database in Unix Shell Script? the First Thing You Have to Do to Connect to Oracle Database in Unix Machine Is to Install...
How do you connect to a database in UNIX shell script?
The first thing you have to do to connect to oracle database in unix machine is to install oracle database drivers on the unix box. Once you installed, test whether you are able to connect to the database from command prompt or not. If you are able to connect to the database, then everything is going fine.
Must Read
How do I connect MySQL database to Unix shell script?
# MYSQL CONFIG VARIABLES $platform = “mysql”; $host = “<your db server ip>”; $database = “<db name>”; $org_table = “<table name>”; $user = “<username>”; $pw = “<password>”; # DATA SOURCE NAME $dsn = “dbi:$platform:$database:$host:$port”; # PERL DBI CONNECT $connect = DBI->connect($dsn, $user, $pw);