db5.1_upgrade: command not found

Have You tried accessing the binary with the full path?

Maybe Your $PATH variable doesn't contain the default paths? echo $PATH should give something like:

[root@server ~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

If it's empty, You may set the PATH variable with this command

export PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin"

On Debian possible default full paths are:

/usr/bin/db5.1_upgrade - from package: db5.1-util

You may install the required package with command apt-get install {package}
Error in other languages:
db5.1_upgrade: bevel nie gevind nie
db5.1_upgrade: comandă negăsită
db5.1_upgrade: comando não encontrado
db5.1_upgrade: commande introuvable
db5.1_upgrade: command not found
db5.1_upgrade: käsku ei ole
db5.1_upgrade: không tìm thấy lệnh
db5.1_upgrade: komanda nerasta
db5.1_upgrade: Kommando nicht gefunden.
db5.1_upgrade: kommandot finns inte
db5.1_upgrade: komut yok
db5.1_upgrade: nie znaleziono polecenia
db5.1_upgrade: níor aimsíodh an t-ordú
db5.1_upgrade: no se encontró la orden
db5.1_upgrade: no s'ha trobat l'ordre
db5.1_upgrade: opdracht niet gevonden
db5.1_upgrade: parancs nem található
db5.1_upgrade: perintah tidak ditemukan
db5.1_upgrade: príkaz nenájdený
db5.1_upgrade: příkaz nenalezen
db5.1_upgrade: команда не найдена
db5.1_upgrade: командата не е открита
db5.1_upgrade: 命令找不到
db5.1_upgrade: コマンドが見つかりません