Skip to content

Add RAISERROR WITH LOG to the migration assessment #25936

Open
@jhavlicek-profinit

Description

@jhavlicek-profinit

Is your feature request related to a problem? Please describe.
Azure SQL Migration extensions wizard performs an assessment whether a database is ready or migration. Currently, it doesn't report RAISERROR (...) WITH LOG as problematic.

However, during migration, the schema deployment fails with an error message

Deployed failure: Only System Administrator can specify WITH LOG option for RAISERROR command. Object element: [dbo].[Redacted].

Describe the solution or feature you'd like

The assessment should include occurrences of RAISERROR (...) WITH LOG in the assessment, at least as warnings, but probably as error (because it blocks schema migration).

Describe alternatives you've considered

I can deploy and look for failures, but it's time consuming. WITH LOG requires sysadmin privileges which I am unlikey to get on Azufre SQL Database.

Additional context

I am using following versions:

Version: 1.49.1 (system setup)
Commit: 2f696aa
Date: 2024-08-13T18:12:38.831Z
VS Code: 1.82.0
Electron: 25.9.8
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Windows_NT x64 10.0.22631

Azure SQL Migration v1.5.4

This is original code that caused the problem

	  RAISERROR (N'Error: Module [%s].[%s] unexpectedly failed with error number %d, severity %d, state %d, at [%s], line %d with the message "%s".',
				 16, 0,
				 @schema,
				 @module,
				 @errorNumber,
				 @errorSeverity,
				 @errorState,
				 @errorProcedure,
				 @errorLine,
				 @errorMessage)
				with log;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions