changed database instance handling