Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to access the table of another server [database] 6

Status
Not open for further replies.

ifxtechie

Technical User
Dec 22, 2000
127
US
Hi,
I am writing a trigger to insert a record into a table of server2 [different machine] whenever there is an insert in one of the local tables. The only problem I am facing is 'How to access a TABLE OF DIFFERENT SERVER'.

Local Machine Credentials:
Database : db1
ip:ip1
user:user1
password:password
Remote machine Credentials:
Database: db2
ip:ip2
userid:user2
password:password

I have set the tnsnames.ora and I am able to access the databases in individual sessions.But in one session I want to access both databases. Can anybody pls tell me how to do this.
Thanks
Partha
 
Partha,

This is rather strange. let's see if there are other triggers on this table:

select owner,trigger_name,table_name from dba_triggers
where table_name = 'MIR_STORES';

Also, let's see if there happens to be another trigger with the same name, but owned by a different user (let's put this new SELECT immediately prior to the INSERT statement):

select owner, object_name, object_type, status from dba_objects
where object_name = 'MIR_STO_INSERT';

At this point, I'm baffled. I hope these new SELECTs yield some interesting results.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA @ 03:20 (18Dec03) GMT, 20:20 (17Dec03) Mountain Time)
 
Hi Dave,
Thanks a lot for your help.
Finally it worked. I made a mistake. I created the trigger on the table on the other server also. It was unable to fire [execute] circular triggers.
I forgot to drop that trigger and tried thinking about this server only.
When I dropped, it worked.
Sorry about that.
Thanks very much, Dave.
Partha
 
Partha,

I'm glad it all worked for you !

Cheers,

[santa]Mufasa
(aka Dave of Sandy, Utah, USA @ 07:32 (18Dec03) GMT, 00:32 (18Dec03) Mountain Time)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top