Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Grant permission

Author  Topic 

Pras
Starting Member

10 Posts

Posted - 2008-05-14 : 18:12:45
I want to Grant permission for a table which is residing at another server's database. I have added the server as a linked server to my database and i am able to do all DML (Insert, Update, Delete) operations from the source server to the target server's table. But i am not able to Grant permission for the table.

funketekun
Constraint Violating Yak Guru

491 Posts

Posted - 2008-05-14 : 18:26:44
grant select on table to login
pls look up on bol.....
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-05-14 : 18:29:25
Grant the permission on the remote server rather than from the linked server.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Database maintenance routines:
http://weblogs.sqlteam.com/tarad/archive/2004/07/02/1705.aspx
Go to Top of Page

Pras
Starting Member

10 Posts

Posted - 2008-05-14 : 18:34:57
quote:
Originally posted by tkizer

Grant the permission on the remote server rather than from the linked server.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Database maintenance routines:
http://weblogs.sqlteam.com/tarad/archive/2004/07/02/1705.aspx

Go to Top of Page

Pras
Starting Member

10 Posts

Posted - 2008-05-14 : 18:37:31
quote:
Originally posted by Pras

quote:
Originally posted by tkizer

Grant the permission on the remote server rather than from the linked server.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Database maintenance routines:
http://weblogs.sqlteam.com/tarad/archive/2004/07/02/1705.aspx






From the source sever how can i connect to the target server's database
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-05-14 : 18:38:58
Various ways:

SQL Server Management Studio
Query Analyzer
osql.exe
sqlcmd.exe

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Database maintenance routines:
http://weblogs.sqlteam.com/tarad/archive/2004/07/02/1705.aspx
Go to Top of Page

Pras
Starting Member

10 Posts

Posted - 2008-05-14 : 18:47:41
quote:
Originally posted by tkizer

Various ways:

SQL Server Management Studio
Query Analyzer
osql.exe
sqlcmd.exe

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Database maintenance routines:
http://weblogs.sqlteam.com/tarad/archive/2004/07/02/1705.aspx

Go to Top of Page

Pras
Starting Member

10 Posts

Posted - 2008-05-14 : 18:51:33
quote:
Originally posted by Pras

quote:
Originally posted by tkizer

Various ways:

SQL Server Management Studio
Query Analyzer
osql.exe
sqlcmd.exe

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Database maintenance routines:
http://weblogs.sqlteam.com/tarad/archive/2004/07/02/1705.aspx








I am currently using SQL Server Management Studio

Say for eg i am in Server A, Database A. I have added Server B as a linked server to Server A. I am able to access all the tables in Server B from Server A. But i am not able to execute the statement

Grant select on [ServerB].[DatabaseB].dbo.[TableB] from Server A.

Now how do i connect to Server B. I also tried

Use [Server B].[Database B]. But this is not working. Could you please send me the SQL query for connecting to the target server's database from Server A.
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-05-14 : 19:09:28
what security settings you have for linked server?
Go to Top of Page

Pras
Starting Member

10 Posts

Posted - 2008-05-14 : 19:59:15
quote:
Originally posted by sodeep

what security settings you have for linked server?




i tried giving all possible security settings but still i am facing the same issue
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-05-14 : 20:30:58
From Management Studio, connect to ServerB, run grant statement, and then you can connect to ServerA and run your queries.

By the way, what error are you getting?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Database maintenance routines:
http://weblogs.sqlteam.com/tarad/archive/2004/07/02/1705.aspx
Go to Top of Page

Pras
Starting Member

10 Posts

Posted - 2008-05-14 : 21:51:46
quote:
Originally posted by tkizer

From Management Studio, connect to ServerB, run grant statement, and then you can connect to ServerA and run your queries.

By the way, what error are you getting?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Database maintenance routines:
http://weblogs.sqlteam.com/tarad/archive/2004/07/02/1705.aspx



I am getting the following error

Cannot find the object <tablename>, because it does not exist or you do not have permission.

Go to Top of Page
   

- Advertisement -