Offistart - Virtual Offices, Office Space, Business Support Services
*Home>>>Branch Offices

How to connect two oracle servers?


I have one server at my office and another at branch. I have dataline connection. Both the Oracle servers are having same database structure. I want to write trigger on on table that if new row inserted in that table I want to transer that entry to my office server. Plz help me.

You need to use an Oracle database link in combination with a trigger, it's pretty straightforward once you get your head around it.

First, set up your tnsnames.ora on the source server so you can do a tnsping to the destination, i.e. run

tnsping targetdatabase

and get a positive response

Then, to create the link, as the sys user on your source database, run:

create public database link <LINKNAME> connect to <DESTINATIONUSER> IDENTIFIED BY <DESTPASSWORD> using 'targetdatabase';

Then write your trigger as normal, adding an @targetdatabase at the end of your insert statement, for example:

This query acts on your local database
SELECT name FROM scott.emp;

This query acts on your remote database
SELECT name FROM scott.emp@targetdatabase;

http://www.orafaq.com/forum/t/67544/0/

Joe Willy Neckbone says, " I don't rightly know the answer to this question, but I will be right here when you ask a question that I do know the answer to."

Maybe a Ethernet cable

Tags
  Meeting Space   Conference Room   Offices to Lease   Rent Offices   Business Centers   Service Offices   Branch Offices   Temporary Offices   Shared Offices   Commercial Space   Office Space   Business Services
Related information
  • Helping my brother with 8th grade social studies? Government test?

    wow wrong time to miss school can he borrow a friends notes? It would take me all night to answer the ones I know so I won't even start. You didn't say when the test was, you can always ...

  • This Anti-America Chavez guy.....?

    Hey your idea is great....and by the way I really thank you for protecting us from the evils of the communist..& terrorism. by the way Joe Kennedy may have his cell number, they are chummy...

  • The Post Office TV ad says theyre "The Peoples Post Office". If that's true why do they keep closing branches?

    good question mate, we are lost without our local P/O living in the country makes it very difficult to get to the nearest Post Office, not a lot of thought has gone into these closures for the bett...

  • Reclaiming bank charges?

    Have a look at my site below which lists all the addresses that you need for all the major banks. Everything is dealt with at Head Office level, don't send anything to your local branch or ...

  • 鈾?Can you write a story about *a bad day at work* using the following phrases?

    The telephone was driving him insane. The moment he hung up from one call, it rang with the next. * ring ring * ...*ring ring* hello? Thank you for calling Hormel, this is Barney speaking, how can ...

  • What do you do when you have no references?

    Try to find someone at a previous job who can give you a reference. References do not need to be in the same industry. My concern when a person said they had no references was that the person jus...

  • Aren't my bank taking the mickey?

    It is a legal requirement to produce a statement, but nothing in law says it has to be sent to your address. I assume you would rather collect your statement from your branch?

    ...
  • Have you heard about the Federal Investigation of the White House's Karl Rove?

    I hope Rove is subpoenaed by the federal prosecutor,, he is a scoundrel that has been allowed to run rampant way too long,,, his lies will make Libby and Gonzales look like high school boys in trou...

  •  

    Categories--Copyright/IP Policy--Contact Webmaster