0
votes

I have been searching all over and i cant seem to find a solution.

I want to query the Pervasive engine to see how many and what are the names of the databases hosted on the Pervasive engine.

my actual purpose for doing this is to create an DSN-Less Linked Server to MSSQL 2008 R2. Reason being that the Database files is hosted on a different server than where i am trying to query it.

I cannot read/write to the registry once the solution is hosted. (To get the database names through the registry).

I have tried accessing the remote computer's registry, (which works in a Console environment) but as soon as i do it through IIS (when the site is hosted), it doesn't allow me. I Do not want to allow registry connections to that server where Pervasive Server is running

I Have tried all the usual "SELECT * from INFORMATION_SCHEMA.Databases" or "DESCRIBE Databases"

None of the them work!

Please help me create a DSN Less LinkedServer and query the databases.

thanks in advance!

1

1 Answers

0
votes

The only way to query the database names in PSQL is to use the DTI or DTO interfaces. Specifically, you would use the PvGeDbName function in DTI or the DtoDatabase object in DTO.
There has been talk of a system stored procedure to list the database names but as far as I know it has not been implemented and would only be available in PSQL v11 or later if it is.