10 Nov 2008 16:13
Windows BindDLZ, ODBC and MSSQL Native Client, Doesnt Like | (Bar)
Robert Dunkley <Robert <at> saq.co.uk>
2008-11-10 15:13:01 GMT
2008-11-10 15:13:01 GMT
I am using a version of Bind DLZ compiled for Windows with ODBC and a
SQL Server native client 2005 connection. The ODBC connector tests OK
and BIND works for recursion and gives no errors before queries for
domains in the Bind DLZ table occur. They always fail with an error as
below:
10-Nov-2008 14:54:50.781 Odbc driver unable to return result set for
lookup quer
y
10-Nov-2008 14:54:50.781
Query String: select ttl, type, mx_priority, data, ownerid, serial,
refresh, ret
ry, expire, minimum
from DNS_DnsRecords where zone = 'grandchild0ren.net' and (type
= 'SOA'
or type='NS')
10-Nov-2008 14:54:50.781 dns_sdlz_putrr returned error. Error code was:
failure
I ran an ODBC log and it seems most of the queries succeed except the
one containing a "bar", here is a sample error from the log:
named -f d88-d48 ENTER SQLExecDirect
HSTMT 00A81FA8
UCHAR * 0x0053C010 [ 219] "select ttl,
type, mx_priority, case when lower(type)='txt' then '"' || data || '"'\
a else data end from DNS_DnsRecords where zone =
'grandchild0ren.net' and host = ' <at> '\ a and not (type = 'SOA' or
type = 'NS')"
SDWORD 219
named -f d88-d48 EXIT SQLExecDirect with return code -1
(SQL_ERROR)
HSTMT 00A81FA8
UCHAR * 0x0053C010 [ 219] "select ttl,
type, mx_priority, case when lower(type)='txt' then '"' || data || '"'\
a else data end from DNS_DnsRecords where zone =
'grandchild0ren.net' and host = ' <at> '\ a and not (type = 'SOA' or
type = 'NS')"
SDWORD 219
DIAG [42000] [Microsoft][SQL Native Client][SQL
Server]Incorrect syntax near '|'. (102)
The only query in mysql.conf with a bar is this one:
{select ttl, type, mx_priority, case when lower(type)='txt' then '\"' ||
data || '\"'
else data end from DNS_DnsRecords where zone = '%zone%' and host
= '%record%'
and not (type = 'SOA' or type = 'NS')}
Does anyone know how to rewrite this query or adjust the MSSQL native
client to understand the existing query?
Thanks in advance,
Rob
The SAQ Group
Registered Office: 18 Chapel Street, Petersfield, Hampshire GU32 3DZ
SEMTEC Limited Trading as SAQ is Registered in England & Wales
Company Number: 06481952
http://www.saqnet.co.uk AS29219
SAQ Group Delivers high quality, honestly priced communication and I.T. services to UK Business.
DSL : Domains : Email : Hosting : CoLo : Servers : Racks : Transit : Backups : Managed Networks : Remote Support.
Find us in http://www.thebestof.co.uk/petersfield
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
RSS Feed