Guide · Migration

How to migrate data from SQL Server (or Oracle) to Salesforce

How to migrate data from SQL Server or Oracle to Salesforce: what to move and what to leave, mapping tables to objects, external IDs, Data Loader or MuleSoft, storage math, testing, cutover and rollback.

Author
Chris Gooding
Published
November 8, 2026
Topic
Migration
On this page (16)

To migrate data from SQL Server or Oracle to Salesforce, decide which data belongs in Salesforce, map your tables to Salesforce objects, give every record an external ID that carries its legacy key, then load parents before children with Data Loader or an ETL tool such as MuleSoft and reconcile each load against the source. The same method works for both databases; Oracle adds a few data type and null-handling traps covered below. The load itself is the easy part. The hard work is in the decisions before it: what to leave behind, how a normalized schema becomes a handful of objects, and how you prove the data still means the same thing after it lands.

Should you migrate everything, or leave some data in SQL Server or Oracle?

Move the data people need to work records in Salesforce, and leave the rest where it is. Salesforce is built for sales, service and customer operations, and it does not replace a general relational database. Data that is high volume, changes constantly, feeds heavy joins for reporting, or belongs to an ERP or finance process usually stays in the database or warehouse.

You have three options for each dataset:

  • Migrate it: the records users create, edit, report on and automate in Salesforce, such as accounts, contacts, open opportunities, active cases, assets and recent orders.
  • Show it without copying it: Salesforce Connect maps external objects to tables in an outside system and reads them on demand, in real time. Salesforce recommends it when you have a large amount of data you do not want to copy, need small amounts at a time, and want the latest values. As of November 2026, it is a paid add-on in Enterprise, Performance and Unlimited editions.
  • Leave it and integrate it: keep the database as the system of record and sync only the fields Salesforce needs, or bring warehouse data into Data 360 (formerly Data Cloud), whose zero copy connectivity queries Snowflake, Databricks, Redshift and BigQuery without keeping a duplicate.

There is no published record count at which migration becomes the wrong call. In practice the signals are these: the data is updated many times a day by another system, users only ever read it, it exists mainly to feed SQL reports, or keeping years of it would cost more in Salesforce storage than it is worth. History is the most common overreach. Ask sales and service leaders how far back they actually look, and archive the rest in the database or a warehouse. Our guide to Salesforce data archiving and retention covers the keep, archive or delete rules.

Also decide early what happens to the old database. If an ERP, a billing system or a BI tool still reads from it, it will not be retired, and your project becomes a migration plus an integration.

How do relational tables map to Salesforce objects?

Map by business entity, one concept at a time. A normalized SQL Server or Oracle schema often spreads one customer across five or six tables for addresses, phone numbers, codes and statuses. In Salesforce that usually becomes one Account with fields, a few related objects, and picklists in place of lookup tables.

Common relational patterns and where they usually land in Salesforce
In SQL Server or OracleUsual Salesforce shape
Customer, contact, order and case tablesStandard objects first: Account, Contact, Opportunity or Order, Case, Asset
Code and status lookup tablesPicklist values, with the legacy code kept in a field if other systems use it
One-to-many foreign keyLookup relationship, or master-detail when the child cannot exist without the parent and should share its access
Many-to-many join tableA junction object with two master-detail or lookup relationships
Composite primary keyA single text field that concatenates the key parts, marked as an external ID
Wide tables split for performanceMerged into one object if users see them as one thing
Views and stored procedures used by appsRebuilt as reports, formula fields, Flow or Apex, or left in the database behind an integration

Use standard objects wherever they fit, because standard reports, AI features and AgentExchange apps expect them. Build a custom object only when no standard one matches. Our Salesforce data model design guide covers lookup versus master-detail and junction objects in more depth.

Stored procedures and PL/SQL packages need their own inventory. List every one an application calls, then decide for each whether the logic moves into Salesforce automation, stays in the database behind an API, or is retired. This is often the largest hidden piece of work, and it belongs in the estimate before anyone signs.

How do external IDs keep legacy keys and relationships intact?

An external ID is a custom field marked with the External ID attribute that holds the record's key from the source system. It does three jobs in a migration. It lets you upsert, which means Salesforce updates the record if the key already exists and creates it if not, so you can rerun a load without making duplicates. It lets child records find their parent by the legacy key, so you never have to look up Salesforce record IDs in a spreadsheet. And it gives you a permanent trail from every Salesforce record back to its source row for reconciliation and audits.

Data Loader supports both: for an upsert, the file needs a column of either external IDs or Salesforce IDs to match on, and if your file carries the external IDs of a related object, you can select that field to match the relationship.

  • Create one external ID field on every object you load, named so everyone knows which system it came from, for example Legacy_ERP_Id__c.
  • For composite keys, build the concatenated value in your extract query and keep the separator consistent.
  • Make the field unique when the source key is unique, so a bad file fails instead of creating a duplicate.
  • Keep the field after go-live. Integrations and future corrections will need it.

Which data types cause silent corruption, and how do you avoid it?

Most data type problems do not throw errors. The load succeeds and the values are quietly wrong. Check these before the first test load:

  • Empty strings and nulls in Oracle. Oracle Database currently treats a character value with a length of zero as null. Data that looked like two different states in another system may arrive as one, so decide what blank means for each field.
  • Time zones. Decide which time zone every legacy date-time column is in, convert explicitly in the extract, and test date-only fields such as birth dates and contract dates, which can shift by a day when a time zone is applied to them.
  • Date ranges. Data Loader accepts dates from 1700-01-01 to 4000-12-31 GMT. Placeholder dates such as 1900-01-01 load fine but pollute reports, so clean them first.
  • Long text. Data Loader version 28.0 and later accepts up to 32,000 characters per field in an imported CSV file. Check CLOB and NVARCHAR(MAX) columns for anything longer and decide whether to truncate, split or store it as a file.
  • Precision. Match each Salesforce number or currency field's decimal places to the source, and compare totals after the load to catch rounding.
  • Character encoding. Export as UTF-8 and spot-check names with accents and special characters before and after the load.

Documents stored as BLOBs are a separate decision. Loading them as Salesforce Files counts against file storage, which is allocated separately from data storage. Many teams move only recent or active documents and leave the archive in a document store with a link on the record.

How should you clean and deduplicate legacy data before loading?

Clean at the source or in a staging database before you load. Fixing data in Salesforce after go-live costs more, because by then users, automation and integrations are touching it. A staging area, often a separate SQL Server or Oracle schema, lets your DBAs use the tools they already know.

  • Profile each table first: row counts, null rates, duplicate keys, orphaned child rows and values outside expected ranges.
  • Deduplicate accounts, contacts and leads with agreed matching rules, such as normalized company name plus postal code, or email address.
  • Standardize picklist values, country and state codes, phone formats and units before mapping.
  • Decide what happens to orphaned child records: attach them to a holding parent, fix them, or leave them behind.
  • Name a data owner per entity who decides which record wins when two business units disagree. Without that person, cleanup stalls.

Our guide to cleaning up duplicate data in Salesforce covers matching rules and merge decisions in detail.

Data Loader, MuleSoft or another ETL tool: which should you use?

Use Data Loader for a one-time migration of well-prepared files, and an ETL or integration platform when the migration needs repeatable transformations, direct database connections, or ongoing sync after go-live. ETL means extract, transform and load: software that pulls data from a source, reshapes it and writes it to a target.

Migration tool options (as of November 2026; confirm with each vendor)
OptionWhat it does wellTrade-offs
Data Import WizardBuilt into Salesforce; Salesforce recommends it for fewer than 50,000 records on supported objects with fewer than 50 fieldsBuilt for smaller imports, so most database migrations outgrow it
Data LoaderFree Salesforce client; insert, update, upsert, delete, hard delete and export; reads CSV files or a database connection; up to 150 million records with Bulk API 2.0; command line for scheduled runs on WindowsLittle transformation logic; you prepare the data in SQL first
MuleSoft Anypoint PlatformDatabase Connector with built-in SQL Server and Oracle connections, stored procedures and bulk operations; Salesforce Connector over SOAP, REST, Bulk and Streaming APIs; reusable after go-live for ongoing integrationA licensed platform run by integration developers; pays off when it keeps running after go-live
Other ETL and iPaaS toolsMany teams already own one, such as SSIS or Azure Data Factory for SQL Server shops; useful when the skills are in houseCheck each tool's Salesforce connector for Bulk API 2.0, upsert by external ID and error handling
Custom scriptsFull control for unusual transformationsYou own error handling, retries and logging

A common pattern for mid-size companies: do the transformation in SQL into staging tables that already match Salesforce objects, then load with Data Loader or the ETL tool you own. If the legacy database will keep running and must stay in sync, plan for an integration platform from the start, because you will need it after cutover anyway. Our guides comparing Salesforce integration options and MuleSoft vs. Workato cover that choice, and Data Import Wizard vs. Data Loader covers the native tools.

In what order do you load objects, and what about automation during the load?

Load parents before children: users and record owners first, then accounts, contacts, opportunities or orders, line items, cases, and finally activities and files. Each child references its parent's external ID, which is why the parent must exist first. For circular references, where two objects point at each other, load both without the circular field, then run a second update pass that fills it in.

Automation needs a plan of its own. Triggers, flows, validation rules, duplicate rules and assignment rules all fire during an API load unless you bypass them, and they slow the load, send unwanted emails and reject legacy values that were valid in the old system. The usual approach is a bypass setting, such as a custom permission or setting that each automation checks, switched on for the migration user only. Switch it off and test every automation once the load is reconciled.

On large data volumes, sharing recalculation can also slow or time out a load. Salesforce lets an admin defer sharing rule and group membership calculations and resume them later, but the feature is not on by default and you request it from Salesforce Support, so ask well before cutover. When you resume, run a full recalculation.

How much Salesforce storage will the data use, and how long will the load take?

Salesforce counts data storage per record, whatever the bytes in your database, so estimate it from row counts. Most records use about 2 KB of data storage. Person accounts use about 4 KB, campaigns 8 KB and campaign members 1 KB. A narrow table of 10 million rows that takes a few gigabytes in SQL Server can therefore need roughly 19 GB in Salesforce. That is why a database of modest size can still outgrow the default allocation.

As of November 2026, Salesforce documents a data storage allocation of 10 GB per org plus 20 MB per user license in Enterprise Edition, or 120 MB per license in Performance and Unlimited, and 10 GB of file storage per org. Storage usage is calculated asynchronously, so after a big load the Storage Usage page catches up later. Count rows per object, multiply by 2 KB, compare with your allocation, and price extra storage or trim history before you commit to scope.

Load time depends more on your org's automation and sharing than on the tool. The platform ceiling is rarely the constraint: as of November 2026, Salesforce documents Bulk API 2.0 for any operation over 2,000 records, with up to 150 million records uploaded per rolling 24 hours and up to 150 MB of encoded data per job. Your developers will find the batch and file size details in the Bulk API limits page listed under Sources.

The only reliable throughput number is the one you measure. Time a full test load of your largest object in a sandbox with production automation and sharing switched on, then plan the cutover window from that. Use the sandbox closest to production you have; if it cannot hold everything, test the full volume of your largest objects and a sample of the rest. Our Salesforce sandbox strategy guide covers what each sandbox type holds.

How do database permissions, audit fields and compliance carry over?

Database permissions do not translate directly. Salesforce controls access with profiles and permission sets for objects and fields, and with organization-wide defaults, the role hierarchy and sharing rules for individual records. Write down who can see what in the old application, rebuild it in Salesforce, then test it with real user accounts. Our guide to the Salesforce sharing model explains each layer.

You can keep original created and modified dates and owners. With the Set Audit Fields upon Record Creation permission switched on, a migration user can set created and last modified dates and users through the API on accounts, contacts, leads, opportunities, cases, tasks, events, contracts, custom objects and several other objects. Two limits matter: the values can only be set when the record is created, and audit date-times must fall on or after 1 January 1970.

For record ownership, every owner must be a Salesforce user. The same Setup step that turns on audit fields also turns on a permission called Update Records with Inactive Owners, which is how teams keep former employees as owners without buying them a license. Confirm it in a test load for each object, and map every legacy owner to an active user, an inactive user or a default owner before the first load.

For regulated data, such as financial account details or health information, decide which fields to encrypt or mask, keep production data out of developer sandboxes, and control the temporary CSV files, ETL logs and error files a migration creates, which can hold the same sensitive data as the source. Our Salesforce data privacy and compliance guide covers the controls.

How do you test and reconcile a database migration?

Run at least two full mock migrations in a sandbox before production, using the same scripts, order and settings you will use on the day. Each mock run should end with a reconciliation, which means proving the target matches the source.

  • Counts: rows extracted, rows loaded, rows rejected, per object. Every rejected row needs a reason from the error file.
  • Totals: sums of amounts, quantities and balances per account and per period, compared in SQL and in Salesforce reports.
  • Relationships: every child has the right parent, checked by external ID, with no orphans.
  • Meaning: a sample of records reviewed by the people who use them, comparing screens side by side in the old system and Salesforce.
  • Access: a few users from different roles confirm they see what they should and nothing more.

Some problems only surface after users start working records: truncated notes, records owned by a queue nobody watches, picklist values that map to the wrong status, lookups pointing at the wrong parent. Plan a hypercare period of focused support after go-live and keep the reconciliation queries ready to rerun.

Big-bang or phased cutover, and how do you roll back?

A big-bang cutover moves everything in one window, usually a weekend, while the old system is frozen. A phased cutover moves one business unit, region or object group at a time. Big-bang is simpler when one application owns the data. Phased fits when several applications share the database or the business cannot freeze for long.

Between the first full load and the final cutover, users keep changing data in the old system. Capture those changes with a delta load, which reloads only rows changed since a timestamp. This is another reason to keep reliable modified dates in your source and to load by upsert on the external ID.

If both systems must run in parallel for weeks or months, decide which system owns each field, sync in one direction where possible, and record which system made each change so the integration does not write the same update back and forth. This is integration work, and an integration platform such as MuleSoft is built for it.

Rollback is rarely a clean undo, because a load across many objects cannot be reversed in one step the way a database transaction can. Plan it in layers:

  • Before go-live, the old system stays the system of record, so rolling back means pointing users back to it.
  • During loads, the external ID lets you identify exactly which records a batch created, delete them, and reload.
  • After users start working in Salesforce, roll forward: fix the bad data with an update load instead of deleting live work.
  • Set a go or no-go point, with named approvers, after which you fix forward.

Take a backup of Salesforce before each production load, and keep the source database read-only but available until reconciliation is signed off.

What happens to SSRS, Power BI and other systems that read the database?

Anything that queries the old database directly will need to change. Reports in SQL Server Reporting Services, Power BI or Tableau that join tables now point at data that lives in Salesforce, so each one is either rebuilt as a Salesforce report or dashboard, or repointed to a warehouse that receives Salesforce data. Integrations that read or write the database, such as ERP feeds, order imports and nightly jobs, need the same review.

List every consumer of the database early. DBAs can usually pull this from login and query logs. That list often changes the project's scope more than the data volume does. Our Salesforce ERP integration guide covers the most common downstream connection.

What does a SQL Server or Oracle migration cost, and how long does it take?

Cost depends on the number of tables and transformations, data quality, history, documents, stored procedure logic and integrations, much more than on record count. A clean migration of a few core entities is a small project; a decade-old application database with heavy custom logic and several downstream consumers is a large one. Our guide to Salesforce migration cost drivers walks through each factor.

Budget for these workstreams: discovery and data profiling, data model and mapping design, cleanup, build of extract and load scripts, mock migrations, reconciliation, the cutover itself, rebuilding reports and integrations, and hypercare. Add licenses where they apply: extra data or file storage, Salesforce Connect, and an ETL or integration platform.

Skills matter as much as tools. Your DBAs know the source data and should own extraction and profiling. Your Salesforce admin knows the target org. A migration also needs someone who has mapped relational schemas to Salesforce before and knows the load limits, sharing behavior and audit field rules. When you check a partner, ask for a comparable project with a relational source, the reconciliation method they used, and who signs off the mapping.

What is different about Oracle to Salesforce data migration?

The method is the same, with a few Oracle-specific checks:

  • Empty strings arrive as nulls, as covered above, so define blank handling per field.
  • Business logic often lives in PL/SQL packages and triggers. Inventory them with the same keep, rebuild or retire decision as SQL Server stored procedures.
  • Large text and binary columns (CLOB and BLOB) need the long-text and file storage decisions above.
  • If the database sits behind an Oracle application such as an ERP, extract from the application's supported interfaces or reporting views where they exist, and agree that approach with the application owner.
  • MuleSoft's Database Connector includes a built-in Oracle connection, and other ETL tools generally connect over JDBC or ODBC, so tool choice follows the same logic as for SQL Server.

Where Abstrakt Solutions fits

Abstrakt Solutions has been a Salesforce Select partner since 2017 and has worked on nearly 900 Salesforce projects. Our team holds 104 Salesforce certifications, and we are a Salesforce Manufacturing Accredited Partner and Financial Services Accredited Partner. Our migration service covers data profiling, mapping, cleanup, test loads, reconciliation and cutover, and our integration team handles the MuleSoft or API work when the old database keeps running.

Our rates are $185 to $225 an hour, with a $3,500 minimum project.

What is the next step?

Talk to us about your database. Send us the source system, the rough number of tables and rows, and what else reads from it, and we will tell you what we would migrate, what we would leave in place, which tools fit, and what would drive the effort.

Questions people also ask

How do you migrate data from SQL Server to Salesforce?

Decide which data belongs in Salesforce, map tables to Salesforce objects, add an external ID field that holds each record's legacy key, clean and transform the data in staging tables, then load parents before children with Data Loader or an ETL tool using upsert on the external ID. Run mock migrations in a sandbox and reconcile counts, totals and relationships before the production cutover.

Can Data Loader connect directly to SQL Server or Oracle?

Data Loader reads CSV files or a database connection when importing, and its command line on Windows supports automated batch runs. Most teams still transform the data in SQL first, because Data Loader has little transformation logic of its own.

Do I need MuleSoft to migrate a database to Salesforce?

No. Data Loader handles one-time loads of prepared data well. MuleSoft or another integration platform earns its cost when the migration needs repeatable transformations or when the database keeps running and must stay in sync with Salesforce after go-live.

What is an external ID in Salesforce?

An external ID is a custom field marked with the External ID attribute that stores a record's key from another system. It lets you upsert records without creating duplicates and lets child records find their parent by the legacy key during a load.

How much Salesforce storage will my database need?

Estimate from row counts, since storage is counted per record. Most records use about 2 KB of data storage, so 10 million rows need roughly 19 GB whatever their size in SQL. As of November 2026, Enterprise Edition includes 10 GB of data storage per org plus 20 MB per user license.

Can I keep the original created dates and owners?

Yes. With the Set Audit Fields upon Record Creation permission, a migration user can set created and last modified dates and users on many standard objects and custom objects. The values can only be set when the record is created, and record owners must exist as active or inactive Salesforce users.

Is Oracle to Salesforce data migration different from SQL Server?

The method is the same. Oracle adds a few checks: it currently treats empty strings as nulls, business logic often sits in PL/SQL packages that need an inventory, and CLOB and BLOB columns need decisions on long text and file storage.

Chris Gooding, President & CEO of Abstrakt Solutions
Chris Gooding
President & CEO, Abstrakt Solutions
LinkedIn →
Tech Talk · monthly newsletter

Valuable insights on technology, CRM and AI, once a month.

Written by the consultants who do the work. One email a month, and you can unsubscribe anytime.

We never share your email. See past issues →

Call (314) 916-4095 Book a consultation
Call (314) 916-4095 Book a call