Home » Server Options » Streams & AQ » oracle streams global_names
oracle streams global_names [message #573790] Thu, 03 January 2013 03:32 Go to next message
maninderkrb
Messages: 41
Registered: August 2012
Location: India
Member
In oracle stream multiple target and one source scenario.(table level replication)

we used to set the parameter global_names=true;

this is so ,bec the dblink and dbname has to be same.

but if we have dbname same on all the servers,
i.e

sourcedb=moddb
dest1db =moddb
dest2db=moddb
dest3db=moddb

we cant set global_names=true;?????
from same source it will not be possible to create dblink with same name as of db on all destinations as it is same.
if we can how ???

so will replication work with global_names=false;
Re: oracle streams global_names [message #573792 is a reply to message #573790] Thu, 03 January 2013 03:38 Go to previous messageGo to next message
Michel Cadot
Messages: 57650
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
You can qualify the db links:
create database link moddb@dest1db connect to ... using 'tns name from moddb on dest1db';

and so on for all db links.

Regards
Michel
Re: oracle streams global_names [message #573793 is a reply to message #573792] Thu, 03 January 2013 03:41 Go to previous messageGo to next message
maninderkrb
Messages: 41
Registered: August 2012
Location: India
Member


this means global_names=false is not mandatory for replication to work?
Re: oracle streams global_names [message #573794 is a reply to message #573793] Thu, 03 January 2013 03:41 Go to previous messageGo to next message
maninderkrb
Messages: 41
Registered: August 2012
Location: India
Member
sorry global_names=true is not mandatory for replication to work?
Re: oracle streams global_names [message #573797 is a reply to message #573794] Thu, 03 January 2013 04:30 Go to previous messageGo to next message
Michel Cadot
Messages: 57650
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
In my example, I still have global_names=true.

Regards
Michel
Re: oracle streams global_names [message #574177 is a reply to message #573797] Mon, 07 January 2013 12:30 Go to previous messageGo to next message
maninderkrb
Messages: 41
Registered: August 2012
Location: India
Member
I have tns enteries in my source as follows
10.51.19.133 is source
pls tell me how to create dblink with global_names=true;
all other entries are for destinations
moddb is database name on a source and all destinations

MODDB_GGN133 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.51.19.133)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = moddb)
)
)

MODDB_KOL20 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.52.151.20)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = moddb)
)
)

MODDB5 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.52.39.5)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = moddb)
)
)
Re: oracle streams global_names [message #574178 is a reply to message #574177] Mon, 07 January 2013 12:37 Go to previous messageGo to next message
Michel Cadot
Messages: 57650
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Please try what I said.

Regards
Michel
Re: oracle streams global_names [message #574179 is a reply to message #574178] Mon, 07 January 2013 12:40 Go to previous messageGo to next message
maninderkrb
Messages: 41
Registered: August 2012
Location: India
Member
create database link moddb@'10.52.39.5' connect to strmadmin identified by strmadmin using 'MODDB5';

is it be like this?
Re: oracle streams global_names [message #574182 is a reply to message #574179] Mon, 07 January 2013 12:48 Go to previous messageGo to next message
maninderkrb
Messages: 41
Registered: August 2012
Location: India
Member
SQL> create public database link moddb@'10.52.39.5' connect to strmadmin identified by strmadmin using 'MODDB5';
create public database link moddb@'10.52.39.5' connect to strmadmin identified by strmadmin using 'MODDB5'
*
ERROR at line 1:
ORA-02084: database name is missing a component

Re: oracle streams global_names [message #574183 is a reply to message #574182] Mon, 07 January 2013 12:51 Go to previous messageGo to next message
maninderkrb
Messages: 41
Registered: August 2012
Location: India
Member
SQL> create public database link moddb@moddb connect to strmadmin identified by strmadmin using 'MODDB5';

Database link created.

SQL> create public database link moddb@moddb connect to strmadmin identified by strmadmin using 'MODDB_KOL20';
create public database link moddb@moddb connect to strmadmin identified by strmadmin using 'MODDB_KOL20'
*
ERROR at line 1:
ORA-02011: duplicate database link name
Re: oracle streams global_names [message #574184 is a reply to message #574183] Mon, 07 January 2013 12:58 Go to previous messageGo to next message
maninderkrb
Messages: 41
Registered: August 2012
Location: India
Member
SQL> create public database link moddb connect to strmadmin identified by "strmadmin" using 'MODDB5';
create public database link moddb connect to strmadmin identified by "strmadmin" using 'MODDB5'
*
ERROR at line 1:
ORA-02082: a loopback database link must have a connection qualifier

Re: oracle streams global_names [message #574185 is a reply to message #574184] Mon, 07 January 2013 12:58 Go to previous messageGo to next message
maninderkrb
Messages: 41
Registered: August 2012
Location: India
Member
guide me if u can.
Re: oracle streams global_names [message #574186 is a reply to message #574185] Mon, 07 January 2013 13:06 Go to previous messageGo to next message
Michel Cadot
Messages: 57650
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Michel Cadot wrote on Thu, 03 January 2013 10:38
You can qualify the db links:
create database link moddb@dest1db connect to ... using 'tns name from moddb on dest1db';

and so on for all db links.

Regards
Michel

Re: oracle streams global_names [message #574242 is a reply to message #574186] Tue, 08 January 2013 03:49 Go to previous messageGo to next message
maninderkrb
Messages: 41
Registered: August 2012
Location: India
Member
i create the db link but later found the error as mentioned below
create public database link moddb@moddbsource connect to strmadmin identified by strmadmin using 'MODDB133'


SQL> begin dbms_streams_adm.add_table_propagation_rules
2 ( table_name => 'MODDB.TBL_SPECIALZONEMASTER',
3 streams_name => 'source_TO_DB05',
4 source_queue_name => 'strmadmin.streams_queue',
5 destination_queue_name => 'strmadmin.streams_queue@"moddb@dest05"',
include_dml => true,
include_ddl => true,
source_database => 'moddb',
inclusion_rule => true);
end;
/ 6 7 8 9 10 11
begin dbms_streams_adm.add_table_propagation_rules
*
ERROR at line 1:
ORA-24045: invalid agent address "STRMADMIN"."STREAMS_QUEUE"@moddb@dest05,
agent address should be of the form [SCHEMA.]NAME[@DATABASE LINK]
ORA-06512: at "SYS.DBMS_STREAMS_ADM", line 836
ORA-06512: at "SYS.DBMS_STREAMS_ADM", line 765
ORA-06512: at line 1
Re: oracle streams global_names [message #574248 is a reply to message #574242] Tue, 08 January 2013 04:05 Go to previous messageGo to next message
Michel Cadot
Messages: 57650
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Do not use quotes.
(And the name of the database link you created does not match the name you use in the procedure call.)

Regards
Michel
Re: oracle streams global_names [message #574250 is a reply to message #574248] Tue, 08 January 2013 04:10 Go to previous messageGo to next message
maninderkrb
Messages: 41
Registered: August 2012
Location: India
Member
SQL> select * from dual@moddb@dest05;


D
-
X
#############################
SQL> select db_link from dba_db_links;

DB_LINK
--------------------------------------------------------------------------------
MODDB@DEST05

SQL>
SQL>
SQL> begin dbms_streams_adm.add_table_propagation_rules
2 ( table_name => 'MODDB.TBL_SPECIALZONEMASTER',
3 streams_name => 'source_TO_DB05',
4 source_queue_name => 'strmadmin.streams_queue',
5 destination_queue_name => 'strmadmin.streams_queue@moddb@dest05',
6 include_dml => true,
7 include_ddl => true,
8 source_database => 'moddb',
9 inclusion_rule => true);
10 end;
11 /
begin dbms_streams_adm.add_table_propagation_rules
*
ERROR at line 1:
ORA-24045: invalid agent address strmadmin.streams_queue@moddb@dest05, agent
address should be of the form [SCHEMA.]NAME[@DATABASE LINK]
ORA-06512: at "SYS.DBMS_STREAMS_ADM", line 836
ORA-06512: at "SYS.DBMS_STREAMS_ADM", line 765
ORA-06512: at line 1
Re: oracle streams global_names [message #574291 is a reply to message #574250] Tue, 08 January 2013 11:26 Go to previous messageGo to next message
maninderkrb
Messages: 41
Registered: August 2012
Location: India
Member
i remove the quotes and having the db link created ,yet the above mentioned error.
need your guidance
Re: oracle streams global_names [message #574401 is a reply to message #574291] Thu, 10 January 2013 00:42 Go to previous message
maninderkrb
Messages: 41
Registered: August 2012
Location: India
Member
pls guide
Previous Topic: Windows Service Oracle AQ Problem
Next Topic: Dequeue exception queue
Goto Forum:
  


Current Time: Thu Apr 24 22:25:54 CDT 2014

Total time taken to generate the page: 0.05502 seconds