0

I have an exe written in Delphi a decade or more ago, with no source code. It calls a ms sql database, maybe more than 1 to retrieve data. I have read only access to one of the databases, I don't have rights to run sql profiler on it.

Is there a way to get the sql calls that are being made like how fiddler does it for http requests. I'm hoping that there is an app that I can run.

Thank you.

8
  • 1
    Nope, if you don't have access to create a Extended Event, or similar, to capture the statements being run you'll have no idea. You'll need to speak to someone who does have that access. If anyone could access the statements being run against an instance, that would be a huge security risk. Commented Jan 21, 2022 at 12:30
  • 2
    Run a trace (Profiler or Extended Events) on the SQL Server including batch_completed and rpc_completed events. Best to do that in a test system. Commented Jan 21, 2022 at 12:30
  • Create an environment where you have the necessary privileges to run the profiler, make a copy of your database in that environment and let your application target that testenvironment ... Commented Jan 21, 2022 at 12:32
  • @Larnu is there no application I can install on the computer that runs the exe to catch the network traffic and see the statement. Commented Jan 21, 2022 at 12:42
  • Yes, Profiler and Extended Events do that, @David ; you just need the permissions to set them up. Like I said, if anyone could just intercept the SQL statements from an application it would be a massive security risk. Commented Jan 21, 2022 at 12:48

1 Answer 1

1

Older versions of Delphi store string properties inside the executable file, at the end of the file.
If the developers did not take action to obscure this, than chances are you can retrieve them there.

It is not always easy to read though, I opened an old delphi program here and searched for the text "select distinct" and this is what came up

enter image description here

some more queries I found, they are there but as I said, not easy to read.

enter image description here

Sign up to request clarification or add additional context in comments.

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.