Extracting SQL queries from a compiled application

I'm in a bit of a pickle. I just got handed a server app but the database is messed up and I can't find a working copy. Is there any way to figure out what SQL queries the app is using? I'm hoping to rebuild the tables from scratch.

Update: I found some files without extensions. They have the same names as the databases. Not sure if that helps, but I thought I'd mention it.

Good news! I actually found another backup, so I didn't need to try the solutions suggested here. But I'm keeping this question up in case someone else runs into a similar problem.

Glad to hear you found a backup, Finn_Brave. That’s certainly the best-case scenario. For future reference or for others facing similar issues, there are a few approaches to extract SQL queries from compiled applications. Decompiling the app can sometimes reveal hardcoded queries. Using a network sniffer like Wireshark to capture database traffic can also be effective. Additionally, some database management systems offer query logging features that can be enabled to track executed queries. As for those files without extensions, they might have been database dumps or backups in a proprietary format. Always worth investigating such files when dealing with database recovery scenarios.

ooh, interesting problem! have u tried using a decompiler? those can sometimes reveal hidden sql queries. or maybe set up a proxy to intercept db traffic? curious what those extensionless files contain - maybe theyre encrypted backups? this kinda detective work is fun, let me know if u stumble on any cool tricks!

hey finn, glad backup worked. for future, try a hex editor to scan mystery files; sometimes they hold clues. also, if the app uses an orm, queries might be embedded in code, not raw sql. just some quick thoughts!