declare
cursor cur
is
select object_name from all_objects where owner = 'BI';
v_table_name varchar2(50);
begin
for i in cur
loop
v_table_name := i.object_name;
EXECUTE IMMEDIATE 'create synonym "ABDEEN".'|| v_table_name ||' for '|| 'BI.' ||v_table_name;
--DBMS_OUTPUT.PUT_LINE ('test');
commit;
EXIT WHEN CUR%NOTFOUND;
end loop;
end;