Showing posts with label permission. Show all posts
Showing posts with label permission. Show all posts

Monday, March 26, 2012

HOW TO GET THE PERMISSION ON OBJECTS

Dear Friends
We have setup a server with replicaiton which will work as a backup server
now the problem i have is permission on the objects as the same is created a
s
new sql database there are no permission on the objects, I have created the
same roles in the database now i want to give the exactly the same permissio
n
to the roles form the parent server.
Is there any easy way say query which can copy the same permission from the
parent server.
your earlier reply would be a great help.
Thanks and best regards
SharadSELECT
QUOTENAME(TABLE_SCHEMA) +
N'.' +
QUOTENAME(TABLE_NAME)
FROM
INFORMATION_SCHEMA.TABLES
WHERE EXISTS
(
SELECT *
FROM sysindexes
WHERE id =
OBJECT_ID(QUOTENAME(TABLE_SCHEMA) +
N'.' +
QUOTENAME(TABLE_NAME)) AND
indid IN(0,1)
)
"Sharad2005" <niitmalad@.yahoo.co.uk> wrote in message
news:F6C8BE64-0A6D-4BE1-B1EE-E91E8EAB588A@.microsoft.com...
> Dear Friends
> We have setup a server with replicaiton which will work as a backup server
> now the problem i have is permission on the objects as the same is created
as
> new sql database there are no permission on the objects, I have created
the
> same roles in the database now i want to give the exactly the same
permission
> to the roles form the parent server.
> Is there any easy way say query which can copy the same permission from
the
> parent server.
> your earlier reply would be a great help.
> Thanks and best regards
> Sharad

Friday, February 24, 2012

how to get impersonate permission?

Say i have two login accounts in sql server 2005,I want to do context switch operation for two accounts.

I want to know to get impersonate permission....

any suggestions?

thanks

Try to use EXECUTE AS T-SQL command , see

|||

hi ggciubuc

I know I should use "execute as" command to implement impersonation.

But the command caller must have impersonate permissions... i want to know how to get the permission

thanks

|||

You can use the IMPERSONATE permission, it should be described in BOL (http://msdn2.microsoft.com/en-us/library/ms178569.aspx), but from a quick look to it, it seems like it may not be clear enough.

Here is a short description on how to use them.

For user impersonation, you need to connect to the appropriate DB and grant IMPERSONATE permission to the user using the following syntax:

GRANT IMPERSONATE ON USER::<<impersonated_context_user_name>>

TO <<grantee_user_name>>

for example:

GRANT IMPERSONATE ON USER::[user_to_be_impersonated] TO [user1]

go

For login impersonation, you need to connect to master DB and then grant the IMPERSONATE permission to the login:

GRANT IMPERSONATE ON LOGIN::<<impersonated_context_login_name>>

TO <<grantee_login_name>>

for example:

GRANT IMPERSONATE ON LOGIN::[login_to_be_impersonated] TO [login1]

go

I hope this information helps, and please let us know if you have any further question on this topic. We will be glad to help. We really appreciate your feedback on BOL; it will help us to improve our documentation and the general quality of SQL Server.

Thanks,

-Raul Garcia

SDE/T

SQL Server Engine

Sunday, February 19, 2012

HOW TO GET DETAILS OF DB_OWNERS ON A SQL SERVER.

Hi,
This is kiran from India. I would like to ask one question regarding the
MS-SQL 2000
"db_owner" access permission user.
On one server we have 50 databases and indivual database have there own
db_owner access assigned to WINODWS 2000 DOMAIN LOCAL USERS and Local users
and Global users .
My question is how to retirve the list of users who are members of DB_OWNERS
and WINODWS 2000 DOMAIN LOCAL USERS and Local users and Global users using
SQL script or by any other means other than going to each database and check
the users in DB_OWNERS.
Please help me ....
Kiran S
Hi
sp_helplogins
"KIRAN MAHA PATRO.S" <KIRANMAHAPATROS@.discussions.microsoft.com> wrote in
message news:C9BCE7B7-BE41-4A88-87D9-F483F6929201@.microsoft.com...
> Hi,
> This is kiran from India. I would like to ask one question regarding the
> MS-SQL 2000
> "db_owner" access permission user.
> On one server we have 50 databases and indivual database have there own
> db_owner access assigned to WINODWS 2000 DOMAIN LOCAL USERS and Local
users
> and Global users .
> My question is how to retirve the list of users who are members of
DB_OWNERS
> and WINODWS 2000 DOMAIN LOCAL USERS and Local users and Global users using
> SQL script or by any other means other than going to each database and
check
> the users in DB_OWNERS.
> Please help me ....
> Kiran S
>