Please see the attachment for the statement and basic information regarding this.
For the all-in-one statement, simply run it against the database and it should work without the need to modify the statement. It runs on information from the sys.tables, sys.schemas and fn_dblog so therefore you may need some db permission or simply have your dba admin with the necessary privileges run it.