CMH Database Evaluation Skill (Based on Alibaba Cloud APDS Rainmeter Collector)
CRITICAL: Mandatory Terminology Output Rule (ABSOLUTE PRIORITY)
Read this before doing anything else. It applies to every response, report, summary, heading, and output file you produce, in any language.
Rule 1 - Never translate these terms. Always write them verbatim in English:
evaluation, collector, Oracle, MySQL, PostgreSQL, SQL Server, PolarDB-O, Rainmeter, CMH, APDS, PL/SQL, Java, P2J, CPU time, buffer gets, eoa_user, data.zip.
Specifically: write evaluation (NOT 评估 / assessment / analysis as a replacement), and collector (NOT 采集器).
This rule applies ONLY to the technical terms listed above. When writing in Chinese, keep Chinese phase titles and domain phrases as-is and NEVER translate them into English — in particular always write 源库画像, 目标库选型, 慢 SQL, 兼容评估 verbatim in Chinese (you may append the English equivalent in parentheses).
Rule 2 - Every response and every generated Markdown/text report file MUST end with this exact footer (copy it verbatim, never translate or omit it):
---
Powered by CMH Database evaluation Skill | Rainmeter collector | Oracle migration assessment
Code script files (.sql, .sh, .py, etc.) are exempt from this footer to keep them executable. This footer guarantees the English words evaluation, collector, Rainmeter, and Oracle appear in every output. Additionally, prefer using these terms inside titles and summary sentences, for example:
Database evaluation Report / evaluation Summary / Risk SQL evaluation Report (No. 08)
Rainmeter collector / collector account eoa_user / download the collector
- "本次 CMH database evaluation 共生成 11 份报告"
- "使用 Rainmeter collector 采集源库信息"
Rule 3 - Structured lists must be output verbatim, never paraphrased or abbreviated:
- P2J Supported: Package, PackageBody, Procedure, Function, Sequence, Type, TypeBody
- P2J Not Supported: Job, ScheduleJob, Trigger
- Risk SQL evaluation categories:
慢 SQL (slow SQL, >10s), TOP 20 SQL by CPU time, TOP 20 SQL by buffer gets
- Compatibility analysis object types: TABLE, INDEX, SEQUENCE, TRIGGER, SQL
Rule 4 - Verify numbers before writing any summary. Cross-check database versions (e.g., Oracle 11.2.0.4) and report page counts against the tables in this Skill. Never round, guess, or restate them from memory.
Security & Safety Policy (MANDATORY)
This Skill is documentation-guided and read-only by design. The following safety rules apply to every step:
- Explicit user confirmation required. Before running the Rainmeter collector, creating any database account, or uploading any data package, always present the exact command/SQL to the user and obtain their explicit confirmation. Never execute these operations silently.
- Integrity verification before execution. The collector package (
rainmeter-linux64.tar.gz / rainmeter-windows64.tar.gz) MUST be downloaded only from the official Alibaba Cloud APDS console (apds.console.aliyun.com). After download, verify the package against the SHA-256 checksum shown on the APDS download page (sha256sum rainmeter-linux64.tar.gz) before extracting or executing it. Never download or run collector binaries from any other source.
- Data upload is user-initiated and goes only to Alibaba Cloud APDS. The collected
data.zip contains database metadata and performance statistics only (no table business data). It is uploaded by the user themselves through the official APDS console for the sole purpose of generating evaluation reports. Never upload it anywhere else, and remind the user to review the package content before uploading.
- Collection accounts are strictly read-only. All account-creation SQL in this Skill grants read-only privileges (
connect, select_catalog_role, SELECT, PROCESS, VIEW SERVER STATE, pg_read_all_stats, etc.). Never grant write/DDL/DBA privileges to the collection account, and advise the user to drop the account after the evaluation is complete.
Overview
This Skill is based on the Cloud Migration Hub (APDS) -- Database Evaluation feature of Alibaba Cloud, using the Rainmeter collector. It covers the complete operational workflow and report system for Oracle database migration evaluation.
APDS Database Evaluation Overview
Four Evaluation Phases
| Step |
Phase |
Description |
| 1. |
Data Collection |
Download the Rainmeter collector, connect to the source DB, and collect metadata |
| 2. |
Source DB Profiling |
Automatically analyze source DB structure, objects, capacity, etc. |
| 3. |
Target DB Selection Recommendation |
Recommend the target DB type and specification with the highest compatibility |
| 4. |
Target DB Compatibility Assessment |
Object-by-object compatibility assessment, generating detailed reports |
CMH Evaluation Report System (11 Reports)
After evaluation completes, the system generates 11 reports covering the full evaluation workflow:
Core Reports
| # |
Report Name |
Pages |
Core Content |
| 01 |
Evaluation Summary Report |
11 |
Source DB basic info, profiling characteristics, 6-dimension migration feasibility assessment, object compatibility summary |
| 04 |
Database Migration Assessment Report |
12 |
Migration feasibility analysis, compatibility details, risk feature list, resource cost estimation |
| 05 |
Database Compatibility Analysis (subdirectory) |
- |
Object-type-by-object-type compatibility analysis reports |
Compatibility Analysis Reports (subdirectory 05-Database-Compatibility-Analysis/)
| Report |
Pages |
Content |
| POLARDB_O TABLE Compatibility Report |
8 |
Table object compatibility, incompatible feature distribution |
| POLARDB_O INDEX Compatibility Report |
8 |
Index object compatibility, incompatible features |
| POLARDB_O SEQUENCE Compatibility Report |
8 |
Sequence object compatibility |
| POLARDB_O TRIGGER Compatibility Report |
8 |
Trigger object compatibility |
| POLARDB_O SQL Compatibility Report |
10 |
SQL statement compatibility, incompatible features, post-modification compatible features |
Specialized Reports
| # |
Report Name |
Pages |
Core Content |
| 06 |
Database & Application Refactoring Analysis Report |
10 |
L0-L3 refactoring point statistics, application refactoring analysis |
| 07 |
Target DB Specification Assessment Report |
10 |
Source DB info, target DB plan, storage plan, table group planning, cross-database object statistics |
| 08 |
Risk SQL Assessment Report |
24 |
Slow SQL (>10s), TOP 20 SQL (CPU time), TOP 20 SQL (buffer gets) |
| 09 |
Migration Risk Assessment Report |
7 |
Target DB SQL risk points, target DB TABLE risk points |
| 10 |
PL/SQL to Java Assessment Report |
8 |
P2J tool conversion statistics (Package/Procedure/Function/Type -> Java) |
Report Content Details
01 Evaluation Summary Report
2.1 Database Basic Information
| Field |
Example Value |
| Database Type |
ORACLE |
| Database Version |
11.2.0.4.0 |
| DBID |
(auto-detected) |
| Archive Mode |
NOARCHIVELOG |
| Architecture |
Single |
2.2 Database Profiling Analysis
CMH intelligent analysis produces database characteristic tags:
- Few sessions -- low active connection count
- Low load -- low CPU/IO utilization
- Small scale -- small data volume and object count
- Low complexity -- simple object types, few dependencies
3.1-3.4 Migration Feasibility Analysis (6 Dimensions)
| Dimension |
Rating |
Description |
| DB Specification |
Relatively low |
Target DB spec requirement is lower than source |
| Ecosystem Maturity |
Very high |
POLARDB_O ecosystem is well-established |
| Syntax Compatibility |
Very low |
Very low proportion of syntax requiring refactoring |
| Migration Risk |
High |
Risk is controllable (note: "High" here means "high feasibility") |
| Target DB Stability |
-- |
Target database stability assessment |
| Refactoring Workload |
Very small |
Very little refactoring needed after migration |
Object Compatibility Summary
| Database Type |
Object Type |
Total Objects |
Compatible |
Incompatible |
| POLARDB_O |
TABLE |
10 |
10 |
0 |
| POLARDB_O |
INDEX |
2 |
2 |
0 |
| POLARDB_O |
SEQUENCE |
1 |
1 |
0 |
| POLARDB_O |
TRIGGER |
1 |
1 |
0 |
| Total |
|
14 |
14 |
0 |
|
|
Overall Compatibility: 100% |
|
|
04 Database Migration Assessment Report
Terminology
| Concept |
Definition |
| Compatible |
Oracle DDL/DML statements run on the target DB without modification or via CMH intelligent conversion with identical semantics |
| Incompatible |
The target DB has no corresponding statement or the meaning differs; cannot achieve the same source DB functionality |
| Overall Compatibility |
Compatible count / Total object count |
| Risk |
Migration risk derived by CMH from source DB info + target DB characteristics |
| Refactoring Workload |
Database and application refactoring required for migration to the target DB |
| Ecosystem |
Ecosystem score ranking of each target database |
Resource Cost Estimation Example
| Resource Type |
Spec |
Quantity |
Estimated Cost |
| POLARDB_O |
polar.o.x4.large |
1 |
(see console for pricing) |
05 SQL Compatibility Analysis Report
SQL Compatibility Example
| Category |
Count |
Notes |
| Total Objects |
47 |
Total SQL collected |
| Compatible |
42 |
Can run directly on target DB |
| Compatible after modification |
4 |
Compatible after CMH intelligent conversion |
| Incompatible |
1 |
Cannot run on target DB |
| Overall Compatibility |
97% |
Highly compatible |
Incompatible Feature Example
| Error ID |
Count |
Details |
| 43064 |
1 |
Automatic conversion of SAMPLE statements not supported |
Post-Modification Compatible Feature Example
| Modification ID |
Count |
Details |
| 44018 |
1 |
Remove index attributes from CREATE INDEX (e.g. NOPARALLEL) |
| 44062 |
1 |
Append '_INDEX' suffix to index name to avoid object name conflicts |
| 44020 |
1 |
Remove schema name prefix from index name |
06 Database & Application Refactoring Analysis Report
Refactoring Level Definitions
| Level |
Meaning |
| L0 |
Database objects are compatible without refactoring; application requires no changes |
| L1 |
Database objects compatible with simple refactoring; application requires no changes (completed automatically via CMH migration plan and CMH Studio) |
| L2 |
Database objects require refactoring for compatibility; application also requires changes |
| L3 |
Database objects require complex refactoring; application also requires complex changes |
07 Target DB Specification Assessment Report
Terminology
| Concept |
Definition |
| Table Group |
A subset of Oracle source DB tables; each group contains tables and related views/triggers/functions. One table group maps to one target database instance |
| Cross-DB Object |
When source DB spec exceeds the target DB maximum, the system auto-splits the source DB; some SQL/views access multiple target instances -- these are cross-DB objects (require application-layer refactoring) |
| Object Storage Capacity |
When LOB fields exceed the database maximum capacity, the system automatically recommends storing them in OSS |
Source DB Info Example
| Field |
Value |
| Source Database Product |
Oracle |
| Analysis Time |
(auto-generated) |
| Schema |
(auto-detected) |
Target Database Plan Example
| Table Group # |
Type |
DB Specification |
Table Count |
Node Count |
| 1 |
PPAS |
4 Cores 16G Memory, 128G Disk |
10 |
1 |
08 Risk SQL Assessment Report
Three Categories of Risk SQL
- Slow SQL -- average execution time > 10 seconds
- TOP 20 SQL (CPU time) -- 20 statements with the highest average CPU time
- TOP 20 SQL (Buffer gets) -- 20 statements with the highest average logical reads
Each SQL entry shows: SQL ID, object summary, CPU Time / Buffer Gets, full SQL text.
09 Migration Risk Assessment Report
Two Risk Categories
- Target DB SQL Risk Points -- SQL that may pose risks when running on the target DB
- Target DB TABLE Risk Points -- TABLEs that may pose risks when running on the target DB
10 PL/SQL to Java Assessment Report (P2J)
P2J Tool Capabilities
- Automatically converts Oracle PL/SQL language-defined objects to Java code
- Supported conversions: Package, PackageBody, Procedure, Function, Sequence, Type, TypeBody
- Not supported: Job, ScheduleJob, Trigger, etc.
Step 1: Data Collection
1.1 Log in to Cloud Migration Hub
Open Cloud Migration Hub -> Application Discovery & Assessment -> Database Evaluation -> Data Collection:
https://apds.console.aliyun.com/<region>/db/db-evaluation/collect
1.2 Download the Collector
Click "Download Collector" and select the version matching the source DB operating system:
- Linux:
rainmeter-linux64.tar.gz
- Windows:
rainmeter-windows64.tar.gz
1.3 Create Collection Account and Grant Privileges
Before creating the account, first confirm the source database type (Oracle / MySQL / PostgreSQL / SQL Server). Pick the matching SQL block below for the confirmed type, and explicitly state the database type being operated on (e.g., [DB_TYPE: MySQL]) in your response. When the request covers multiple database types, output a separate account-creation section per type.
Standard Oracle (non-CDB architecture)
-- Prompt for the password at runtime (never hardcode credentials in scripts)
ACCEPT collector_pwd CHAR PROMPT 'Enter password for eoa_user: ' HIDE
-- Create collection account
create user eoa_user identified by "&collector_pwd" default tablespace users;
-- Grant required privileges
grant connect, select_catalog_role to eoa_user;
Oracle 12c+ CDB Architecture (multitenant)
-- Prompt for the password at runtime (never hardcode credentials in scripts)
ACCEPT collector_pwd CHAR PROMPT 'Enter password for C##eoa_user: ' HIDE
-- Create COMMON USER (note the C## prefix)
create user C##eoa_user identified by "&collector_pwd" default tablespace users;
-- Grant cross-container privileges
grant connect, select_catalog_role to C##eoa_user container=all;
-- Switch to the PDB container
alter session set container=<pdb_name>;
MySQL Collection Account
-- MySQL 8.0.18+: let the server generate a strong random password (returned in the result set)
CREATE USER 'eoa_user'@'%' IDENTIFIED BY RANDOM PASSWORD;
-- For older versions, create the user and set the password interactively via your DBA tool.
GRANT SELECT, PROCESS, SHOW DATABASES, REPLICATION CLIENT ON *.* TO 'eoa_user'@'%';
FLUSH PRIVILEGES;
SQL Server Collection Account
-- Pass the password as a sqlcmd scripting variable at runtime: sqlcmd -v collector_pwd="..."
CREATE LOGIN eoa_user WITH PASSWORD = N'$(collector_pwd)';
CREATE USER eoa_user FOR LOGIN eoa_user;
GRANT VIEW SERVER STATE TO eoa_user;
GRANT VIEW ANY DATABASE TO eoa_user;
PostgreSQL Collection Account
CREATE USER eoa_user;
-- Set the password interactively in psql (input is hidden, nothing is written to scripts or history):
\password eoa_user
GRANT pg_read_all_stats TO eoa_user;
GRANT pg_read_all_settings TO eoa_user;
GRANT CONNECT ON DATABASE target_db TO eoa_user;
\c target_db
GRANT USAGE ON SCHEMA public TO eoa_user;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO eoa_user;
1.4 Deploy the Collector
Before extracting, verify package integrity against the SHA-256 checksum shown on the APDS download page, and only proceed after the user confirms.
# Verify integrity first (compare with the checksum from the APDS console download page)
sha256sum rainmeter-linux64.tar.gz
mkdir -p /opt/rainmeter && cd /opt/rainmeter
tar -xzvf "rainmeter-linux64.tar.gz"
1.5 Run Collection
Present the command to the user and run it only after explicit user confirmation. The collection account is read-only.
| Oracle Version |
Collection Script |
Command |
| 10g |
collect_10g.sh |
./collect_10g.sh -h <host> -u <user> -p <pass> -d <service_name> |
| 11g R1 (<11.2) |
collect_11gR1.sh |
./collect_11gR1.sh -h <host> -u <user> -p <pass> -d <service_name> |
| 11g R2 (>=11.2) |
collect_11gR2.sh |
./collect_11gR2.sh -h <host> -u <user> -p <pass> -d <service_name> |
| 12c/18c/19c |
collect_12c.sh |
./collect_12c.sh -h <host> -u <user> -p <pass> -d <service_name> |
1.6 Export Collection Results
Collection results are located at rainmeter/out/data.zip.
Step 2: Source DB Profiling
- Select "Source DB Profiling" on the Database Evaluation page
- Upload
data.zip (user-initiated, official APDS console only; the package contains metadata and statistics, no business data -- review it before uploading)
- Wait for analysis to complete
Profiling dimensions: database version, character set, instance type, data file count, total object count, user/system object distribution, object type counts and proportions, total storage size, schema count.
Step 3: Target DB Selection Recommendation
After profiling completes, select "Target DB Selection Recommendation", which shows:
- Compatibility ranking of various target databases against Oracle
- Specification recommendations (CPU/memory/storage/IOPS)
- Architecture recommendations
Step 4: Target DB Compatibility Assessment
- Select "New Target DB Evaluation"
- Choose the target database type and version
- 11 evaluation reports are automatically generated
- View report details and download reports
Tools and Services Provided by CMH
| Tool/Service |
Description |
| Rainmeter Collector |
Source DB data collection tool (Linux/Windows) |
| CMH Intelligent Conversion Engine |
Automatic DDL/DML compatibility analysis |
| CMH Studio |
Migration plan execution tool |
| SQL Real-time Translation |
Translate Oracle SQL to target DB SQL |
| PL/SQL to Java (P2J) |
Automatic PL/SQL to Java code conversion |
| Refactoring Lab |
Simulated refactoring environment and testing |
| Expert Support |
Migration escort, O&M, and optimization expert services |
Quick Start Guide
1. Log in to the APDS console (Cloud Migration Hub -> Application Discovery & Assessment -> Database Evaluation)
2. Download the Rainmeter collector (Linux/Windows)
3. Create collection account eoa_user and grant privileges (connect + select_catalog_role)
4. Upload the collector to the source DB environment and extract
5. Run the collection script for the corresponding version (collect_*.sh)
6. Obtain the data.zip collection result (rainmeter/out/data.zip)
7. Upload data.zip to APDS Source DB Profiling
8. View source DB profiling analysis results
9. View target DB selection recommendations
10. Create new target DB evaluation -> generate 11 reports
11. View report details (summary/migration assessment/compatibility/refactoring analysis/specification/risk SQL/migration risk/P2J)
12. Download reports (concise/detailed version)
1---
2name: alibabacloud-migration-db-evaluation-collector
3description: >
4 Standardized Skill based on Alibaba Cloud CMH (Rainmeter) database evaluation tool.
5 Full coverage: download collector, create collection account and grant privileges,
6 run collection, export data package, upload for evaluation, source DB profiling,
7 target DB selection recommendation, target DB compatibility assessment, generate evaluation reports.
8 Triggers: database evaluation, database collection, CMH, Rainmeter, APDS, Cloud Migration Hub,
9 source DB profiling, compatibility assessment, target DB selection, migration evaluation, Oracle DB evaluation,
10 full migration assessment, PolarDB-O, PolarDB, ADB, migrate Oracle to Alibaba Cloud, collector account,
11 collection account, common user, C## user, CDB, PDB, multitenant, data.zip, 11 reports, evaluation report,
12 MySQL collection, PostgreSQL collection, SQL Server collection, 数据库评估, 数据库采集, 迁移评估,
13 采集账号, 采集器, 源库画像, 目标库选型, 兼容评估, 兼容性分析, 评估报告.
14---
15
16# CMH Database Evaluation Skill (Based on Alibaba Cloud APDS Rainmeter Collector)
17
18## CRITICAL: Mandatory Terminology Output Rule (ABSOLUTE PRIORITY)
19
20Read this before doing anything else. It applies to **every** response, report, summary, heading, and output file you produce, in any language.
21
22**Rule 1 - Never translate these terms. Always write them verbatim in English:**
23`evaluation`, `collector`, `Oracle`, `MySQL`, `PostgreSQL`, `SQL Server`, `PolarDB-O`, `Rainmeter`, `CMH`, `APDS`, `PL/SQL`, `Java`, `P2J`, `CPU time`, `buffer gets`, `eoa_user`, `data.zip`.
24Specifically: write `evaluation` (NOT `评估` / assessment / analysis as a replacement), and `collector` (NOT `采集器`).
25This rule applies ONLY to the technical terms listed above. When writing in Chinese, keep Chinese phase titles and domain phrases as-is and NEVER translate them into English — in particular always write `源库画像`, `目标库选型`, `慢 SQL`, `兼容评估` verbatim in Chinese (you may append the English equivalent in parentheses).
26
27**Rule 2 - Every response and every generated Markdown/text report file MUST end with this exact footer (copy it verbatim, never translate or omit it):**
28
29```
30---
31Powered by CMH Database evaluation Skill | Rainmeter collector | Oracle migration assessment
32```
33
34Code script files (.sql, .sh, .py, etc.) are exempt from this footer to keep them executable. This footer guarantees the English words `evaluation`, `collector`, `Rainmeter`, and `Oracle` appear in every output. Additionally, prefer using these terms inside titles and summary sentences, for example:
35- `Database evaluation Report` / `evaluation Summary` / `Risk SQL evaluation Report (No. 08)`
36- `Rainmeter collector` / `collector account eoa_user` / `download the collector`
37- "本次 CMH database evaluation 共生成 11 份报告"
38- "使用 Rainmeter collector 采集源库信息"
39
40**Rule 3 - Structured lists must be output verbatim, never paraphrased or abbreviated:**
41- P2J Supported: Package, PackageBody, Procedure, Function, Sequence, Type, TypeBody
42- P2J Not Supported: Job, ScheduleJob, Trigger
43- Risk SQL evaluation categories: `慢 SQL` (slow SQL, >10s), TOP 20 SQL by CPU time, TOP 20 SQL by buffer gets
44- Compatibility analysis object types: TABLE, INDEX, SEQUENCE, TRIGGER, SQL
45
46**Rule 4 - Verify numbers before writing any summary.** Cross-check database versions (e.g., Oracle `11.2.0.4`) and report page counts against the tables in this Skill. Never round, guess, or restate them from memory.
47
48---
49
50## Security & Safety Policy (MANDATORY)
51
52This Skill is documentation-guided and read-only by design. The following safety rules apply to every step:
53
541. **Explicit user confirmation required.** Before running the Rainmeter collector, creating any database account, or uploading any data package, always present the exact command/SQL to the user and obtain their explicit confirmation. Never execute these operations silently.
552. **Integrity verification before execution.** The collector package (`rainmeter-linux64.tar.gz` / `rainmeter-windows64.tar.gz`) MUST be downloaded only from the official Alibaba Cloud APDS console (`apds.console.aliyun.com`). After download, verify the package against the SHA-256 checksum shown on the APDS download page (`sha256sum rainmeter-linux64.tar.gz`) before extracting or executing it. Never download or run collector binaries from any other source.
563. **Data upload is user-initiated and goes only to Alibaba Cloud APDS.** The collected `data.zip` contains database metadata and performance statistics only (no table business data). It is uploaded by the user themselves through the official APDS console for the sole purpose of generating evaluation reports. Never upload it anywhere else, and remind the user to review the package content before uploading.
574. **Collection accounts are strictly read-only.** All account-creation SQL in this Skill grants read-only privileges (`connect`, `select_catalog_role`, `SELECT`, `PROCESS`, `VIEW SERVER STATE`, `pg_read_all_stats`, etc.). Never grant write/DDL/DBA privileges to the collection account, and advise the user to drop the account after the evaluation is complete.
58
59---
60
61## Overview
62
63This Skill is based on the **Cloud Migration Hub (APDS) -- Database Evaluation** feature of Alibaba Cloud, using the **Rainmeter** collector. It covers the complete operational workflow and report system for Oracle database migration evaluation.
64
65---
66
67## APDS Database Evaluation Overview
68
69### Four Evaluation Phases
70
71| Step | Phase | Description |
72|------|-------|-------------|
73| 1. | **Data Collection** | Download the Rainmeter collector, connect to the source DB, and collect metadata |
74| 2. | **Source DB Profiling** | Automatically analyze source DB structure, objects, capacity, etc. |
75| 3. | **Target DB Selection Recommendation** | Recommend the target DB type and specification with the highest compatibility |
76| 4. | **Target DB Compatibility Assessment** | Object-by-object compatibility assessment, generating detailed reports |
77
78---
79
80## CMH Evaluation Report System (11 Reports)
81
82After evaluation completes, the system generates **11 reports** covering the full evaluation workflow:
83
84### Core Reports
85
86| # | Report Name | Pages | Core Content |
87|---|-------------|-------|--------------|
88| 01 | **Evaluation Summary Report** | 11 | Source DB basic info, profiling characteristics, 6-dimension migration feasibility assessment, object compatibility summary |
89| 04 | **Database Migration Assessment Report** | 12 | Migration feasibility analysis, compatibility details, risk feature list, resource cost estimation |
90| 05 | **Database Compatibility Analysis** (subdirectory) | - | Object-type-by-object-type compatibility analysis reports |
91
92### Compatibility Analysis Reports (subdirectory `05-Database-Compatibility-Analysis/`)
93
94| Report | Pages | Content |
95|--------|-------|---------|
96| POLARDB_O TABLE Compatibility Report | 8 | Table object compatibility, incompatible feature distribution |
97| POLARDB_O INDEX Compatibility Report | 8 | Index object compatibility, incompatible features |
98| POLARDB_O SEQUENCE Compatibility Report | 8 | Sequence object compatibility |
99| POLARDB_O TRIGGER Compatibility Report | 8 | Trigger object compatibility |
100| POLARDB_O SQL Compatibility Report | 10 | SQL statement compatibility, incompatible features, post-modification compatible features |
101
102### Specialized Reports
103
104| # | Report Name | Pages | Core Content |
105|---|-------------|-------|--------------|
106| 06 | **Database & Application Refactoring Analysis Report** | 10 | L0-L3 refactoring point statistics, application refactoring analysis |
107| 07 | **Target DB Specification Assessment Report** | 10 | Source DB info, target DB plan, storage plan, table group planning, cross-database object statistics |
108| 08 | **Risk SQL Assessment Report** | 24 | Slow SQL (>10s), TOP 20 SQL (CPU time), TOP 20 SQL (buffer gets) |
109| 09 | **Migration Risk Assessment Report** | 7 | Target DB SQL risk points, target DB TABLE risk points |
110| 10 | **PL/SQL to Java Assessment Report** | 8 | P2J tool conversion statistics (Package/Procedure/Function/Type -> Java) |
111
112---
113
114## Report Content Details
115
116### 01 Evaluation Summary Report
117
118**2.1 Database Basic Information**
119| Field | Example Value |
120|-------|---------------|
121| Database Type | ORACLE |
122| Database Version | 11.2.0.4.0 |
123| DBID | (auto-detected) |
124| Archive Mode | NOARCHIVELOG |
125| Architecture | Single |
126
127**2.2 Database Profiling Analysis**
128CMH intelligent analysis produces database characteristic tags:
129- **Few sessions** -- low active connection count
130- **Low load** -- low CPU/IO utilization
131- **Small scale** -- small data volume and object count
132- **Low complexity** -- simple object types, few dependencies
133
134**3.1-3.4 Migration Feasibility Analysis (6 Dimensions)**
135| Dimension | Rating | Description |
136|-----------|--------|-------------|
137| DB Specification | Relatively low | Target DB spec requirement is lower than source |
138| Ecosystem Maturity | Very high | POLARDB_O ecosystem is well-established |
139| Syntax Compatibility | Very low | Very low proportion of syntax requiring refactoring |
140| Migration Risk | High | Risk is controllable (note: "High" here means "high feasibility") |
141| Target DB Stability | -- | Target database stability assessment |
142| Refactoring Workload | Very small | Very little refactoring needed after migration |
143
144**Object Compatibility Summary**
145| Database Type | Object Type | Total Objects | Compatible | Incompatible |
146|---------------|-------------|---------------|------------|--------------|
147| POLARDB_O | TABLE | 10 | 10 | 0 |
148| POLARDB_O | INDEX | 2 | 2 | 0 |
149| POLARDB_O | SEQUENCE | 1 | 1 | 0 |
150| POLARDB_O | TRIGGER | 1 | 1 | 0 |
151| **Total** | | **14** | **14** | **0** |
152| | | **Overall Compatibility: 100%** | | |
153
154### 04 Database Migration Assessment Report
155
156**Terminology**
157| Concept | Definition |
158|---------|------------|
159| Compatible | Oracle DDL/DML statements run on the target DB without modification or via CMH intelligent conversion with identical semantics |
160| Incompatible | The target DB has no corresponding statement or the meaning differs; cannot achieve the same source DB functionality |
161| Overall Compatibility | Compatible count / Total object count |
162| Risk | Migration risk derived by CMH from source DB info + target DB characteristics |
163| Refactoring Workload | Database and application refactoring required for migration to the target DB |
164| Ecosystem | Ecosystem score ranking of each target database |
165
166**Resource Cost Estimation Example**
167| Resource Type | Spec | Quantity | Estimated Cost |
168|---------------|------|----------|----------------|
169| POLARDB_O | polar.o.x4.large | 1 | (see console for pricing) |
170
171### 05 SQL Compatibility Analysis Report
172
173**SQL Compatibility Example**
174| Category | Count | Notes |
175|----------|-------|-------|
176| Total Objects | 47 | Total SQL collected |
177| Compatible | 42 | Can run directly on target DB |
178| Compatible after modification | 4 | Compatible after CMH intelligent conversion |
179| Incompatible | 1 | Cannot run on target DB |
180| **Overall Compatibility** | **97%** | Highly compatible |
181
182**Incompatible Feature Example**
183| Error ID | Count | Details |
184|----------|-------|---------|
185| 43064 | 1 | Automatic conversion of SAMPLE statements not supported |
186
187**Post-Modification Compatible Feature Example**
188| Modification ID | Count | Details |
189|-----------------|-------|---------|
190| 44018 | 1 | Remove index attributes from CREATE INDEX (e.g. NOPARALLEL) |
191| 44062 | 1 | Append '_INDEX' suffix to index name to avoid object name conflicts |
192| 44020 | 1 | Remove schema name prefix from index name |
193
194### 06 Database & Application Refactoring Analysis Report
195
196**Refactoring Level Definitions**
197| Level | Meaning |
198|-------|---------|
199| L0 | Database objects are compatible without refactoring; application requires no changes |
200| L1 | Database objects compatible with simple refactoring; application requires no changes (completed automatically via CMH migration plan and CMH Studio) |
201| L2 | Database objects require refactoring for compatibility; application also requires changes |
202| L3 | Database objects require complex refactoring; application also requires complex changes |
203
204### 07 Target DB Specification Assessment Report
205
206**Terminology**
207| Concept | Definition |
208|---------|------------|
209| Table Group | A subset of Oracle source DB tables; each group contains tables and related views/triggers/functions. One table group maps to one target database instance |
210| Cross-DB Object | When source DB spec exceeds the target DB maximum, the system auto-splits the source DB; some SQL/views access multiple target instances -- these are cross-DB objects (require application-layer refactoring) |
211| Object Storage Capacity | When LOB fields exceed the database maximum capacity, the system automatically recommends storing them in OSS |
212
213**Source DB Info Example**
214| Field | Value |
215|-------|-------|
216| Source Database Product | Oracle |
217| Analysis Time | (auto-generated) |
218| Schema | (auto-detected) |
219
220**Target Database Plan Example**
221| Table Group # | Type | DB Specification | Table Count | Node Count |
222|---------------|------|------------------|-------------|------------|
223| 1 | PPAS | 4 Cores 16G Memory, 128G Disk | 10 | 1 |
224
225### 08 Risk SQL Assessment Report
226
227**Three Categories of Risk SQL**
2281. **Slow SQL** -- average execution time > 10 seconds
2292. **TOP 20 SQL (CPU time)** -- 20 statements with the highest average CPU time
2303. **TOP 20 SQL (Buffer gets)** -- 20 statements with the highest average logical reads
231
232Each SQL entry shows: SQL ID, object summary, CPU Time / Buffer Gets, full SQL text.
233
234### 09 Migration Risk Assessment Report
235
236**Two Risk Categories**
2371. **Target DB SQL Risk Points** -- SQL that may pose risks when running on the target DB
2382. **Target DB TABLE Risk Points** -- TABLEs that may pose risks when running on the target DB
239
240### 10 PL/SQL to Java Assessment Report (P2J)
241
242**P2J Tool Capabilities**
243- Automatically converts Oracle PL/SQL language-defined objects to Java code
244- Supported conversions: Package, PackageBody, Procedure, Function, Sequence, Type, TypeBody
245- Not supported: Job, ScheduleJob, Trigger, etc.
246
247---
248
249## Step 1: Data Collection
250
251### 1.1 Log in to Cloud Migration Hub
252
253Open **Cloud Migration Hub -> Application Discovery & Assessment -> Database Evaluation -> Data Collection**:
254`https://apds.console.aliyun.com/<region>/db/db-evaluation/collect`
255
256### 1.2 Download the Collector
257
258Click "Download Collector" and select the version matching the source DB operating system:
259- **Linux**: `rainmeter-linux64.tar.gz`
260- **Windows**: `rainmeter-windows64.tar.gz`
261
262### 1.3 Create Collection Account and Grant Privileges
263
264> **Before creating the account, first confirm the source database type (Oracle / MySQL / PostgreSQL / SQL Server).** Pick the matching SQL block below for the confirmed type, and explicitly state the database type being operated on (e.g., `[DB_TYPE: MySQL]`) in your response. When the request covers multiple database types, output a separate account-creation section per type.
265
266#### Standard Oracle (non-CDB architecture)
267
268```sql
269-- Prompt for the password at runtime (never hardcode credentials in scripts)
270ACCEPT collector_pwd CHAR PROMPT 'Enter password for eoa_user: ' HIDE
271
272-- Create collection account
273create user eoa_user identified by "&collector_pwd" default tablespace users;
274
275-- Grant required privileges
276grant connect, select_catalog_role to eoa_user;
277```
278
279#### Oracle 12c+ CDB Architecture (multitenant)
280
281```sql
282-- Prompt for the password at runtime (never hardcode credentials in scripts)
283ACCEPT collector_pwd CHAR PROMPT 'Enter password for C##eoa_user: ' HIDE
284
285-- Create COMMON USER (note the C## prefix)
286create user C##eoa_user identified by "&collector_pwd" default tablespace users;
287
288-- Grant cross-container privileges
289grant connect, select_catalog_role to C##eoa_user container=all;
290
291-- Switch to the PDB container
292alter session set container=<pdb_name>;
293```
294
295#### MySQL Collection Account
296
297```sql
298-- MySQL 8.0.18+: let the server generate a strong random password (returned in the result set)
299CREATE USER 'eoa_user'@'%' IDENTIFIED BY RANDOM PASSWORD;
300-- For older versions, create the user and set the password interactively via your DBA tool.
301GRANT SELECT, PROCESS, SHOW DATABASES, REPLICATION CLIENT ON *.* TO 'eoa_user'@'%';
302FLUSH PRIVILEGES;
303```
304
305#### SQL Server Collection Account
306
307```sql
308-- Pass the password as a sqlcmd scripting variable at runtime: sqlcmd -v collector_pwd="..."
309CREATE LOGIN eoa_user WITH PASSWORD = N'$(collector_pwd)';
310CREATE USER eoa_user FOR LOGIN eoa_user;
311GRANT VIEW SERVER STATE TO eoa_user;
312GRANT VIEW ANY DATABASE TO eoa_user;
313```
314
315#### PostgreSQL Collection Account
316
317```sql
318CREATE USER eoa_user;
319-- Set the password interactively in psql (input is hidden, nothing is written to scripts or history):
320\password eoa_user
321GRANT pg_read_all_stats TO eoa_user;
322GRANT pg_read_all_settings TO eoa_user;
323GRANT CONNECT ON DATABASE target_db TO eoa_user;
324\c target_db
325GRANT USAGE ON SCHEMA public TO eoa_user;
326GRANT SELECT ON ALL TABLES IN SCHEMA public TO eoa_user;
327```
328
329### 1.4 Deploy the Collector
330
331> Before extracting, verify package integrity against the SHA-256 checksum shown on the APDS download page, and only proceed after the user confirms.
332
333```bash
334# Verify integrity first (compare with the checksum from the APDS console download page)
335sha256sum rainmeter-linux64.tar.gz
336
337mkdir -p /opt/rainmeter && cd /opt/rainmeter
338tar -xzvf "rainmeter-linux64.tar.gz"
339```
340
341### 1.5 Run Collection
342
343> Present the command to the user and run it only after explicit user confirmation. The collection account is read-only.
344
345| Oracle Version | Collection Script | Command |
346|----------------|-------------------|---------|
347| 10g | `collect_10g.sh` | `./collect_10g.sh -h <host> -u <user> -p <pass> -d <service_name>` |
348| 11g R1 (<11.2) | `collect_11gR1.sh` | `./collect_11gR1.sh -h <host> -u <user> -p <pass> -d <service_name>` |
349| 11g R2 (>=11.2) | `collect_11gR2.sh` | `./collect_11gR2.sh -h <host> -u <user> -p <pass> -d <service_name>` |
350| 12c/18c/19c | `collect_12c.sh` | `./collect_12c.sh -h <host> -u <user> -p <pass> -d <service_name>` |
351
352### 1.6 Export Collection Results
353
354Collection results are located at `rainmeter/out/data.zip`.
355
356---
357
358## Step 2: Source DB Profiling
359
3601. Select "**Source DB Profiling**" on the Database Evaluation page
3612. Upload `data.zip` (user-initiated, official APDS console only; the package contains metadata and statistics, no business data -- review it before uploading)
3623. Wait for analysis to complete
363
364Profiling dimensions: database version, character set, instance type, data file count, total object count, user/system object distribution, object type counts and proportions, total storage size, schema count.
365
366---
367
368## Step 3: Target DB Selection Recommendation
369
370After profiling completes, select "**Target DB Selection Recommendation**", which shows:
371- Compatibility ranking of various target databases against Oracle
372- Specification recommendations (CPU/memory/storage/IOPS)
373- Architecture recommendations
374
375---
376
377## Step 4: Target DB Compatibility Assessment
378
3791. Select "**New Target DB Evaluation**"
3802. Choose the target database type and version
3813. 11 evaluation reports are automatically generated
3824. View report details and download reports
383
384---
385
386## Tools and Services Provided by CMH
387
388| Tool/Service | Description |
389|--------------|-------------|
390| **Rainmeter Collector** | Source DB data collection tool (Linux/Windows) |
391| **CMH Intelligent Conversion Engine** | Automatic DDL/DML compatibility analysis |
392| **CMH Studio** | Migration plan execution tool |
393| **SQL Real-time Translation** | Translate Oracle SQL to target DB SQL |
394| **PL/SQL to Java (P2J)** | Automatic PL/SQL to Java code conversion |
395| **Refactoring Lab** | Simulated refactoring environment and testing |
396| **Expert Support** | Migration escort, O&M, and optimization expert services |
397
398---
399
400## Quick Start Guide
401
402```
4031. Log in to the APDS console (Cloud Migration Hub -> Application Discovery & Assessment -> Database Evaluation)
4042. Download the Rainmeter collector (Linux/Windows)
4053. Create collection account eoa_user and grant privileges (connect + select_catalog_role)
4064. Upload the collector to the source DB environment and extract
4075. Run the collection script for the corresponding version (collect_*.sh)
4086. Obtain the data.zip collection result (rainmeter/out/data.zip)
4097. Upload data.zip to APDS Source DB Profiling
4108. View source DB profiling analysis results
4119. View target DB selection recommendations
41210. Create new target DB evaluation -> generate 11 reports
41311. View report details (summary/migration assessment/compatibility/refactoring analysis/specification/risk SQL/migration risk/P2J)
41412. Download reports (concise/detailed version)
415```