I am new to writing scripts so dont blast be to bad. This is a script to make all logins of a sql server readonly users to all user databases. Mainly after a restore from a different server. (for reporting maybe)
Any methods to optimize this script are fine.