Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with automating a task

Status
Not open for further replies.

jpotucek

Technical User
Jan 26, 2005
144
US
Can anyone get me started on this. I need to automate as much as possible... maybe create a stored procedure to do the following on a SQL Server 20000 Instance:

Create a new NT authenticated login (if does not exist), then add the user to the DB as DB Owner, then insert the user to a table in the DB ?
 
Use xp_grantlogin to add the Windows login to the server, then sp_adduser to add the log to the database as a user.
Then use sp_addrolemember to add the user to the db_owner role.
Then use the INSERT statement to add the username to the table needed.

Denny
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / Microsoft Windows SharePoint Services 3.0: Configuration / Microsoft Office SharePoint Server 2007: Configuration)
MCITP Database Administrator (SQL 2005) / Database Developer (SQL 2005)

My Blog
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top