SQLShift V3.0 Update: SQL Server Stored Procedure Conversion to GaussDB Is Now Supported
As a SQL dialect conversion tool for heterogeneous databases, SQLShift has gradually delivered Oracle stored procedure conversion to OceanBase and PostgreSQL over the past two months. Let’s look at the new capabilities in this release.
New Feature Highlights
✔️ SQL Server stored procedure -> GaussDB function refactoring: supports intelligent T-SQL -> PL/pgSQL conversion with structural and semantic adaptation.
Feature Details
1. Intelligent Conversion from SQL Server Stored Procedures to GaussDB
The biggest highlight of this release is accurate semantic mapping and syntax refactoring for complex differences between SQL Server and GaussDB.
🔍 Multi-dimensional Syntax Compatibility Assessment
SQLShift evaluates compatibility in GaussDB for syntax elements used in SQL Server stored procedures, including structure definitions, system views, and data types. It covers 300+ syntax points for precise cross-database mapping. Examples include:
- Structure definitions: SQL Server
CREATE PROCEDUREis rewritten asCREATE FUNCTION ... RETURNS type LANGUAGE plpgsqlto satisfy GaussDB constraints. - System functions: SQL Server
@@spidis rewritten topg_backend_pid()in GaussDB. - System views and tables: SQL Server
sys.columnsis mapped toinformation_schema.columns. - Temporary objects: SQL Server
SELECT ... INTO #temp_tableis rewritten asCREATE TEMP TABLE ... AS. - Data types: SQL Server
DATETIMEis rewritten asTIMESTAMP(3). - Keywords: for patterns like
CREATE TABLE DemoTable(CONTENT BIT, DBTIMEZONE VARCHAR(50)..., SQLShift automatically renames GaussDB reserved words (such asDBTIMEZONE) and provides recommendations for business-sensitive identifiers (such ascontent). - More syntax conversions are available for exploration.
🔍 Intelligent Conversion of Non-standard Syntax
SQLShift performs semantic-level fixes for SQL Server-specific non-standard patterns and platform behavior differences, achieving both “recognition” and “reconstruction.” Typical examples:
- Early alias reference in
UPDATE- SQL Server syntax:
UPDATE a SET col=1 FROM tableA a WHERE a.id=b.id - GaussDB syntax:
UPDATE tableA a SET col=1 FROM tableB b WHERE a.id=b.id- Rationale: GaussDB requires explicit primary-table alias scope in
UPDATE.
- Rationale: GaussDB requires explicit primary-table alias scope in
- SQL Server syntax:
- Statements without terminators
- SQL Server syntax:
SELECT * FROM table - GaussDB syntax:
SELECT * FROM table;(semicolon auto-completed) More SQL Server-specific conversion cases are available in product experience.
- SQL Server syntax:
🔍 GaussDB-specific Mapping and Semantic Refactoring
General models are often trained on generalized PostgreSQL syntax and may fail to identify version-level differences between GaussDB and PostgreSQL, causing high-risk mis-conversions. For example, GaussDB V2.0-3.x does not support some PostgreSQL functions like uuid_generate_v4() and only supports ON COMMIT {PRESERVE ROWS | DELETE ROWS}. Without version knowledge, generic models may still apply PostgreSQL rules.
SQLShift deeply understands GaussDB version differences, integrates official Huawei syntax rules, and combines semantic recognition with behavior refactoring. It dynamically parses the precise target cluster version to ensure each conversion is usable, controllable, and maintainable:
- Business logic refactoring:
NEWID()-> business unique identifier reconstruction (for example JavaUUID.randomUUID().toString()), avoiding missing-equivalent-function risks. - Temporary table behavior refactoring:
ON COMMIT DROP-> explicit cleanup chain (ON COMMIT DELETE ROWS + DROP) to ensure compliant lifecycle handling and prevent temp-table buildup that could trigger OOM.
2. Batch Stored Procedure Conversion, Doubled Efficiency
Still converting procedures one by one? SQLShift batch processing can handle migration of hundreds of procedures with ease:
✅ Script upload: supports SQL files containing multiple stored procedures
✅ Intelligent splitting: precisely identifies boundaries and auto-assigns conversion tasks
✅ Progress tracking: real-time visual status with intelligent anomaly prompts
✅ Syntax compatibility assessment: identifies incompatibilities and refactors automatically
✅ Unified export: exports target-compatible stored procedure files
Next Preview
📌 Support for complex stored procedures exceeding 400 lines
📌 SQL Server -> OceanBase stored procedure conversion
🎁 Limited-time Offer
The first 100 users can click here or follow the steps below to claim 30-day stored procedure conversion credits.
1. Click “Free Trial” in the top-right corner, then register and sign in to SQLShift.

2. After signing in, click “Claim Credits” at the lower-left.
- Enter redemption code:
83103ce2-9167-439c-a03c-532c911fb516 - Successfully claim 10 credits, valid for 30 days.
