Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: dblink and tnsname
"xueyang" <xueyangy_at_singnet.com.sg> wrote in message
news:aho4kq$9h$1_at_reader01.singnet.com.sg...
> Hi,
>
> there are two method to connect to a remote db, by dblink or tnsname.
The basis of your question is wrong, I'm afraid. Tnsnames is just a resolution method ("Crikey... you want the SALES database? Now how do I connect to that? Ah... yes, check tnsnames.ora... MachineX, IP Address x.x.x.y, Port such-and-such... connecting you now").
A database link is just an object defining another database. It's a stored database name, if you like. But that name still has to be resolved somehow, and tnsnames.ora would get used for that if that's the naming resolution method you've opted for.
So they're not two different things that are mutually exclusive.
So... given that, your questions don't make an enormous amount of sense. But the answer to them will always be 'the remote database'. If you link databases A and B with a dblink, and issue a 'select * from emp' on database A, with the EMP table residing in database B, then all the disk activity and Buffer Cache memory usage takes place where the table is, on Database B. If you want the work to happen on Database A, a Clustering installation is required (ie, RAC or OPS).
Regards
HJR
> Anyone has an idea on :
> if i issue a query on remote db by dblink, which side's resource(like
> memory) will this query takes? local db or remote db?
> likewise,
> if i issue a query on remote db by tnsname, which side's resource(like
> memory) will this query takes? local db or remote db?
>
> It's also appreciated if you can recommend where i can find the answer.
>
> Thanks in advance.
>
>
Received on Thu Jul 25 2002 - 01:23:27 CDT