Re: John Powells question - dbservername in SPL
Posted in 1996
Jack Parker wrote:
>
> I think what John wants to do is:
>
> create procedure tst_dbs(srvnm CHAR(64))>
> CALL database@srvnm:procedure(parameters);
> {^^^^^}
>
> end procedure;
>
> (I also want to do it)
>
> any thoughts?
>
> cheers
> j.
Hi Jack,
ok if I understood it right you want to execute a SP dynamically on a
server which name you somehow provide.
Perhaps this can help:
For each SP (mysp) you want to be executed this way you create following
table in the database and server which this SP resides
create table execmysp
(
exec_proc char(1)
);
Each table has following trigger:
create trigger t_ins_execmysp insert ON execmysp
referencing new as sp2exec
for each row (execute procedure mysp());
Now if you want to execute SP mysp on DB mydb and server myserver you simply
execute
insert into mydb@myserver:execmysp values ("Y");
I must admit that this solution has some overhead -) but I hope it works.
(I didn't explicitly test it)
Regards
Tolis Varnas
--
+---------------------------------------------------------------------+
| V+K Relational Solutions email: tvarnas@compulink.gr |
| Deligiorgi 26 tvarnas@orbit.de |
| 546 42 Thessaloniki Voice: (30) 31 820270 |
| Greece Fax: (30) 31 865463 |
+---------------------------------------------------------------------+