During data testing today, you need to call dblink in the local database to insert the data to another database. The ID column uses the auto-incrementing sequence, and then promptsORA-02069: Global_names parameter must be set to true for this operation error. Online Search generally means that global_names must be set to true. The default value is false in Oracle installation, however, changing to true will become inconvenient when dblink is used. The two Sid must be set to the same name. The two databases have been running for several years at the customer's end, and manyProgramOnce the SID is changed, this method cannot be used. Finally, it was found that when data was inserted to a remote database, the sequence could not call the local sequence, and the remote sequence must also be called.
Original SQL: insert into testtig @ link173 (ID, uname, uage) values (z_seq.nextval, 'z', 22 );
After changing the SQL statement, insert into testtig @ link173 (ID, uname, uage) values (z_seq.nextval @ link173, 'z', 22 );
Insert OK.