There are a whole bunch of scripts for membership and role databases under
C:\Windows\Microsoft.NET\Framework\v2.0.50727\
Something like:
InstallCommon.sql
InstallMembership.sql
InstallPersistSqlState.sql
InstallPersonalization.sql
InstallProfile.SQL
InstallRoles.sql
InstallSqlState.sql
InstallSqlStateTemplate.sql
InstallWebEventSqlProvider.sql
and their equivalent uninstall scripts, too.
The easiest way to install those databases is to use the aspnet_regsql
command line tool in that directory. It's a wizard that walks you through installing the necessary bits.