Unanswered: Script for creation of user,group,role
How will I come to know that group is exists or not on paricular database.
I need this info to create the script for below requirements :
1)Create group groupName on database XYZ.(If group exists do not create this group)
2) Create user username and add it to groupName in XYZ
(c)Create role role_name on server Ser_1
(d) grant role_name to user is userName.