Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Help: Is there any way we can get all the db_links that are active?
u705413818_at_spawnkill.ip-mobilphone.net (Joe Bayer) wrote in message news:<l.1020365604.1794158935@[64.94.198.252]>...
> Somebody suggested
>
> select username,
> db_link,
> logged_on,
> heterogeneous,
> protocol,
> open_cursors,
> in_transaction ,
> update_sent,
> commit_point_strength
> from v$dblink,
> dba_users
> Where owner_id = user_id order by 1,2
>
> But it always returns no rows even though I know there is some open db
> links
>
> Any suggestions?
>
> Thanks
Joe, without studying the view definition and the underlying x$ tables it would appear this view is session specific and that the querying session must have issued a distributed statement for an entry to exist: (8.1.7.2)
DDC1> connect ******/******
Connected.
DDC1> select * from v$dblink;
no rows selected
DDC1> select count(*) from chassis_no;
COUNT(*)
16118
DDC1> select * from v$dblink;
DB_LINK
---------- --- --- ------ ------------ --- --- --------------------- PFA.WORLD 25 YES YES UNKN 0 YES NO 1
Querying the v$dblink view from another session under a DBA id shows no rows.
HTH and I curious if anyone else knows more on this subject.