How to migrate a single oracle instance from 32-bit to 64-bit (3)-instructions on using export

Source: Internet
Author: User

 

I have compiled several blogs about migrating a single instance from 32-bit to 64-bit:

Oracleconverta 32-bit database to 64-bit database (32-bit to 64-bit) Description

Http://blog.csdn.net/tianlesoftware/article/details/7252742

 

Migration of a single oracle instance from 32-bit to 64-bit (1) -- direct copydatafiles

Http://blog.csdn.net/tianlesoftware/article/details/7258654

 

How to migrate a single oracle instance from 32-bit to 64-bit (2) -- use rmanrestore example

Http://blog.csdn.net/tianlesoftware/article/details/7261970

 

Directly copy datafiles or use RMAN will have a problem, that is, you need to re-build the stored hared Data Objects (SRO). By default, the OLAP component will be installed, the OLAP component also needs to be rebuilt during migration, which adds a lot of time for migration.

 

This problem does not occur when using export and import. However, it takes time to export and import a large amount of data, although the data pump (expdp/impdp) is used) the efficiency is higher than exp/IMP, but this time is also relatively long.

 

The links to the exported and imported blogs are as follows:

Oracleexp/IMP description

Http://blog.csdn.net/tianlesoftware/article/details/4718366

 

Oracle 10 gdata pump expdp/impdp

Http://blog.csdn.net/tianlesoftware/article/details/4674224

 

Oracleexpdp/impdp example

Http://blog.csdn.net/tianlesoftware/article/details/6260138

 

Comparison between exp/IMP and expdp/impdp and some optimization items in use

Http://blog.csdn.net/tianlesoftware/article/details/6093973

 

Using export to import can solve two problems:

1. Cross-OS version

2. Cross-database version

 

Therefore, to some extent, this method is the most flexible.

 

For more information about the compatibility of export/import, see:

Export/import DataPump parameter version-compatibility of data pump between different Oracle versions [Video] [ID 553337.1]

 

This article is not tested, because the export/import operations are relatively simple. Here we reference several cases in the mos document for your reference:

How to Use Export and Import whentransferring data between SS platforms or between ss 32-bit and 64-bit servers [id277650.1]

 

Scenario 1: transfer of a table.

If one or moretables need to be transferred between databases implements SS platforms, then you canuse the table level export mode.

Example:
-Source database is 64-bit 8.1.7.4 database on 64-bit Sun Solaris 9
-Target database is 64-bit 10.1.0.5 database on 64-bit Linux red hatenterprise server v3

-Tables Scott. EMP and Hugo. Dept need to betransferred

A. on Sun Solaris, export with the 8.1.7.4 export utility:

> Exp system/manager file = exp_tabs.dmp log = exp_tabs.log \
Recordlength = 65535 tables = Scott. EMP, Hugo. Dept

B. Transfer the file in binary mode to the Linux red hatenterprise server.

C. On Linux Red Hat, import with the 10.1.0.5 import utility:

> Imp system/manager file = exp_tabs.dmp log = imp_tabs.log \
Recordlength = 65535 fromuser = Scott, Hugo touser = Scott, Hugo

Notes:
1. The Export and Import parameter recordlength was used with the maximum value (64 KB ).
2. The users Scott and Hugo must exist in the target database prior to theimport operation; otherwise an error is returned.

Scenario 2: transfer of a schema.

If one or more schema's need to be transferred between databases extends ssplatforms, you can use the user (owner) level export mode.

Example:
-Source database is 32-bit 9.0.1.4 database on Microsoft Windows 2000
-Target database is 64-bit 9.2.0.8 database on HP-Unix 11i
-Schema's Scott and Hugo need to be transferred

A. on Windows 2000, export with the 9.0.1.4 export utility:

-- Windows: type all parameters on one singleline:

D: \> exp system/manager file = exp_u.dmp log = exp_u.log
Recordlength = 65535 owner = Scott, Hugo

B. Transfer the file in binary mode to the HP-UX 11iserver.

C. on HP-Unix, import with the 9.2.0.8 import utility:

> Imp system/manager file = exp_u.dmp log = imp_u.log \
Recordlength = 65535 fromuser = Scott, Hugo touser = Scott, Hugo

Notes:
1. the user names Scott and Hugo must exist in the target database prior to theimport operation; otherwise an error is returned.
2. in Oracle10g when using export DataPump and import DataPump, you can use theimport DataPump parameter remap_schema which loads all objects from a sourceschema into a target schema, and creates the target schema if it does notexist.

Scenario 3: transfer of a tablespace.

Beginning with the Oracle10g Database, a tablespace can always be transportedto a database with the same or higher compatibility setting, whether the targetdatabase is on the same or a different platform.

Example:
-Source database is 32-bit 10.1.0.2 database on 32-bit Microsoft Windows2000
-Target database is 64-bit 10.2.0.1 database on AIX 5.2
-Tablespaces users and example need to be transferred

A. on the Microsoft Windows 2000 Platform:

-- Check involved datafiles, and check if the transportable set is self
-- Contained:
Select file_name from dba_data_files
Where tablespace_name in ('users', 'example ');

Execute dbms_tts.transport_set_check ('users, example ', true );

Select * From transport_set_violations;

-- Make tablespaces read-only, and export the transportable set:

Alter tablespace users read only;

Alter tablespace example read only;

-- Export the transport tablespace set:
-- (Windows: type parameters on one single line)

D: \> expdp system/manager directory = my_dir dumpfile = exp_tbsp.dmp
Logfile = exp_tbsp.log transport_tablespaces = users, Example
Transport_full_check = y

B. Check platform, and check if the datafiles need to beconverted (difference exists in endian format ):

Select platform_name from V $ database;

Select * from V $ transportable_platform;

-- Use RMAN if the datafiles need to be converted:

> RMAN target/

RMAN> convert tablespace users, example to platform 'Aix-based systems
(64-bit) 'format'n': \ temp \ % U ';
RMAN> exit;

Otherwise, copy the datafiles to a temporary location, and put the tablespaces back to read write.

C. Transfer the export dumpfile and the copied/converted datafiles in binarymode to the AIX 5.2 server.

D. Plug in the tablespaces:

> Impdp system/manager directory = my_dir2 dumpfile = exp_tbsp.dmp \
Logfile = imp_tbsp.log transport_datafiles = \ ('/dbdir/users01.dbf ',\
'/Dbdir/example01.dbf' \) remap_schema =\( SCOTT: scott2 \)\
Transport_full_check = y remap_schema = \ (HUGO: hugo2 \)

E. Change the plugged in tablespaces backto read write.

Notes:
1. in this example we assumed that only the users Scott and Hugo owned objectsin the tablespaces users and example. the users scott2 and hugo2 become the newowners of the objects. these users shoshould have been created in the targetdatabase prior to the import.
2. You cannot transport the system tablespace.

-- The system tablespace cannot be transmitted.
3. You cannot transport objects owned by the user SYS (such as: PL/SQL, javaclasses, callouts, views, synonyms, users, privileges, dimensions, directories, and sequences ).

-- The object of any sys user cannot be transmitted.
4. The source and target database must use the same character set and nationalcharacter set.
5. In Oracle9i and Oracle8i the source and target database must be on the samehardware platform.

-- This section describes how to use expdp/impdp to transmit tablespaces. You can also use RMAN to transmit tablespaces. For this part of questions, we will sort out related blogs in the near future.

Scenario 4: transfer of a database.

The Export and Import utilities are the only method that Oracle supports formoving an existing Oracle database from one hardware platform to another. thisincludes moving between Unix and NT systems. in Oracle10g you can use thetransportable tablespace feature to migrate a database to a different platformby creating a new database on the destination platform and discovery Ming atransport of all the user tablespaces.
Note that you cannot transport the system tablespace. therefore, objects suchas sequences, PL/SQL packages, and other objects that depend on the systemtablespace are not transported. you must either create these objects manuallyon the destination database, or use data pump to transport the objects that arenot moved by transportable tablespace. A full Database Export and Import can beused in all Oracle version to transfer a database using SS platforms.

Example:
-Source database is 32-bit 9.2.0.8 database on 32-bit Microsoft Windows2000
-Target database is 64-bit 10.2.0.3 database on 64-bit HP-Unix itanium11.22

The following steps provide a general overview of how to move a databasebetween platforms.

A. query the views dba_tablespaces, dba_data_files and dba_temp_files. You willneed this information later in the process.

B. perform a full export from the source database:

> Exp system/manager full = y file = exp_full.dmp log = exp_full.log

C. Transfer the export dumpfile in binary mode to thehp-Unix 11.22 server.

D. Create a new database on the target server.

E. before importing the dump file, you must first create your tablespaces, using the information obtained in step a (otherwise, the import will create thecorresponding datafiles in the same file structure as at the source database, which may not be compatible with the file structure on the targetsystem ).

F. perform a full import with the ignore parameter enabled:

> Imp system/manager full = y file = exp_full.dmp log = imp_full.log ignore = y

Using ignore = y instructs Oracle to ignore any creationerrors during the import and permit the import to complete.

-- This section describes how to export and import a full database.

 

For more examples, refer:

Oracleexpdp/impdp example

Http://blog.csdn.net/tianlesoftware/article/details/6260138

 

 

 

 

 

 

Bytes -------------------------------------------------------------------------------------------------------

All rights reserved. reprinted articles are allowed, but source addresses must be indicated by links. Otherwise, the documents will be held legally responsible!

Email: tianlesoftware@gmail.com

Skype: tianlesoftware

Blog: http://www.tianlesoftware.com

WEAVER: http://weibo.com/tianlesoftware

Twitter: http://twitter.com/tianlesoftware

Facebook: http://www.facebook.com/tianlesoftware

 

------- Add a group to describe the relationship between Oracle tablespace and data files in the remarks section. Otherwise, reject the application ----

Dba1 group: 62697716 (full); dba2 group: 62697977 (full) dba3 group: 62697850 (full)

Super DBA group: 63306533 (full); dba4 group: 83829929 dba5 group: 142216823

Dba6 group: 158654907 dba7 group: 172855474 DBA group: 104207940

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.