SSMAforSybaseConsole.EXE causes FileIsLockedException

Maheen, Aziq Ahamed 0 Reputation points
2023-10-27T05:53:31.17+00:00

Executing more than 1 or 2 sessions using SSMAforSybaseConsole.EXE in Powershell / cmd causes FileIsLockedException. How to resolve this ?


Unhandled Exception: Microsoft.SSMA.Framework.Generic.Factories.Utils.FileIOUtils+FileIsLockedException: The process cannot access the file 'C:\Users\userid\AppData\Roaming\Microsoft SQL Server Migration Assistant\Sybase\global-preferences.prefs' because it is being used by another process. ---> System.IO.IOException: The process cannot access the file 'C:\Users\userid\AppData\Roaming\Microsoft SQL Server Migration Assistant\Sybase\global-preferences.prefs' because it is being used by another process.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite, Boolean checkHost)
   at Microsoft.SSMA.Framework.Generic.Factories.Utils.FileIOUtils.TrySaveAsXml(String fileName, Boolean needsCompression, SaveAsXmlProcessor saveProcessor)
   --- End of inner exception stack trace ---
   at Microsoft.SSMA.Framework.Generic.Factories.Utils.FileIOUtils.TrySaveAsXml(String fileName, Boolean needsCompression, SaveAsXmlProcessor saveProcessor)
   at Microsoft.SSMA.Framework.Generic.Environment.AbstractEnvironment.SaveEnvironmentImpl(SqlServerVersion targetVersion)
   at Microsoft.SSMA.Framework.Generic.SSMAEnvironment.SSMAEnvironment.SaveEnvironmentImpl()
   at Microsoft.SSMA.GUI.Generic.CommandProcessor.AbstractCommandProcessor.StartSSMAImpl(Int32& exitCode)
   at Microsoft.SSMA.GUI.Generic.CommandProcessor.AbstractCommandProcessor.StartSSMA()
   at Microsoft.SSMA.GUI.Sybase2SqlServer.CommandProcessor.Sybase2SqlServerCommandProcessor.Main(String[] args)

SQL Server Migration Assistant
SQL Server Migration Assistant
A Microsoft tool designed to automate database migration to SQL Server from Access, DB2, MySQL, Oracle, and SAP ASE.
507 questions
0 comments No comments
{count} votes