MS SQL Shadowing on Linux
Vadym
4-20-18
Hello!

I have a problem with my MS SQL Shadowing (for example Build RDB Data).
I have installed ODBC Driver 17 for SQL Server on my Ubuntu 17.04. When I start HW_RDB server I get in log file success connection to MS SQL Server:


2018-04-20 13:42:54 ODBC INIT SQLTCHAR: 1
2018-04-20 13:42:55 Connected to relational database

But when I try to build RDB Data I get in log:

2018-04-20 13:43:38 SA Error building RDB Data

Sql user permission is fine because I can connect to sql via isql command and can create a table manually:

SQL> USE HW
[01000][Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Changed database context to 'HW'.
[ISQL]INFO: SQLExecute returned SQL_SUCCESS_WITH_INFO

SQLRowCount returns 0
SQL> CREATE TABLE dbo.TEST (TESTID int PRIMARY KEY NOT NULL)
SQLRowCount returns 0
SQL> quit


Please, help me solve this problem
Vadym
4-20-18
It is a BUG.

When I use "Build All RDB Data", Registers from "Relational DB Registers" settings was created successful(not all HW Registers).
When I use "Build RDB Data" I have a error in logfile "Error building RDB Data"
Vadym
4-20-18
When HW on Windows I have similar problem. Also HW service crushing.

Starting:
2018-04-20 22:52:34 ODBC INIT SQLTCHAR: 2
2018-04-20 22:52:34 Connected to relational database

Use "Build RDB Data":
2018-04-20 22:48:02 SA/THREAD(22) CheckInternetEnabler failed
2018-04-20 22:48:19 SA Error building RDB Data

Use "Build All RDB Data"
2018-04-20 22:51:06 SA Failed executing prepared insert, rc: -1
2018-04-20 22:51:06 SA Failed executing prepared insert, vc: CUVc

2018-04-20 22:51:06 SA ODBC ERROR, SQLSTATE 22008 message '[Microsoft][ODBC SQL Server Driver]Datetime field overflow' NATIVE ERROR 0
2018-04-20 22:51:06 SA Disabling RDB interface due to previous errors
2018-04-20 22:51:06 SA Error building RDB Data
2018-04-20 22:52:05 SA Error clearing RDB Data
2018-04-20 22:52:09 SA Error clearing RDB Data
2018-04-20 22:52:16 SA Error clearing RDB Data
Crush
Vadym
4-20-18
Created byVadym16:02 20 Apr 2018
It is a BUG. When I use "Build All RDB Data", Registers from "Relational DB Registers" settings was created successful(not all HW Registers). When I use "Build RDB Data" I have a error in logfile "Error building RDB Data"
It's not a BUG. It's my mistake. I should select a row with Register before use this option.
Vadym
4-20-18
But anyway, some of registers make a HW server crush. IVVc,CUVc etc.

2018-04-20 23:23:55 SA Failed executing statement 2: -1
2018-04-20 23:23:55 SA create table IVVcMath (recid int not null, rowno int not nul
2018-04-20 23:23:55 SA l, STP SMALLINT,ARTCODE NVARCHAR(20),QUANT DECIMAL(31,7),PRI
2018-04-20 23:23:55 SA CE DECIMAL(31,7),rdbSUM DECIMAL(31,7),VREBATE DECIMAL(31,7),
2018-04-20 23:23:55 SA SALESACC NVARCHAR(10),OBJECTS NVARCHAR(60),ORDROW INTEGER,BA
2018-04-20 23:23:55 SA SEPRICE DECIMAL(31,7),ROWGP DECIMAL(31,7),FIFO DECIMAL(31,7)
2018-04-20 23:23:55 SA ,SPEC NVARCHAR(100),VATCODE NVARCHAR(10),RECEPY NVARCHAR(20)
2018-04-20 23:23:55 SA ,SERIALNR NVARCHAR(60),PRICEFACTOR DECIMAL(31,7),VARLIST NVA
2018-04-20 23:23:55 SA RCHAR(30),CUPNR INTEGER,FIFOROWVAL DECIMAL(31,7),COEFFICIENT
2018-04-20 23:23:55 SA DECIMAL(31,7),CUACCCODE NVARCHAR(20),EXCISENR NVARCHAR(20),
2018-04-20 23:23:55 SA PERIODCODE NVARCHAR(10),UNITCODE NVARCHAR(5),UNITFACTQUANT D

2018-04-20 23:23:55 SA ECIMAL(31,7),UNITFACTPRICE DECIMAL(31,7),UNITXVAL DECIMAL(31
2018-04-20 23:23:55 SA ,7),UNITYVAL DECIMAL(31,7),UNITZVAL DECIMAL(31,7),VECODE NVA
2018-04-20 23:23:55 SA RCHAR(20),CREDITCARD NVARCHAR(20),AUTHORIZATIONCODE NVARCHAR
2018-04-20 23:23:55 SA (10),POSCODE NVARCHAR(20),CURNCYCODE NVARCHAR(5),FRRATE DECI
2018-04-20 23:23:55 SA MAL(31,7),TORATEB1 DECIMAL(31,7),TORATEB2 DECIMAL(31,7),BASE
2018-04-20 23:23:55 SA RATE1 DECIMAL(31,7),BASERATE2 DECIMAL(31,7),PAYMODE NVARCHAR
2018-04-20 23:23:55 SA (2),GCNR INTEGER,CUSTORDNR NVARCHAR(60),REPAEXVAT DECIMAL(31
2018-04-20 23:23:55 SA ,7),BASEPRICEB2 DECIMAL(31,7),TAX2CODE NVARCHAR(5),TAX2PRC D
2018-04-20 23:23:55 SA ECIMAL(31,7),TAX2REB DECIMAL(31,7),TAX1REB DECIMAL(31,7),TAX
2018-04-20 23:23:55 SA 2ACC NVARCHAR(10),CREDITEDROW INTEGER,NOTUPDSTOCKFLAG SMALLI
2018-04-20 23:23:55 SA NT,CUSERVICEHISTNR INTEGER,CUSERVICEUNTILDATE DATETIME,SERVI

2018-04-20 23:23:55 SA CEDELDATE DATETIME,LOCATION NVARCHAR(10),rdbCOMMENT NVARCHAR
2018-04-20 23:23:55 SA (100),DISCAPPROVEDBY NVARCHAR(10),PERCEPTIONS SMALLINT,VOIDE
2018-04-20 23:23:55 SA DROWNR INTEGER,VOIDEDSIGN NVARCHAR(10),OVST SMALLINT,WITHHOL
2018-04-20 23:23:55 SA DINGS SMALLINT,WHTAX NVARCHAR(2),CCTRANSID NVARCHAR(50),TAXT
2018-04-20 23:23:55 SA EMPLATECODE NVARCHAR(60),RESUSAGE NVARCHAR(10),MBRCODE NVARC
2018-04-20 23:23:55 SA HAR(10),CHEQUENR INTEGER,CHECKNR NVARCHAR(20),POINTS DECIMAL
2018-04-20 23:23:55 SA (31,7),SALESASSISTANT NVARCHAR(10),CCTIMESTAMP NVARCHAR(20),
2018-04-20 23:23:55 SA MOTHERARTCODE NVARCHAR(20),RECIPEQUANT DECIMAL(31,7),ORDNR I
2018-04-20 23:23:55 SA NTEGER,IVNR INTEGER,RETROW INTEGER,QTROW INTEGER,SHNR INTEGE
2018-04-20 23:23:55 SA R,SHROW INTEGER,CUSTARTCODE NVARCHAR(20),SALESMEN NVARCHAR(6
2018-04-20 23:23:55 SA 0),CREDOFFICIALSERNR NVARCHAR(100),MOTHERNR NVARCHAR(60),AES

2018-04-20 23:23:55 SA TATUS SMALLINT,CUSTOMSNR NVARCHAR(30),COUNTRYOFORG NVARCHAR(
2018-04-20 23:23:55 SA 5),SECONDARYSERIALNR NVARCHAR(60),ALTERNATEDEVICEID NVARCHAR
2018-04-20 23:23:55 SA (30),MOTHERSECONDARYSERIALNR NVARCHAR(60),MOTHERALTERNATEDEV
2018-04-20 23:23:55 SA ICEID NVARCHAR(30),UNITCOMMENT NVARCHAR(200),RVRSVATCODE NVA
2018-04-20 23:23:55 SA RCHAR(10),CCRECEIPTNR NVARCHAR(50),FIFOCUR DECIMAL(31,7),FIF
2018-04-20 23:23:55 SA OROWVALCUR DECIMAL(31,7),CURNCYCODECUR NVARCHAR(5),IVFORRETN
2018-04-20 23:23:55 SA R INTEGER,RETFROMCOMP NVARCHAR(0),USEDBIRTHREBATE SMALLINT,p
2018-04-20 23:23:55 SA rimary key (recid,rowno))
2018-04-20 23:23:55 SA ODBC ERROR, SQLSTATE 42000 message '[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Length or precision specification 0 is invalid.' NATIVE ERROR 1001
2018-04-20 23:23:55 SA Disabling RDB interface due to previous errors
2018-04-20 23:23:55 SA Failed allocating statement
2018-04-20 23:23:58 Windows Service version
2018-04-20 23:23:58 Starting application...
Aldevinas Katkus
4-23-18
Try to use SQL profiler to find out the SQL statement which causes the crash. Some time ago we had crash with an invoice date in the year 2090 or smth. Even though it is within the range of SQL server supports, it caused the crash.
Martins Gulbis
4-23-18
Hello!

From what I understand the part that is still valid is "But anyway, some of registers make a HW server crush. IVVc,CUVc etc."?


Would it be possible for you to repot a bug as I would not be able to give you answer right away?

Best regards,


HansaWorld Latvija
Vadym
4-30-18
It's probably problem with data in customer DB, because CUVc and IVVc from other DB was sync correct.

We will try to find the problem


Thanks
Vadym
6-1-18
It's problem for Windows Server. On Linux server all registers sync fine.
Paul Timms
6-14-18
I have a similar issue but using the FreeTDS driver. I have UK sample data running on Linux, and it's connected to Microsoft SQL. I have added Contacts to the relational DB registers. When I build RDB data, it creates the dbo.CUVc table, and the column headings, but fails when inserting data. The error is [FreeTDS][SQL Server]Cannot insert the value NULL into column 'CREDITLIMIT', table 'HANSA-TEST.dbo.CUVc'; column does not allow nulls. INSERT fails. NATIVE ERROR 515.

When I check the Column properties in SQL Server Management Studio, every field has Allow Nulls not ticked. How do I get them to create with Allow Nulls ticked?


Also, Vadym, do you have instructions on how to use the ODBC Driver 17 for SQL Server? I installed it but all my test connections from the Linux shell failed.
Paul Timms
6-15-18
I have now got this working using the ODBC Driver 17 for SQL Server. I think there should be some updated guidance on how to set this up, from start to finish, as the current manual is a bit vague.
Leave Comment
You can subscribe to notifications for this post by selecting the 'star' icon on the top right corner of the post.
Back to the list
Latest Posts
David Delač
Hi Piotr, The log entry:
2024-12-14 08:40:43 0.000 CallHal(IsHansaWorldCustomer) appears because the server is running with the verbosity=debug-detailed setting in its parameters.txt file. Thi...
09:43 16 Dec 2024
Brittany McGrath
Hi Vaughn, I can confirm this has been fixed now and is live in Standard ERP 2024-11-20 Version: 85556786. Thank you. ...
10:04 10 Dec 2024