Inhaltsverzeichnis
PPAS还有个命令行的迁移工具,比图形界面可以有对迁移过程有更多控制,具体见下面其可带的参数:
Heim Datenbank MySQL-Tutorial 把数据库从oracle迁移到PPAS

把数据库从oracle迁移到PPAS

Jun 07, 2016 pm 03:38 PM
oracle 数据库 迁移

PPAS有两个迁移工具,一个图形界面的,一个命令行的,下面以图形界面为例。 1 首先需要在目标数据库系统PPAS上建立和源库对应的用户和对等的权限,再建立目标数据库。 create user USERNAMEXXX withsuperuser password 'xxxxxx'; create database DatabaseNa

PPAS有两个迁移工具,一个图形界面的,一个命令行的,下面以图形界面为例。

 

1

首先需要在目标数据库系统PPAS上建立和源库对应的用户和对等的权限,再建立目标数据库。

create user " USERNAMEXXX " withsuperuser password 'xxxxxx';

create database DatabaseNameowner="TYTUTOR" encoding='utf8';

 

2

根据jre版本(当前环境是1.4版)把oracle数据库的驱动程序拷贝到如下目录

/opt/PostgresPlus/9.2AS/jre/lib/ext/ojdbc14.jar

 

3

运行PPAS迁移工具


把数据库从oracle迁移到PPAS
 

 

4


把数据库从oracle迁移到PPAS
 


 

5

在servers上右键点击增加迁移的源和目标数据库


把数据库从oracle迁移到PPAS
 

 

6

 


把数据库从oracle迁移到PPAS
 

 

7

在左侧oracle源数据库上右键点击要迁移的schema,现在在线迁移


把数据库从oracle迁移到PPAS
 

 

8

选择目标数据库,schema,点击run


把数据库从oracle迁移到PPAS
 

 

Ok了,开始迁移了,可以看过程中的信息提示或迁移日志文件,oracle迁移到pg可能有很多pl/sql的数据库对象都会失败,要迁到ppas就好多了,因为ppas有oracle兼容引擎。

       都搞定后就可以迁移应用程序了,这又是一堆事。

 

PPAS还有个命令行的迁移工具,比图形界面可以有对迁移过程有更多控制,具体见下面其可带的参数:

 

ot@host1 9.2AS]#jre/bin/java -jar bin/edb-migrationtoolkit.jar -help

 

EnterpriseDBMigration Toolkit (Build 46)

 

Usage: runMTK[-options] SCHEMA

 

If no option isspecified, the complete schema will be imported.

 

where optionsinclude:

-help        Display the application command-lineusage.

-version    Display the application version information.

-verbose [on|off]Display application log messages on standard output (default: on).

 

-schemaOnly  Import the schema object definitions only.

-dataOnly       Import the table data only. When -tablesis in place, it imports data only for the selected tables. Note: If there areany FK constraints defined on target tables, use -truncLoad option along withthis option.

 

-sourcedbtypedb_type The -sourcedbtype option specifies the source database type. db_typemay be one of the following values: mysql, oracle, sqlserver, sybase,postgresql, enterprisedb. db_type is case-insensitive. By default, db_type is oracle.

-targetdbtypedb_type The -targetdbtype option specifies the target database type. db_typemay be one of the following values: oracle, sqlserver, postgresql,enterprisedb. db_type is case-insensitive. By default, db_type is enterprisedb.

 

-allTables Import all tables.

-tables LIST   Import comma-separated list of tables.

-constraints     Import the table constraints.

-indexes   Import the table indexes.

-triggers   Import the table triggers.

-allViews Import all Views.

-views LIST   Import comma-separated list of Views.

-allProcs   Import all stored procedures.

-procs LIST    Import comma-separated list of storedprocedures.

-allFuncs  Import all functions.

-funcs LIST    Import comma-separated list of functions.

-allPackages    Import all packages.

-packages LISTImport comma-separated list of packages.

-allSequences  Import all sequences.

-sequences LISTImport comma-separated list of sequences.

-targetSchemaNAME Name of the target schema (default: target schema is named after sourceschema).

-allDBLinks    Import all Database Links.

-allSynonyms  It enables the migration of all public andprivate synonyms from an Oracle database to an Advanced Server database.  If a synonym with the same name alreadyexists in the target database, the existing synonym will be replaced with themigrated version.

-allPublicSynonyms      It enables the migration of all publicsynonyms from an Oracle database to an Advanced Server database.  If a synonym with the same name alreadyexists in the target database, the existing synonym will be replaced with themigrated version.

-allPrivateSynonyms    It enables the migration of all privatesynonyms from an Oracle database to an Advanced Server database.  If a synonym with the same name alreadyexists in the target database, the existing synonym will be replaced with themigrated version.

 

-dropSchema[true|false] Drop the schema if it already exists in the target database(default: false).

-truncLoad     It disables any constraints on target tableand truncates the data from the table before importing new data. This optioncan only be used with -dataOnly.

-safeMode      Transfer data in safe mode using plain SQLstatements.

-copyDelimiter      Specify a single character to be used asdelimiter in copy command when loading table data. Default is \t

-batchSize       Specify the Batch Size to be used by thebulk inserts. Valid values are  1-1000,default batch size is 1000, reduce if you run into Out of Memory exception

-cpBatchSize  Specify the Batch Size in MB, to be used inthe Copy Command. Valid value is > 0, default batch size is 8 MB

-fetchSize       Specify fetch size in terms of number ofrows should be fetched in result set at a time. This option can be used whentables contain millions of rows and you want to avoid out of memory errors.

-filterProp       The properties file that contains tablewhere clause.

-skipFKConst Skip migration of FK constraints.

-skipCKConst       Skip migration of Check constraints.

-ignoreCheckConstFilter     By default MTK does not migrate Checkconstraints and Default clauses from Sybase, use this option to turn off thisfilter.

-fastCopy       Bypass WAL logging to perform the COPYoperation in an optimized way, default disabled.

-customColTypeMappingLIST Use custom type mapping representedby a semi-colon separated list, where each entry is specified usingCOL_NAME_REG_EXPR=TYPE pair. e.g. .*ID=INTEGER

-customColTypeMappingFilePROP_FILE    The custom type mappingrepresented by a properties file, where each entry is specified usingCOL_NAME_REG_EXPR=TYPE pair. e.g. .*ID=INTEGER

-offlineMigration[PATH] This performs offline migration and saves the DDL/DML scripts in filesfor a later execution. By default the script files will be saved under userhome folder, if required follow -offlineMigration option with a custom path.

-logDir LOG_PATHSpecify a custom path to save the log file. By default, on Linux the logs willbe saved under folder $HOME/.enterprisedb/migration-toolkit/logs. In case ofWindows logs will be saved under folder%HOMEDRIVE%%HOMEPATH%\.enterprisedb\migration-toolkit\logs.

-copyViaDBLinkOraThis option can be used to copy data using dblink_ora COPY commad. This optioncan only be used in Oracle to EnterpriseDB migration mode.

-singleDataFile      Use single SQL file for offline datastorage for all tables. This option cannot be used in COPY format.

-allUsers Import allusers and roles from the source database.

-users LISTImport the selected users/roles from the source database. LIST is acomma-separated list of user/role names e.g. -users MTK,SAMPLE

-allRules Importall rules from the source database.

-rules LIST Importthe selected rules from the source database. LIST is a comma-separated list ofrule names e.g. -rules high_sal_emp,low_sal_emp

-allGroups Importall groups from the source database.

-groups LISTImport the selected groups from the source database. LIST is a comma-separatedlist of group names e.g. -groups acct_emp,mkt_emp

-allDomainsImport all domain, enumeration and composite types from the source database.

-domains LISTImport the selected domain, enumeration and composite types from the sourcedatabase. LIST is a comma-separated list of domain names e.g. -domainsd_email,d_dob, mood

-objecttypes    Import the user-defined object types.

-replaceNullChar If null character is part of a column value, the data migrationfails over JDBC protocol. This option can be used to replace null characterwith a user-specified character.

-importPartitionAsTable[LIST] Use this option to import Oracle Partitioned table as a normal table inEnterpriseDB. To apply the rule on a selected set of tables, follow the optionby a comma-separated list of table names.

-enableConstBeforeDataLoadUse this option to re-enable constraints (and triggers) before data load. Thisis useful in the scenario when the migrated table is mapped to a partitiontable in EnterpriseDB.

-checkFunctionBodies[true|false] When set to false, it disables validation of the function bodyduring function creation, this is to avoid errors if function contains forwardreferences. Applicable when target database is Postgres/EnterpriseDB, defaultis true.

-retryCount VALUE    Specify the number of re-attempts performedby MTK to migrate objects that failed due to cross-schema dependencies. TheVALUE parameter should be greater than 0, default is 2.

-analyze It invokes ANALYZE operation against a targetPostgres or Postgres Plus Advanced Server database. The ANALYZE collectsstatistics for the migrated tables that are utilized for efficient query plans.

-vacuumAnalyze It invokes VACUUM and ANALYZE operationsagainst a target Postgres or Postgres Plus Advanced Server database. The VACUUMreclaims dead tuple storage whereas ANALYZE collects statistics for themigrated tables that are utilized for efficient query plans.

-loaderCountVALUE Specify the number of jobs (threads)to perform data load in parallel. The VALUE parameter should be greater than 0,default is 1.

 

DatabaseConnection Information:

The applicationwill read the connectivity information for the source and target databaseservers from toolkit.properties file.

Refer to MTKreadme document for more information.


Erklärung dieser Website
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn

Heiße KI -Werkzeuge

Undresser.AI Undress

Undresser.AI Undress

KI-gestützte App zum Erstellen realistischer Aktfotos

AI Clothes Remover

AI Clothes Remover

Online-KI-Tool zum Entfernen von Kleidung aus Fotos.

Undress AI Tool

Undress AI Tool

Ausziehbilder kostenlos

Clothoff.io

Clothoff.io

KI-Kleiderentferner

AI Hentai Generator

AI Hentai Generator

Erstellen Sie kostenlos Ai Hentai.

Heißer Artikel

R.E.P.O. Energiekristalle erklärten und was sie tun (gelber Kristall)
3 Wochen vor By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Beste grafische Einstellungen
3 Wochen vor By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. So reparieren Sie Audio, wenn Sie niemanden hören können
3 Wochen vor By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: Wie man alles in Myrise freischaltet
3 Wochen vor By 尊渡假赌尊渡假赌尊渡假赌

Heiße Werkzeuge

Notepad++7.3.1

Notepad++7.3.1

Einfach zu bedienender und kostenloser Code-Editor

SublimeText3 chinesische Version

SublimeText3 chinesische Version

Chinesische Version, sehr einfach zu bedienen

Senden Sie Studio 13.0.1

Senden Sie Studio 13.0.1

Leistungsstarke integrierte PHP-Entwicklungsumgebung

Dreamweaver CS6

Dreamweaver CS6

Visuelle Webentwicklungstools

SublimeText3 Mac-Version

SublimeText3 Mac-Version

Codebearbeitungssoftware auf Gottesniveau (SublimeText3)

iOS 18 fügt eine neue Albumfunktion „Wiederhergestellt' hinzu, um verlorene oder beschädigte Fotos wiederherzustellen iOS 18 fügt eine neue Albumfunktion „Wiederhergestellt' hinzu, um verlorene oder beschädigte Fotos wiederherzustellen Jul 18, 2024 am 05:48 AM

Apples neueste Versionen der iOS18-, iPadOS18- und macOS Sequoia-Systeme haben der Fotoanwendung eine wichtige Funktion hinzugefügt, die Benutzern dabei helfen soll, aus verschiedenen Gründen verlorene oder beschädigte Fotos und Videos einfach wiederherzustellen. Mit der neuen Funktion wird im Abschnitt „Extras“ der Fotos-App ein Album mit dem Namen „Wiederhergestellt“ eingeführt, das automatisch angezeigt wird, wenn ein Benutzer Bilder oder Videos auf seinem Gerät hat, die nicht Teil seiner Fotobibliothek sind. Das Aufkommen des Albums „Wiederhergestellt“ bietet eine Lösung für Fotos und Videos, die aufgrund einer Datenbankbeschädigung verloren gehen, die Kameraanwendung nicht korrekt in der Fotobibliothek speichert oder eine Drittanbieteranwendung die Fotobibliothek verwaltet. Benutzer benötigen nur wenige einfache Schritte

Ausführliches Tutorial zum Herstellen einer Datenbankverbindung mit MySQLi in PHP Ausführliches Tutorial zum Herstellen einer Datenbankverbindung mit MySQLi in PHP Jun 04, 2024 pm 01:42 PM

So verwenden Sie MySQLi zum Herstellen einer Datenbankverbindung in PHP: MySQLi-Erweiterung einbinden (require_once) Verbindungsfunktion erstellen (functionconnect_to_db) Verbindungsfunktion aufrufen ($conn=connect_to_db()) Abfrage ausführen ($result=$conn->query()) Schließen Verbindung ( $conn->close())

Umgang mit Datenbankverbindungsfehlern in PHP Umgang mit Datenbankverbindungsfehlern in PHP Jun 05, 2024 pm 02:16 PM

Um Datenbankverbindungsfehler in PHP zu behandeln, können Sie die folgenden Schritte ausführen: Verwenden Sie mysqli_connect_errno(), um den Fehlercode abzurufen. Verwenden Sie mysqli_connect_error(), um die Fehlermeldung abzurufen. Durch die Erfassung und Protokollierung dieser Fehlermeldungen können Datenbankverbindungsprobleme leicht identifiziert und behoben werden, wodurch der reibungslose Betrieb Ihrer Anwendung gewährleistet wird.

Wie verwende ich Datenbank-Callback-Funktionen in Golang? Wie verwende ich Datenbank-Callback-Funktionen in Golang? Jun 03, 2024 pm 02:20 PM

Durch die Verwendung der Datenbank-Rückruffunktion in Golang kann Folgendes erreicht werden: Ausführen von benutzerdefiniertem Code, nachdem der angegebene Datenbankvorgang abgeschlossen ist. Fügen Sie benutzerdefiniertes Verhalten durch separate Funktionen hinzu, ohne zusätzlichen Code zu schreiben. Rückruffunktionen stehen für Einfüge-, Aktualisierungs-, Lösch- und Abfragevorgänge zur Verfügung. Sie müssen die Funktion sql.Exec, sql.QueryRow oder sql.Query verwenden, um die Rückruffunktion verwenden zu können.

Wie lässt sich Go WebSocket in Datenbanken integrieren? Wie lässt sich Go WebSocket in Datenbanken integrieren? Jun 05, 2024 pm 03:18 PM

So integrieren Sie GoWebSocket in eine Datenbank: Richten Sie eine Datenbankverbindung ein: Verwenden Sie das Datenbank-/SQL-Paket, um eine Verbindung zur Datenbank herzustellen. Speichern Sie WebSocket-Nachrichten in der Datenbank: Verwenden Sie die INSERT-Anweisung, um die Nachricht in die Datenbank einzufügen. WebSocket-Nachrichten aus der Datenbank abrufen: Verwenden Sie die SELECT-Anweisung, um Nachrichten aus der Datenbank abzurufen.

Wie speichere ich JSON-Daten in einer Datenbank in Golang? Wie speichere ich JSON-Daten in einer Datenbank in Golang? Jun 06, 2024 am 11:24 AM

JSON-Daten können mithilfe der gjson-Bibliothek oder der json.Unmarshal-Funktion in einer MySQL-Datenbank gespeichert werden. Die gjson-Bibliothek bietet praktische Methoden zum Parsen von JSON-Feldern, und die Funktion json.Unmarshal erfordert einen Zieltypzeiger zum Unmarshalieren von JSON-Daten. Bei beiden Methoden müssen SQL-Anweisungen vorbereitet und Einfügevorgänge ausgeführt werden, um die Daten in der Datenbank beizubehalten.

Praxisfall: Anbindung an heterogene Datenbanksysteme mittels PHP Praxisfall: Anbindung an heterogene Datenbanksysteme mittels PHP Jun 02, 2024 pm 08:46 PM

Die PHP-Verbindung zu heterogenen Datenbanken bietet die Möglichkeit, über verschiedene Datenbanksysteme hinweg zu interagieren, indem bestimmte Erweiterungen (z. B. PDO_SQLSRV, PDO_OCI, PDO_MYSQL) installiert und PDO-Klassen zum Herstellen einer Verbindung mit der Datenbank verwendet werden. Im konkreten Fall fragt PHP die SQL Server- und Oracle-Datenbank ab und führt die Ergebnisse zusammen. Durch diese Schritte können Benutzer heterogene Datenbanken integrieren, um leistungsstarke Anwendungen zu erstellen, die mehrere Datenquellen umfassen.

Fallstricke bei PHP-Datenbankverbindungen: Vermeiden Sie häufige Fehler und Missverständnisse Fallstricke bei PHP-Datenbankverbindungen: Vermeiden Sie häufige Fehler und Missverständnisse Jun 05, 2024 pm 10:21 PM

Um Fehler bei der PHP-Datenbankverbindung zu vermeiden, befolgen Sie Best Practices: Überprüfen Sie auf Verbindungsfehler und gleichen Sie Variablennamen mit Anmeldeinformationen ab. Verwenden Sie sichere Speicher- oder Umgebungsvariablen, um eine Hardcodierung von Anmeldeinformationen zu vermeiden. Schließen Sie die Verbindung nach der Verwendung, um eine SQL-Injection zu verhindern, und verwenden Sie vorbereitete Anweisungen oder gebundene Parameter.

See all articles