0

How can we get database name in progress openedge like in SQL we can get database name by using show databases; or SELECT schema_name FROM information_schema.schemata; using SQL query to openedge DB.

1

3 Answers 3

1

In ABL you can

DEFINE VARIABLE i AS INTEGER     NO-UNDO.

DO i = 1 TO NUM-DBS:
    MESSAGE LDBNAME (i) SKIP 
            PDBNAME (i) SKIP 
            DBPARAM (i)
        VIEW-AS ALERT-BOX INFORMATION BUTTONS OK.
END.

In OpenEdge SQL the SHOW CATALOGS command returns the database/catalog names:

https://docs.progress.com/bundle/openedge-sql-reference/page/SHOW-CATALOGS.html?_ga=2.234385114.558448476.1620632697-128156788.1596090319

SHOW CATALOGS PRO_NAME;
Sign up to request clarification or add additional context in comments.

2 Comments

I want in SQL query not in ABL.
You tagged your question with "progress-4gl". That gives people the idea that maybe you're using the 4gl engine. Which also contains some (very limited) SQL syntax.
0
select db_name() from sysprogress.syscalctable;

Comments

0

Just in case the link to "Progress Communities" goes away:

Valeriy Bashkatov (Progress Technologies LLC)

You should run this with a DBA privileged user.

select * from sysprogress.SYSTABLES;

select * from sysprogress.SYSTABLES_FULL;

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

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.