HEELPBOOK - T- SQL to Map User to Database (SQL Server) ################# Officially, you want to create a database user that is mapped to a login. To do that, you would use: Create User For LOGIN This obviously requires that the login exist. After that you would then call: exec sp_addrolemember 'db_owner', This presumes that the account with which you are connecting to the database has privileges to add members to the db_owner role. ############ ARTICLE INFO ############# Article Month: February Article Date: 15/02/2013 Permalink: http://heelpbook.altervista.org/2013/t-sql-to-map-user-to-database-sql-server/ Source: http://stackoverflow.com/questions/2775234/tsql-to-map-user-to-database Language: English View more articles on: http://www.heelpbook.net/ Follow us on Facebook: http://it-it.facebook.com/pages/HeelpBook/100790870008832 Follow us on Twitter: https://twitter.com/#!/HeelpBook Follow us on RSS Feed: http://feeds.feedburner.com/Heelpbook Follow us on Delicious: http://delicious.com/heelpbook Linkedin: http://it.linkedin.com/pub/stefano-maggi/27/73a/b20 Google+ : https://plus.google.com/116990277568167008289/posts