• Assuming that you are passing the script to be executed in @SQLStat parameter, your procedure should be:

    create proc ExecuteScripts (@SQLstat varchar(max))

    as

    begin

    exec ( @SQLstat )

    end

    Also check sp_executesql if you need to use dynamic sql.

    Neepa