Oracle Database 10 GB-table space that can be transferred

Source: Internet
Author: User

The portable tablespace can now be migrated across platforms, making data publishing faster and easier. In addition, external table downloads make data transfer tasks easier and faster through conversion.

How do you migrate data from one database to another? One of the existing methods is particularly good: the tablespace can be transferred. In this method, you use a set of self-contained and read-only tablespaces to export only metadata, and copy the data files of these tablespaces to the target platform at the operating system layer, and import the metadata into the data dictionary-this process is calledInsert.

Operating System File copying is generally much faster than other traditional data transfer methods (such as export/import or SQL * Loader. However, in Oracle9 IIn databases and earlier versions, tablespaces that can be transmitted are only useful when the target database and the source database run on the same operating system platform-for example, you cannot transfer tablespaces between Solaris and the HP-UX platform.

In Oracle Database 10 G, This restriction disappears: as long as the operating system has the same byte order, you can transfer tablespaces between platforms. This article will not elaborate on the byte sequence, but it is enough to mention a few words: some operating systems (including Windows) this system is called Low address, low byte order. On the contrary, other operating systems (including Solaris) store the highest valid bytes in the low memory address. Therefore, this system is called Low address, high byte order. When a low-address, high-byte system tries to read data from a low-address, low-byte system, a conversion process is required-otherwise, the byte order will cause the read data to be incorrectly interpreted. however, when the tablespace is transmitted between platforms in the same byte sequence, no conversion is required.

How do you know which kind of operating system adopts the byte sequence? You do not need to guess or search for the Internet, but simply execute the following query:
SQL> select * from v$transportable_platform order by platform_id;PLATFORM_ID PLATFORM_NAME                       ENDIAN_FORMAT----------- ----------------------------------- --------------1 Solaris[tm] OE (32-bit)             Big2 Solaris[tm] OE (64-bit)             Big3 HP-UX (64-bit)                      Big4 HP-UX IA (64-bit)                   Big5 HP Tru64 UNIX                       Little6 AIX-Based Systems (64-bit)          Big7 Microsoft Windows IA (32-bit)       Little8 Microsoft Windows IA (64-bit)       Little9 IBM zSeries Based Linux             Big10 Linux IA (32-bit)                   Little11 Linux IA (64-bit)                   Little12 Microsoft Windows 64-bit for AMD    Little13 Linux 64-bit for AMD                Little15 HP Open VMS                         Little16 Apple Mac OS                        Big

Assume that you want to transmit a tablespace USERS to the computer TGT1 running the Microsoft Windows operating system from a host SRC1 running the Linux operating system on the Intel architecture. Both the source and target platforms are low-address and Low-byte-order. The data file of the tablespace USERS is users_01.dbf. Follow these steps.
  1. Make the tablespace read-only:
    alter tablespace users read only;
  2. Export the tablespace. Run the following command at the operating system prompt:
    exp tablespaces=users transport_tablespace=y file=exp_ts_users.dmp
    The exp_ts_users.dmp file only contains metadata (not the contents of the tablespace USERS), so it will be very small.

  3. Copy the exp_ts_users.dmp and users_01.dbf files to the host TGT1. If you use FTP, You need to specify the binary option.
  4. Insert the tablespace into the database. Run the following statement at the operating system command prompt:
    imp tablespaces=users transport_tablespace=y file=exp_ts_users.dmp datafiles='users_01.dbf'
After step 2, the target database will have a tablespace named USERS and the contents of the tablespace will be provided.

Remember that the SRC1 and TGT1 systems are Linux and Windows respectively. To Oracle9 ISo far, databases running on TGT1 cannot identify the data file users_01.dbf in step 1, making the entire process useless. You will have to seek help with other methods (such as conventional export and import, creating plain text files, loading through SQL * Loader, or directly loading and inserting between different databases ).

In 10 G, Because the target database can identify data files from another platform. In our example, the operating system run on the source and target hosts in the same byte order (low-address and Low-byte order), so no conversion is required.

This function is particularly useful in Data Warehouses. Smaller Object-oriented Data marketplaces are often filled in from warehouses after refreshing. Use 10 GThese data marketplaces can now be placed in smaller, cheaper computers (such as Intel boxes running Linux), while data warehouse servers can be placed in larger enterprise computers. Essentially, with the ability to transmit tablespaces, you can now make better use of combinations of hardware and operating systems.
  • 1
  • 2
  • 3
  • Next Page

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.