Question

My application uses Entity Framework 4 to access a SQL Anywhere 12.0.1 database. I need a query that will tell me what the name of the database file on disk, including the drive letter.

How do I get the database path from the database itself?

Was it helpful?

Solution

I figured it out. This query will retrieve the path of the file that the current database is stored in:

SELECT file_name FROM SYSDBFILE WHERE dbfile_name = 'system'

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top