Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Creating a default user Expand / Collapse
Author
Message
Posted Tuesday, September 16, 2008 8:50 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, February 25, 2009 10:32 AM
Points: 3, Visits: 4
Hi there

We have an admin user who we need to create every time a database is created. Is there a way of automating this so each time a database is created this designated user is always added to that database?

Thanks
Mark

Post #570313
Posted Tuesday, September 16, 2008 9:17 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Today @ 11:38 AM
Points: 33,165, Visits: 15,298
Not that I know of. You need to add the user.

A good reason to have a script to create database instead of using the GUI. Let someone change parameters at the beginning (path, size, etc) and have the CREATE USER at the bottom of the script.







Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #570344
Posted Tuesday, September 16, 2008 9:24 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, February 25, 2009 10:32 AM
Points: 3, Visits: 4
Thanks for that I had a search all over and couldn't find an answer so thought I would post this.

Thanks for the quick reply.

:)
Post #570356
Posted Tuesday, September 16, 2008 10:17 AM
SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Thursday, August 7, 2014 3:54 PM
Points: 4,065, Visits: 5,296
If you create the user in the Model database, it will be created in every new database afterward.

Greg
Post #570421
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse