Get the App
SLTechnology News&Howtos  ›  Database  › 

[Mo Jin original] Oracle clone empty database to build exactly the same database without data

Shulou Source: shulou.com Published: 2022-06-01 18:33:34 11月12日 Update

Background

Due to the amount of data brought by the development of platform data, the response time of the platform is slowed down. The technical team decided to enable the database partitioning feature!

target

Partition according to date and month, realize the function of automatic monthly partition of later data, and solve the problem of procrastination of system response caused by data accumulation.

Scheme

1. Add Sql with partition function

2. Whether the existing database can automatically cut historical data

3. Clone empty library

4. Import the old data into the new database

5. Switch to hard work

Realize

1 、...

.

.

3. Clone empty library

-- 301Exporting library (without data) exp CEN_NORM/CEN_NORM@10.16.175.50:1521/xaptdb file=d:/cen_norm.dmp rows=n consistent=y OWNER=CEN_NORM

Core: rows=n consistent=y

Restore to the new library imp CEN_NORM_PART/CEN_NORM_PART@10.16.175.50:1521/xaptdb file=d:/cen_norm.dmp full=y--303 to check consistency select * from dba_constraints where owner='CEN_NORM' and table_name='TB_HIS_MZ_Reg';select * from dba_indexes where owner='CEN_NORM' and table_name='TB_HIS_MZ_Reg'

Tags: Data function database platform procrastination consistency unit history historical data technology scheme date time core goal system background problem switch Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information Shulou Tech Info Linux Microsoft vpn