SQL server 2005 - user rights

Posted by Paresh on Stack Overflow See other posts from Stack Overflow or by Paresh
Published on 2010-04-01T09:31:26Z Indexed on 2010/04/01 10:53 UTC
Read the original article Hit count: 368

Filed under:
|
|
|

I have created one user named "tuser" with create database rights in SQL server 2005. and given the 'db_owner' database role of master and msdb database to "tuser".

From this user login when I run the script for create database then it will create new database. But "tuser" don't have access that newly created database generated from script.

Any one have any idea?, I want to write the script so "tuser" have access that new created database after creation and can have add user permission of newly created database.

I want to give 'db_owner' database roles to "tuser" on that newly created database in the same script which create new database. The script run under 'tuser'.

© Stack Overflow or respective owner

Related posts about sql

Related posts about sql-server