Opener,
Hoinz's suggestion is right on the money. Also, knowing how much trouble I had originally figuring out how
database links worked, I thought I would pass along some simple samples for you of a syntax option to create at database link, then an example of how to use a database link to both access and update a remote database.
First, I have a database on a machine on our network that is 750 miles away on the West Coast. The alias that I have in my tnsnames.ora for that database is RIV817. Here then is my code to create a database link to the SYSTEM user on that database:
Code:
create database link RIVER
connect to SYSTEM identified by <SYSTEM password goes here>
using 'RIV817';
Database link created.
Then to access yet another schema in the remote database:
Code:
select * from dontdrop.dummy@riv817;
X
---------
£
1
2 rows selected.
To update the remote database, you can say:
Code:
update dontdrop.dummy@riv817
set x = '$' where x = '£';
1 row updated.
select * from dontdrop.dummy@riv817;
X
---------
$
1
2 rows selected.
Then, to illustrate that you have full consistency control over even a remote transaction:
Code:
rollback;
Rollback complete.
select * from dontdrop.dummy@riv817;
X
---------
£
1
2 rows selected.
Does this give you the illustration you need to take care of business?
![[santa] [santa] [santa]](/data/assets/smilies/santa.gif)
Mufasa
(aka Dave of Sandy, Utah, USA)
[
Providing low-cost remote Database Admin services]
Click here to join
Utah Oracle Users Group on Tek-Tips if you use
Oracle in
Utah USA.