Skip to Content.
Sympa Menu

freetds - [freetds] [FreeTDS][SQL Server]Procedure has no parameters and arguments were supplied., {42000, NativeErr = 8146}

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Hans Christiansen <hans.christiansen AT apero.se>
  • To: freetds AT lists.ibiblio.org
  • Subject: [freetds] [FreeTDS][SQL Server]Procedure has no parameters and arguments were supplied., {42000, NativeErr = 8146}
  • Date: Mon, 12 Dec 2011 16:05:12 +0100

freeTDS 0.64 on 64 bit gentoo linux (3.0.6-gentoo #1 SMP Fri Dec 2 19:18:36 CET 2011 x86_64 Intel(R) Xeon(R) CPU E5405 @ 2.00GHz GenuineIntel GNU/Linux)

Using Oracle 11g and dg4odbc via freeTDS to access a SQL Server.

A maintenence task executed nightly has worked well with freeTDS for many months/years now (on Oracle 10/hsodbc/freetds). Upon upgrade to Oracle 11g and dg4odbc I receive the following message after ~ 1 minutes execution.

SQL*Plus: Release 11.2.0.2.0 Production on Må Dec 12 15:09:22 2011

Copyright (c) 1982, 2011, Oracle. All rights reserved.

Enter user-name: ljt/ljt

Connected to:
Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production

SQL> set serveroutput on
SQL> set timing on
SQL> exec weekly_sales.refresh_job_info_cache_week(sysdate-7);
/error -28500
text: ORA-28500: connection from ORACLE to a non-Oracle system returned this
message:/
[FreeTDS][SQL Server]Procedure has no parameters and arguments were
supplied. {42000,NativeErr = 8146}
ORA-02063: preceding 2 lines from GRAFU
job=143770
BEGIN weekly_sales.refresh_job_info_cache_week(sysdate-7); END;

*
ERROR at line 1:
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
[FreeTDS][SQL Server]Procedure has no parameters and arguments were supplied.
{42000,NativeErr = 8146}
ORA-02063: preceding 2 lines from GRAFU
ORA-06512: at "LJT.WEEKLY_SALES", line 393
ORA-06512: at "LJT.WEEKLY_SALES", line 432
ORA-06512: at line 1


Elapsed: 00:02:06.04
SQL>

Please note that there are 2 spaces between "Procedure" and "has no ...".

Text in yellow is debug information sent by my package.

The error can occur at different places in my code every time it is run.

dump file = /tmp/freetds.log
debug flags = 0xffff
was uncommented in freetds.conf which generated (an awful lot of information) the following at the end:

15:11:41.158760 16157 (query.c:1573):tds_submit_execute()
15:11:41.158766 16157 (util.c:119):Changing query state from IDLE to QUERYING
15:11:41.158772 16157 (mem.c:519):tds_free_all_results()
15:11:41.158779 16157 (query.c:1267):tds_put_data_info putting status
15:11:41.158786 16157 (query.c:1362):tds_put_data: colsize = 0
15:11:41.158792 16157 (query.c:1391):tds_put_data: not null param varint_size = 1
15:11:41.158798 16157 (query.c:1450):swapping numeric data...
15:11:41.158811 16157 (util.c:119):Changing query state from QUERYING to PENDING
15:11:41.158818 16157 (net.c:673):Sending packet
0000 03 01 00 34 00 00 01 00-0a 00 73 00 70 00 5f 00 |...4.... ..s.p._.|
0010 65 00 78 00 65 00 63 00-75 00 74 00 65 00 00 00 |e.x.e.c. u.t.e...|
0020 00 00 26 04 04 01 00 00-00 00 00 6a 04 06 00 04 |..&..... ...j....|
0030 01 9a 31 02 - |..1.|

15:11:41.158852 16157 (util.c:119):Changing query state from PENDING to READING
15:11:41.159169 16157 (net.c:446):Received header
0000 04 01 00 be 00 43 01 00- |.....C..|

15:11:41.159185 16157 (net.c:542):Received packet
0000 aa aa 00 d2 1f 00 00 01-10 39 00 50 00 72 00 6f |........ .9.P.r.o|
0010 00 63 00 65 00 64 00 75-00 72 00 65 00 20 00 20 |.c.e.d.u .r.e. . |
0020 00 68 00 61 00 73 00 20-00 6e 00 6f 00 20 00 70 |.h.a.s. .n.o. .p|
0030 00 61 00 72 00 61 00 6d-00 65 00 74 00 65 00 72 |.a.r.a.m .e.t.e.r|
0040 00 73 00 20 00 61 00 6e-00 64 00 20 00 61 00 72 |.s. .a.n .d. .a.r|
0050 00 67 00 75 00 6d 00 65-00 6e 00 74 00 73 00 20 |.g.u.m.e .n.t.s. |
0060 00 77 00 65 00 72 00 65-00 20 00 73 00 75 00 70 |.w.e.r.e . .s.u.p|
0070 00 70 00 6c 00 69 00 65-00 64 00 2e 00 16 47 00 |.p.l.i.e .d....G.|
0080 52 00 41 00 46 00 55 00-53 00 45 00 52 00 56 00 |R.A.F.U. S.E.R.V.|
0090 45 00 52 00 5c 00 53 00-51 00 4c 00 45 00 58 00 |E.R.\.S. Q.L.E.X.|
00a0 50 00 52 00 45 00 53 00-53 00 00 01 00 fe 02 00 |P.R.E.S. S.......|
00b0 e0 00 00 00 00 00 - |......|

15:11:41.159250 16157 (token.c:526):processing result tokens. marker is aa(ERROR)
15:11:41.159257 16157 (token.c:105):tds_process_default_tokens() marker is aa(ERROR)
15:11:41.159264 16157 (token.c:2439):tds_process_msg() reading message from server
15:11:41.159271 16157 (read.c:179):tds_get_string: reading 114 from wire to give 57 to client.
15:11:41.159281 16157 (read.c:179):tds_get_string: reading 44 from wire to give 22 to client.
15:11:41.159298 16157 (token.c:2501):tds_process_msg() calling client msg handler
15:11:41.159314 16157 (token.c:2514):tds_process_msg() returning TDS_SUCCEED
15:11:41.159322 16157 (token.c:526):processing result tokens. marker is fe(DONEPROC)
15:11:41.159329 16157 (token.c:2143):tds_process_end: more_results = 0
was_cancelled = 0
error = 1
done_count_valid = 0
15:11:41.159335 16157 (token.c:2159):tds_process_end() state set to TDS_IDLE
15:11:41.159341 16157 (util.c:119):Changing query state from READING to IDLE
15:11:41.159348 16157 (util.c:119):Changing query state from IDLE to PENDING


The contents of freetds.conf contains:

[global]
tds version = 8.0
; initial block size = 512
# uses some fixes required for some bugged MSSQL 7.0 server that
# return invalid data to big endian clients
# NOTE TDS version 7.0 or 8.0 should be used instead
; swap broken dates = no
; swap broken money = no
# Whether to write a TDSDUMP file for diagnostic purposes
# (setting this to /tmp is insecure on a multi-user system)
dump file = /tmp/freetds.log
debug flags = 0xffff
# Command and connection timeouts
timeout = 600
; timeout = 10
; connect timeout = 10
# If you get out of memory errors, it may mean that your client
# is trying to allocate a huge buffer for a TEXT field.
# (Microsoft servers sometimes pretend TEXT columns are
# 4 GB wide!) If you have this problem, try setting
# 'text size' to a more reasonable limit
# text size = 64512
text size = 16384
client charset = UTF-8

[grafu_prod]
host = grafuserver.ljungbergs.se
port = 1081
tds version = 8.0
# client charset = UTF-8
client charset = ISO-8859-1

(Note: edited for clarity. grafu_prod is the connection used)

my initGRAFU_PROD.ora file contains:

HS_FDS_CONNECT_INFO = grafu_prod
HS_FDS_TRACE_LEVEL = 0
HS_FDS_SHAREABLE_NAME = /usr/lib64/libodbc.so
HS_FDS_RESULTSET_SUPPORT = TRUE
HS_LANGUAGE=american_america.we8iso8859P1
#HS_NLS_NCHAR=american_america.we8iso8859P1
#HS_LANGUAGE=AMERICAN_AMERICA.UTF8
HS_NLS_NCHAR=UCS2
HS_KEEP_REMOTE_COLUMN_SIZE = LOCAL
#HS_NLS_LENGTH_SEMANTICS = CHAR
set ODBCINI = /etc/unixODBC/odbc.ini
set LANG = en_US.utf8

I find no pattern in why it should return an error! Any ideas or hints are grately appreciated.

Regards
Hans




--

*Apero Solutions AB*

Box 104, S-264 22 Klippan

Telephone: +46-435 77 91 21

www.apero.se <http://www.apero.se>





Archive powered by MHonArc 2.6.24.

Top of Page