Multi tenant in django

I was working on a multi tenant project where I have to route the database also alter the session to a particular schema iam using Oracle database

For tenant 1 I want to connect to database key called a also alter the session to schema b like a.tablename

I have successfully routed the database dynamically but couldn’t able to alter the session dynamically even if we try altering it’s not working anyone knows how to solve this