Automate setting permissions to databases (SQL 2005)?



I set a long list of granular user database permissions with every reinstall
of my development database and I would like to automate this work with a
script instead of doing this manually in SQL Server Management Studio.

Is there a security settings export to file option? Or maybe some script
samples that show how to set user permissions?

I saw this example, but it requires both old and new databases to be running
at once. I reinstall the same PC repeatedly so this doesn't work for me:
http://www.sql-server-performance.com/bm_object_permission_scripts.asp

Thanks!
Adam



.



Relevant Pages

  • Re: test just reinstalled my OS
    ... I never reformat a drive with valuable data on it, ... >> backup it's database file, reinstall it, and then add the database again. ... > LOL ...
    (comp.graphics.apps.lightwave)
  • Re: Cant Install SP4 for SQL 2000 / Win2k3
    ... This explains why a reinstall did not fix the errors. ... ran 'sp_resetstatus msdb' from query analyzer, ... > The LSN %S_LSN passed to log scan in database '%.*ls' is invalid. ... > To resolve this problem, obtain the latest service pack for Microsoft SQL ...
    (microsoft.public.sqlserver.setup)
  • Re: Can not open and Error Message
    ... Allen Browne - Microsoft MVP. ... There is problem for ver 2002. ... I want to distribute my denomination chruch secretary database whose ... Do you think I need to uninstalled my ver 2002 and reinstall it again?. ...
    (microsoft.public.access.modulesdaovba)
  • Re: Failed KB909544 install
    ... SharePoint then reinstalled it. ... of a pain in the @%$ than it would be to reinstall then take a look at these ... Update for SQL Server 2000 Desktop Engine on Windows ... It does not seem that the database for KB909544 vesion of MSDE will be ...
    (microsoft.public.windows.server.sbs)
  • Re: Checksum problem on system database
    ... I was already afraid I would have to reinstall. ... instance from sharepoint. ... we're having an issue with the SQL database that sharepoint ... don't, you are in trouble, as MSDE does not provide the Rebuild utility ...
    (microsoft.public.sqlserver.msde)