firebird isql:“此数据库中没有表XXXX" [英] firebird isql: "there is no table XXXX in this database"

查看:107
本文介绍了firebird isql:“此数据库中没有表XXXX"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从Firebird 2.5 SQL数据库中提取数据以进行迁移.数据是通过嵌入了Firebird 2.5数据库的软件在很长一段时间内建立的-该软件公司在允许以易于迁移的形式访问我们的数据方面没有帮助...

I am trying to extract data from a Firebird 2.5 SQL database for migration. The data has been built up over a long period through software that has the Firebird 2.5 database embeded - and the software company is not being helpful in allowing access to our data in an easily migratable form ...

通过更改security2.fdb文件,我可以使用管理员用户名SYSDBA通过isql访问数据库,并且可以列出数据库中的表,但是对单个表的任何进一步访问总是会抛出该消息:此数据库中没有表XXXX"

By changing the security2.fdb file I can access the database through isql using the administrator username SYSDBA and can list the tables in the database, but any further access to individual tables always throws the message: "there is no table XXXX in this database"

以下是Windows命令提示符的示例:

Here is an example of the Windows command prompt:

SQL> show tables;
        ....
        ....
        Customer
        ....
SQL> show table customer;
There is no table CUSTOMER in this database

我怀疑对单个表的访问是受控制的,但即使有可能,也无法弄清楚如何重新获得访问权限.

I suspect that access to individual tables is controlled, but can't work out how to regain access, if this is possible at all.

推荐答案

Firebird(和大多数其他数据库)中的默认对象名称不区分大小写,但是有一个局限性:如果创建或引用表(或其他对象)名称不带引号,实际上将其视为大写形式.仅当对象名称用引号引起来时,它才区分大小写并按原样引用.此行为在SQL标准中指定(请参见SQL:2011 Foundation, 5.2< token>和< separator& 以及 5.4名称和标识符).

By default object names in Firebird (and most other databases) are case insensitive, but with a catch: If you create or reference a table (or other object) name without quotes, it is actually treated as if it is uppercased. Only when an object name is enclosed in quotes is it case sensitive and referenced as-is. This behavior is specified in the SQL Standard (see SQL:2011 Foundation, 5.2 <token> and <separator> together with 5.4 Names and Identifiers).

这意味着customerCustomerCUSTOMERCuStOmEr"CUSTOMER"都引用同一张表,即:CUSTOMER.

This means that customer, Customer, CUSTOMER, CuStOmEr and "CUSTOMER" all reference the same table, namely: CUSTOMER.

创建表"Customer"(请注意引号)时,该表以Customer的形式存储在元数据中,但只能将其引用为"Customer",使用Customer仍将引用CUSTOMER作为未引用的对象名称不区分大小写.

When you create a table "Customer" (note the quotes), it is stored in the metadata as Customer but it can only be referenced as "Customer", using Customer will still reference CUSTOMER as unquoted object names are case insensitive.

您尝试使用

show table Customer;

在错误消息中注意CUSTOMER的大写使用:

Note the uppercased use of CUSTOMER in the error message:

此数据库中没有表客户

show tables的输出显示您有一个表Customer(而不是CUSTOMER),因此您需要将其引用为"Customer".您需要使用:

The output of show tables shows you have a table Customer (and not CUSTOMER), so you need to reference it as "Customer". You need to use:

show table "Customer";

这篇关于firebird isql:“此数据库中没有表XXXX"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆