Hi ,
I need to run a monthly job in oracle which takes data from a remote database and fills it into my database.
To Connect to the remote database I have a db link created. Even after
the creation of dblink the table could not be accessed because of name issues in dblink and database name.

Hence I added the statement " alter session set global_names='false' " before my insert queries . When I run it as a script it works fine and fetches the data.

The following works as a script:

alter session set global_names='false';
select * from abc.domainname.com

My problem is when I put these statements in a job and a procedure alter session doesn't seem to work.

The only modication I made for it to run in a job is

execute immediate ' alter session set global_names='false' '
select * from abc.domainname.com


This gives me the same previous error which came before adding the alter session in the script.


Kindly suggest how to tackle this................