in reply to regular expression code not working

Try:

$line  =~ s/\)\z/\)\;\n/;

I can't tell if that'll do the job for you, but it appears to me that your terminating ")" may NOT be the first char on the line (depending on content of the input and/or how you're handling the input from files with the MSSQL schema).

Alternately, you may want to read the documentation re regexen available at your command prompt -- including perlre and perlretut -- with specfic reference to multi-line and single-line mode.