This is what I’d recommend. This is for SQL server, if you have another DBMS this will be slightly different. I’m assuming you want to automate this task. (1) let all your users know that scheduled maintenance begins at ?? time and give them advanced notice of the outage. (2) In SQL server, next you should restrict access so that anyone that is kicked off, cant login. (3) Create a SQL script that will loop thru the sysprocesses table and issue a KILL command for users in your database.
You can even make a stored proc in your database to automate this task. If your DBMS is SQL Server, look in books online and search on KILL, sysprocesses, and sp_who.
I hope this helps