Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get table schema from Progress database via odbc

I have a linked server set up between sql 2008 and a Progress OpenEdge 10.1b server.

How do I get the table schemas?

like image 601
NotMe Avatar asked Apr 09 '10 18:04

NotMe


People also ask

What is return schema in odbcconnection?

Returns schema information for the data source of this OdbcConnection. A DataTable that contains schema information. Returns schema information for the data source of this OdbcConnection using the specified name for the schema name. Specifies the name of the schema to return.

What does system data ODBC mean?

System. Data. Odbc Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here. Returns schema information for the data source of this OdbcConnection.

What is the use of getschema () method in SQL?

All restrictions that apply to the SQLStatistics method also apply to the ODBCConnection.GetSchema ("indexes") collection. Returns schema information for the data source of this OdbcConnection using the specified string for the schema name and the specified string array for the restriction values.

What is the _DB metaschema table?

This is the existing _db metaschema table for databases. Added to the table is a new field for a globally unique identifier (GUID) to uniquely identify a database and support the aggregation of audit data from multiple databases or sources.


2 Answers

You can get all available tables:

select * from sysprogress.SYSTABLES;

or

select * from sysprogress.SYSTABLES_FULL;

You can get all columns of specified table:

select * from sysprogress.SYSCOLUMNS where TBL = 'table_name';

or

select * from sysprogress.SYSCOLUMNS_FULL where TBL = 'table_name';

It works only with DBA privileged user.

More detail in OpenEdge Product Documentation: https://community.progress.com/community_groups/openedge_general/w/openedgegeneral/1329.openedge-product-documentation-overview

Document title: SQL Reference

Chapter: OpenEdge SQL System Catalog Tables

like image 161
ksimon Avatar answered Oct 11 '22 14:10

ksimon


You can do a statement like

SELECT * FROM LinkedProgressOpenedgeServer.YourDatabase.Owner.TableName WHERE 1=2

That should return just the schema without any data.

like image 26
Raj More Avatar answered Oct 11 '22 14:10

Raj More