AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / dba / 问题 / 169191
Accepted
raphael75
raphael75
Asked: 2017-04-06 04:37:39 +0800 CST2017-04-06 04:37:39 +0800 CST 2017-04-06 04:37:39 +0800 CST

这些错误消息是什么意思?

  • 772

这是在使用 dblib 和 PDO 连接到远程 Sybase 数据库(Sybase 版本 11.0.1.2596)的 PHP 脚本中的 AWS AMI EC2 Linux 实例上运行的。服务器具有具有以下设置的 freetds:

Compile-time settings (established with the "configure" script)
                        Version: freetds v0.91
         freetds.conf directory: /etc
 MS db-lib source compatibility: yes
    Sybase binary compatibility: yes
                  Thread safety: yes
                  iconv library: yes
                    TDS version: 4.2
                          iODBC: no
                       unixodbc: yes
          SSPI "trusted" logins: no
                       Kerberos: yes

有时当我们在 sybase 计算机上运行查询时,我们会收到这样的错误(令牌可能会有所不同):

TDS: unexpected token 95 [0] (severity 0) [(null)]

查询有时甚至会在出现此错误后运行,有时会失败。我在网上搜索过,但找不到此错误的含义或修复方法。这是其中一个查询的示例:

-- 999 | Hammil | 2017-04-05 08:23:29 
SELECT  
    999 as 'site_id',
    (select rest_name from micros.rest_def) as 'location',
    now() as 'dt_run',
    emp_seq,
    employee_number as 'obj_num',
    last_name,
    first_name,
    check_number,
    xfer_from_check,
    xfer_from_type,
    xfer_to_check,
    xfer_to_type,
    check_id,
    table_number,
    table_name,
    group_number,
    cover_count,
    order_type,
    order_type_name,
    business_date,
    check_open_date_time,
    check_closed_date_time,
    table_open_date_time,
    printed_count,
    sub_ttl,
    tax_ttl,
    auto_svc_ttl,
    other_svc_ttl,
    paymnt_ttl,
    amount_due_ttl,
    sp_error
FROM
    micros.micros.v_R_guest_checks x
where
    x.check_closed_date_time is null;

有时我们会收到此错误:

SQLSTATE[HY000]: General error: 20047 DBPROCESS is dead or not enabled [20047] (severity 1) [(null)]

发生这种情况时,我可以运行

nc -v -w 4 xxx.xxx.xxx.xxx 2638

它返回

Connection to xxx.xxx.xxx.xxx 2638 port [tcp/sybaseanywhere] succeeded!

但我会继续收到错误几分钟,然后它就会消失。

sybase php
  • 1 1 个回答
  • 474 Views

1 个回答

  • Voted
  1. Best Answer
    Hannah Vernon
    2017-04-06T05:08:40+08:002017-04-06T05:08:40+08:00

    TDS 中的意外标记表示错误的网络数据包已发送到 Sybase 正在侦听的 TCP 端口。

    这表明以下两件事之一:

    1. TCP TDS 数据包被破坏的间歇性网络连接问题
    2. 您有一些进程试图在不使用 TDS 的情况下连接到 Sybase 实例。

    我已经看到 #2 发生在寻找开放端口的安全扫描进程中。

    从您的症状来看,这听起来像是网络连接问题。由于 Sybase Anywhere 服务器与您的客户端计算机不在同一网段,因此我倾向于认为客户端需要优雅地处理连接问题。

    • 2

相关问题

  • 固定值字段的外键约束

  • 为什么同时使用 TRUNCATE 和 DROP?

  • 已经连接时是否有与 isql 等效的 -w ?

  • 如何从 isql 将参数传递给“SQL 脚本”

  • 如何识别具有指向 Sybase 中特定表的外键的表?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    连接到 PostgreSQL 服务器:致命:主机没有 pg_hba.conf 条目

    • 12 个回答
  • Marko Smith

    如何让sqlplus的输出出现在一行中?

    • 3 个回答
  • Marko Smith

    选择具有最大日期或最晚日期的日期

    • 3 个回答
  • Marko Smith

    如何列出 PostgreSQL 中的所有模式?

    • 4 个回答
  • Marko Smith

    列出指定表的所有列

    • 5 个回答
  • Marko Smith

    如何在不修改我自己的 tnsnames.ora 的情况下使用 sqlplus 连接到位于另一台主机上的 Oracle 数据库

    • 4 个回答
  • Marko Smith

    你如何mysqldump特定的表?

    • 4 个回答
  • Marko Smith

    使用 psql 列出数据库权限

    • 10 个回答
  • Marko Smith

    如何从 PostgreSQL 中的选择查询中将值插入表中?

    • 4 个回答
  • Marko Smith

    如何使用 psql 列出所有数据库和表?

    • 7 个回答
  • Martin Hope
    Jin 连接到 PostgreSQL 服务器:致命:主机没有 pg_hba.conf 条目 2014-12-02 02:54:58 +0800 CST
  • Martin Hope
    Stéphane 如何列出 PostgreSQL 中的所有模式? 2013-04-16 11:19:16 +0800 CST
  • Martin Hope
    Mike Walsh 为什么事务日志不断增长或空间不足? 2012-12-05 18:11:22 +0800 CST
  • Martin Hope
    Stephane Rolland 列出指定表的所有列 2012-08-14 04:44:44 +0800 CST
  • Martin Hope
    haxney MySQL 能否合理地对数十亿行执行查询? 2012-07-03 11:36:13 +0800 CST
  • Martin Hope
    qazwsx 如何监控大型 .sql 文件的导入进度? 2012-05-03 08:54:41 +0800 CST
  • Martin Hope
    markdorison 你如何mysqldump特定的表? 2011-12-17 12:39:37 +0800 CST
  • Martin Hope
    Jonas 如何使用 psql 对 SQL 查询进行计时? 2011-06-04 02:22:54 +0800 CST
  • Martin Hope
    Jonas 如何从 PostgreSQL 中的选择查询中将值插入表中? 2011-05-28 00:33:05 +0800 CST
  • Martin Hope
    Jonas 如何使用 psql 列出所有数据库和表? 2011-02-18 00:45:49 +0800 CST

热门标签

sql-server mysql postgresql sql-server-2014 sql-server-2016 oracle sql-server-2008 database-design query-performance sql-server-2017

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve