Skip to Content
0
Nov 06, 2018 at 09:50 PM

stored procedure recovery

176 Views Last edit Nov 06, 2018 at 09:50 PM 2 rev

so I am VERY new to sybase, I work a lot with mysql though.

we have an application that uses a sybase db and lo and behold someone ran this on it:

print_log_file("Dropping $spName\n");
open(DELETE, ">/tmp/do-sp-delete-$spName");
print DELETE "if exists (select name from sysobjects where name='$spName' and type='P')\n"
. "drop procedure $spName\n"
. "go\n";
close(DELETE) || die("Cannot close file for write - dropping SP $spName - $!");

***I have a full list of the stored procedures removed.***

so we have file level backups of the server, entire server, but its old and you cant really deploy a new server from the backups like R1 does (bare metal).

So my question is, where are the stored procedures stored in file level, are they even?

How would I go about recreating these stored procedures from a file level restore?

Alternatively, *wink wink* dont (we totally do) have access to another server that has these stored procedures on it that I need, how would I dump just the stored procedures from that server and import them on this one?