Data import export framework – get staging data error in AX 2012

Continue reading

When we are importing data using DIXF framework – during get staging data process – following error could be thrown:‍

SQL error description: [Microsoft][SQL Server Native Client 10.0][SQL Server]The specified schema name “<schema name>” either does not exist or you do not have permission to use it.

We can see in the SQL statement:

SQL statement: CREATE FUNCTION [<schema name>].FN_FMT_NUMBERSEQUENCE

Error is thrown when function FN_FMT_NUMBERSEQUENCE is created and used schema name looks to be invalid.

Schema name is obtained in function DMFGenerateSSISPackage::getSchemaName (see below):

private static str getSchemaName()

{

ResultSet resultSet;

str sql_Current_user = 'SELECT current_user';

str schemaName;

Connection con;

SqlStatementExecutePermission sqlStatementExecutePermission;

...

}

The original code: ‘SELECT current_user’ instead of expected “dbo” can return AOS service account. To solve this issue we need just to change it to SELECT SCHEMA_NAME()

private static str getSchemaName()

{

ResultSet resultSet;

//-->

// str sql_Current_user = 'SELECT current_user';

str sql_Current_user = 'SELECT SCHEMA_NAME()';

//<--

str schemaName;

Connection con;

SqlStatementExecutePermission sqlStatementExecutePermission

...

}

More articles
Explore our blog

What can we do for you?

We'd love to hear about your project. Our team will get back to you within two working days.

Thank you for inquiry, we’ve passed it to our sales department, our representative will reach you back in his earliest convenience.

Oops! Something went wrong while submitting the form.
.

Dziękujemy za zapytanie, przekazaliśmy je do naszego działu sprzedaży. Nasz przedstawiciel skontaktuje się z Państwem w najbliższym możliwym terminie.

Ups! Coś poszło nie tak podczas przesyłania formularza.