reconnect db server and close current cursor