Hi,
i've aproblem with the taskscheduling on our NAV2017 CTP25 installation on SQL Server 2014.
The following error is shown in Eventlog:
Server instance: Instance1
Tenant ID: <ii>default</ii>
<ii>Session type: RoleTailoredClient
Session ID: 5
User: USERTEST
Type: Microsoft.Dynamics.Nav.Types.Exceptions.NavSqlException
ErrorNumber: 137
SuppressMessage: False
SuppressExceptionCreatedEvent: False
FatalityScope: None
Message:
<ii>Der folgende SQL-Fehler war nicht erwartet.
Must declare the scalar variable "@tenantid".
Statement(s) could not be prepared. SQL-Anweisung:
INSERT INTO [DATABASE].[dbo].[$ndo$taskscheduling] ([id],[tenantid],[not_before],[state],[Server Instance ID],[retries]) VALUES (@id,@tenantid,@notbefore,@state,@serverInstanceId,@retries)
StackTrace:
at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
at System.Environment.get_StackTrace()
at Microsoft.Dynamics.Nav.Runtime.NavSqlConnection.ThrowNavSqlException(SqlExceptionAdapter exceptionAdapter, NavSqlCommand command,
So why he doesn't no the TenantID? But in line 2 he know it ("default")
Regards
Comments
Can you post these CTP issues?
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
so founf the solution self:
System send:
declare @id uniqueidentifier;
declare @tenantId nvarchar(128);
declare @notbefore datetime;
declare @state int;
declare @serverInstanceId int;
declare @retries int;
set @id='862546B2-3598-43B3-8BE2-E2DAF7C1B3EA';
set @tenantId=N'default';
set @notbefore='2016-09-13 22:00:00';
set @state=1;
set @serverInstanceId=0;
set @retries=0;
INSERT INTO [Demo Upgrade NAV (10-0)].[dbo].[$ndo$taskscheduling] ([id],[tenantid],[not_before],[state],[Server Instance ID],[retries])
VALUES (@id,@tenantid,@notbefore,@state,@serverInstanceId,@retries)
<--- variable @tenantid declared as @tenantId but used in Insert as @tenantid.
Why it works on "Demo" instance from DVD --> Server Collaction.
Our System that the admin gives us is --> SQL_Latin1_General_CP850_CS_AS :-/ :-/
The default of on DVD is Latin1_General_CI_AS
So, with the CP850 the variable not declared, with CI_AS it is
Post can be closed.