You can assign an instance of a class in one database to an instance of a class of the same name in another database. Instances created by the class in the source database are transferred into columns or variables whose declared type is the class in the current (target) database.
You can insert or update from a table in one database to a table in another database. For example:
insert into db1.Smith.emps select * from db2.Jones.emps
update db1.Smith.emps set home_addr = (select db2.Jones.emps.home_addr from db2.Jones.emps where db2.Jones.emps.name = db1.Smith.emps.name)
You can insert or update from a variable in one database to another database. (The following fragment is in a stored procedure on db2.) For example:
declare @home_addr Address select @home_addr = new Address(‘94608’, ‘222 Baker Street’) insert into db1.Janes.emps(name, home_addr) values (‘Jone Stone’, @home_addr)
In these examples, instance values are transferred between databases. You can:
Transfer instances between two local databases.
Transfer instances between a local database and a remote database.
Transfer instances between a SQL client and an Adaptive Server.
Replace classes using install and update statements or remove and update statements.
In an inter-class transfer, the Java serialization is transferred from the source to the target.