Extract scripts from exe?

Packages and compresses schema and contents of SQL Server databases

Moderators: JonathanWatts, Chris Auckland, David Atkinson, david connell, Anu Deshpande, Michelle Taylor, james.billings, Marianne

Extract scripts from exe?

Postby Beedle » Fri Sep 16, 2011 5:58 pm

Hi,
Is there a way to extract the scripts from an exe(and dll) package? My problem is this: I have a exe/dll set created from a database (and network environment) no longer in existence. I made the mistake of letting the SQL Packager include logins, so now when I attempt to run it, it fails right away trying to create a domain\\login for an invalid domain. Short of actually creating the domain and user, can anyone think of a way I can extract the scripts from this package? I was thinking of maybe somehow tricking the exe into sending the commands to a shell, or some way to have it keep executing after errors.

Thanks,
Beedle
Beedle
 
Posts: 2
Joined: Fri Sep 16, 2011 5:47 pm
Location: Minneapolis

Postby james.billings » Mon Sep 19, 2011 12:33 pm

I can't think of a massively simple way of doing this. You could try our .NET Reflector product, as this will let you see the source code for the .exe. The scripts is stored as a bunch of string resources. However, if you ticked the box to compress these when you originally made the .exe, you won't be able to view them in any meaningful sense.
james.billings
 
Posts: 1144
Joined: Wed Jun 16, 2010 11:10 am
Location: My desk.

Postby Beedle » Mon Sep 19, 2011 5:30 pm

Thanks for the idea James. When I try to open any of the dll's resources, I get an "Invalid resource file signature" error.
Beedle
 
Posts: 2
Joined: Fri Sep 16, 2011 5:47 pm
Location: Minneapolis

Postby james.billings » Mon Sep 19, 2011 5:34 pm

Unfortunately, that suggests the string resources are compressed.

I don't know of a way to decompress those I'm afraid, and I don't think there's any way to get the script to continue if it encounters an error as the rollback code is part of the script. So it looks like really you'd need some way to create those users first.
james.billings
 
Posts: 1144
Joined: Wed Jun 16, 2010 11:10 am
Location: My desk.


Return to SQL Packager 6

Who is online

Users browsing this forum: No registered users and 0 guests