set option "PUBLIC"."Global_database_id" = ’1’;
create table extract_id ( next_id integer not null) ;
insert into extract_id values( 1 );
create procedure sp_hook_dbxtract_begin
as declare @next_id integer
update extract_id set next_id = next_id + 1000
select @next_id = (next_id )
from extract_id
commit
update #hook_dict
set value = @next_id
where name = ’extracted_db_global_id’
Theneach extracted or re-extracted database will get a different
Global_database_id. The first starts at 1001, the next at 2001, and so on.
Toassist in debugging procedure hooks,
dbxtract
outputsthe following
whenit is set to operate in verbose mode:
theprocedure hooks found
thecontents of #hook_dict before the procedure hook is called
thecontents of #hook_dict after the procedure hook is called.
How default valuesare chosen
Thepublic option Global_database_id in each database must be set to a
unique,non-negative integer. The range of default values for a particular
databaseis
pn
+1 to
p
(
n
+1), where
p
isthe partition size and
n
isthe value
ofthe public option Global_database_id. Forexample, if the partition size
is1000 and Global_database_id is set to 3, then the range is from 3001
to4000.
IfGlobal_database_id is set to a non-negative integer, Adaptive Server
Anywherechooses default values by applying the following rules:
Ifthe column contains no values in the current partition, the first default
valueis
pn
+1.
Ifthe column contains values in the current partition, but all are less than
p
(
n
+1), the next default value will be one greater than the previous
maximumvalue in this range.
Defaultcolumn values are not affect by values in the column outside of
thecurrent partition; that is, by numbers less than
pn
+1 or greater than
p
(
n
+1). Suchvalues may be present if they have been replicated from
anotherdatabase via MobiLink synchronization.
132