April 11, 2012 at 7:22 am
I'm a SQL Developer, not and administrator, but a third party software company working with our DB needs access and I need to add a user and give them Admin access.
I can't find out how to do this anywhere? I have set up a windows log in for them. Can someone please clue me it?
Thanks!
April 11, 2012 at 7:31 am
What all privileges he they should get /
What all data they can read/edit?
Regards,
Skybvi
Regards
Sushant Kumar
MCTS,MCP
April 11, 2012 at 7:34 am
I need to give them full access to everything.
April 11, 2012 at 7:50 am
create a sql login ( thru security)
in user mapping, select the database, whcih u want him to access everythign and give him
db_owner permissions.
Regards,
Skybvi
Regards
Sushant Kumar
MCTS,MCP
April 11, 2012 at 8:06 am
Thanks! But, I'm not a SQL Admin, I'm a developer. My Admin is not here this week and I need to give this access as soon as possible. Can you give me a little more info?
create a sql login ( thru security) - How? Is this a script or from MGMT Studio?
in user mapping, select the database, whcih u want him to access everythign and give him
db_owner permissions. Again, how do I do this? don't know what user mapping is?
Thanks again for your help!
April 11, 2012 at 8:15 am
djustice 20821 (4/11/2012)
I need to give them full access to everything.
Please define full access to everything. Do they need only access to a specific database or the entire server?
April 11, 2012 at 8:19 am
They need access to 2 databases, 'Test' and 'Production', but they need full access to both. By full access I mean they need to be able to access (read/Write) all tables, views, SP's etc.
Thanks
April 11, 2012 at 8:23 am
djustice 20821 (4/11/2012)
They need access to 2 databases, 'Test' and 'Production', but they need full access to both. By full access I mean they need to be able to access (read/Write) all tables, views, SP's etc.Thanks
One more question, anything else on the server that they don't need access to, other databases for example?
April 11, 2012 at 8:26 am
Yes, there are several other DB's that they do not need access to.
April 11, 2012 at 8:32 am
Right click Logins, under security in SSMS for the instance, then "New Login".
Enter the credentials (SQL or Windows type login), then on the mapping tab, select the databases they need access to. This will create a user in the databases.
In the database, double click the user and I would suggest you build a role that provides access, but it sounds like you don't really understand much about SQL security. You can give them the db_datareader and db_datawriter roles, but I'd document this and then let the normal admin person review it and change things if needed.
April 11, 2012 at 8:35 am
Hope this helps:
CREATE LOGIN [domainname\username] FROM WINDOWS; -- Replace domainname\username with the windows login you created
GO
USE [first_database_name]
GO
CREATE USER username FOR [domainname\username];
GO
EXEC sp_addrolemember N'db_owner', N'username'
GO
USE [second_database_name]
GO
CREATE USER username FOR [domainname\username];
GO
EXEC sp_addrolemember N'db_owner', N'username'
GO
April 11, 2012 at 9:24 am
Great. Worked perfectly. Thanks for your help!
Viewing 12 posts - 1 through 11 (of 11 total)
You must be logged in to reply to this topic. Login to reply