Sql 列出Omnis数据库中的表

Sql 列出Omnis数据库中的表,sql,Sql,我正在使用SSIS将数据从Omnis数据库迁移到SQL Server。我可以将Omnis数据库与ODBC驱动程序和查询表连接起来,但我想自动化这个过程,所以我需要使用sql语句从数据库中检索所有表。在其他数据库上,我通常会这样做: 在MySQL下我会做的 SHOW TABLES 在postgresql下 SELECT table_name FROM information_schema.tables ORDER BY table_schema,table_name; 但我不知道Omnis D

我正在使用SSIS将数据从Omnis数据库迁移到SQL Server。我可以将Omnis数据库与ODBC驱动程序和查询表连接起来,但我想自动化这个过程,所以我需要使用sql语句从数据库中检索所有表。在其他数据库上,我通常会这样做:

在MySQL下我会做的

SHOW TABLES
在postgresql下

SELECT table_name
FROM information_schema.tables
ORDER BY table_schema,table_name;
但我不知道Omnis Db的语法。我怎样才能做到这一点

如果可能,我还需要获取列数据类型信息…

以下是我的操作方法:

_odConn.Open(); // Where this is my Omnis Odbc driver connection object

var tableDT = _odConn.GetSchema("TABLES");
foreach (DataRow r in tableDT.Rows)
{
   Console.WriteLine("Database: " + r[1].ToString()); // This will always be "OMNIS"
   Console.WriteLine("Table Name: " + r[2].ToString()); // This is your table name, ie, "ACTIVITY"
   Console.WriteLine("Object Type: " + r[3].ToString()); // This will always be "TABLE"
}
要获取列定义列表,请执行相同的操作,但使用GetSchemaCOLUMNS。据我所知,每一列的内容都没有文档记录,但以下是我使用的内容:

column #   Content
3          Column Name
5          DataType
6          Precision (or length)
11         Comment or Description
16         Ordinal position of column

您可以尝试使用Excel链接到ODBC数据,它似乎知道如何查看所有表和列。

谢谢,我将在返回项目后立即进行测试。