question

PankajBhide-6378 avatar image
0 Votes"
PankajBhide-6378 asked PankajBhide-6378 commented

Initialization error while migration assistance for oracle

I just installed MS SQL Server migration assistance for Oracle and migration assistance for Oracle extension. The installation was successful. I also installed oracle client 19. I am using SQL Server 2019 developer edition.

However when I launch MS SQL Server migration assistance for Oracle, it immediately gives following error:

Any clue what could be the issue here?

=====================
Cannot start because of an initialization error
Try to restart the application. If this problem remains, contact support group (please provide a log file).

Exception: One or more errors occurred.
site:
source:

InnerException #1: The type initializer for 'Microsoft.SSMA.Framework.Oracle.SqlServer.Initializer' threw an exception.
site: Void EnsureInitialize()
source: Microsoft.SSMA.Framework.Oracle.SqlServer
at Microsoft.SSMA.Framework.Oracle.SqlServer.Initializer.EnsureInitialize()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.SSMA.GUI.Product.SourceToTarget.Startup.GuiBootstrap`1.<InitializeAsync>d__11.MoveNext()
InnerException #2: The type initializer for 'Microsoft.SSMA.Framework.Oracle.Generic.OracleTypeProcessor' threw an exception.
site: Microsoft.SSMA.Framework.Oracle.Generic.OracleTypeProcessor get_Instance()
source: Microsoft.SSMA.Framework.Oracle.Generic
at Microsoft.SSMA.Framework.Oracle.Generic.OracleTypeProcessor.get_Instance()
at Microsoft.SSMA.Framework.Generic.Converters.Types.Default.DefaultContainerDescriptor.GetSourceTypeDescriptor(String id)
at Microsoft.SSMA.Framework.Generic.Converters.Types.Default.DefaultTypeMappingSchemaDescriptor.Read(XNode node, IContainerDescriptor contDescriptor)
at Microsoft.SSMA.Framework.Generic.Converters.Types.Default.DefaultContainerDescriptor.ReadSchemaDescriptors(XNode node, IDictionary`2 descriptors)
at Microsoft.SSMA.Framework.Generic.Converters.Types.Default.DefaultContainerDescriptor.Read(XNode node)
at Microsoft.SSMA.Framework.Oracle.SqlServer.Initializer.AddContainerDescriptor(SqlServerVersion serverVersion, String descriptorXml)
at Microsoft.SSMA.Framework.Oracle.SqlServer.Initializer.InitContainerDescriptor()
at Microsoft.SSMA.Framework.Oracle.SqlServer.Initializer.Initialize()
at Microsoft.SSMA.Framework.Oracle.SqlServer.Initializer..cctor()
InnerException #3: The type initializer for 'Microsoft.SSMA.Framework.Generic.Logging.Logger' threw an exception.
site: Microsoft.SSMA.Framework.Generic.Logging.Logger get_GenericLogger()
source: Microsoft.SSMA.Framework.Generic.Factories
at Microsoft.SSMA.Framework.Generic.Logging.Logger.get_GenericLogger()
at Microsoft.SSMA.Framework.Oracle.Generic.OracleTypeProcessor..cctor()
InnerException #4: Configuration system failed to initialize
site: Void PrepareConfigSystem()
source: System.Configuration
at System.Configuration.ConfigurationManager.PrepareConfigSystem()
at System.Configuration.ConfigurationManager.GetSection(String sectionName)
at System.Configuration.PrivilegedConfigurationManager.GetSection(String sectionName)
at System.Diagnostics.DiagnosticsConfiguration.GetConfigSection()
at System.Diagnostics.DiagnosticsConfiguration.Initialize()
at System.Diagnostics.DiagnosticsConfiguration.get_IndentSize()
at System.Diagnostics.TraceInternal.InitializeSettings()
at System.Diagnostics.TraceInternal.get_Listeners()
at System.Diagnostics.Trace.get_Listeners()
at Microsoft.SSMA.Framework.Generic.Logging.Logger..cctor()
InnerException #5: Section or group name 'oracle.manageddataaccess.client' is already defined. Updates to this may only occur at the configuration level where it is defined. (C:\Program Files\Microsoft SQL Server Migration Assistant for Oracle\bin\SSMAforOracle.exe.Config line 4)
site: Void ThrowIfErrors(Boolean)
source: System.Configuration
at System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean ignoreLocal)
at System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors(ConfigurationSchemaErrors schemaErrors)
at System.Configuration.ClientConfigurationSystem.EnsureInit(String configKey)

sql-server-migration-assistant
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

AlexanderIvanov-MSFT avatar image
0 Votes"
AlexanderIvanov-MSFT answered PankajBhide-6378 commented

Hello,

Yeah, we are aware of this issue and will address it in the upcoming release (v8.22). This happens when you have Oracle client drivers installed globally on the machine and try to use SSMA.

As a workaround, you can navigate to SSMA installation folder (default is %PROGRAMFILES%\Microsoft SQL Server Migration Assistant for Oracle\bin) and remove following sections from the SSMAforOracle.exe.config:

<configSections>
  <section name="oracle.manageddataaccess.client" type="OracleInternal.Common.ODPMSectionHandler, Oracle.ManagedDataAccess" />
</configSections>

and

<oracle.manageddataaccess.client>
  <version number="*">
    <settings>
      <setting name="FetchSize" value="4194304" />
    </settings>
  </version>
</oracle.manageddataaccess.client>


Regards,
Alex.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

TThanks a lot Alex, It worked.

0 Votes 0 ·