Showing posts with label permissions. Show all posts
Showing posts with label permissions. Show all posts

Sunday, March 25, 2012

Adding a database user

Hi,
Could someone please tell me how to add a database user using a query? I
know how to set the appropriate permissions for tables of existing users,
but I can't figure out how to add a new user.
Thank you,
SteveSteve,
Do you mean a User or a Login or both? There is a difference and a User is
no good without an associated Login. You may want to check out sp_adduser
and sp_addlogin in BooksOnLine.
Andrew J. Kelly
SQL Server MVP
"Steve Caliendo" <scaliendo@.epion.com> wrote in message
news:e4Rvg8NREHA.1308@.TK2MSFTNGP10.phx.gbl...
> Hi,
> Could someone please tell me how to add a database user using a query? I
> know how to set the appropriate permissions for tables of existing users,
> but I can't figure out how to add a new user.
> Thank you,
> Steve
>|||Hi,
Also have a look into the system procedures which allocate fixed roles to
users/logins in books online.
sp_addsrvrolemember and sp_addrolemember
Thanks
Hari
MCDBA
"Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
news:ORPqt3OREHA.3012@.tk2msftngp13.phx.gbl...
> Steve,
> Do you mean a User or a Login or both? There is a difference and a User
is
> no good without an associated Login. You may want to check out sp_adduser
> and sp_addlogin in BooksOnLine.
> --
> Andrew J. Kelly
> SQL Server MVP
>
> "Steve Caliendo" <scaliendo@.epion.com> wrote in message
> news:e4Rvg8NREHA.1308@.TK2MSFTNGP10.phx.gbl...
I[vbcol=seagreen]
users,[vbcol=seagreen]
>|||To add to the other responses:
Use sp_addlogin to add a new SQL login.
Use sp_grantlogin to grant an existing Windows account access to SQL Server
Use sp_grantdbaccess to add a SQL login or Windows account as a database
user
For example:
EXEC sp_addlogin 'MySqlLogin', 'MyPassword'
EXEC sp_grantlogin 'MyDomain\MyAccount'
USE MyDatabase
EXEC sp_grantdbaccess 'MySqlLogin'
EXEC sp_grantdbaccess 'MyDomain\MyAccount'
See the Books Online for details.
Hope this helps.
Dan Guzman
SQL Server MVP
"Steve Caliendo" <scaliendo@.epion.com> wrote in message
news:e4Rvg8NREHA.1308@.TK2MSFTNGP10.phx.gbl...
> Hi,
> Could someone please tell me how to add a database user using a query? I
> know how to set the appropriate permissions for tables of existing users,
> but I can't figure out how to add a new user.
> Thank you,
> Steve
>

Sunday, February 19, 2012

add column permissions to a new column in SQL server 2005

Can someone explain to me how to go about adding column permissions to a new column in SQL server 2005? I added a new column to an existing table, to which I want to add security. Thanks in advance!

To grant permissions on a table column -

GRANT <permission> ON <schema>.<tablename>(<columnname>) TO <GRANTEE>

<permission> = SELECT | UPDATE | REFERENCES

To deny permissions on a table column -

DENY <permission> ON <schema>.<tablename>(<columnname>) TO <GRANTEE>

add column permissions to a new column in SQL server 2005

Can someone explain to me how to go about adding column permissions to a new column in SQL server 2005? I added a new column to an existing table, to which I want to add security. Thanks in advance!

To grant permissions on a table column -

GRANT <permission> ON <schema>.<tablename>(<columnname>) TO <GRANTEE>

<permission> = SELECT | UPDATE | REFERENCES

To deny permissions on a table column -

DENY <permission> ON <schema>.<tablename>(<columnname>) TO <GRANTEE>

Thursday, February 16, 2012

Add admin user to reporting services

Hi, we have a webpage which makes a call to the reporting services
function GetSystemPermissions via C# to get permissions for our
intranet.
My question is how to I add an admin user to this group? Is it done
via Active Directory and if so what rights does the person need?
We are running MSSQL 2005 and Windows Server 2003.
Thanks for any help
Regards
MarkusReporting Services by default is integrated with Windows integrated
security. But, you have to map a user or group to a role in RS. By default
any member of the local adminstrators group is an admin in RS.
What I do is add appropriate users to the local adminstrators group on the
server running RS for adminstrative rights. But you could just assign
another group to the appropriate role in RS. For browsing I add a local
group and then to that local group I add individual users and domain groups.
That local group is then assigned to the appropriate role.
Read up on roles in RS.
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
<MarkusJNZ@.gmail.com> wrote in message
news:1183531995.432312.93700@.m37g2000prh.googlegroups.com...
> Hi, we have a webpage which makes a call to the reporting services
> function GetSystemPermissions via C# to get permissions for our
> intranet.
> My question is how to I add an admin user to this group? Is it done
> via Active Directory and if so what rights does the person need?
> We are running MSSQL 2005 and Windows Server 2003.
> Thanks for any help
> Regards
> Markus
>