July 14, 2010 at 3:50 pm
Please view the attached picture and tell me how to script setting the sv2 user to 'map' to the solovue_country_fresh database with a role membership of db_owner.
Thank you!!
Mike
July 14, 2010 at 4:39 pm
Did you consider BOL (BooksOnLine, the SQL Server help system), section "sp_addrolemember" as a resource?
July 15, 2010 at 8:49 am
Everything's kinda on that screen. I think you ought to try this yourself first and if it doesn't work, let us know what you've done.
August 2, 2010 at 12:34 am
Everything is on that screen is UI. I want to know how to do it in an .SQL file that can be run.
Mike
August 6, 2010 at 6:16 am
Try the SP_ADDROLEMEMBER TSQL
EXEC SP_ADDROLEMEMBER N'db_owner', N'user_login'
"More Green More Oxygen !! Plant a tree today"
August 6, 2010 at 8:33 am
Ok...
This:
use xyz
EXEC sp_grantdbaccess @loginame = 'sv2'
gets me 'public' database access to xyz for user sv2. How do I programatically get the db_owner set for the same user?
TIA,
Mike
August 7, 2010 at 8:54 pm
mike 57299 (8/6/2010)
Ok...This:
use xyz
EXEC sp_grantdbaccess @loginame = 'sv2'
gets me 'public' database access to xyz for user sv2. How do I programatically get the db_owner set for the same user?
TIA,
Mike
What privileges with you have logged in? if it is a sysadmin and simple from the management studio you can assign db_owner role on the specific db for the login you need. This will be the simple step
or use the TSQL above to grant the role.
Cheers,
Got an idea..share it !!
DBA_Vishal
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply