Mysql database migrated to Oracle database _mysql

Source: Internet
Author: User
Tags oracle database

The example of this article for everyone to share the Java access to different paths for your reference, the specific content as follows

1. Use tools:

(1) Navicat Premium
(2) Pl/sql Developer 11.0
(3) Oracle SQL Developer 4.0.0.12.84 (click to enter the download page)
Special Note: initially I used a high version of the SQL Developer, but in the database porting to about two minutes, always error, and wrong message is not clear. Finally, replace with Oracle SQL Developer 4.0.0.12.84, To solve the problem! If you encounter the same problem, suggest that you also change to this low version.

2. Backup MySQL Database

Use Navicat Premium connection need to migrate MySQL database, in order to prevent misoperation to the database damage, so first to backup the source database, the backup database of MySQL database migration operations.
Using Navicat premium to back up your database is easy, as shown in the following figure:

(1) Create a new MySQL database as a backup

(2) Select the MySQL database to be backed up to perform the backup operation



Click to start , you can successfully complete the database backup.

3. Create Oracle Tablespace and user

In MySQL, the relationship between the database and the user is not particularly obvious, as long as we link to the MySQL server, you can see all the databases and tables, and Oracle created a new user does not have any resources and permissions, we need to assign resources to their rights, you can also create a table under this user, But you can't build a database like Oracle, because for Oracle, a user corresponds to a database of MySQL. So migrating a database requires creating a user in Oracle with the same name as the appropriate MySQL database.

(1) Because Scott does not have enough permissions to create a user, in addition to the other higher permissions of the account password forgotten, so here to add the Oracle Change Password method:

A. Enter ' Sqlplus SCOTT/TIGER@192.168.56.6:1521/ORCL ' on the console to connect Oracle;
B. Enter ' Conn/as sysdba ' into the DBA role;

C. After successful connection, type Select username from all_users to view the list of users.
D. If you modify a user password, modify the user password format:

Alter user username identified by new password;

(2) Use user system login Pl/sql Developer, create tablespace and user

Create tablespace casic_smart datafile ' C:\oracle\product\10.2.0\oradata\orcl\casic_smart.dbf ' size 1000m;
Create user Tianzhi_smart identified by tianzhi_smart default Tablespace casic_smart quota 500m on users;
Grant all privileges to tianzhi_smart;

4. Converting databases via Oracle SQL Developer

(1) Open the Oracle SQL Developer, configure the MySQL connection plug-in, only after configuration, you can see the MySQL tab:


Add a good driver and we'll start connecting to a database transplant.

"> (2) Add two connections, one is MySQL, one is Oracle:

(3) Conversion of databases through Oracle SQL Developer:

Note : After the conversion is completed, you need to check whether the various objects of the database are complete, the status is correct, especially the number of tables must be checked, because sometimes some tables will not be successful conversion, need to hand-operated.

The above is the entire content of this article, I hope to help you learn, but also hope that we support the cloud habitat community.

Related Article

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.