+965 9727 1175 info@a1-soft.com
AR | EN | FR

Help & Documentation

Everything you need to migrate a SQL Server database — install, connect, convert, verify, and fix issues. Clear cards, step by step.

⬇️
Step 1

Install

  • Download A1DataMigrator-Setup-1.0.0.exe from the download page.
  • Right-click → Properties → tick Unblock (if shown) → OK.
  • Double-click the installer and follow the wizard.
  • Installs to %LOCALAPPDATA%\A1Soft\Migrator — no admin, no .NET prerequisite (self-contained).
🎯
Step 2

Choose the target engine

On the Target page pick where the data goes, then enter the connection:

🐘 PostgreSQL host/port/user 🐬 MySQL / MariaDB conn string 📄 SQLite file path 🍃 MongoDB mongodb:// URI
💡PostgreSQL is the full pipeline (schema + data + indexes + FKs + auto-converted objects). MySQL / SQLite / MongoDB do schema + data + best-effort indexes.
▶️
Step 3

Run the migration (wizard)

  • Open A1 Data Migrator from the Start menu.
  • SQL Server page → enter the source connection → Test connection.
  • Target page → pick engine + connection → Test connection.
  • Migration page → Start. Watch the live progress bar + log.
  • Complete page → summary report + link to the porting workbook.
⚙️
What happens

The 5 phases

  • Schema — creates the database + all tables.
  • Data — copies rows with high-speed binary COPY.
  • Constraints — indexes + foreign keys + checks, with smart fallback.
  • Objects — auto-converts views / functions / procedures (see next card).
  • Verify — compares row counts table by table.
🛡️Every phase is resilient: one bad table or object is skipped and recorded — the run continues and prints a full report at the end.
🔄
New

Automatic object conversion

  • Views, scalar functions and stored procedures are auto-converted to PostgreSQL by A1's own built-in converter — no external tool.
  • Converted objects are applied to the target automatically (with dependency-order retry).
  • Anything not yet auto-convertible (cursors, triggers, table-valued functions, dynamic SQL) is written to a porting workbook + the _migration_meta.objects table for a quick manual port.
🧩
After migration

Port a trigger / proc / view

-- 1) list what's still pending
SELECT object_type, schema_name, object_name
FROM _migration_meta.unported;

-- 2) read the original T-SQL
SELECT tsql_definition FROM _migration_meta.objects
WHERE object_name = 'tr_audit_insert';

-- 3) create the PostgreSQL version, then mark done
UPDATE _migration_meta.objects SET port_status='DONE'
WHERE object_name = 'tr_audit_insert';
🛠️
Help

Troubleshooting

SymptomCause & fix
"Login failed for user 'sa'"SQL Server mixed-mode auth is off or the password is wrong — verify in SSMS first.
Connection string not valid (MongoDB)Use a mongodb://host:27017 URI, not a file path. A file path is for the SQLite engine.
FK fails with code 23503The source has orphan rows. See {db}_constraints_report.sql for cleanup options.
Index "row size exceeds 2704"Single-column non-unique indexes auto-convert to HASH. Multi-column / UNIQUE: see the report file.
"DROP DATABASE is being used by another"An app or pgAdmin holds a connection to the target — close it or restart PostgreSQL.
Some objects went to the workbookExpected — the hard ones (cursors/triggers/TVFs) need a manual port; see the porting card above.

المساعدة والوثائق

كل ما تحتاجه لنقل قاعدة بيانات SQL Server — التثبيت، والاتصال، والتحويل، والتحقق، وحل المشكلات. بطاقات واضحة خطوة بخطوة.

⬇️
الخطوة 1

التثبيت

  • نزِّل A1DataMigrator-Setup-1.0.0.exe من صفحة التنزيل.
  • انقر بالزر الأيمن → Properties → فعّل Unblock إن ظهر → OK.
  • انقر نقراً مزدوجاً على المثبّت واتّبع المعالج.
  • يُثبَّت في %LOCALAPPDATA%\A1Soft\Migrator — دون صلاحيات مدير ودون تثبيت .NET (مستقل بالكامل).
🎯
الخطوة 2

اختيار محرّك الهدف

في صفحة الهدف (Target) اختر وجهة البيانات ثم أدخل بيانات الاتصال:

🐘 PostgreSQL host/port/user 🐬 MySQL / MariaDB connection string 📄 SQLite مسار الملف 🍃 MongoDB ‏mongodb:// URI
💡‏PostgreSQL هو المسار الكامل (جداول + بيانات + فهارس + مفاتيح + تحويل تلقائي للكائنات). أما MySQL / SQLite / MongoDB فتنفّذ الجداول + البيانات + فهارس بأفضل جهد.
▶️
الخطوة 3

تشغيل الترحيل (المعالج)

  • افتح A1 Data Migrator من قائمة Start.
  • صفحة SQL Server → أدخل اتصال المصدر → Test connection.
  • صفحة الهدف → اختر المحرّك والاتصال → Test connection.
  • صفحة الترحيلStart. تابع شريط التقدّم والسجل مباشرة.
  • صفحة الإنهاء → تقرير ملخّص + رابط دفتر التحويل اليدوي.
⚙️
ماذا يحدث

المراحل الخمسة

  • الجداول — إنشاء القاعدة وكل الجداول.
  • البيانات — نسخ الصفوف بـ binary COPY عالي السرعة.
  • القيود — فهارس + مفاتيح خارجية + checks مع معالجة ذكية.
  • الكائنات — تحويل تلقائي للـ views / functions / procedures (البطاقة التالية).
  • التحقق — مقارنة عدد الصفوف جدول بجدول.
🛡️كل مرحلة مرنة: أي جدول أو كائن يفشل يُتخطّى ويُسجَّل — وتستمر عملية الترحيل لتطبع تقريراً كاملاً في النهاية.
🔄
جديد

تحويل الكائنات تلقائياً

  • الـ views والدوال والإجراءات المخزّنة تتحوّل تلقائياً إلى PostgreSQL بمحوّل A1 الداخلي — بدون أي أداة خارجية.
  • الكائنات المحوّلة تُطبَّق على الهدف تلقائياً (مع إعادة محاولة بترتيب الاعتماديات).
  • أي كائن غير قابل بعد للتحويل التلقائي (cursors، triggers، دوال جدولية، SQL ديناميكي) يُكتب في دفتر تحويل + جدول _migration_meta.objects لنقله يدوياً بسرعة.
🧩
بعد الترحيل

تحويل trigger / proc / view

-- 1) اعرض المتبقّي
SELECT object_type, schema_name, object_name
FROM _migration_meta.unported;

-- 2) اقرأ الـ T-SQL الأصلي
SELECT tsql_definition FROM _migration_meta.objects
WHERE object_name = 'tr_audit_insert';

-- 3) أنشئ نسخة PostgreSQL ثم علّمه كمنتهٍ
UPDATE _migration_meta.objects SET port_status='DONE'
WHERE object_name = 'tr_audit_insert';
🛠️
مساعدة

حل المشاكل

العَرَضالسبب والحل
"Login failed for user 'sa'"مصادقة SQL Server المختلطة غير مفعّلة أو كلمة المرور خاطئة — تحقّق من SSMS أولاً.
‏Connection string غير صالح (MongoDB)استخدم URI بالشكل mongodb://host:27017 لا مسار ملف. مسار الملف خاص بمحرّك SQLite.
‏FK يفشل بالكود 23503يحتوي المصدر على صفوف يتيمة (orphan). راجع {db}_constraints_report.sql لخيارات التنظيف.
"row size exceeds 2704"الفهارس أحادية العمود غير الفريدة تتحوّل إلى HASH تلقائياً. أما المتعددة / الفريدة فراجع ملف التقرير.
"DROP DATABASE is being used by another"هناك تطبيق أو pgAdmin يُمسك اتصالاً بالهدف — أغلقه أو أعد تشغيل PostgreSQL.
بعض الكائنات انتقلت إلى الدفترهذا متوقّع — فالكائنات الصعبة (cursors/triggers/دوال جدولية) تحتاج نقلاً يدوياً؛ راجع بطاقة التحويل بالأعلى.