Can we use Deployment Module with multi DB Drupal Site or Cross DB Connection Drupal Site? I have scenario in which I am using Cross DB connection on my Drupal 7 Site, I specified my DB connection in settings.php file. Second DB is used as a source db.

Can I use Deployment Module to deploy updates on my default drupal DB only or can also deploy updates on second DB too?
I tried and got this solution, sharing with you all

While using hook_update_N() in your deployment module - .install file, you have to active the DB for which you want to deploy the changes.  I tried it on my server and it works, I am sharing a piece of code, have a look:  

function hook_update_N(&amp;$sandbox){ 
db_set_active('dbsourcekey'); 
variable_set('clean_url', 0); 
variable_set('site_403', 'access-denied'); 
db_set_active('default'); 
}