50 things you need to know before migrating Mysql to Oracle _ MySQL

Source: Internet
Author: User
Tags oracle documentation
In fact, I saw a few people sorted out by Robert treat on the same day & rdquo; 50 things I need to know before migrating Mysql to Oracle & ldquo; and BaronSchwartz & rdquo; before migrating data from Oracle to Mysql, you need to know 50 things & ldquo;, but this list of BaronSchwartz may be more useful to everyone, so we will first round it out. in addition, the differences they listed are quite meaningful, some may be the same day when I saw the 50 things that Robert Treat had sorted out before Mysql was migrated to Oracle. what I need to know before migrating Oracle to Mysql from Baron Schwartz? 50 things, it's just that this list of Baron Schwartz may be more useful to everyone, so we will first round it out. in addition, some of the differences they listed are quite meaningful. some may be due to their own identity as a Mysql DBA, and some may be confused about Oracle. however, in general, the list of Baron Schwartz can help you understand the similarities and differences between Oracle and Mysql ..

  Robert Treat

1. some people say that Oracle has no restrictions. In fact, they may say that Oracle does not support the LIMIT syntax, but it can be implemented using the rownum virtual column, but it will be more troublesome.

2. Oracle does not support the offset syntax.

3. Oracle Replication may be more robust than MySQL, but it is more difficult to configure.

4. for systems of multiple Master types, most users want you to use more complex and expensive Oracle RAC (although NDB may be more robust ).

5. the partitioning function of Oracle is very robust, but it is not built-in and requires special payment for this (the partitioning function is built-in in Enterprise Edition ).

6. on Linux/Unix, Oracle is not as convenient as Mysql. by default, many Linux/Unix releases bring their own Mysql. (My understanding of this and translation may be different)

7. INSERT... On duplicate key update syntax will no longer be available, but you need to learn more complex (but compliant with SQL standards) MERGE syntax.

8. oracle's ROLE architecture is very different from that of MySQL, so you cannot use the root ROLE to complete all the work. (However, the permissions of Sys users are still the same as those of root users, but they are not recommended for security purposes ).

9. the Role account is associated with a specific Schema (and vice versa), similar to the Database concept in the MySQL Database. (The Role is not completely associated with the Schema. The system has some fixed role, which contains some of the defined permission sets (privilege set ), you can also customize some new role ).

10. In fact, discard all known connection access settings. Oracle uses a brand new system to process connection access.

11. full-text search is supported, but the syntax is completely different.

12. Oracle documentation is very rich. However, if you need professional Oracle services, you need to have Metalink access permissions.

13. it is difficult to find related support information in non-database communities (such as the blog of PHP forums or website developers)

14. the auto-increment function can be implemented through Trigger and sequence objects.

15. a large number of common SHOW commands will no longer be available. to obtain system information, you need to learn the Oracle data dictionary (or information Schema). to learn more deeply, you also need to learn about the dynamic performance of Oracle.

16. MySQL adds multiple non-standard extensions to the information Schema, which is hard to find in Oracle.

17. to manage the transfer and transfer of production and non-production systems, you need to have a thorough understanding of Oracle authorization rules.

18. in general, the Oracle numeric type is simpler. if you really need a multi-granularity numeric type similar to MySQL, you need to implement it yourself, you can also set different precision values (Number (n, x.

19. in Oracle, tables can grow without limit, but in most cases, we recommend that you use table space for fine-grained management.

20. oracle does not support alter table add column before | AFTER, that is, it does not support field location. (some of our applications have strict requirements on field order. However, theoretically, this is a problem in business design, in most cases, select * or insert table values is used to process data, instead of specifying the field name list to be processed in select ).

21. if you are used to managing databases through a graphical interface (GUI), you will certainly like Oracle, but if you prefer to use a client similar to Mysql command line, you may be disappointed with the SQL * plus client tool (SQL * plus is still quite useful when you need a habit ).

22. oracle Data verification is more rigorous than Mysql, and dependency on MySQL fuzzy rules may cause applications to fail. mySQL accepts "2017-00-00" as the date type value, which is a typical example.

23. although Oracle's PL/SQL functions are more powerful, it does not support writing stored procedures in the standard PSM language, so you may have to learn its non-standard syntax.

24. Oracle does not support the ENUM data type. it can only be implemented by using the text-based check constraint or creating a foreign key association table.

25. some of the more mysterious table types of Mysql (such as blackhole and csv) cannot find the corresponding functions in Oracle. (It is not clear what type of blockhole is, but Oracle external table does support csv format, this file can be compressed, encrypted, and processed in version 11g ).

26. the Group By statement in Oracle must be definite, and all columns in the select list must be included in the group by clause.

27. The dmp file output by the Oracle exp command cannot be manually modified like the Mysql dump file.

28. the underlying implementation of Oracle has changed significantly. you need to learn about UNDO and REDO segment, archiving, and DBWR processes. (I personally think that the main advantage of Oracle over other databases may be its UNDO/REDO design .)

29. Oracle is not an open source software, so you cannot fix, optimize, fix, or implement your own things on it.

  Robert Holland

30. oracle query optimization is a task that requires expert intervention. its Optimizer is more mature than MySQL, which means the query plan is more difficult to explain. if you have a large application, be prepared to hire a guy who knows how to do this effectively.

31. the cost-based optimizer of Oracle requires accurate statistics for effective operation. for tables with changes, statistical information must be collected regularly. the batch data loading process also needs to execute the estimate/compute statistics command from time to time during the processing to collect statistics for satisfactory performance.

32. in Oracle, creating a connection is costly. Oracle applications with good performance tend to use a connection pool to minimize the login overhead.

33. oracle applications require the application of prepared statement for considerable performance. if your application does not use prepared statement, you need to adjust the application. this is a standard programming practice for Oracle databases. (the prepared statement here should be more about binding variables ).

34. the application needs to close the result set cursor, otherwise it will soon encounter the famous "ORA-01000 Too open cursors" error. in Oracle, this is considered a user error and you need to adjust your code.

35. long queries on busy systems may experience the ORA-01555 Snapshot too old error. you can adjust the size of the redo segment (sometimes by adjusting the application) to eliminate this error, but you still need to pay attention to this. (The redo segments statement here is a bit problematic. here it should be Undo tablespace and the corresponding Undo Retention. Oracle does not have the so-called redo segment statement ).

36. Oracle does not have a concept similar to a non-transaction table. Most Oracle users agree on this.

37. oracle's temporary table definition is a persistent SQL object that is visible to all users (this should be understood as the Session logged on to this user ). this is different from the lightweight tables used in MySQL. in MySQL, temporary tables are created and destroyed in a single session.

  Denish Patel

38. in Oracle, multiple Alter Table operations cannot be performed in the same SQL statement. for example, alter table emp modify name varchar (64) not null, add gender char (1) not null;

39. Oracle does not automatically submit data by default.

40. the KILL command is invalid in Oracle. it uses the alter system kill command. (I don't know what the first kill concept is. the kill at the operating system level is supported by Oracle. I often use it ).

41. Oracle does not support minus signs (-) in the Order by statement (it is unclear what this specific minus sign is ).

42. the sqlplus command line interface of Oracle does not support highlighted display.

  Roland Bouman

43. oracle does not support group_concat or similar grouping functions. you need to implement the query by looping the cursor, or by combining xmlhandler and XMLQUERY. (After Oracle 9R2, you can use a custom aggregate function to implement this function. after Oracle 11gR1, Oracle itself provides a new listparts grouping function to implement this function ).

44. for the count (distinct expression) function, Oracle only supports one expression (either a column name or *), and Mysql supports a group of expressions. (to implement a set of expressions in Oracle, you can use subqueries ).

45. Oracle supports subqueries very well. do not use it because of Mysql's habits.

46. oracle does not support user variables (@ num ). if you need to use it to calculate the sum of runtime, you can use the analysis function (window function. if you use user variables to implement specific aggregate functions, you will find that Oracle has built-in functions to support these functions. (in Oracle, you can apply dbms_session in the package to set context to implement user variables ).

47. Oracle does not distinguish the TIME and DATE types. Oracle's Date type is actually a DATETIME type (but it supports a larger DATE range than MySQL ).

48. compared with MySQL, Oracle has much better stored procedures and trigger functions and performance. do not use them habitually.

49. if you need to write a stored procedure in Oracle, remember to spend some time before coding to see if Oracle has a corresponding built-in package. you will find that most of the problems have been solved, or at least a large amount of basic code is already there.

50 if you use BLOB or TEXT in MySQL, you may migrate them to BLOB and CLOB in Oracle. however, unlike MySQL, Oracle does not transparently materialized the data. in most cases, this is indeed a good thing, but it also means that if you just want to process BLOB/CLOB as text, you will need to spend a lot of time using the LOB function. at the beginning, the LOB function is quite frustrating. (LOB-related functions are really annoying, and LOB processing efficiency is also very poor, even if the Oracle 11g SecureFile is used ).

  

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.