How to automatically grant permissions to application created databases in SQL Server 2008 R2? So I have an application that automatically creates a new database after the database it is currently in reaches a fixed number of rows. I need to be able to automatically assign a user within the installation the db_datareader role for the automatically created database. I'm kind of at a loss here, any help is greatly appreciated.
You can do this by granting the permission in the Model database.  This database is used to create any new ones.

USE model
GO

CREATE USER UserName FROM LOGIN LoginName
GO

EXEC sp_addrolemember 'db_datareader','UserName'
GO


That way, as the application creates new databases (which are copied from Model), they will already have the User and the role membership.  

However be warned.  This will be the case for ANY new database created with the CREATE DATABASE command on this instance.  So if you create a database for a different application it will already have this user and the user will have db_datareader. Databases created with ATTACH DATABASE or RESTORE DATABASE will not use the model database, and will not copy the security from the Model database.