Permission On View Not On Table

Dec 14, 2007

I am trying to create a set of "Reporting" views and grant Select permission on those views instead of the tables. I created the view in the same database but under a different schema from the tables. When the user tries to select from the views they get an error saying they do not have select privilege on the tables. Do I need to grant them select on the underlying tables?

View 4 Replies


ADVERTISEMENT

Permission On View. Is There Way To Avoid Granting Persmission On The Underlying Table?

Jul 13, 2007

I want to grant access on the below view for an end user so that he connect to our SQL server and retrieve data. The view looks like the below


CREATE VIEW DB1.[dbo].[View1]
AS
-- For brevity, I made it as simple statement.
SELECT *
From DB2.dbo.table2
GO

For the above view, it looks like I have to grant select and connect permission for the DB1. [dbo].[View1] as well as DB2.dbo.table2.

1. Is my understanding correct?

2. I want the user to access only DB1. [dbo].[View1] and not the underlying tables. Is there a way to grant access only on the view and execute the statement on a different security context so that the user can€™t access DB2.dbo.table2 directly?

3. When the user uses SQL Server Management Studio to connect to SQL server, he is able to connect and select DB2.dbo.table2 directly. Is there any way to restrict user from viewing and executing select statement on DB2 database from SQL Server Management Studio

Thanks in advance for your help

With regards
Ganesh

View 5 Replies View Related

Granting Permission For A VIEW?

Mar 8, 2012

I have an application, the front end is Access and the back end is sql server 2008 express.

The application does not display the view on a user's machine. Do I have to grant permission for the user, in order for the VIEW to display?

I have tried granting permission, but I am doing something wrong.

View 3 Replies View Related

Permission To View Error Logs

Jan 4, 2001

How can a person view the error logs without being an sa?

View 1 Replies View Related

Granting Permission To Create View

Jul 20, 2005

What is the best way to grant a user permission to create a view?I first created a role using enterprise manager but for the role Icreated it doesn't seem to offer that permission. It offers the basicstuff such as insert, select, and update.I could go in and use a grant create view sql statement I suppose butI'd rather do it through enterprise manager where it would be visibleif I need to change it in the future.-David

View 3 Replies View Related

Permission To View The Posted Reports

Apr 30, 2008

Hi,
This is regarding the SQL 2005 Report Manager (http://localhost/Reports) page. I have posted the reports, the reports run fine, buttons like new folder, new data source, etc... are visible (lets call this machine as A). The problem is when my machine is accessed from a nearby computer on the same network as http://machineA/Reports, the Report manager Home page appears with limited or no buttons. The reports are also not visible in the browser of machine B. How do I make the reports visible to users (grant permission) for them to run and view those reports?

In a nutshell, how the posted reports be accessed by users?

Thanks,
Raj

View 1 Replies View Related

Giving Permission To View CERTAIN Records

Dec 4, 2006

I've been looking through permissions to see if it's possible to grant a user permission to see only certain records from a table.

For example:

I'm granting users to view records in the table 'Sales', but I only want the users to see their respective data.

User A should only be able to see Sales where Sales.Location = 1

User B should only be able to see Sales where Sales.Location = 2

... and so on.

I believe I've read this is possible, but in looking through the permissions you can define, I've only found where you can limit the columns a user sees, not records.

Anyone have any ideas or did I just remember something wrong?

View 6 Replies View Related

How To Grant Permission To View Stored Procedures?

May 21, 2007

On our production SQL 2005 servers I want to give developers readonly access to each user database and also give them the ability to see stored procedures. Readonly is handled through db_datareader, but how do I give them the ability to see stored procedures without granting permission to execute them?

Thanks, Dave

View 4 Replies View Related

SYSAdmin Users Do Not Have Permission To See Records In A View?

Sep 15, 2006

We have a third party application and wish to create a report based upon a view.

The strange thing is logged in to the server as a SQL SYSAdmin account, we cannot view the data via the view. SQL Admin accounts are setup correctly and there is nothing different on this particular server. No errors are returned just a blank view with no records.

Could this be a permissions problem or orphaned schemas in that particular database? I thought SYSAdmin could view and do just about anything and the people who use this particular database would not have the know how on denying permission to the SYSAdmin role.

Thanks

N

View 12 Replies View Related

T-SQL (SS2K8) :: Deny View On Database And Select Permission?

Mar 19, 2014

I create a new user who will have a read only permission on TestDB.

I want to give only select permission on TestDB and also I don't want that the new user will not see any other database.

DENY VIEW ANY DATABASE to user_readonly

ALTER AUTHORIZATION ON DATABASE :: TestDB TO user_readonly

but when I am using the above query then the new user is the owner of the testdb. i don't want that. I want that the user will have only select permission on the table.is there any way?

View 1 Replies View Related

SQL Server 2008 :: SSRS Report View Permission

Jun 2, 2015

I gave a user all required permission to view the SSRS report. User is able to select from the dropdown list but unable to view the data, It is showing a blank screen.

View 9 Replies View Related

SQL Security :: View Definition Permission On Target Database

May 15, 2015

I am trying to do a schema compare and data compare via VS2012 and I am getting below error: The reverse engineering operation cannot continue because you do not have View Definition permission on the 'Target' database.

Whats interesting is I created a viewdefinition role and added the group(to which the user belongs) to the role. However I dont get the error if I make the group the dbowner. Is this a bug?

View 2 Replies View Related

SQL 2012 :: DENY Permission On Column Subsequently Reference In View?

Aug 6, 2014

Just encountered something that I wasn't expected, in that a user who has an explicit deny on a column in a table was able to select it when referenced through a view in a schema they have the SELECT permission on. This seems to me to go against the principle that DENY overrides everything when it comes to permissions? Is this how it's meant to work?

Code is below:-

--create test user
CREATE USER TestDenyOnViewUser WITHOUT LOGIN
GO

--create test schema (authorization dbo - same owner as dbo schema so ownership chaining will apply)
CREATE SCHEMA TestDenyOnView AUTHORIZATION dbo

[Code] ......

View 6 Replies View Related

SQL Server Admin 2014 :: How To Grant User Permission To View Specific Views

Aug 5, 2015

I have a user who needs access to views like(dbo.viewnameabc1,dbo.viewnameabc2 and so on...) dbo.viewnameabc* and anytime the user creates the view he already have the permission to view those views....

View 3 Replies View Related

SQL Server - Permission Issues : Execute Permission Denied On Object 'SprocName'

Dec 13, 2005

I have an application that uses Integrated Windows authentication. My Web.config looks like below
<add key="dbconnection" value=" server=XXX;Initial Catalog=XXX;persist security info=False;Integrated Security=SSPI;Pooling=true" />
When users try to access my application, they get the below error:
Execute permission denied on object 'SprocName', database 'DBNAME',Owner,'dbo'
The Only way I  could get rid off the error is if I set DBO permissions for the user group on the databse.
Can someone suggest how to set up a security group with the ‘necessary’ permissions on SQL SERVER (ie read,write execute Sproc etc) and not too many extra ones, like DBO.
Thanks,
 

View 2 Replies View Related

Truncate Table Permission

Jul 16, 2001

I have somme users who need to truncate some tables owned by DBO. I know that only table owner or DBO can execute TRUNCATE TABLE but I don't want grant DBO permission to those users. Do you have any suggestion ? Thanks a lot.

View 4 Replies View Related

Truncate Table Permission

Mar 17, 2000

I know that only the owner of a table can truncate it.
I want a user to run a procedure that truncates a table. Both the procedure and the table are owned by dbo, however the system says that the user can't truncate the tables because she doesn't have permission. The user has dataread and datawrite global permissions, and I do not want to give her dbo perimssions.
Is there a solution to this?

View 1 Replies View Related

Permission To Use Table Variable?

Oct 4, 2004

I am trying to get around business logic that does not give the user permissions to create any temp tables or tables.

If a user falls into this category, will they still be allowed to create "table variables"? (Declare @x table (i int)

...I'm obviously trying to find a way around this permission issue.

Thanks... :D

View 5 Replies View Related

Create Table Permission

Nov 4, 2005

Hi,

Is there any query available to check the existence of 'CREATE TABLE' permission in a database
?

Please advice,

Thanks,
MiraJ

View 1 Replies View Related

CREATE Table Permission

Sep 20, 2007

I gave a user explicit permission to create table, but still gettingthis error:Property Default Schema is not available for database[DBNAME]. Thisproperty may not exist for this object or may not be recoverable due toinsufficient access right. Microsoft.SQLServer.Express.SQLEditorsDo I need to create a new schema?--sharif

View 1 Replies View Related

Alter Table Permission To Dbo

Jul 20, 2005

I have the following requirementI am creating a login and database user 'test' on a database with dborole .I want to remove create table , alter table permisions to this user.I am able to revoke create table permission but alter table goesthrough.I gave a command deny insert,delete,update on ssycolumns to test.Still I am not able to prevent user altering schema . Alter tablesuccessfully goes throgh.I do not want to use datreader and datwriter role.since I want user 'test' to create storred procedure with dbo ownerIs there a way to achieve this ?ThanksM A Srinivas

View 1 Replies View Related

Critical Table Permission

May 12, 2008



Publc role has been grannted 'SELECT' privelege to syslogins and sysusers tables in the Master and GTSS database


The syslogins table contains all the logins that were created on the server. The sysusers table contains the users that are mapped to the database. Unauthorised access to these tables would reveal critical authentication info of other users

Restrictive permissions should be configured on critical database tables such as sysusers and syslogin.

How to set this.

View 1 Replies View Related

Can't Create Table .no Permission?

Sep 25, 2007



question 1 :
I create a login account and a user account ,and then grant create table permission to the user.
But the user can't create table yet,it return a error message:
The specified schema name "dbo" either does not exist or you do not have permission to use it


But i can find the dbo scheam by querying sys.schemas.

the sql script i execute:

(sa login)



Code Snippet
use tempdb
go
create login l1 with password='a' ,check_policy=off
go
create user u1 for login l1
go
grant create table to u1





Code Snippet
(l1 login)
use tempdb
create table table1
(
col int
)


--fail
--error message:The specified schema name "dbo" either does not exist or you do not have permission to use it




question 2 :
The granularity of "grant permission to useraccount" command is database,while i want to get a table level of granularity.. how?

thanks

View 5 Replies View Related

Create Table Permission Denied

Jul 8, 2007

Hi,i run an asp.net application which uses sql server express.i defined a login 'aspnet' (IIS 5.0) and for the specific database, an user 'aspnet' with following roles:db_datareader and db_datawriter.Now, any user who uses that application must also be able to create programmatically tables in that database. My question is: which role do i have to give to user 'aspnet'?
I use Studio Management express.ThanksTartuffe

View 8 Replies View Related

Permission Problems With A #temp Table

Aug 2, 2004

Hi,

I am having problems running a stored procedure that was created by the sa account. The stored procedure creates a temp table ( #temp_basf) and performs a bulk insert into it. The user account has execute privileges against the stored procedure. The error I am getting is:

The current user is not the database or object owner of table '#temp_basf'. Cannot perform SET operation.

Here is the code from stored procedure:


create procedure processFarmChemDataFile
as
begin
create table #temp_basf
(RTUId varchar(15),
LName varchar(20),
Address1 varchar(50),
City varchar(20),
StateCode varchar(9),
ZipCode varchar(15),
CName varchar(30),
Voice varchar(30),
Name varchar(25),
TankCap varchar(15),
TankHgt varchar(9),
notUsed varchar(20),
ProdDesc varchar(20),
InvTime smalldatetime,
GrVolume varchar(15))
end
begin
bulk insert #temp_basf from 'c: estdata.txt' with
(FIELDTERMINATOR = ',',ROWTERMINATOR = '')
end
begin
update #temp_basf
set RTUId = replace(RTUId,'"',''),
LName = replace(LName,'"',''),
Address1 = replace(Address1,'"',''),
City = replace(City,'"',''),
StateCode = replace(StateCode,'"',''),
ZipCode = replace(ZipCode,'"',''),
CName = replace(CName,'"',''),
Voice = replace(Voice,'"',''),
Name = 'Tank '+replace(Name,'"',''),
TankCap = replace(TankCap,'"',''),
TankHgt = replace(TankHgt,'"',''),
notUsed = replace(notUsed,'"',''),
ProdDesc = replace(ProdDesc,'"',''),
InvTime = replace(InvTime,'"',''),
GrVolume = replace(GrVolume,'"','')
end
begin
select CustomerId,LocationId,TankId,Temp,Alarms,SpecGrav,
CoeffExp,ProdCode,a.ProdDesc,UserProdId,UserTankId,
b.InvTime,b.RTUId,b.GrVolume,ChartId
from Tank a
inner join #temp_basf b on a.Name = upper(b.Name)
end


Thanks

View 1 Replies View Related

Select Permission Denied On Table

Feb 15, 2000

Why would we get the error 229 Select Permission on object denied when the user has select permissions granted? All tables in the database are accessible by the user but this one. All tables for this user have the same permissions: Select, Insert & update.

I noticed that the indexes were not set up correctly but even after fixing them it didn't help. what other reasons would cause this error.

This is an Access 97 database linked to SS7.

thanks

View 1 Replies View Related

Deny Drop Table Permission

Mar 9, 2000

Can any body tell me how can I restrict a user who has Sa previlages, from droping a table. He should be able to do everything except droping the table.

Thanx in advance.

Ram

View 2 Replies View Related

SQL 2012 :: Full Permission For Table

May 6, 2015

i need to set permission like full control, insert, update, delete etc .so the user can drop index and recreate and truncate data from a table.

View 2 Replies View Related

What Permission Required To DROP TABLE ?

May 2, 2007

Hi,
I would execute the following query to allow a user to create table

USE dbname
GRANT CREATE TABLE TO username

but it doesnt let me execute the following query
GRANT DROP TABLE TO username

I am wondering if there is a way to do this.

I know db_ddladmin does that. But I dont want to assign the whole role or schema to do that. I want specific privilege

According to SQL Server documentation, we need CONTROL permission to do this so I tried following query

GRANT CONTROL TO username

and

GRANT CONTROL ON tablename TO username

neither of them helped..

Please tell me what permission do I require to DROP a table.

Thanks,

View 5 Replies View Related

Grant Permission On More Than One Table In A Single Command

Aug 24, 2000

Hi

Does anyone know how i can grant select permission on more than one table in the same database using a single grant commmand....its painful to use grant statement seperately on each table

thanks and regards,
reshma

View 3 Replies View Related

Cannot Drop The Table '#ZipLatLong', Because It Does Not Exist Or You Do Not Have Permission...

Apr 8, 2008



I have a stored procedure that I am writing that is giving me trouble dropping a temp table in SQL Server 2005. I have to use the SQL in Query 1, marked below, to get the temp table. I can find the table but I get the error listed in this message's subject. If I try to run DROP TABLE #ZipLatLong I will get an error telling me that the table already exists but then I can run CREATE TABLE #ZipLatLong ( ZIP INT, Latitude DECIMAL(18,6), Longitude DECIMAL(18,6)) and that will work...

In short, SQL Server 2005 is not letting me drop temporary objects. I am getting return messages telling me that an object already exists in the database by the name I am trying to delete and then it will let me create a table with the same name...

Figure 1
USE TEMPDB
GO
SELECT *
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_CATALOG = 'tempdb'
AND TABLE_SCHEMA = USER
AND TABLE_NAME LIKE '#ZipLatLong%'
GO
DROP TABLE #ZipLatLong
GO

View 5 Replies View Related

Cannot Add Select User Permission For A Person On A Table

Feb 24, 2008



Hello,

I am trying to grant solely the SELECT privilige to a particular user and to a particular database.I am using Sql server management studio express to do this and SQL Server 2005.

I have created a new login and set the server roles to public, then on the user mapping page, I have checked the box next to the table I wish the user to access and have selected the database membership role - public.
Next, On the Table Properties, I have added the user on the Permissions Page and Selected "Select" under the grant column

When I click on effective permissions, the select command does not show and when I try to login with that user, the table does not display.

What I am doing wrong?

Thanks

View 7 Replies View Related

Insert Permission Denied After Granting Permission

Sep 19, 2007



SQL Server 2005 anomoly?
In SQL Server Management Studio I granted specific permissions to user "A" to do Select, Insert, Update, Delete on Table "B" -
When I logged on as User "A" and attempted the Insert imto table "B" I got the following error:
"Insert Permission Denied on Table B, Database C, Schema dbo"
Is this a problem with the dbo schema?

Then I went back and created a stored proccedure "D" with the exact same Insert statement inside the procedure. I granted User "A" execute permission on the stored procedure "D".
I then logged on as User A and executed Stored Procedure "D". No Problem - stored procedure executed fine with the Insert.
I attempted the Insert statement again - straight SQL - as User "A" and got the same error as above ("Insert Permission Denied.....")
Strange behavior - cannot do a SQL. Insert even though user has permissions but can execute a store procedure with the same Insert statement.
What gives?


View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved