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


ADVERTISEMENT

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

Giving Permission .......urgent

Dec 20, 1999

i have a user database called calls. In that database there are about 100 of tables. now i want to give permission to that tables to a new user so what is the easiest way to give permission in a single shot to the 100 of the tables.

I know how to give the object permission to the table. But for 100 talbes it will take a lot of times , isn't it???


thanks in advance.

View 5 Replies View Related

Creating User And Giving Permission To All Databases

Feb 27, 2008



Hi,

Any body please give me some TSQL Stored procedure for

creating an SQL user and to give db access permission to all the databases available on a the server.

Mujeeb

View 5 Replies View Related

Getting Problem In Giving Database Permission To Group User

Jun 18, 2007

hi ,

I am getting some problem in using group in sql server login.

i have two NT groups in windows.i) developer and tester

I added a user Lalit in both gruop. I want to give db_owner permission on a particular database(Employee) to developer group and data_denyreader and deny_writer on same database(Employee) to tester group.



Now when i logging in to sql server using Lalit(windows authentication) iam not able to access the database(Employee).



Now my concern is that Lalit should have full access to the employee database when entered as developer user and limited access to employee database when entered as tester user.



how can i achieve this set up????



Please do help.

Thanks a lot in advance !!!!!!!!!!!!!!!!!!

View 1 Replies View Related

SQL 2012 :: View Giving Different Results?

Nov 4, 2014

I have a view over 5 tables that has started giving unreliable results. There are three records that should be different, but in a production Access database, the view is giving three identical records where there should be three unique records. I have tested the view within SQL Server Management Studio and it gives the correct records there. But, I have attached this same view into the same Access database with two separate names. One instance of the view within Access database gives the correct records, and the other gives the incorrect (duplicated) records. I have attached screen shots that show these two separately named incarnations of the same SQL View, with the duplicated data, or the unique data highlighted.

I have also included the SQL query specs for this view.

what I can do to this view in order for it to always give us the unique records that we need, rather than sometimes the correct records, and sometimes the incorrect records.

Correct 3 records:

Incorrect 3 records:

[URL]

View 4 Replies View Related

VIEW On MS SQL Giving Different Result That Query On ACCESS

Mar 13, 2008

Good morning,
I'm trying to create a view on SQL Server based on a query that i use on Access. The query returns detailed data from a table based on ID's selected and saved into another table.

the thing is, on access it returns back 5 records<which is a correct output> , while on SQL. its returning only one record. what could be the issue here ?

thank you,

View 3 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 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 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

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

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

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

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

Too Many Records In View

Mar 19, 2004

I am trying to create a very simple view to associate the EVP from an HR data table (TBLCCINFORMATIONFEBRUARY04) of 65,000 records with the entries in a lost savings table (TBLCCYEARTOTALS) of 1,939 records. This is the View query:
SELECT dbo.TBLCCYEARTOTALS.*, dbo.TBLCCINFORMATIONFEBRUARY04.EVPREPORTNAME AS EVPREPORTNAME
FROM dbo.TBLCCYEARTOTALS INNER JOIN
dbo.TBLCCINFORMATIONFEBRUARY04 ON dbo.TBLCCYEARTOTALS.VPAWID = dbo.TBLCCINFORMATIONFEBRUARY04.VPAWID

The view is returning 2,516,488 records, and I can see the same data repeating over and over again. What am I doing to create these additional records?

Thanks!

View 1 Replies View Related

Counting Records In A View

Sep 14, 2006

I was wondering if i would be able to add a column in a view that assigns a value to each record and incriments the number each time by 1. Like the way an identity field works in a table.

Is this possible using a view?

View 5 Replies View Related

How To View Truncated Records

Dec 14, 2006

My table has got 67K records but the tool is showing just 100 records other records are getting truncated. Now what i have to do in SQL statement to view the other records starting from 100 to 1000?

View 2 Replies View Related

How To Append The Records Of One View To Another?

Dec 5, 2007

Hi, I have two view (Run1OnlyFailures and Run2OnlyFailures). THey share exact same columes. Run1OnlyFailures has three records and Run2OnlyFailures has 5 records. Is there any way that I could put all 8 (3+5) records into a third view BothRunFailures, which share the same columns defination as Run1OnlyFailures and Run2OnlyFailures?

Thx
Tao

View 1 Replies View Related

Help With Returning A Certain # Of Records From A View.

Jul 20, 2005

I have a view that will return say 5000 records when I do a simpleselect query on that view like.select *from vw_test_viewHow can I set up my query to only return a certain # of records, saythe first 300?Here is what is going on, we have a large amount of data that returnsin a view and we need to work with all of it eventually, However wewant to do it in chunks. So my thoughts were as follows:1. To run a query to return X amount of the total data for us to workwith.2. Update these records with a flag in a table that the vw_test_viewfilters out.3. The next time I run the query to pull data from the view it willskip the records that I have already looked at (because of step 2) andpull the next X amount of records.Thanks in advance,Mike

View 3 Replies View Related

View Multiple Records In A Single Row?

Jan 3, 2012

Id account num acc_type
42 1376200071278 gl
42 1308111111111 ic
42 1291111111111 os
34 1245200000000 gl
34 1132485111111 ic

this is table structure.there are multiple records like this in a table . I need output as

id gl accountnum ic accountnum osaccountnum
42 1376200071278 1308111111111 1291111111111
34 1245200000000 1132485111111 -

View 7 Replies View Related

Creating Records Based SQL View

Oct 30, 2007

I have a spreadsheet that we download from one of our customers that contains Sales Order Release information. The spreadsheets contains 1-n releases per part #.

I have a SQL 2000 view that groups this information into a smaller table (after importing into SQL).

I need to take this view and create 1-n release records based on our production run qty and put it in a new table. I have a field in my view that contains the desired # of records to create.

Since I never used TSQL to loop through table/view, how do I do this. Following is what the output should look like:

From SQL view
---------------------------------------
Part #: 11124A1
Qty Due:175
Run Qty: 50
# Release to Generate: 4


Output to Table
----------------------

Part # QtyDue RunQty
----------------------------------------------------
11124A1 50 50
11124A1 50 50
11124A1 50 50
11124A1 25 50

Note QtyDue is the production run qty, with the last record containing the remaining QtyDue from view's Qty Due

View 4 Replies View Related

Inserting Records Using The Details View Or Programmatically

Aug 26, 2006

I'm a new user to vwd.  If I use a details view control on my page, I have noticed that the "New" link is not visible unless there is at least one record in the table. Is there any way of making it visible where there aren't any records?My web pages are currently hosted at vwdhosting. I have uploaded my database with the record structure onto the web site and I am using a remote connection string to access it. I have had users updating data in another table on the remote database. If I add records to my new table locally and upload the database to the remote site, all the data that my users have been adding will be lost. So, if I can't add my first record using a control on my web page when there are no records in the table, should I be doing it programmatically? If so, how?Thanks,Julie 

View 2 Replies View Related

Creating View (transpose Records To Columns)

Jul 20, 2005

I have a table like the followingField1 Field2 Field3------ ------- ------x1 y1 z1x1 y2 z2x1 y3 z3x1 y4 z4x2 y1 z5x2 y2 z6x2 y3 z7x2 y4 z8x3 y1 z9............and so onI want to create a view with x1, x2, x3.. as uniquerecords; y1, y2, y3.... as fields; and z1, z2, z3.... as the valuesWhen I doCREATE VIEW xyz (y1, y2, y3, y4) ASSELECT field1 ,( SELECT field3 FROM table WHERE field2 = 'y1'),( SELECT field3 .....FROM tableI get the error that the sql query creates duplicate values. I think Imay have to do a join using distinct values of field1. I was lookingfor some guidance with the join.Thanks for your help in advance(using SQLSERVER 2000)

View 2 Replies View Related

How Can I View Data Records In SQL Server 2005

Jan 24, 2008

Hi all,
sorry for this question, but I am brand new with SQL Server 2005 Express.
I have nothing found in the documentation.

With which tool can I view the data records in my SQL Server?
I have tried with MS SQL Server Management Studion Express but had no success.

thanks for help
hawk

View 5 Replies View Related

'Open View' Option Does Not Sort Records According To ORDER BY

May 26, 2008

Hi,
I have few views in SQL Server 2005. In Design View, the results of View are ok. In OPEN VIEW option, records are not sorted correctly, ORDER BY is ignored.
What could be the reason for this ?
Thanks a lot in advance! 
 
 

View 6 Replies View Related

Executing A Stored Procedure As Times As The View Has Records

Oct 6, 2007

i have a stored procedure with one coming id parameter





Code BlockALTER PROCEDURE [dbo].[sp_1]
@session_id int
...







and a view that holds these @session_id s to be sent to the stored procedure.

how could i execute this sp_1 in a select loop of the view. I mean i want to call the stored procedure as times as the view has records with different ids.

View 1 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

Data Access :: How To Create View To Get Records From Multiple Tables

Sep 1, 2015

I want to create a view to get records from multiple tables. I have a UserID in all the tables. When I pass UserID to view it should get records from multiple tables. I have a table

UserInfo with as data as
UserID=1, FName = John,
LName=Abraham and Industry = 2. I have a
Industry table with data as
ID=1 and Name= Sports,
ID =2 and Name= Film.

When I query view where UserID=1 it should return record as

FName =John,
LName = Abraham and
Industry= Film

How to write query?

View 2 Replies View Related







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