- Webmaster
- 註冊日: 2008/2/19
- 來自:
- 發表數: 15771
|
- [分享]移動 Informix 資料庫
- For example, your site purchases a more powerful UNIX computer to allow
faster access to the users. You need to transfer existing databases to the new database server on the new computer. Use onunload to unload data from the first database server, then use onload to load the data into the second database server. Both database servers must be at the same version level. You can move the entire database or selected tables only, but you cannot modify the database schema.
The onunload and onload utilities have the following restrictions: n You cannot use onunload and onload to move data between non- GLS and GLS locales. n Do not use onunload and onload to move data between two Universal Server or Informix Dynamic Server with Universal Data Option databases if they contain extended data types. Use the HPL instead to move the Universal Server data. However, you can use onunload and onload with Universal Server if the databases contain legacy data types. ‥ n INFORMIX-SE does not support onload and onunload. ‥ n INFORMIX-OnLine XPS and Informix Dynamic Server with Advanced Decision Support and Extended Parallel Options do not support onload and onunload.
To move a database from one computer to another :
1. Make sure that the page size, numeric representations, and byte alignment on structures and unions are the same on both computers. (The page size is 2 kilobytes on certain UNIX systems and 4 kilobytes on Windows NT.) The page size is an Informix characteristic. For information about page size, refer to your Administrator’s Guide. The numeric representation and the byte alignment are characteristics of your operating system. For information about numeric representation and byte alignment, refer to the manuals for your operatingsystems. 2. Decide where to store the unloaded data. 3. Run the oncheck utility to make sure that your database isconsistent. For information about oncheck, refer to your Administrator’s Guide. 4. If you want to save the triggers, access privileges, stored procedures, defaults, constraints, and synonyms for the tables in the database, run the dbschema utility. 5. Run the onunload utility. 6. If necessary, transfer the storage medium (tape or disk) to the newcomputer. If the two computers are on the same network, you can read or write the data remotely. 7. Run the onload utility. 8. Set the desired logging status for the new database. For information about logging status, refer to your Administrator’sGuide. On disk Create an empty file for onunload to hold the data. Make sure that you have write permission for the file. On tape Use the tape device and characteristics specified in the ONCONFIG configuration file by either TAPEDEV or LTAPEDEV, or specify another tape device. Make sure that the tape device that you specify is available foronunload. 9. If necessary, change the DBA privileges of the database. 10. If you want to restore the triggers, access privileges, stored procedures, defaults, constraints, and synonyms for the tables in the database, run the dbschema utility. 11. Create a level-0 backup of the new database.
To move a table from one computer to another :
1. Make sure that the page size, numeric representations, and byte alignment on structures and unions are the same on both computers. (The page size is 2 kilobytes on certain UNIX systems and 4 kilobytes on Windows NT.) 2. Decide where to store the unloaded data. (See step 2 of the previoussection.) 3. Run the oncheck utility to make sure that your database isconsistent. 4. If you want to save the triggers, access privileges, stored procedures, defaults, constraints, and synonyms for the table, run the dbschemautility. 5. Run the onunload utility. 6. If necessary, transfer the storage medium to the new computer. 7. If the table includes simple large objects that are stored in blobspaces, decide where to store the simple large objects. If necessary, create new blobspaces. 8. Turn off logging. When you are loading a table, logging on the target database must be turned off. (When you are creating and loading an entire database, the logging status does not matter.) 9. Run the onload utility. 10. Create a level-0 backup of the modified database. 11. Turn logging back on, if you want logging. 12. If you want to restore the triggers, access privileges, stored procedures, defaults, constraints, and synonyms for the table, run the dbschema utility or create them manually.
To move a table from one dbspace to another dbspace on the same computer :
1. Run the onunload utility to unload the table. 2. Turn off logging. When you are loading a table, logging on the target database must beturned off. 3. Run the onload utility. Specify a new table name and new dbspace name in the onloadstatement. 4. If the data loads successfully, delete the old table in the old dbspace and rename the new table to the old table name. 5. Create a level-0 backup of the modified database. 6. Turn logging back on, if you want logging.
|