Home
%3CLINGO-SUB%20id%3D%22lingo-sub-368750%22%20slang%3D%22en-US%22%3EMigrate%20your%20Oracle%20database%20to%20Azure%20SQL%20Database%20Managed%20Instance%20using%20SSMA%208.0%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-368750%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSTRONG%3E%20First%20published%20on%20MSDN%20on%20Feb%2017%2C%202019%20%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CI%3E%20Authored%20by%20datamigrationteam%40microsoft.com%20%3C%2FI%3E%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3E%20%3CA%20href%3D%22https%3A%2F%2Fwww.microsoft.com%2Fen-us%2Fdownload%2Fdetails.aspx%3Fid%3D54258%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3ESQL%20Server%20Migration%20Assistant%208.0%3C%2FA%3E%26nbsp%3Bintroduces%20support%20for%20%3CSTRONG%3E%20Azure%20SQL%20Database%20Managed%20Instance%20%3C%2FSTRONG%3E%20as%20a%20target.%20Whether%20you%20were%20planning%20to%20migrate%20or%20already%20in%20the%20process%20of%20converting%20your%20database%20schema%20%E2%80%93%20now%20you%20have%20all%20the%20tool%20under%20your%20belt!%20%3CBR%20%2F%3E%3CBR%20%2F%3EBefore%20you%20start%20converting%20schemas%20in%20the%20%3CSTRONG%3E%20SQL%20Server%20Migration%20Assistant%20%3C%2FSTRONG%3E%20%2C%20you%20need%20to%20install%20%3CSTRONG%3E%20SSMA%20for%20Oracle%20Extension%20Pack%20%3C%2FSTRONG%3E%20on%20your%20target%20Azure%20SQL%20Database%20Managed%20Instance.%20This%20will%20add%20additional%20functionality%20to%20your%20instance%20that%20will%20be%20used%20by%20the%20converted%20code%20produced%20by%20SSMA%20and%20it%20only%20needs%20to%20be%20done%20once%20for%20each%20instance.%20To%20install%20the%20extension%20pack%2C%20download%20%3CA%20href%3D%22https%3A%2F%2Fwww.microsoft.com%2Fen-us%2Fdownload%2Fdetails.aspx%3Fid%3D54258%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%20Extension%20Pack%20installer%3C%2FA%3E%26nbsp%3Band%20follow%20usual%20installation%20steps.%20After%20you%20get%20to%20the%20second%20part%20of%20the%20installation%20process%2C%20select%20%3CSTRONG%3E%20Remote%20instance%20(Linux%20or%20Azure)%20%3C%2FSTRONG%3E%20%3A%20%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20486px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F88852i9826E5E8F850D620%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20%2F%3E%3C%2FSPAN%3E%20%3CBR%20%2F%3E%3CBR%20%2F%3EProvide%20connection%20credentials%20to%20your%20%3CSTRONG%3E%20Azure%20SQL%20Database%20Managed%20Instance%20%3C%2FSTRONG%3E%20%2C%20and%20the%20install%20the%20%3CSTRONG%3E%20Utilities%20%3C%2FSTRONG%3E%20database%20and%20Extension%20Pack%20libraries.%20%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20486px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F88853i879861EC81E3FE81%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20%2F%3E%3C%2FSPAN%3E%20%3CBR%20%2F%3E%3CBR%20%2F%3EAfter%20installation%20is%20done%2C%20you%20can%20jump%20to%20the%20SSMA%20client%20tool%20to%20start%20working%20on%20your%20schema%20conversion.%20For%20this%20walk-through%2C%20let's%20move%20the%20well-known%20%3CSTRONG%3E%20HR%20%3C%2FSTRONG%3E%20schema%20from%20Oracle%20to%20Azure%20SQL%20Database%20Managed%20Instance.%20%3CBR%20%2F%3E%3CBR%20%2F%3EOpen%20the%20SSMA%20client%20tool%2C%20and%20then%20create%20a%20new%20project%20targeting%20Azure%20SQL%20Database%20Managed%20Instance%3A%20%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20581px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F88854i6ABFDD0C6845296B%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20%2F%3E%3C%2FSPAN%3E%20%3CBR%20%2F%3E%3CBR%20%2F%3EConnect%20to%20source%20and%20target%20servers.%20%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F88855i48E591E26C1923C9%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20%2F%3E%3C%2FSPAN%3E%20%3CBR%20%2F%3E%3CBR%20%2F%3EAfter%20you%20have%20your%20source%20and%20target%20connected%2C%20right-click%20desired%20schema%20in%20the%20%3CSTRONG%3E%20Oracle%20Metadata%20Explorer%20%3C%2FSTRONG%3E%20tree%2C%20and%20then%20select%20%3CSTRONG%3E%20Convert%20Schema%3C%2FSTRONG%3E%3A%20%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20374px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F88856i15F937259D1CE88F%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20%2F%3E%3C%2FSPAN%3E%20%3CBR%20%2F%3E%3CBR%20%2F%3ESSMA%20will%20load%20additional%20information%20about%20the%20objects%20and%20convert%20them%20to%20their%20SQL%20Server%20representations.%20Depending%20on%20the%20size%20of%20your%20schema%20this%20may%20take%20some%20time.%20For%20our%20sample%20HR%20schema%20this%20takes%20less%20than%2010%20seconds%20and%20once%20done%20you%20will%20be%20presented%20with%20the%20results%20in%20a%20form%20of%20conversion%20errors%20and%20warnings.%20In%20this%20simple%20case%20we%20only%20have%20five%20warnings%20that%20we%20need%20to%20look%20into%3A%20%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20998px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F88857i706C5E4FF0ED4741%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20%2F%3E%3C%2FSPAN%3E%20%3CBR%20%2F%3E%3CBR%20%2F%3EAs%20you%20may%20notice%2C%20four%20of%20them%20are%20related%20to%20the%20NUMBER%20datatype%20and%20on%20is%20about%20the%20READ%20ONLY%20clause%20that%20was%20ignored.%20Let%E2%80%99s%20start%20with%20the%20NUMBER%20datatype%20conversion%3A%20double-click%20on%20of%20the%20warnings%20and%20it%20will%20take%20you%20to%20the%20place%20that%20requires%20attention.%20%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F88858i00209FA7D43A9CDD%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20%2F%3E%3C%2FSPAN%3E%20%3CBR%20%2F%3E%3CBR%20%2F%3EHere%20you%20can%20see%20that%20%3CSTRONG%3E%20p_emp_id%20%3C%2FSTRONG%3E%20is%20defined%20as%20%3CSTRONG%3E%20job_history.employee_id%20%3C%2FSTRONG%3E%20column%E2%80%99s%20type%2C%20which%20resolves%20to%20an%20arbitrary%20NUMBER%2C%20since%20Oracle%20doesn%E2%80%99t%20allow%20precision%20and%20scale%20for%20procedure%20arguments.%20SSMA%20cannot%20tell%20which%20value%20will%20be%20passed%20in%20there%20(integer%20or%20decimal)%20at%20runtime%2C%20so%20it%20assumes%20anything%20and%20uses%20%3CSTRONG%3E%20float(53)%20%3C%2FSTRONG%3E%20datatype%20on%20the%20SQL%20Server%20side.%20Given%20that%20%3CSTRONG%3E%20float%20%3C%2FSTRONG%3E%20in%20SQL%20Server%20and%20%3CSTRONG%3E%20NUMBER%20%3C%2FSTRONG%3E%20in%20Oracle%20support%20different%20scale%20and%20precision%2C%20SSMA%20notifies%20you%20that%20there%20might%20be%20a%20potential%20data%20loss%2C%20depending%20on%20the%20values%20you%20decide%20to%20store%20in%20the%20column.%20In%20our%20case%2C%20since%20we%20know%20that%20we%20always%20pass%20an%20integer%20here%20%E2%80%93%20we%20can%20just%20update%20it%20to%20%3CSTRONG%3E%20int%20%3C%2FSTRONG%3E%20datatype%20in%20SQL%20Server%20and%20move%20on.%20Other%20three%20issues%20from%20this%20bucket%20are%20the%20same%20%E2%80%93%20ID%20is%20being%20passed%20as%20an%20argument%20%E2%80%93%20let%E2%80%99s%20just%20update%20all%20places%20to%20use%20%3CSTRONG%3E%20int%20%3C%2FSTRONG%3E%20.%20%3CBR%20%2F%3E%3CBR%20%2F%3ELastly%2C%20we%20have%20%E2%80%9CWITH%20READ%20ONLY%E2%80%9D%20clause%20on%20the%20view%20that%20SSMA%20does%20not%20convert%2C%20so%20it%20notifies%20you%20that%20it%20was%20ignored.%20To%20make%20the%20view%20non-updatable%20in%20SQL%20Server%20you%20can%20tweak%20user%E2%80%99s%20permissions%20after%20you%20deploy%20the%20schema.%20Given%20that%20it%20is%20not%20a%20functional%20blocker%20for%20the%20migration%2C%20lets%20proceed%20and%20deploy%20our%20converted%20schema%20to%20the%20target%20Azure%20SQL%20Database%20Managed%20Instance.%20%3CBR%20%2F%3E%3CBR%20%2F%3EMake%20sure%20you%20have%20converted%20schema%20(%20%3CSTRONG%3E%20HR%20%3C%2FSTRONG%3E%20%2C%20in%20our%20case)%20as%20well%20as%20%3CSTRONG%3E%20ssma_oracle%20%3C%2FSTRONG%3E%20schema%20checked%2C%20then%20right-click%20the%20database%20node%20in%20the%20target%20metadata%20explorer%20and%20select%20%3CSTRONG%3E%20Synchronize%20with%20Database%20%3C%2FSTRONG%3E%20%3A%20%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F88859i1323218342DBBBED%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20%2F%3E%3C%2FSPAN%3E%20%3CBR%20%2F%3E%3CBR%20%2F%3ESSMA%20will%20analyze%20existing%20database%20state%20and%20present%20you%20with%20the%20changes%20that%20are%20going%20to%20be%20applied%3A%20%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20886px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F88860iF81DF21E6E5E4F08%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20%2F%3E%3C%2FSPAN%3E%20%3CBR%20%2F%3E%3CBR%20%2F%3EReview%20the%20changes%2C%20and%20then%20click%20%3CSTRONG%3E%20OK%20%3C%2FSTRONG%3E%20to%20proceed.%20SSMA%20will%20start%20loading%20new%20objects%20to%20the%20database.%20This%20may%20take%20some%20time%2C%20depending%20on%20the%20size%20of%20your%20schema.%20Wait%20until%20you%20see%20synchronization%20completion%20message%20in%20the%20%3CSTRONG%3E%20Output%20%3C%2FSTRONG%3E%20window%20and%20now%20your%20Oracle%20schema%20is%20successfully%20migrated%20to%20Azure%20SQL%20Database%20Managed%20Instance!%20%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20767px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F88861i9B6D80BC7E3DF3F5%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20%2F%3E%3C%2FSPAN%3E%20%3CBR%20%2F%3E%3CBR%20%2F%3EThe%20next%20step%20in%20the%20migration%20process%20is%20to%20move%20your%20data%2C%20and%20SSMA%20can%20assist%20you%20with%20this%20as%20well.%20All%20you%20need%20to%20do%20after%20the%20schema%20is%20migrated%20is%20to%20right-click%20the%20%3CSTRONG%3E%20Tables%20%3C%2FSTRONG%3E%20node%20in%20the%20%3CSTRONG%3E%20Oracle%20Metadata%20Explorer%20%3C%2FSTRONG%3E%20%2C%20and%20the%20select%20%3CSTRONG%3E%20Migrate%20Data%20%3C%2FSTRONG%3E%20%3A%20%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20942px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F88862i65FCB5A68CC3465A%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20%2F%3E%3C%2FSPAN%3E%20%3CBR%20%2F%3E%3CBR%20%2F%3ERe-enter%20you%20source%20and%20target%20credentials%20and%20wait%20until%20it%E2%80%99s%20done.%20At%20the%20end%20you%20will%20be%20presented%20with%20the%20summary%2C%20indicating%20how%20many%20rows%20were%20moved%20for%20each%20table%20and%20whether%20there%20were%20any%20issues%3A%20%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20856px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F88863i1BCE90BD4060AA0B%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20%2F%3E%3C%2FSPAN%3E%20%3CBR%20%2F%3E%3CBR%20%2F%3EAt%20this%20point%20your%20database%20is%20fully%20migrated%20and%20ready%20to%20use!%20%3CBR%20%2F%3E%3CBR%20%2F%3EFor%20those%20who%20are%20already%20familiar%20with%20SSMA%20and%20wondering%20if%20there%20are%20any%20limitations%20when%20targeting%20Azure%20SQL%20Database%20Managed%20Instance%2C%20compared%20to%20on-premises%20SQL%20Server%20%E2%80%93%20unfortunately%2C%20there%20are%20a%20few.%20In%20this%20initial%20release%2C%20the%20%3CSTRONG%3E%20Tester%20%3C%2FSTRONG%3E%20feature%20and%20%3CSTRONG%3E%20Server-side%20data%20migration%20%3C%2FSTRONG%3E%20are%20not%20supported.%20We%20will%20continue%20working%20with%20the%20Azure%20SQL%20Database%20Managed%20Instance%20team%20to%20enable%20all%20functionality%20in%20future%20versions.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-368750%22%20slang%3D%22en-US%22%3E%3CP%3EFirst%20published%20on%20MSDN%20on%20Feb%2017%2C%202019%20Authored%20by%20datamigrationteam%40microsoft.%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-368750%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ESSMA%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Microsoft

First published on MSDN on Feb 17, 2019

Authored by datamigrationteam@microsoft.com


SQL Server Migration Assistant 8.0 introduces support for Azure SQL Database Managed Instance as a target. Whether you were planning to migrate or already in the process of converting your database schema – now you have all the tool under your belt!

Before you start converting schemas in the SQL Server Migration Assistant , you need to install SSMA for Oracle Extension Pack on your target Azure SQL Database Managed Instance. This will add additional functionality to your instance that will be used by the converted code produced by SSMA and it only needs to be done once for each instance. To install the extension pack, download Extension Pack installer and follow usual installation steps. After you get to the second part of the installation process, select Remote instance (Linux or Azure) :



Provide connection credentials to your Azure SQL Database Managed Instance , and the install the Utilities database and Extension Pack libraries.



After installation is done, you can jump to the SSMA client tool to start working on your schema conversion. For this walk-through, let's move the well-known HR schema from Oracle to Azure SQL Database Managed Instance.

Open the SSMA client tool, and then create a new project targeting Azure SQL Database Managed Instance:



Connect to source and target servers.



After you have your source and target connected, right-click desired schema in the Oracle Metadata Explorer tree, and then select Convert Schema:



SSMA will load additional information about the objects and convert them to their SQL Server representations. Depending on the size of your schema this may take some time. For our sample HR schema this takes less than 10 seconds and once done you will be presented with the results in a form of conversion errors and warnings. In this simple case we only have five warnings that we need to look into:



As you may notice, four of them are related to the NUMBER datatype and on is about the READ ONLY clause that was ignored. Let’s start with the NUMBER datatype conversion: double-click on of the warnings and it will take you to the place that requires attention.



Here you can see that p_emp_id is defined as job_history.employee_id column’s type, which resolves to an arbitrary NUMBER, since Oracle doesn’t allow precision and scale for procedure arguments. SSMA cannot tell which value will be passed in there (integer or decimal) at runtime, so it assumes anything and uses float(53) datatype on the SQL Server side. Given that float in SQL Server and NUMBER in Oracle support different scale and precision, SSMA notifies you that there might be a potential data loss, depending on the values you decide to store in the column. In our case, since we know that we always pass an integer here – we can just update it to int datatype in SQL Server and move on. Other three issues from this bucket are the same – ID is being passed as an argument – let’s just update all places to use int .

Lastly, we have “WITH READ ONLY” clause on the view that SSMA does not convert, so it notifies you that it was ignored. To make the view non-updatable in SQL Server you can tweak user’s permissions after you deploy the schema. Given that it is not a functional blocker for the migration, lets proceed and deploy our converted schema to the target Azure SQL Database Managed Instance.

Make sure you have converted schema ( HR , in our case) as well as ssma_oracle schema checked, then right-click the database node in the target metadata explorer and select Synchronize with Database :



SSMA will analyze existing database state and present you with the changes that are going to be applied:



Review the changes, and then click OK to proceed. SSMA will start loading new objects to the database. This may take some time, depending on the size of your schema. Wait until you see synchronization completion message in the Output window and now your Oracle schema is successfully migrated to Azure SQL Database Managed Instance!



The next step in the migration process is to move your data, and SSMA can assist you with this as well. All you need to do after the schema is migrated is to right-click the Tables node in the Oracle Metadata Explorer , and the select Migrate Data :



Re-enter you source and target credentials and wait until it’s done. At the end you will be presented with the summary, indicating how many rows were moved for each table and whether there were any issues:



At this point your database is fully migrated and ready to use!

For those who are already familiar with SSMA and wondering if there are any limitations when targeting Azure SQL Database Managed Instance, compared to on-premises SQL Server – unfortunately, there are a few. In this initial release, the Tester feature and Server-side data migration are not supported. We will continue working with the Azure SQL Database Managed Instance team to enable all functionality in future versions.