I have the database gcd001 that contains multiple tables tab1, tab2, tab3 which contain data, and a second database dde002 that contains the same tables tab1, tab2, tab3 but with no data.
I'm trying to create a script that will create synonyms between the tables of these two databases. I tried something like:
# !/bin/sh
# USAGE : cresyn.sh {dtabase_with_data} {dtabase_no_data} {Table}
dtabase_with_data=$1
dtabase_no_data=$2
Table=$3
dbaccess $1 CREATE SYNONYM $1 FOR $2:$3;
done
but it didn't work and I really don't know how to do it. Can you help?