Project product Upgrade Database scripting problem--How to query the library table or data for two database differences

Source: Internet
Author: User

Project product is able to solve the SVN version problem, to prevent a field discovery problem need to modify multiple sets of program problems. But at the same time brings new problems, when the project needs change or upgrade a product, the corresponding database script becomes the key, here is a solution- data Link comparison method. Compare missing library tables and various configuration data by establishing a data chain. of course, there would be no such problem if the database scripts were properly managed at the time of development

Steps:

1, set up the data chain, open PL/SQL, right click database_links--New, fill in the information, the corresponding SQL statement for, here I built a name called test data chain

--Drop existing Database link drop database link TEST. Regress. Rdbms. DEV. US. oracle.com;--CREATE DATABASE link CREATE database link TEST. Regress. Rdbms. DEV. US.  oracle.com  Connect to * * * * Identified by * * *  using ' (DESCRIPTION = (Address_list = (ADDRESS = (PROTOCOL = TCP) (HOST = ***.**.**.**) (PORT = 1521))) (Connect_data = (service_name = *))) ';


2, using the data chain for comparison, here to introduce wm_concat () This function, this function can change the row value into a column

Select Wm_concat (a.table_name) from  user_tables A where a.table_name not in (select table_name from [email protected])


In this way, we can get the difference between the database table and the library table in the field library and the development library.

If you have a database configuration table, you can also use the same method to isolate the missing configuration data in the current database

Project product Upgrade Database scripting problem--How to query the library table or data for two database differences

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.