how to get a location of database by giving its name?

Posted by prajapati.puru on 02-Apr-2012 03:13

I do have 4 or 5 database connected to a progress client. If i want to have the full location of database by provinding name of database, how should i do that.

i tried 'pdbname' keyword, it give the location of some database and gives the db name only of other . Is there any way that i can get that.

Advance thank you

All Replies

Posted by egarcia on 02-Apr-2012 12:46

Hello,

I am guessing that a physical name with a path was not specified for some of the other databases in the connection parameters.

Notice that a path to the database is not required if the database is accessed using network parameters -H -S.

For example, prowin32 -db mydb -H hostname -S portnumber  would connect to the mydb database regardless the physical location. You can specify a path but it is not used.

I hope this helps.

Posted by Rob Fitzpatrick on 02-Apr-2012 13:20

Are you saying that you want your ABL code to determine, based on a provided logical database name, the "location" of the database?

If so, you have to define more clearly what you mean by the location of the database.  Do you mean the server name?  Do you mean the full-qualified directory that contains the control area (dbname.db)?  You may be able to get that from _AreaExtent._extent-path, after you find first _AreaExtent.  I say "may" because there is no guarantee it contains an absolute path.  It could be a relative path like ".\demo.db", which isn't very helpful.

This thread is closed