I'd say that using the sequence numbers to identify the database is... a flawed approach. Particularly as you're already consuming the sequence, so presumably both databases already have rows in the 1 - 5 billion range.
Anyway the issue is because last_number in *_sequences is
not the "next value". It's the last value written to disk. When you first access it, this is the initial value + cache value.
In testing, nothing uses the sequence, so last_value really is the "next value". But when someone's using it this is something between 1 and 20 (the cached values) more than the real next value:
create sequence ZCMD_SEQ_TEST
minvalue 90000000
maxvalue 100000000
start with 94683461
increment by 1
cache 20;
SELECT last_number
FROM all_sequences
WHERE sequence_name = 'ZCMD_SEQ_TEST';
LAST_NUMBER
94683461
SELECT ZCMD_SEQ_TEST.NEXTVAL FROM DUAL;
NEXTVAL
94683461
SELECT last_number
FROM all_sequences
WHERE sequence_name = 'ZCMD_SEQ_TEST';
LAST_NUMBER
94683481
So when using this "for real", you're somewhere up to 20 values short of your desired new minimum of 1,000,000,000.
Outputting what's going on makes this clearer:
DECLARE
newnu NUMBER := 1000000001;
lnu NUMBER;
ib NUMBER;
stmt varchar2(100);
procedure p as
begin
dbms_output.put_line ( stmt );
execute immediate stmt;
end p;
BEGIN
SELECT last_number, increment_by
INTO lnu, ib
FROM all_sequences
WHERE sequence_name = 'ZCMD_SEQ_TEST';
stmt := 'ALTER SEQUENCE ZCMD_SEQ_TEST MAXVALUE 4999999999'; p();
stmt := 'ALTER SEQUENCE ZCMD_SEQ_TEST INCREMENT BY ' || (newnu - lnu); p();
dbms_output.put_line ( (newnu - lnu) );
SELECT last_number, increment_by
INTO lnu, ib
FROM all_sequences
WHERE sequence_name = 'ZCMD_SEQ_TEST';
dbms_output.put_line ( lnu );
EXECUTE IMMEDIATE 'SELECT ZCMD_SEQ_TEST.NEXTVAL FROM DUAL' INTO lnu;
dbms_output.put_line ( lnu );
stmt := 'ALTER SEQUENCE ZCMD_SEQ_TEST INCREMENT BY ' || ib; p();
stmt := 'ALTER SEQUENCE ZCMD_SEQ_TEST MINVALUE 1000000000'; p();
END;
/
ALTER SEQUENCE ZCMD_SEQ_TEST MAXVALUE 4999999999
ALTER SEQUENCE ZCMD_SEQ_TEST INCREMENT BY 905316520
905316520
999999981
999999981
ALTER SEQUENCE ZCMD_SEQ_TEST INCREMENT BY 905316520
ALTER SEQUENCE ZCMD_SEQ_TEST MINVALUE 1000000000
ORA-04007: MINVALUE cannot be made to exceed the current value
So you just need to increase your increment by (up to) 20.
But I reiterate: I don't see the advantage of doing this.