轉://RMAN跨平臺可傳輸表空間和數據庫

參考鏈接:

http://blog.itpub.net/23135684/viewspace-776048/

http://blog.sina.com.cn/s/blog_69e7b8d7010164xh.html

https://www.2cto.com/database/201311/260446.html

這篇文章翻譯自Oracle 11gR2官方文檔。詳細討論了使用RMAN工具的CONVERT DATAFILE,CONVERT TABLESPACE和CONVERT DATABASE命令實現跨平臺傳輸表空間和數據庫。

?

27? Transporting Data Across Platforms

You?can use RMAN to transport tablespaces across platforms with different endian formats. You can also use RMAN to transport an entire database to a different platform so long as the two platforms have the same endian format.

你可以使用RMAN在具有不同字節序序列的平臺之間傳輸表空間。?你也可以使用RMAN傳輸整個數據庫到不同的平臺,只要這兩個平臺具有相同的字符串格式即可。

?

Overview of Cross-Platform Data Transportation

This section explains the basic concepts and tasks involved in transporting tablespaces and databases across platforms.

Purpose of Cross-Platform Data Transportation

You can transport tablespaces in a database that runs on one platform into a database that runs on a different platform. Typical uses of cross-platform transportable tablespaces include the following:

你可以將在一個平臺上運行的數據庫中的表空間傳輸到在不同平臺上運行的數據庫。跨平臺可運輸表空間的典型用途包括:

  • Publishing structured data as transportable tablespaces for distribution to customers, who can convert the tablespaces for integration into their existing databases regardless of platform
  • Moving data from a large data warehouse server to data marts on smaller computers such as Linux-based workstations or servers
  • Sharing read-only tablespaces across a heterogeneous cluster in which all hosts share the same endian format

·?????????將結構化數據作為可傳輸表空間發布給客戶,無論平臺如何,可將表空間轉換為現有數據庫進行集成

·?????????將數據從大型數據倉庫服務器移動到較小型計算機(如基于Linux的工作站或服務器)上的數據集市

·?????????在異構集群中共享只讀表空間,其中所有主機共享相同的端格式

You can also use RMAN to transport an entire database from one platform to another. For example, business requirements demand that you run your databases on less expensive servers that use a different platform. In this case, you can use RMAN to transport the entire database rather than re-create it and use import utilities or transportable tablespaces to repopulate the data.

你還可以使用RMAN將整個數據庫從一個平臺傳輸到另一個平臺。例如,業務需求要求在使用不同平臺的較便宜的服務器上運行數據庫。在這種情況下,你可以使用RMAN傳輸整個數據庫,而不是重新創建它,并使用導入實用程序或可移動表空間重新填充數據。

You can convert a database on the destination host or source host. Reasons for converting on the destination host include:

你可以在目標主機或源主機上轉換數據庫。?在目的主機上轉換的原因包括:

  • Avoiding performance overhead on the source host due to the conversion process
  • Distributing a database from one source system to multiple recipients on several different platforms
  • Evaluating a migration path for a new platform

·?????????由于轉換過程,避免源主機的性能開銷

·?????????將數據庫從一個源系統分發到多個不同平臺上的多個收件人

·?????????評估新平臺的遷移路徑

?

Basic Concepts of Cross-Platform Data Transportation

You must use the RMAN?CONVERT?command in a transportable tablespace operation when the?source platform?is different from the?destination platformand the endian formats are different. If you are converting part of the database between platforms that have the same endian format, you can use operating system methods to copy the files from the source to the destination. If you are converting an entire, same endian database, any data files with undo information must be converted. You cannot copy the data files directly from the source to the destination platform.

當源平臺與目標平臺不同,并且字節存儲順序不同時,必須在可移動表空間操作中使用RMAN CONVERT命令。?如果要在具有相同字節存儲順序的平臺之間轉換部分數據庫,則可以使用操作系統方法將文件從源端復制到目標端。?如果要轉換整個具有相同字節存儲順序的數據庫,則必須轉換具有undo信息的任何數據文件。不能將數據文件直接從源端復制到目標平臺。

Tablespace and Data File Conversion

You can perform tablespace conversion with the RMAN?CONVERT?TABLESPACE?command on the source host, but not on the destination host. The?CONVERT TABLESPACE?command does not perform in-place conversion of data files. Rather, the command produces output files in the correct format for use on the destination platform. The command does not alter the contents of data files in the source database.

你以在源主機上使用RMAN CONVERT TABLESPACE命令進行表空間轉換,但該命令不能用在目標主機。?CONVERT TABLESPACE命令不能進行數據文件的就地轉換。?相反,該命令會以正確的格式生成輸出文件,以便在目標平臺上使用。?該命令不會更改源數據庫中的數據文件的內容。

You can use the?CONVERT?DATAFILE?command to convert files on the destination host, but not on the source host. The Data Pump Export utility generates anexport dump file?that, with data files manually copied to the destination host, can be imported into the destination database. Until the data files are transported into the destination database, the data files are not associated with a tablespace name in the database. In this case, RMAN cannot translate the tablespace name into a list of data files. Therefore, you must use?CONVERT?DATAFILE?and identify the data files by file name.

可以在目標主機上使用CONVERT DATAFILE命令轉換文件,但該命令不能用在源主機上。“數據泵導出”生成一個轉儲文件,可將該dump文件手動復制到目標主機,將其導入目標數據庫。?在將數據文件傳輸到目標數據庫之前,數據文件不與數據庫中的表空間名稱相關聯。在這種情況下,RMAN無法將表空間名稱轉換為數據文件列表。?因此,必須使用CONVERT DATAFILE來根據文件名來識別數據文件。

Database Conversion

To convert a whole database to a different platform, both platforms must use the same endian format. The RMAN?CONVERT?DATABASE?command automates the movement of an entire database from a source platform to a destination platform. The transported database contains the same data as the source database and also has, with a few exceptions, the same settings as the source database.

要將整個數據庫轉換為不同的平臺,兩個平臺必須使用相同的字節存儲順序。?RMAN CONVERT DATABASE命令自動將整個數據庫從源平臺移動到目標平臺。傳輸的數據庫包含與源數據庫相同的數據,除了少數特例,還有與源數據庫相同的設置。

自動傳送到目標平臺的文件包括:

Files automatically transported to the destination platform include:

  • Data files that belong to permanent tablespaces

Unlike transporting tablespaces across platforms, transporting entire databases requires that certain types of blocks, such as blocks in undo segments, be reformatted to ensure compatibility with the destination platform. Even though the endian formats for the source and destination platforms are the same, the data files for a transportable database must under go a conversion process. You cannot simply copy data files from one platform to another as you can when transporting tablespaces.

?屬于永久表空間的數據文件

與跨平臺傳輸表空間不同,傳輸整個數據庫需要重新格式化某些類型的塊(例如undo段中的塊),以確保與目標平臺的兼容性。即使源平臺和目標平臺的字節存儲順序相同,可傳輸數據庫的數據文件必須經過轉換。當在傳輸表空間時,你不能簡單地將數據文件從一個平臺復制到另一個平臺。

  • Initialization parameter file or server parameter file

If the database uses a text-based initialization parameter file, then RMAN transports it. If the database uses a server parameter file, then RMAN generates an initialization parameter file based on the server parameter file, transports it and creates a new server parameter file at the destination based on the settings in the initialization parameter file.

Usually, some parameters in the initialization parameter file require manual updating for the new database. For example, you may change the?DB_NAMEand parameters such as?CONTROL_FILES?that indicate the locations of files on the destination host.

?初始化參數文件或服務器參數文件

如果數據庫使用文本初始化參數文件,那么RMAN會傳輸它。如果數據庫使用服務器參數文件,首先RMAN會根據服務器參數文件生成一個初始化參數文件,并在目標端根據初始化參數文件中的設置傳輸并創建一個新的服務器參數文件。

通常,初始化參數文件中的一些參數需要手動更新新的數據庫。例如,您可以更改DB_NAME和參數(如CONTROL_FILES),以指示目標主機上文件的位置。

You can convert the format of the data files either on the source platform or on the destination platform. The?CONVERT DATABASE ON DESTINATION PLATFORM command does not convert the format of data files. Rather, it generates scripts that you can run manually to perform the conversion. The?CONVERT SCRIPTparameter creates a?convert script?that you can manually execute at the destination host to convert data file copies in batch mode. The?TRANSPORT SCRIPTparameter generates a?transport script?that contains SQL statements to create the new database on the destination platform.

可以在源平臺或目標平臺上轉換數據文件的格式。?CONVERT DATABASE ON DESTINATION PLATFORM命令不轉換數據文件的格式。?相反,它生成可以手動運行以執行轉換的腳本。?CONVERT SCRIPT參數創建一個轉換腳本,你可以在目標主機上手動執行轉換腳本,以批處理模式轉換數據文件副本。?TRANSPORT SCRIPT參數生成包含SQL語句的傳輸腳本,以在目標平臺上創建新的數據庫。

Performing Cross-Platform Tablespace Conversion on the Source Host(在源主機中執行跨平臺表空間傳輸)

For purposes of illustration, assume that you must transport tablespaces?finance?and?hr?from source database?prod_source, which runs on a Sun Solaris host. You plan to transport them to destination database?prod_dest?running on a Linux PC. You plan to store the converted data files in the temporary directory/tmp/transport_linux/?on the source host.

為了說明情況,假設你必須從在Sun Solaris主機上運行的源數據庫prod_source傳輸表空間financehr?你計劃將它們傳輸到運行在Linux PC上的目標數據庫prod_dest。你計劃將轉換的數據文件存儲在源主機上的/ tmp / transport_linux /臨時目錄中。

To perform cross-platform tablespace conversion on the source host:

在源主機上執行跨平臺表空間轉換:

  1. Start SQL*Plus and connect to the source database?prod_source?with administrator privileges.

啟動SQL * Plus,并以管理員權限連接到源數據庫prod_source

  1. Query the name for the destination platform in the?V$TRANSPORTABLE_PLATFORM?view.

The database has a list of its own internal names for each platform supporting cross-platform data transport. You may need the exact name of the source or destination platform as a parameter to the?CONVERT?command. Query?V$TRANSPORTABLE_PLATFORM?to get the platform names. The following example queries Linux platform names:

V $ TRANSPORTABLE_PLATFORM視圖中查詢目標平臺的名稱。

數據庫具有支持跨平臺數據傳輸的每個平臺的自己內部名稱的列表。?你可能需要源平臺或目標平臺的確切名稱作為CONVERT命令的參數。?查詢V $ TRANSPORTABLE_PLATFORM以獲取平臺名稱。?以下示例查詢Linux平臺名稱:

SELECT PLATFORM_ID, PLATFORM_NAME, ENDIAN_FORMAT
FROM?? V$TRANSPORTABLE_PLATFORM?
WHERE? UPPER(PLATFORM_NAME) LIKE '%LINUX%';

The?PLATFORM_NAME?for Linux on a PC is?Linux IA (32-bit).

  1. Place the tablespaces to be transported in read-only mode. For example, enter:

將待傳輸的表空間放置在只讀模式。

ALTER TABLESPACE finance READ ONLY;
ALTER TABLESPACE hr READ ONLY;

  1. Choose a method for naming the output files.

You must use the?FORMAT?or?DB_FILE_NAME_CONVERT?arguments to the?CONVERT?command to control the names of the output files. The rules are listed in order of precedence:

你必須使用CONVERT命令的FORMATDB_FILE_NAME_CONVERT參數來控制輸出文件的名稱。?規則按優先順序列出:

    1. Files that match any patterns provided in?CONVERT ... DB_FILE_NAME_CONVERT?clause are named based upon this pattern.
    2. If you specify a?FORMAT?clause, then any file not named based on patterns provided in?CONVERT ... DB_FILE_NAME_CONVERT?clause is named based on the?FORMAT?pattern.

如果指定了FORMAT子句,則根據CONVERT ... DB_FILE_NAME_CONVERT子句中提供的模式未命名的任何文件都將基于FORMAT模式進行命名。

Note:

You cannot use?CONVERT ... DB_FILE_NAME_CONVERT?to generate output file names for the?CONVERT?command when the source and destination files have Oracle Managed File names.

當源文件和目標文件具有Oracle托管文件名時,不能使用CONVERT ... DB_FILE_NAME_CONVERTCONVERT命令生成輸出文件名。

?

  1. Start RMAN and connect to the?source?database (not the destination database) as?TARGET. For example, enter:

% rman
RMAN> CONNECT TARGET SYS@prod_source

  1. Run the?CONVERT TABLESPACE?command to convert the data files into the endian format of the destination host.

In the following example, the?FORMAT?argument controls the name and location of the converted data files:

RMAN> CONVERT TABLESPACE finance,hr

2>?? TO PLATFORM 'Linux IA (32-bit)'

3> ??FORMAT '/tmp/transport_linux/%U';

The result is a set of converted data files in the?/tmp/transport_linux/?directory, with data in the correct endian format for the Linux IA (32-bit) platform.

  1. Follow the rest of the general outline for transporting tablespaces:
    1. Use the Oracle Data Pump Export utility to create the export dump file on the source host.
    2. Move the converted data files and the export dump file from the source host to the desired directories on the destination host.
    3. Plug the tablespace into the new database with the Import utility.
    4. If applicable, place the transported tablespaces into read/write mode.

使用Oracle?數據泵在源主機上創建導出轉儲文件。

將轉換的數據文件和導出轉儲文件從源主機移動到目標主機上的所需目錄。

使用導入程序將表空間插入新數據庫。

如果適用,將傳輸的表空間設置為讀/寫模式。

?

Performing Cross-Platform Data File Conversion on the Destination Host(在目標主機中執行跨平臺數據文件傳輸)

About Cross-Platform Data File Conversion on the Destination Host

Data file conversion necessitates that you choose a technique for naming the output files. You must use the?FORMAT?or?DB_FILE_NAME_CONVERT?arguments to theCONVERT?command to control the naming of output files. The rules are listed in order of precedence:

你必須使用CONVERT命令的FORMATDB_FILE_NAME_CONVERT參數來控制命名輸出文件。規則按優先順序列出:

  1. Files that match any patterns provided in?CONVERT ... DB_FILE_NAME_CONVERT?clause are named based upon this pattern.
  2. If you specify a?FORMAT?clause, then any file not named based on patterns provided in?CONVERT ... DB_FILE_NAME_CONVERT?clause is named based on theFORMAT?pattern.

CONVERT中提供的任何模式匹配的文件... DB_FILE_NAME_CONVERT子句根據此模式命名。

如果指定FORMAT子句,則根據CONVERT ... DB_FILE_NAME_CONVERT子句中提供的模式未命名的任何文件都將基于FORMAT模式進行命名。

Note:

You cannot use?CONVERT ... DB_FILE_NAME_CONVERT?to generate output file names for the?CONVERT?command when both the source and destination files are Oracle Managed Files.

當源文件和目標文件都是Oracle托管文件時,不能使用CONVERT ... DB_FILE_NAME_CONVERT來生成CONVERT命令的輸出文件名。

If the source and destination platforms differ, then you must specify the?FROM PLATFORM?parameter. View platform names by querying the V$TRANSPORTABLE_PLATFORM. The?FROM PLATFORM?value must match the format of the data files to be converted to avoid an error. If you do not specify?FROM PLATFORM, then this parameter defaults to the value of the destination platform.

如果源和目標平臺不同,則必須指定FROM PLATFORM參數。通過查詢V $ TRANSPORTABLE_PLATFORM查看平臺名稱。?FROM PLATFORM值必須與要轉換的數據文件的格式相匹配,以避免錯誤。如果不指定FROM PLATFORM,則此參數默認為目標平臺的值。

Using CONVERT DATAFILE to Convert Data File Formats

This section explains how to use the?CONVERT DATAFILE?command. The section assumes that you intend to transport tablespaces?finance?(data filesfin/fin01.dbf?and?fin/fin02.dbf) and?hr?(data files?hr/hr01.dbf?and?hr/hr02.dbf) from a source database named?prod_source. The database runs on a Sun Solaris host. You plan to transport these tablespaces into a destination database named?prod_dest, which runs on a Linux PC. You plan to perform conversion on the destination host.

假設你打算從prod_source源數據庫傳輸表空間financedata filesfin / fin01.dbffin / fin02.dbf)和hr(數據文件hr / hr01.dbfhr / hr02.dbf)。?該數據庫在Sun Solaris主機上運行。?你計劃將這些表空間傳輸到prod_dest目標數據庫,該數據庫在Linux PC上運行。你計劃在目標主機上執行轉換。

When the data files are plugged into the destination database, you plan to store them in?/orahome/dbs?and preserve the current directory structure. That is, data files for the?hr?tablespace are stored in the?/orahome/dbs/hr?subdirectory, and data files for the?finance?tablespace are stored in the?/orahome/dbs/fin directory.

當數據文件插入目標數據庫時,你計劃將它們存儲在/ orahome / dbs中,并保留當前的目錄結構。?也就是說,hr表空間的數據文件存儲在/ orahome / dbs / hr子目錄中,finance表空間數據文件存儲在/ orahome / dbs / fin目錄中。

To perform cross-platform data file conversion on the destination host:

  1. Start SQL*Plus and connect to the source database?prod_source?with administrator privileges.

啟動SQL * Plus,并以管理員權限連接到源數據庫prod_source

  1. Query the name for the source platform in?V$TRANSPORTABLE_PLATFORM.

The database has a list of its own internal names for each platform supporting cross-platform data transport. You may need the exact name of the source or destination platform as a parameter to the?CONVERT?command. For example, you can obtain the platform name of the connected database as follows:

V $ TRANSPORTABLE_PLATFORM中查詢源平臺的名稱。

數據庫具有支持跨平臺數據傳輸的每個平臺的自己內部名稱的列表。?您可能需要源或目標平臺的確切名稱作為CONVERT命令的參數。?例如,可以如下獲取連接的數據庫的平臺名稱:

SELECT PLATFORM_NAME
FROM?? V$TRANSPORTABLE_PLATFORM?
WHERE? PLATFORM_ID =
??????? ( SELECT PLATFORM_ID
?????????????????? FROM?? V$DATABASE );

For this scenario, assume that the?PLATFORM_NAME?for the source host is?Solaris[tm] OE (64-bit).

  1. Identify the tablespaces to be transported from the source database and place them in read-only mode.

將待傳輸的表空間放置在只讀模式。

For example, enter the following SQL statements to place?finance?and?hr?in read-only mode:

ALTER TABLESPACE finance READ ONLY;
ALTER TABLESPACE hr READ ONLY;

  1. On the source host, use Data Pump Export to create the export dump file

In this example, the dump file is named?expdat.dmp.

在源主機使用數據泵導出一個dump文件

  1. Make the export dump file and the data files to be transported available to the destination host.

將導出轉儲文件和要傳輸的數據文件提供給目標主機

You can use NFS to make the dump file and current database files (not copies) accessible. Alternatively, you can use an operating system utility to copy these files to the destination host.

In this example, you store the files in the?/tmp/transport_solaris/?directory of the destination host. You preserve the subdirectory structure from the original location of the files, that is, the data files are stored as:

  • /tmp/transport_solaris/fin/fin01.dbf
  • /tmp/transport_solaris/fin/fin02.dbf
  • /tmp/transport_solaris/hr/hr01.dbf
  • /tmp/transport_solaris/hr/hr02.dbf
Start RMAN and connect to the?destination?database (not the source database) as?TARGET. For example, enter the following command:

% rman
RMAN> CONNECT TARGET SYS@prod_dest

  1. Execute the?CONVERT DATAFILE?command to convert the data files into the endian format of the destination host.

執行CONVERT DATAFILE命令將數據文件轉換為目標主機的字節存儲順序。

In this example, you use?DB_FILE_NAME_CONVERT?to control the name and location of the converted data files. You also specify the?FROM?PLATFORM?clause.

RMAN> CONVERT DATAFILE
2>?? '/tmp/transport_solaris/fin/fin01.dbf',
3>?? '/tmp/transport_solaris/fin/fin02.dbf',
4>?? '/tmp/transport_solaris/hr/hr01.dbf',
5>?? '/tmp/transport_solaris/hr/hr02.dbf'
6>?? DB_FILE_NAME_CONVERT
7>???? '/tmp/transport_solaris/fin','/orahome/dbs/fin',
8>???? '/tmp/transport_solaris/hr','/orahome/dbs/hr'
9>?? FROM PLATFORM 'Solaris[tm] OE (64-bit)

The result is a set of converted data files in the?/orahome/dbs/?directory that are named as follows:

  • /orahome/dbs/fin/fin01.dbf
  • /orahome/dbs/fin/fin02.dbf
  • /orahome/dbs/hr/hr01.dbf
  • /orahome/dbs/hr/hr02.dbf
Follow the rest of the general outline for transporting tablespaces:
    1. Plug the tablespace into the new database with the Import utility.
    2. If applicable, place the transported tablespaces into read-only mode.

使用導入程序將表空間插入新數據庫。

將傳送的表空間置于只讀模式。


?

Checking the Database Before Cross-Platform Database Conversion(跨平臺數據庫轉換之前檢查數據庫)

As explained in?"Basic Concepts of Cross-Platform Data Transportation", you can use the RMAN?CONVERT DATABASE?command to automate the copying of an entire database from one platform to another.

你可以使用RMAN CONVERT DATABASE命令自動將整個數據庫從一個平臺復制到另一個平臺。

Before converting the database, see the list of?CONVERT DATABASE?command prerequisites described in?Oracle Database Backup and Recovery Reference.Confirm that you meet all these prerequisites before attempting the procedure in this section.

在轉換數據庫之前,請參閱Oracle數據庫備份和恢復參考中描述的CONVERT DATABASE命令先決條件列表。確認在嘗試本節中的過程之前,滿足所有這些先決條件。

One prerequisite is that both the source and destination platform must share the same endian format. For example, you can transport a database from Microsoft Windows to Linux for x86 (both little-endian), or from HP-UX to AIX (both big-endian), but not from HP-UX to Linux for x86 (big-endian to little-endian).

一個先決條件是源平臺和目標平臺必須共享相同的字節存儲順序。例如,你可以將數據庫從Microsoft Windows傳輸到Linux for x86(小端),或從HP-UX傳輸到AIX(大端),但不能從HP-UXLinux for x86(大端到小端)。

Note:

If you cannot use the?CONVERT DATABASE?command because the platforms do not share endian formats, then you can create a database on a destination platform manually and transport needed tablespaces from the source database with cross-platform transportable tablespaces.

如果不能使用CONVERT DATABASE命令,因為平臺字節存儲序列不一致,那么你可以手動創建目標平臺上的數據庫,并使用跨平臺的可移動表空間從源數據庫傳輸所需的表空間。

When you transport entire databases, note that certain files require RMAN conversion to ensure compatibility with the destination platform. Even though the endian formats for the source and destination platform are the same, these files cannot be simply copied from the source to the destination system. The following kinds of files require RMAN conversion:

當傳輸整個數據庫時,請注意,某些文件需要進行RMAN轉換才能確保與目標平臺的兼容性。即使源平臺和目標平臺的字節存儲順序相同,這些文件也不能簡單地從源文件復制到目標系統。以下類型的文件需要RMAN轉換:

  • Any file containing undo segments
  • Any file containing automatic segment space management (ASSM) segment headers that is being transported to or from the HP Tru64 platform

·?????????任何包含undo段的文件

·?????????任何包含自動段空間管理(ASSM)段頭的文件,這些段頭正在傳輸到HP Tru64平臺或從HP Tru64平臺傳輸

The?CONVERT DATABASE?command, by default, processes all data files in the database using RMAN conversion. The RMAN conversion copies the files from one location to another, even when it does not make any changes to the file. If you have other preferred means to copy those files that do not require RMAN conversion, you can use the?SKIP UNNECESSARY DATAFILES?option of the?CONVERT DATABASE?command. If you select this option, then the?CONVERT DATABASE?command only processes the kinds of files previously mentioned. All other files must be copied by the user from the source to the destination database.

CONVERT DATABASE命令默認使用RMAN轉換來處理數據庫中的所有數據文件。即使文件沒有進行任何更改,RMAN轉換將文件從一個位置復制到另一個位置。如果有其他首選方法來復制不需要RMAN轉換的文件,則可以使用CONVERT DATABASE命令的SKIP UNNECESSARY DATAFILES選項。如果選擇此選項,則CONVERT DATABASE命令僅處理上述文件的種類。所有其他文件必須由用戶從源復制到目標數據庫。

The files should be copied while the source database is open in read-only mode. Similarly, if the conversion is performed at the destination, all data files should be copied to the destination when the source database is open in read-only mode.

在源數據庫以只讀模式打開時,在復制文件。類似地,如果在目的地執行轉換,則當源數據庫以只讀模式打開時,所有數據文件都應被復制到目標。

To prepare for database conversion:

  1. Start a SQL*Plus session as?SYSDBA?on the source database.

SYSDBA的權限使用SQl*Plus連接到源數據庫

  1. Open the database in read-only mode.

以只讀模式打開數據庫

ALTER DATABASE OPEN READ ONLY;

  1. Ensure that server output is on in SQL*Plus.

For example, enter the following SQL*Plus command:

SET SERVEROUTPUT ON

  1. Execute the?DBMS_TDB.CHECK_DB?function.

執行DBMS_TDB.CHECK_DB函數

This check ensures that no conditions would prevent the transport of the database, such as incorrect compatibility settings, in-doubt or active transactions, or incompatible endian formats between the source platform and destination platform.

此檢查確保沒有條件會阻止數據庫的傳輸,例如不正確的兼容性設置,無效或活動事務,或源平臺和目標平臺之間不兼容的字節存儲順序。

You can call?CHECK_DB?without arguments to see if a condition at the source database prevents transport. You can also call this function with the arguments shown in?Table 27-1.

可以調用CHECK_DB而不用參數來查看源數據庫中的條件是否阻止傳輸。還可以使用表27-1所示的參數調用此函數。

Table 27-1 CHECK_DB Function Parameters

Parameter

Description

target_platform_name

The name of the destination platform as it appears in the?V$DB_TRANSPORTABLE_PLATFORM?view.

This parameter is optional, but is required when the?skip_option?parameter is used. If omitted, it is assumed that the destination platform is compatible with the source platform, and only the conditions not related to platform compatibility are tested.

skip_option

Specifies which, if any, parts of the database to skip when checking whether the database can be transported. Supported values (of type?NUMBER) are:

<span "="">o????SKIP_NONE?(or?0), which checks all tablespaces

<span "="">o????SKIP_OFFLINE?(or?2), which skips checking data files in offline tablespaces

<span "="">o????SKIP_READONLY?(or?3), which skips checking data files in read-only tablespaces

?

Example 27-1?illustrates executing?CHECK_DB?on a 32-bit Linux platform for transporting a database to 32-bit Windows, skipping read-only tablespaces.

驗證在32Linux平臺上執行CHECK_DB,用于將數據庫傳輸到32Windows,并跳過只讀表空間。

Example 27-1 Executing DBMS_TDB.CHECK_DB

DECLARE

? db_ready BOOLEAN;

BEGIN

? db_ready :=

?????? DBMS_TDB.CHECK_DB('Microsoft Windows IA (32-bit)',DBMS_TDB.SKIP_READONLY);

END;

/

?

PL/SQL procedure successfully completed.

If no warnings appear, or if?DBMS_TDB.CHECK_DB?returns?TRUE, then you can transport the database. Proceed to Step 6.

如果沒有出現警告,或DBMS_TDB.CHECK_DB返回TRUE,則可以傳輸數據庫。?繼續步驟6

If warnings appear, or if?DBMS_TDB.CHECK_DB?returns?FALSE, then you cannot currently transport the database. Proceed to Step 5.

如果出現警告,或DBMS_TDB.CHECK_DB返回FALSE,則無法傳輸數據庫。?繼續步驟5

  1. Examine the output to learn why the database cannot be transported, fix the problem if possible, and then return to the Step 4. See the?DBMS_TDBdocumentation for the conditions present.

檢查輸出以了解為什么無法傳輸數據庫,如果可能的話可以解決問題,然后返回到步驟4.有關條件的信息,請參閱DBMS_TDB文檔。

  1. Execute the?DBMS_TDB.CHECK_EXTERNAL?function to identify any external tables, directories, or BFILEs. RMAN cannot automate the transport of these files, so you must copy the files manually and re-create the database directories.

執行DBMS_TDB.CHECK_EXTERNAL函數來識別任何外部表,目錄或BFILE?RMAN無法自動傳輸這些文件,因此你必須手動復制文件并重新創建數據庫目錄。

?

Example 27-2?shows how to call the?DBMS_TDB.CHECK_EXTERNAL?function.

如何調用DBMS_TDB.CHECK_EXTERNAL函數

Example 27-2 Executing DBMS_TDB.CHECK_EXTERNAL

DECLARE

???? external BOOLEAN;

BEGIN

??? /* value of external is ignored, but with SERVEROUTPUT set to ON

???? * dbms_tdb.check_external displays report of external objects

???? * on console */

??? external := DBMS_TDB.CHECK_EXTERNAL;

END;

/

If no external objects exist, then the procedure completes with no output. If external objects exist, however, then the output is similar to the following:

如果沒有外部對象存在,那么該過程完成,沒有輸出。?但是,如果存在外部對象,則輸出類似于以下內容:

The following external tables exist in the database:
SH.SALES_TRANSACTIONS_EXT
The following directories exist in the database:
SYS.DATA_PUMP_DIR, SYS.MEDIA_DIR, SYS.DATA_FILE_DIR, SYS.LOG_FILE_DIR
The following BFILEs exist in the database:
PM.PRINT_MEDIA

?
PL/SQL procedure successfully completed.




Converting Data Files on the Source Host When Transporting a Database
(在傳輸數據庫時轉換源主機上的數據文件)

When you transport entire databases, certain types of blocks, such as blocks in undo segments, must be reformatted to ensure compatibility with the destination platform. Even though the endian formats for the source and destination platform are the same, the data files for a transportable database must undergo a conversion process. You cannot simply copy data files from one platform to another as you can when transporting tablespaces.

當在傳輸整個數據庫時,必須重新格式化某些類型的塊(例如undo段中的塊),以確保與目標平臺的兼容性。盡管源平臺和目標平臺的字節存儲順序相同,但可傳輸數據庫的數據文件必須經過轉換過程。你不可以在傳輸表空間時簡單地將數據文件從一個平臺復制到另一個平臺。

Data files with undo information and those from the HP Tru64 platform must be converted. By default, all data files are converted when the?CONVERT DATABASEcommand is executed. If, however,?SKIP UNNECESSARY DATAFILES?is used in the?CONVERT DATABASE?command, then the data files with undo segments and those from the HP Tru64 platform are converted. The data files without undo segments can be copied to the new database using FTP, an operating system copy command, or some other mechanism.

必須轉換具有undo信息和HP Tru64平臺的數據文件。默認情況下,執行CONVERT DATABASE命令時,將轉換所有數據文件。但是,如果在CONVERT DATABASE命令中使用SKIP UNNESSESSARY DATAFILES參數,則會轉換具有undo段和HP Tru64平臺的數據文件。沒有undo段的數據文件可以使用FTP,操作系統復制命令或其他機制復制到新數據庫。

This section assumes that you have already met all of the?CONVERT DATABASE?prerequisites and followed the steps in?"Checking the Database Before Cross-Platform Database Conversion". The goal of this procedure is to convert the format of data files on the source host as part of a cross-platform database transport.

假設你已經滿足了所有的CONVERT DATABASE先決條件,并按照“"Checking the Database Before Cross-Platform Database Conversion”中的步驟。該過程的目標是在源主機上轉換數據文件的格式,作為跨平臺數據庫傳輸的一部分。

Assume that you want to convert a database running on Solaris to a database that runs on Windows.

假設要將在Solaris上運行的數據庫轉換為在Windows上運行的數據庫。

To convert the database on the source platform:

  1. Open the source database in read-only mode.

ALTER DATABASE OPEN READ ONLY;

  1. Start RMAN and connect to the source database as?TARGET. For example, enter the following commands:

% rman
RMAN> CONNECT TARGET SYS@source_db

  1. Run the?CONVERT?DATABASE?command.

Example 27-3?shows a?CONVERT DATABASE?command (sample output included). The?TRANSPORT SCRIPT?parameter specifies the location of the generated SQL script that you can use to create the new database. The?TO PLATFORM?parameter indicates the platform of the destination database. TheDB_FILE_NAME_CONVERT?parameter specifies the naming scheme for the generated data files.

27-3顯示CONVERT DATABASE命令(包括樣本輸出)。?TRANSPORT SCRIPT參數指定可用于創建新數據庫的生成的SQL腳本的位置。?TO PLATFORM參數指示目標數據庫的平臺。?DB_FILE_NAME_CONVERT參數指定生成的數據文件的命名方案。

Example 27-3 Converting a Database on the Source Host

RMAN> CONVERT DATABASE

2>?? NEW DATABASE 'newdb'

3>?? TRANSPORT SCRIPT '/tmp/convertdb/transportscript.sql'

4>?? TO PLATFORM 'Microsoft Windows IA (32-bit)'

5>?? DB_FILE_NAME_CONVERT '/disk1/oracle/dbs' '/tmp/convertdb';

?

Starting convert at 25-NOV-06

using channel ORA_DISK_1

?

External table SH.SALES_TRANSACTIONS_EXT found in the database

?

Directory SYS.DATA_PUMP_DIR found in the database

Directory SYS.MEDIA_DIR found in the database

Directory SYS.DATA_FILE_DIR found in the database

Directory SYS.LOG_FILE_DIR found in the database

?

BFILE PM.PRINT_MEDIA found in the database

?

User SYS with SYSDBA and SYSOPER privilege found in password file

User OPER with SYSDBA privilege found in password file

channel ORA_DISK_1: starting datafile conversion

input datafile fno=00001 name=/disk1/oracle/dbs/tbs_01.f

converted datafile=/tmp/convertdb/tbs_01.f

channel ORA_DISK_1: datafile conversion complete, elapsed time: 00:00:15

channel ORA_DISK_1: starting datafile conversion

input datafile fno=00002 name=/disk1/oracle/dbs/tbs_ax1.f

converted datafile=/tmp/convertdb/tbs_ax1.f

channel ORA_DISK_1: datafile conversion complete, elapsed time: 00:00:03

.

.

.

channel ORA_DISK_1: starting datafile conversion

input datafile fno=00016 name=/disk1/oracle/dbs/tbs_52.f

converted datafile=/tmp/convertdb/tbs_52.f

channel ORA_DISK_1: datafile conversion complete, elapsed time: 00:00:01

Run?SQL script /tmp/convertdb/transportscript.sql?on the destination platform

? to create database

Edit?init.ora file init_00gb3vfv_1_0.ora.?This PFILE will be used to

? create the database on the destination platform

To recompile all PL/SQL modules, run utlirp.sql and utlrp.sql on

? the destination platform

To change the internal database identifier, use DBNEWID Utility

Finished backup at 25-NOV-06

  1. After?CONVERT?DATABASE?completes, you can open the source database read/write again.

CONVERT DATABASE完成后,可以以讀寫的方式打開源數據庫。

  1. Move the data files generated by?CONVERT DATABASE?to the desired locations on the destination host.

CONVERT DATABASE生成的數據文件移動到目標主機上所需的位置。

In?Example 27-3, the command creates the files in the?/tmp/convertdb/?directory on the source host. Move these files to the directory on the destination host that will contain the destination database files.

在例27-3中,該命令將在源主機上的/ tmp / convertdb /目錄中創建文件。?將這些文件移動到將包含目標數據庫文件的目標主機上的目錄。

  1. If the path to the data files is different on the destination host, then edit the transport script to refer to the new data file locations.

如果數據文件的路徑在目標主機上不同,則編輯傳輸腳本以引用新的數據文件位置。

  1. If necessary, edit the initialization parameter file to change any settings for the destination database.

如有必要,請編輯初始化參數文件以更改目標數據庫的任何設置。

You should edit several entries at the top of the initialization parameter file when the database is moved to the destination platform. For example, the initialization parameter file may look as follows:

當數據庫移動到目標平臺時,你應該編輯初始化參數文件頂部的多個條目。?例如,初始化參數文件可能如下所示:

# Please change the values of the following parameters:
control_files??????????? = "/tmp/convertdb/cf_D-NEWDBT_id-1778429277_00gb9u2s"
db_recovery_file_dest??? = "/tmp/convertdb/orcva"
db_recovery_file_dest_size= 10737418240
instance_name??????????? = "NEWDBT"
service_names?? ?????????= "NEWDBT.example.com"
plsql_native_library_dir = "/tmp/convertdb/plsqlnld1"
db_name????????????????? = "NEWDBT"

  1. If necessary, edit the transport script to use the new names for the converted data files.

如有必要,請編輯傳輸腳本以使用轉換后的數據文件的新名稱。

In?Example 27-3, the transport script is named?/tmp/convertdb/transportscript.sql. You run this script on the?destination?host to create the database. Thus, you must edit this script with the correct names for the data files.

在例27-3中,傳輸腳本命名為/tmp/convertdb/transportscript.sql?您可以在目標主機上運行此腳本來創建數據庫。?因此,您必須使用數據文件的正確名稱編輯此腳本。

  1. On the destination host, start SQL*Plus and connect to the destination database instance as?SYSDBA?using operating system authentication.

在目標主機上,啟動SQL * Plus,并使用操作系統身份驗證以SYSDBA連接到目標數據庫實例。

For example, connect as follows:

SQL> CONNECT / AS SYSDBA

If you choose not to use operating system authentication, then you must first configure Oracle Net files, create a?password file, and start the listener. You can then connect to the instance with a net service name.

如果你選擇不使用操作系統身份驗證,則必須首先配置Oracle Net文件,創建密碼文件,然后啟動偵聽器。?然后,您可以使用網絡服務名稱連接到實例。

  1. Execute the transport script in SQL*Plus to create the new database on the destination host.

SQL * Plus中執行傳輸腳本,以在目標主機上創建新的數據庫。

SQL> @transportscript

When the transport script finishes, the creation of the new database is complete.

傳輸腳本完成后,新數據庫的創建就完成了

?

Converting Data Files on the Destination Host When Transporting a Database(在傳輸數據庫時轉換目標主機上的數據文件)

This section assumes that you have already met all of the?CONVERT DATABASE?command prerequisites and followed the steps in?"Checking the Database Before Cross-Platform Database Conversion". The goal of this procedure is to convert the format of data files on the destination host as part of a cross-platform database transport.

假設你已經滿足了所有CONVERT DATABASE命令的先決條件,并按照“"Checking the Database Before Cross-Platform Database Conversion”中的步驟進行操作。?此過程的目標是在目標主機上轉換數據文件的格式,作為跨平臺數據庫傳輸的一部分。

Perform the data file conversion in the following phases:

  1. Performing Preliminary Data File Conversion Steps on the Source Host
  2. Converting Data Files on the Destination Host

在以下階段執行數據文件轉換:

在源主機上執行初步的數據文件轉換步驟

轉換目標主機上的數據文件

Performing Preliminary Data File Conversion Steps on the Source Host

In this procedure, you execute the?CONVERT DATABASE?command on the source host. This command generates an initialization parameter file and scripts that you can edit for use on the destination host. You also copy the unconverted data files from the source host to the destination host.

在此過程中,你可以在源主機上執行CONVERT DATABASE命令。?此命令生成一個初始化參數文件和腳本,你可以編輯該腳本以在目標主機上使用。你還將未轉換的數據文件從源主機復制到目標主機。

To perform preliminary data file conversion steps on the source host:

  1. Ensure that the database is open in read-only mode.

確保數據庫是以只讀方式打開

  1. Start RMAN and connect to the?source?database as?TARGET.

For example, enter the following commands:

% rman
RMAN> CONNECT TARGET SYS@source_db

  1. Run the?CONVERT?DATABASE ON DESTINATION PLATFORM?command.

Example 27-4?shows a sample?CONVERT DATABASE?command (sample output included). The?ON DESTINATION PLATFORM?parameter specifies that any?CONVERTcommands required for data files should be performed on the destination platform rather than the source platform. The?FORMAT?parameter specifies the naming scheme for the generated files.

示例27-4顯示了一個示例CONVERT DATABASE命令(包括樣本輸出)。?ON DESTINATION PLATFORM參數指定在目標平臺而不是源平臺上執行數據文件所需的任何CONVERT命令。?FORMAT參數指定生成的文件的命名方案。

Example 27-4 Executing CONVERT DATABASE ON DESTINATION PLATFORM

RMAN> CONVERT DATABASE

2>?? ON DESTINATION PLATFORM

3>?? CONVERT SCRIPT '/tmp/convertdb/convertscript-target'

4>?? TRANSPORT SCRIPT '/tmp/convertdb/transportscript-target'

5>?? NEW DATABASE 'newdbt'

6>?? FORMAT '/tmp/convertdb/%U';

?

Starting convert at 28-JAN-05

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: sid=39 devtype=DISK

?

External table SH.SALES_TRANSACTIONS_EXT found in the database

?

Directory SYS.DATA_PUMP_DIR found in the database

Directory SYS.MEDIA_DIR found in the database

Directory SYS.DATA_FILE_DIR found in the database

Directory SYS.LOG_FILE_DIR found in the database

?

BFILE PM.PRINT_MEDIA found in the database

?

User SYS with SYSDBA and SYSOPER privilege found in password file

User OPER with SYSDBA privilege found in password file

channel ORA_DISK_1: starting to check datafiles

input datafile fno=00001 name=/disk1/oracle/dbs/tbs_01.f

channel ORA_DISK_1: datafile checking complete, elapsed time: 00:00:00

channel ORA_DISK_1: starting to check datafiles

input datafile fno=00002 name=/disk1/oracle/dbs/tbs_ax1.f

channel ORA_DISK_1: datafile checking complete, elapsed time: 00:00:00

channel ORA_DISK_1: starting to check datafiles

input datafile fno=00017 name=/disk1/oracle/dbs/tbs_03.f

channel ORA_DISK_1: datafile checking complete, elapsed time: 00:00:00

.

.

.

channel ORA_DISK_1: starting to check datafiles

input datafile fno=00015 name=/disk1/oracle/dbs/tbs_51.f

channel ORA_DISK_1: datafile checking complete, elapsed time: 00:00:00

channel ORA_DISK_1: starting to check datafiles

input datafile fno=00016 name=/disk1/oracle/dbs/tbs_52.f

channel ORA_DISK_1: datafile checking complete, elapsed time: 00:00:00

Run SQL script /tmp/convertdb/transportscript-target on the destination platform to create database

Edit init.ora file /tmp/convertdb/init_00gb9u2s_1_0.ora. This PFILE will be used to create the database on the destination platform

Run RMAN script /tmp/convertdb/convertscript-target on destination platform to convert datafiles

To recompile all PL/SQL modules, run utlirp.sql and utlrp.sql on the destination platform

To change the internal database identifier, use DBNEWID Utility

Finished backup at 28-JAN-05

The command in?Example 27-4?creates a transport script, an initialization parameter file for the new database, and a convert script containing RMANCONVERT DATAFILE?commands for each data file being converted.

示例27-4中的命令創建一個傳輸腳本,一個用于新數據庫的初始化參數文件,以及一個轉換腳本,其中包含要轉換的每個數據文件的RMANCONVERT DATAFILE命令。

Note:

CONVERT?DATABASE?ON?DESTINATION?PLATFORM?does?not?produce converted data file copies. The command only creates scripts.

CONVERT DATABASE ON DESTINATION PLATFORM不會生成轉換的數據文件副本。?該命令僅創建腳本。

  1. Use an operating system utility to copy the following files to a temporary location on the destination host:

使用操作系統實用程序將以下文件復制到目標主機上的臨時位置:

  • The data files to be converted(要轉換的數據文件)
  • The convert script(轉換腳本)
  • The transport script(傳輸腳本)
  • The initialization file for the destination database(目標數據庫的初始化文件)
Make the source database read/write.

使源數據庫讀/寫。

Converting Data Files on the Destination Host

This section explains how to use the script created in the previous section to convert the data files on the destination host.

本節介紹如何使用上一節中創建的腳本來轉換目標主機上的數據文件。

The convert script created in the previous phase uses the original data file names of the source database files. The?FORMAT?parameter specifies the name that was generated with the?FORMAT?or?DB_FILE_NAME_CONVERT?parameter of the?CONVERT DATABASE?command.

在前一階段創建的轉換腳本使用源數據庫文件的原始數據文件名。?FORMAT參數指定使用CONVERT DATABASE命令的FORMATDB_FILE_NAME_CONVERT參數生成的名稱。

If the data files of the source database are accessible from the destination host with the same path names, then so long as the source database is read-only you can run the convert script on the destination host without any changes. For example, if the source and destination hosts both use NFS to mount a disk containing the source data files, and if the mount point for both hosts is?/fs1/dbs/, then no editing is needed.

如果源數據庫的數據文件可以從具有相同路徑名稱的目標主機訪問,那么只要源數據庫是只讀的,你可以在目標主機上運行轉換腳本,而不進行任何更改。?例如,如果源和目標主機都使用NFS裝載包含源數據文件的磁盤,并且如果兩個主機的安裝點為/ fs1 / dbs /,則不需要編輯。

To convert the data files on the destination host:

If necessary, edit the convert script.(如有必要,編輯轉換腳本)

In the script, one?CONVERT?DATAFILE?command exists for each data file to be converted. The convert script should indicate the current temporary file names of the unconverted data files and the output file names of the converted data files. A typical convert script looks as follows:

在腳本中,每個要轉換的數據文件都有一個CONVERT DATAFILE命令。?轉換腳本應該指示未轉換的數據文件的當前臨時文件名和轉換的數據文件的輸出文件名。?一個典型的轉換腳本如下所示:

RUN

{

?CONVERT

?FROM PLATFORM 'Linux IA (32-bit)'

?PARALLELISM 10

? DATAFILE '/disk1/oracle/dbs/tbs_01.f'

? FORMAT

?'/tmp/convertdb/data_D-TV_I-1778429277_TS-SYSTEM_FNO-1_7qgb9u2s';

?

?DATAFILE '/disk1/oracle/dbs/tbs_ax1.f'

?FORMAT

?'/tmp/convertdb/data_D-TV_I-1778429277_TS-SYSAUX_FNO-2_7rgb9u2s';

?

?DATAFILE '/disk1/oracle/dbs/tbs_03.f'

?FORMAT

?'/tmp/convertdb/data_D-TV_I-1778429277_TS-SYSTEM_FNO-17_7sgb9u2s';

?

?DATAFILE '/disk1/oracle/dbs/tbs_51.f'

?FORMAT

?'/tmp/convertdb/data_D-TV_I-1778429277_TS-TBS_5_FNO-15_8egb9u2u';

?

?DATAFILE '/disk1/oracle/dbs/tbs_52.f'

? FORMAT

?'/tmp/convertdb/data_D-TV_I-1778429277_TS-TBS_5_FNO-16_8fgb9u2u';

}

Edit each?DATAFILE?command in the convert script to specify the temporary location of each data file as input. Also, edit the?FORMAT?parameter of each command to specify the desired final location of the data files of the transported database.

convert腳本中編輯每個DATAFILE命令,以指定每個數據文件的臨時位置作為輸入。?此外,編輯每個命令的FORMAT參數以指定傳輸數據庫的數據文件的所需最終位置。

  1. If necessary, edit the initialization parameter file on the destination host to change settings for the destination database.

如有必要,編輯目標主機上的初始化參數文件以更改目標數據庫的設置。

You should edit several entries at the top of the initialization parameter file before moving the database to the destination platform. For example, the initialization parameter file may look as follows:

在將數據庫移動到目標平臺之前,應編輯初始化參數文件頂部的多個條目。?例如,初始化參數文件可能如下所示:

# Please change the values of the following parameters:

control_files??????????? = "/tmp/convertdb/cf_D-NEWDBT_id-1778429277_00gb9u2s"

db_recovery_file_dest??? = "/tmp/convertdb/orcva"

db_recovery_file_dest_size= 10737418240

instance_name??????????? = "NEWDBT"

service_names??????????? = "NEWDBT.example.com"

plsql_native_library_dir = "/tmp/convertdb/plsqlnld1"

db_name????????????????? = "NEWDBT"

  1. On the destination host, use SQL*Plus to start the database instance in?NOMOUNT?mode.

在目標主機上,使用SQL * PlusNOMOUNT模式啟動數據庫實例。

Specify the initialization parameter file that you copied in the preceding step. For example, enter the following command:

指定在上一步中復制的初始化參數文件。?例如,輸入以下命令:

SQL> STARTUP NOMOUNT PFILE='/tmp/init_convertdb_00i2gj63_1_0.ora'

  1. Start RMAN and connect to the destination database (not the source database) as?TARGET. For example, enter the following command:

% rman
RMAN> CONNECT TARGET SYS@prod_dest

  1. Run the convert script at the RMAN prompt. For example, enter the following command:

RMAN> @/tmp/convertdb/convertscript-target

  1. Shut down the database instance.

關閉數據庫實例。

This step is necessary because the transport script that must execute already includes a?STARTUP NOMOUNT?command.

此步驟是必需的,因為必須執行的傳輸腳本已經包含STARTUP NOMOUNT命令。

  1. If necessary, edit the transport script to use the new names for the converted data files.

如有必要,編輯傳輸腳本以使用轉換后的數據文件的新名稱。

In?Example 27-3, the transport script is?/tmp/convertdb/transportscript.sql. You run this script on the destination host to create the database. Thus, you must edit this script with the correct names for the data files.

在例27-3中,傳輸腳本為/tmp/convertdb/transportscript.sql?您可以在目標主機上運行此腳本來創建數據庫。?因此,您必須使用數據文件的正確名稱編輯此腳本。

  1. Execute the transport script in SQL*Plus.

SQL * Plus中執行傳輸腳本。

For example, create the new database on the destination host as follows:

SQL> @/tmp/convertdb/transportscript

When the transport script completes, the destination database is created.

傳輸腳本完成后,將創建目標數據庫

轉載于:https://www.cnblogs.com/zfox2017/p/8562527.html

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/278309.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/278309.shtml
英文地址,請注明出處:http://en.pswp.cn/news/278309.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

2139=數據結構實驗之圖論五:從起始點到目標點的最短步數(BFS)

1 #include<stdio.h>2 #include<string.h>3 int map[1000][1000],visit[1000];4 int step,mark;5 int queue[1000];//用來儲存已經遍歷了的數據。6 void BFS(int k)7 {8 int i,o0,p0,temp,end0;//temp用來表示當前所在地。o表示下一步從哪個頂點向下出發。9 …

vnc數量限制_通過限制視覺效果在Vista上加速VNC

vnc數量限制This article was written by MetrotekGeek from Metrotek Solutions, a friend of the How-To Geek 本文由Metrotek Solutions的MetrotekGeek撰寫&#xff0c;Metrotek Solutions是How-To Geek的朋友 As a computer field tech, I use the remote desktop program…

思科AP-什么是COS AP?

COS:Click OS 所有新的wave 2 AP都帶有COS。它建立在IOS之上&#xff0c;但behaves 不同。 COS APs是Click OS APs&#xff08;較新的AP型號&#xff0c;Wave 2等&#xff09; 例如&#xff1a;18xx&#xff0c;28xx&#xff0c;38xx&#xff0c;48xx型號Click OS APs或COS AP。…

[轉帖]外殼命名空間擴展

一般介紹 很多人一定用過ZipMagic&#xff0c;對它能把一個壓縮文件映射成文件夾感到很奇怪&#xff0c;不知道它使用了什么技術&#xff0c;實際上它用到的技術就是實現了一個外殼的命名空間擴展&#xff08;Shell Namespace Extention&#xff09;。 文件夾和視圖&#xff1a…

使Safari在Windows Vista上每20秒停止崩潰

The new Safari for Windows is a very slick browser that beats the pants off everything else in the speed department, but it crashes so much on Windows Vista that it’s virtually unusable. 新的Windows版Safari瀏覽器非常流暢&#xff0c;可以超越速度部門的所有…

js----與瀏覽列表有關的對象(瀏覽器對象)

document  location  history  navigator  screen   frame History 對象包含用戶&#xff08;在瀏覽器窗口中&#xff09;訪問過的 URL Location 對象包含有關當前 URL 的信息 Window 對象表示瀏覽器中打開的窗口 Navigator 對象包含有關瀏覽器的信息 轉載于:https:/…

[svc]jdk+tomcat部署.jforum論壇部署

安裝jdk和tomcat jdk1.7.0_13(系列)下載url 我這里用的最新的jdk. 去官網下載即可cd /usr/local/src/ tar xf jdk-8u162-linux-x64.tar.gz -C /usr/local/ ln -s /usr/local/jdk1.8.0_162 /usr/local/jdk tar xf apache-tomcat-8.5.29.tar.gz -C /usr/local/ ln -s /usr/local/…

ipad和iphone切圖_如何從iPhone和iPad上的Mail應用程序刪除電子郵件帳戶

ipad和iphone切圖Nicole Lienemann/Shutterstock妮可利尼曼(Nicole Lienemann)/ ShutterstockWhen you add your Google account to your iPhone or iPad in the Settings app, you’re adding your Gmail account to the Mail app. If you prefer to use third-party email cl…

使用nmcli 實現 bond0 網絡組 網橋三種模式

使用nmcli 實現 bond 網絡組 網橋模式 bond0&#xff08;負載均衡&#xff09; step1&#xff1a;創建一個bond0的主屬nmcli connection add con-name bond0 type bond ifname bond0 mode active-backup 之所以不為綠色是因為還沒有創建從屬&#xff0c;這個bond0相當于一個虛擬…

RabbitMQ是如何運轉的?

前言 之前已經介紹了RabbitMQ交換機模型的相關簡單概念&#xff0c;都是作為此篇的基礎鋪墊&#xff0c;如果對此篇不懂的可以先看我上一篇的介紹認識RabbitMQ交換機模型&#xff0c;或者聯系評論&#xff0c;分享《RabbitMQ實戰指南》電子書給大家&#xff0c;里面雖然有些許錯…

如何種植屢獲殊榮的青豆

Most people don’t know this yet, but I’ve decided to give up computers and become a farmer instead. Since I’m the helpful type, I’ve decided to share everything I know about farming with you, starting with how I won my prize winning green beans. 大多數…

充分利用Microsoft Planner的6種方法

Microsoft Planner is pretty simple to use, but some of its more useful features aren’t front and center. If you’re just creating and moving tasks, here are six ways to get a bit more out of Planner. Here’s everything you need to know. Microsoft Planner的…

IOS - UTF-8轉碼問題

2016.07.06 21:45* 字數 61 閱讀 921評論 0喜歡 2 IOS中提供的轉碼。 [utf8str stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; 轉碼后發現&#xff0c;與java的不一樣。 原來IOS中轉碼的標準不一致&#xff0c;導致出現錯誤。 不過&#xff0c;可以使用下…

手把手教你如何實現繼承

本文將從最簡單的例子開始&#xff0c;從零講解在 JavaScript 中如何實現繼承。 小例子 現在有個需求&#xff0c;需要實現 Cat 繼承 Animal &#xff0c;構造函數如下&#xff1a; function Animal(name){this.name name }function Cat(name){this.name name } 復制代碼注&a…

最詳細的排序解析,理解七大排序

最詳細的排序解析&#xff0c;理解七大排序 mp.weixin.qq.com點擊上方“方志朋”&#xff0c;選擇“置頂或者星標” 你的關注意義重大&#xff01; 注&#xff1a; lgN在這里為1og2N簡寫 為了方便描述,本文默認用int類型比較&#xff0c;從小到大排序 本文排序算法以java語言…

xp刪除管理員賬戶_在Windows XP中從登錄屏幕刪除用戶帳戶

xp刪除管理員賬戶So you login to your computer every single day, but there’s more than one account to choose from… either because you got the computer from somebody else, or some software package added a user account that you really don’t want to see. So…

Java網絡爬蟲實操(8)

上一篇&#xff1a;Java網絡爬蟲實操&#xff08;7&#xff09; 大家好&#xff0c;本篇文章介紹一下NetDiscovery爬蟲框架里的downloader對象 1) 前言 面向對象設計仍然是目前編程的核心思想&#xff0c;從下面截圖可以了解爬蟲框架的主要對象&#xff1a; 程序在本地組織好一…

Pycharm下將py文件打包成exe文件

1. 在PyCharm下安裝PyInstaller 1. 首先&#xff0c;打開自己要發布的工程 2. 點擊底部的【Terminal】打開終端&#xff0c;中輸入命令pip install pyinstaller后回車&#xff0c;如圖所示進行安裝 3. 輸入命令 pyinstaller&#xff0c;回車顯示安裝成功 4. 輸入命令 pyinstall…

什么是自然語言處理,它如何工作?

NicoElNino/Shutterstock.comNicoElNino / Shutterstock.comNatural language processing enables computers to process what we’re saying into commands that it can execute. Find out how the basics of how it works, and how it’s being used to improve our lives. 自…

GIT速查手冊

為什么80%的碼農都做不了架構師&#xff1f;>>> 一、GIT 1.1 簡單配置 git是版本控制系統&#xff0c;與svn不同的是git是分布式&#xff0c;svn是集中式 配置文件位置 # 配置文件 .git/config 當前倉庫的配置文件 ~/.gitconfig 全局配置文件# 查看所有配置項 git …