|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
||||
|
||||
|
SQL block in a Shell Script connecting to a local and remote DB
Hi All, In a Shell scriipt with a SQL block I want to issue a query against a local DB and a remote DB on a remote server. The shell script is running locally. This is how I connect to the local server. But I want the query to reference remote table in the join. Question can I specify a localServer.DB and RemoteServerDB in the connection command. Code:
${MYSQLDIR}/mysql -u ${MYusername} --password=${MYAPASSWD} ${MYSQLDB} << SQL
SELECT col1
FROM localDB.tabl1,
remoteServer.RemoteDB.tab1
WHERE ......with a join
SQLMany thanks for your help. Dave
|
| Sponsored Links | ||
|
|
#2
|
||||
|
||||
|
No, you can't.
With MySQL you can use the federated storage engine to access remote tables from the local instance. |
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Block local and remote port with iptables - Script BASH | houstaf | Shell Programming and Scripting | 0 | 03-26-2012 07:03 AM |
| call shell script from pl/sql block | Opamps123 | Shell Programming and Scripting | 3 | 12-09-2010 04:01 AM |
| Executing a shell script from a PL / SQL Block | sudhird | Shell Programming and Scripting | 1 | 06-21-2010 05:56 AM |
| error connecting sql through a shell script | nehak | Shell Programming and Scripting | 1 | 04-30-2008 08:04 AM |
| Connecting DB in the Shell Script to do SQL Query | mehuldoshi | UNIX for Advanced & Expert Users | 3 | 03-29-2003 11:47 AM |
|
|