Giving access permissions to user webadminqa_iispool
-
Hi All, I want to check if the user exists on a database with domain and user registration "XXXCXXX-XXX\webxxxxxqa_iispool", if doesn't exists create one, if it exists then give user the roles to access the application db_owner or public on few databases on the server using user login properties by using the script. I know we can do this by using Management Studio, is there any way to write it all as a script to run it when we have multiple databases. Any help is appreciated, link, suggestion or code snippet anything. Thanks in advance.
Thanks, Abdul Aleem "There is already enough hatred in the world lets spread love, compassion and affection."
-
Hi All, I want to check if the user exists on a database with domain and user registration "XXXCXXX-XXX\webxxxxxqa_iispool", if doesn't exists create one, if it exists then give user the roles to access the application db_owner or public on few databases on the server using user login properties by using the script. I know we can do this by using Management Studio, is there any way to write it all as a script to run it when we have multiple databases. Any help is appreciated, link, suggestion or code snippet anything. Thanks in advance.
Thanks, Abdul Aleem "There is already enough hatred in the world lets spread love, compassion and affection."
Anything you can do in SSMS can be done by script, you could put a stored proc in the Master database and run it from there. When you are in SSMS there is an icon to create a script on most actions, use this to jump start you requirements. Most results from a google search of the operation you need will give you sample scripts that you can use, try these[^].
Never underestimate the power of human stupidity RAH
-
Hi All, I want to check if the user exists on a database with domain and user registration "XXXCXXX-XXX\webxxxxxqa_iispool", if doesn't exists create one, if it exists then give user the roles to access the application db_owner or public on few databases on the server using user login properties by using the script. I know we can do this by using Management Studio, is there any way to write it all as a script to run it when we have multiple databases. Any help is appreciated, link, suggestion or code snippet anything. Thanks in advance.
Thanks, Abdul Aleem "There is already enough hatred in the world lets spread love, compassion and affection."
indian143 wrote:
... give user the roles to access the application db_owner ...
That's a very bad idea. The user should only have the permissions required by your application. I assume your application doesn't need to modify the structure of tables, views, stored procedures, etc.? And it doesn't need to modify the users and permissions? So why give it those permissions?
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer