cancel
Showing results for 
Search instead for 
Did you mean: 

How do I expunge all SQL code from a database?

Breck_Carter
Participant
0 Kudos
3,369

I want to ship an 11.0.1.2276 *.db file to another party without any of the procedural code still visible to even a binary editor.

I can use ALTER ... SET HIDDEN but that just obfuscates and the recipient is rather clever.

I suspect DROP may not do much of anything to the system catalog data and extension pages other than mark them as free.

Should I use ALTER to replace every procedure, trigger, event, service etcetera with big fat meaningless templates, thus overwriting everything?

Or is that still not going to work?

Accepted Solutions (0)

Answers (1)

Answers (1)

These are two wild guesses:

1) Can you create a blank db and send only the data over to it? Ship the new "clean" db with the same data contents instead of the original with all the procedural code.

2) Can you unload the db and generate the reload statement then delete what you don't want in the reload and then reload? Ship the newly loaded "clean" db.

VolkerBarth
Contributor
0 Kudos

I guess that you don't have that much influence on the contents of "freed pages" or make sure that the pages containing procedural code get overwritten when the procedures are altered. (I don't know whether "free'd pages" are reliably "clean"). So I second Siger's suggestions.

VolkerBarth
Contributor
0 Kudos

To add: Would you need something like Sysinternals SDELETE for database objects/pages?

Breck_Carter
Participant
0 Kudos

@Siger: yes, copying the tables but not the procedures to a new database is a perfect solution... except for the fact that I don't want to do that in this case. For various reasons, it's too much work.