View Permissions Alter

Aug 10, 2000

I have granted a developer the alter view permissions on some views in our production server which now allow him to open the view for modification. When he tries to save his changes he gets an error that he doesn't have create view permission. If seen this behavior before when you modify a table, does SQL Server 7.0 actually drop and recreate the object? If so, would he then need create permissions on views also?

View 2 Replies


ADVERTISEMENT

Table Permissions Versus View Permissions

Aug 2, 2006

Using SQL Server 2k5 sp1, Is there a way to deny users access to a specific column in a table and deny that same column to all stored procedures and views that use that column? I have a password field in a database in which I do not want anyone to have select permissions on (except one user). I denied access in the table itself, however the views still allow for the user to select that password. I know I can go through and set this on a view by view basis, but I am looking for something a little more global.

View 5 Replies View Related

Alter View / Create View

Aug 14, 2000

I had given one of our developers create view permissions, but he wants to also modify views that are not owned by him, they are owned by dbo.

I ran a profiler trace and determined that when he tries to modify a view using query designer in SQLem or right clicks in SQLem on the view and goes to properties, it is performing a ALTER VIEW. It does the same for dbo in a trace (an ALTER View). He gets a call failed and a permission error that he doesn't have create view permissions, object is owned by dbo, using both methods.

If it is doing an alter view how can I set permissions for that and why does it give a create view error when its really doing an alter view? Very confusing.

View 1 Replies View Related

Schema Permissions, Alter Proc But Not Table?

Jan 10, 2008

I want our developers to be able to alter procs owned by the dbo schema, but for data modelling reasons, I want to exclude them from creating or altering any tables in the dbo schema. I can't seem to figure out how to do this, is there a way?

Thanks,

View 1 Replies View Related

SQL Security :: Deny Alter And Drop Permissions On ONLY Stored Procedures

Aug 19, 2015

We have a generic sql login "prduser". Applications use this login. We want the login NOT to have ALTER PROCEDURE and DROP PROCEDURE permissions only on the stored procedures(there are thousands of them).

View 17 Replies View Related

Alter More Than One View

Jan 4, 2007

Hi All,I am new to this group and this is my first doubt i am facing atpresent.I am doing data migration. In this sequence i need to alter few views.Alter in the sense, inside the existing query of view i want to includeone more column.I want to do it inside one single script. If i run the script all viewsshould get updated.Any help on this will be greatful.my mail id is Join Bytes!.Thanks in advance

View 9 Replies View Related

Alter View And Concatenate In One Row (was: Is It Possible?!)

Aug 28, 2006

Hey Folks,

I have a View that I'm using to power a Crystal Report. I want to include an extra column that will be a string containing all the values from a single column of another table, seperated by comma.

So for example:

Project | Staff
----------------------
TestProject1 | "Jonathan, Greg, Joe"

Is this possible? Where do I do it? From the SQL Server end or in the report?

View 2 Replies View Related

Can I Add Alter View In The Stored Procedure?

May 13, 2008

Hi,
I am using SQL 2000( Version: 8.00.000)
I want to ask can I add View in the stored procedure like the following:


Create Procedure sp_createTblLogReasonColorView
@m int,
@y int
AS
BEGIN

ALTER View vw_tblLogReasonColor
AS
Select * From tblLogReasonColor where Year(n_Delivery_Date) = @y AND Month(n_Delivery_Date) = @m

END

Thanks for you reply.

View 1 Replies View Related

Alter View Fails To Replicate

Oct 18, 2007

prerequisites:
MSSQL 2005 64bit as publisher (transactional replication)
MSSQL 2000 32 bit as subscriber (pull, read-only)

All objects are set to replicate except foreign keys and defaults.
There is a linked server DW on both the publisher and the subscriber that both can access (sa and user logins mapped)
The snapshot generation and loading is fine.

but then I issue this statement at the publisher:

ALTER VIEW [dbo].[v_Test] as
select * from DW.DW_DB.dbo.v_Test

but it fails to replicate at the subscriber with the message:
Category:COMMANDSource: Failed CommandNumber: Message: ALTER VIEW [dbo].[v_Test] asselect * from DW.DW_DB.dbo.v_TestCategoryQLSERVERSource: SubscriberNumber: 7399Message: OLE DB provider 'SQLOLEDB' reported an error.

I tried the command on the Subcriber via Query Analyzer and it works.
What gives?

All suggestions are welcome!

View 2 Replies View Related

DB Design :: Alter View To Add Columns

Jun 9, 2015

I would like to alter view to add columns. My base table is populated by application and the base table name is always change. Is there any way to add some extra columns to this view.

One way is to create a sp to add columns and use the view inside the sp. But I would like to know is there any way to alter the view. 

View 4 Replies View Related

SQL 2012 :: How To Drop Columns From Alter View

Mar 20, 2015

I have a VIEW which is dynamically generated through complex dynamic SQL. Unfortunately the dynamic SQL uses "Select * from table" to select the columns because the programmer did that to reduce the amount of code in the dynamic SQL string as the code can't be debugged if it's too long.

Therefore, I have a VIEW with columns in it I don't need, and want to remove them from the view - I need to remove all columns with column names matching the syntax '%1%_2' .

The view is called TEMP_EXPORT_1

I can either use the code below to return a list of columns that I want removed:

select column_name from information_schema.columns

where table_name='TEMP_EXPORT_1' and column_name like '%1%_2'

Or I can use the code below to return the list of columns that I want to keep:

select column_name from information_schema.columns

where table_name='TEMP_EXPORT_1' and column_name not like '%1%_2'

Now how would I go about altering TEMP_EXPORT_1 view so that it no longer has these columns? I know views don't have a drop statement...

Therefore I tried the following but I'm not sure of the syntax:

ALTER VIEW dbo.TEMP_EXPORT_1
AS
SELECT (select column_name from information_schema.columns
where table_name='TEMP_EXPORT_1' and column_name not like '%1%_2')
FROM dbo.TEMP_EXPORT_1

Am I on the right track? how can I ALTER this view to remove these columns? ... I want to keep this separate from the code that generated the view as I want it as an optional procedure that can be run if needed.

View 2 Replies View Related

Alter View Hangs - Merge Replication SQL 2005

Dec 18, 2006

Background - I have a publication that propigates schema changes. I have a view in which I want to remove a column.

Error - Going by what the BOL says, I use Alter View and delete the column from my select statement. I issue the alter view command against the Publication database and it just "churns". I do not get any locking errors or any other type of error, but the statement never completes execution. I watched it run for 10 minutes and cancelled the query. Executing the same statement against a copy of the database that is not being published executes in 1, 2 seconds.

Here is what I am doing:

Old View: Select table1.record_number, table1.record_date, table1.status_code, table2.status_desc,

table2.txt_sort_order

FROM table1 join table2 on table1.status_code = table2.status_code

The query I am executing:

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

ALTER VIEW myview

AS

Select table1.record_number, table1.record_date, table1.status_code, table2.status_desc

FROM table1 join table2 on table1.status_code = table2.status_code

View 1 Replies View Related

View Permissions

Jun 7, 2007

I followed T-SQL instructions from Steve Gott (Thanks!) to alter the dbo schema and granted create a view permissions for one of my users. She can now create a view, however, she can not save the view she creates such as dbo.view1. Additionally, when she right-clicks on and existing view, it shows the ability to create views, however, greyed out are the options to edit or design the view.



What other steps should I take to ensure she can create, edit, design and save new and existing views?

View 3 Replies View Related

How To View All User Permissions?

Mar 14, 2007

I've seriously looked, but this simple concept eludes me. How do I go about viewing all the permissions granted to a database user? Like whether or not they can execute a stored procedure.

View 1 Replies View Related

HELP - View Permissions Not Change In EM

Nov 6, 2000

Is there a way to set it so that a user can view permissions in EM but not change them? I have tried using the SecurityAdmin role on the database, but this lets the user change the permissions. I really need to be able to do this, is there any way or can anyone make any other suggestions about this i.e., can you place the user in this role yet revoke the ability to commit a change?

View 2 Replies View Related

View Job History Permissions For Non SA's

Mar 27, 2002

How can I allow non SA accounts access to view completed Job History of certain jobs.

Development application owners may receive notification of a Production SQL job failing and have no way to see step "details" of the failed job.

View 3 Replies View Related

Permissions To See Design View

Jul 23, 2005

Is there a way to allow users to see the design view of a table withouthaving dbo permissions?Thanks

View 1 Replies View Related

Table And View Permissions

Aug 2, 2007

I have a list of users that I want to restrict access to tables in a database. The goal is to allow the users to use select statements on the views instead of the tables. How can this be accomplished?

View 14 Replies View Related

Permissions To View INFORMATION_SCHEAM Views

Aug 9, 2002

SQL7, sp3

What specific permissions do you need to be able to view information_schema views? I thought public role had permissions to select on these views, but this is not the case? What do I do?

my developers have db_reader, db_writer, and db_ddladmin. They do not have db_owner. If I make them Sysadmin in sql they can view them, but that doens't fit in our security setup we have. THoughts?

Thanks,

View 2 Replies View Related

Selecting From A View, Permissions Issue?

Oct 3, 2001

I have created a view where the data is a subset of the table. When a non dbo user selects only the first column from that view, the query returns the value. However, when the non dbo user selects any of the other columns or a combination of columns I get an invalid column name error. The syntax of my query is correct because it works when I use QA using a login with dbo permissions. Ideas?

Any help would be appreciated.

View 1 Replies View Related

Table/View Permissions Snafu

Mar 3, 1999

I am having trouble with permissions on views and tables. I have a set of tables owned by dbo, and then a set of view owed by another user, say User1.
So I have a table dbo.Airports, and then a view User1.Airports. User1 has all permissions on dbo.Airports, and via ISQL I can select and update with no problem. MY VB application is working with User1.Airport, and it will select from User1.Airport fine, but I keep getting an error when I try to Update User1.Airport. I have many other tables set up the same way, and they all work fine - my VB app updates no problem. Any ideas?

I have dropped and recreated the table and all views, assigned all permissions, everything looks good, but...

Another strangev thing is if I use Enterprise Manager, and display permissions by user, and display all tables and views, the permissions are checked off for the view, but not the table, (which is incorrect) but if I don't display permissions for view, the permissions are checked off forv the table, which is correct. So that seems not to be working correctly.

View 1 Replies View Related

How To View Permissions Using Management Studio?

Apr 5, 2007

How do you view permissions granted to an id, such as ALTER TRACE permission, using Management Studio? I want to see if ALTER TRACE permission has been granted to an id, but am unable to find this information in the GUI.

Thanks, Dave

View 2 Replies View Related

View Stored Procedure Permissions

Jul 20, 2005

We are running SQL Server 2000 Developer Edition. I don't want tomake the developers the sysadmin or even the dbo in the userdatabases. Is there a way to give them access to only view thepermissions for the stored procedures in the user database withoutmaking them dbo?When I take them out of the db_owner role, when they open a storedprocedure they no longer see the permissions tab. I would like forthem to see the permissions tab and be able to view the permissionsbut not change the permissions.Is that doable?

View 1 Replies View Related

User Permissions - Read Only With Create View

Jan 11, 2008

I need to create a new login with SELECT rights so the users can view all tables with no UPDATE, DELETE, OR INSERT rights. But this user needs to be able to CREATE VIEWS. I have assigned the user to the Public role and gone in and modified Securables for the Database to be able to CREATE VIEW. When I connect using my new user and try to create a view, I get the error message: CREATE VIEW permissions denied in database 'test01'.

Help Please

TMDavis

View 1 Replies View Related

Permissions With Windows Groups And View To Other Databases

Aug 24, 2007

I am having a problem with permissions using Windows groups. I have a database (database1) that has permissions granted via Windows groups. Two groups (group1 and group2) are members of the db_datareader role in database1, and this work fine. Do to the number of tables that get created during our work, using db_datareader is the easiest way to keep up with permissions without creating a maintenance problem. Now I have a table that I want to add to this database, but I only want group2 to have select permission on this one table which is a problem because group1 has the db_datareader role. So I thought I could create a view in this database to the restricted table that I put in database2. Then in database2 I only added group2 as a user with the permission to select from this table. Unfortunately the group membership does not seem to get interpretted correctly in database2 and no one can successfult select from the view in database1.

In other words, user1 who belongs to group1 connects to database1 and cannot select from the restricted view -- this is what I would expect. However, when user2 who belongs to group2 connects to database1 they also cannot select from the restricted view -- not the behvior I would expect. Now, if I make user2 a user in database2 with select on the restricted table then user2 can connect to database1 and successfuly get data from the restricted view. So it looks like the fact that user2 belongs to group2 is never passed to database2 via the select from the view on database1. Is this indeed the way that Windows group security is working or is meant to work in SQL Server?

I realize I could solve this simplified version of the problem by creating my own role in database1 for group1 etc., but I am trying to solve a bigger problem in our environment that has hundreds of databases across numerous servers.

Thanks
Rob

View 4 Replies View Related

Permissions To View Stored Procedure Property

Feb 9, 2007

My Production servers are SQL Server 2005 x64. I would like to allow my developers the ability to look at permissions on production stored procedures but not be able to change those permissions or alter the production code. What has to be set to allow this sort of security.

View 8 Replies View Related

[SQL2000] Permissions To Use View Based On Tables From Many Databases

Feb 21, 2006

HiI have two databases: Customers and Operations. In Customers database I havemade a view based on a few tables from both Customers and Operations (leftjoin - customers without any operations). In the same database (Customers) Ihave created a stored procedure based on the view. Finally I'd like to giveto some users permission only to exec the stored procedure.Have I to add the users to Customers? If yes, please describe me how tolimit the users privileges only to execution the stored procedure (no rightsto open tables or view from Customers).Regards,GrzegorzPs. I had sent the post on microsoft.public.sqlserver.security, but I had noanswer.

View 5 Replies View Related

Permissions In SQL Server 2005 To Allow Users To View The Management Activity Monitor?

Sep 27, 2006

For SQL Server 2000 we have a user login mapped to msdb with database role membership of db_datareader and public checked. This seems to allow the developers to view the Management Activity monitor. For SQL Server 2005 the same mapping is in place but the developers cannot view the Management Activity monitor. Developers are NOT granted the sysadmin role, and should not have that role.

What permissions need to be set for SQL Server 2005 to allow users to view the Management Activity monitor? They should not be allowed to take actions on the activities.

View 13 Replies View Related

How To View Permissions Of User-defined Database Roles In Management Studio?

Dec 20, 2005

As part of our security project, I've done the following when logged in as 'sa':

Created database roles 'dbrole1' within dbAccount

Created login and user 'user1' and added user to be a member of 'dbrole1'

Granted execute permissions on sp1 and sp2 to 'dbrole1'

However, I didn't see the above permissions listed in SQL Server Management Studio - Database - Security - Roles - Database Roles - 'dbrole1' properties - securables

Any ideas?  Thanks!

View 4 Replies View Related

SQL Server 2008 :: Granting Explicit View Definition Permissions On Stored Procedure To DBO?

Mar 6, 2013

The developers in our shop have a need to explicitly grant view definition permissions to themselves on stored procedures they create in their development databases. They have dbo level permissions in these databases and although they can explicitly grant view definition permissions to other developers in the same database, they are unable to do so for themselves. When they attempt this, it appears that they are successful but when they check the stored procedure afterwards the permission is not there for themselves.

While this does not cause an issue in development, the intention is for these view definition permissions to be carried forward to the test and production databases where they only have datareader permissions.

When these stored procedures are scripted out by the dba to move to Test and Production the view definition permissions are not scripted out for the developer in question.

Is there a way that a developer with dbo rights in a database can explicitly grant themselves view definition permissions on a stored procedure they create as dbo?

View 9 Replies View Related

How To Grant Create View Access Without Grant Alter On Schema::

Aug 16, 2007

In SQL Server 2005 SP2 I want to grant the ability to create views to a user but in order to do this it requires that the users has the ability to grant alter on a schema.

Is there any way to grant this privilage without granting alter on schema also?

View 1 Replies View Related

Alter Table Alter Column In MSACCESS. How Can I Do It For A Decimal Field?

Jul 23, 2005

Hi people,I?m trying to alter a integer field to a decimal(12,4) field in MSACCESS 2K.Example:table : item_nota_fiscal_forn_setor_publicofield : qtd_mercadoria integer NOT NULLALTER TABLE item_nota_fiscal_forn_setor_publicoALTER COLUMN qtd_mercadoria decimal(12,4) NOT NULLBut, It doesn't work. A sintax error rises.I need to change that field in a Visual Basic aplication, dinamically.How can I do it? How can I create a decimal(12,4) field via script in MSACCESS?Thanks,Euler Almeida--Message posted via http://www.sqlmonster.com

View 1 Replies View Related

Alter Table Alter Column

Jul 20, 2005

I would like to add an Identity to an existing column in a table using astored procedure then add records to the table and then remove the identityafter the records have been added or something similar.here is a rough idea of what the stored procedure should do. (I do not knowthe syntax to accomplish this can anyone help or explain this?Thanks much,CBLCREATE proc dbo.pts_ImportJobsas/* add identity to [BarCode Part#] */alter table dbo.ItemTestalter column [BarCode Part#] [int] IDENTITY(1, 1) NOT NULL/* add records from text file here *//* remove identity from BarCode Part#] */alter table dbo.ItemTestalter column [BarCode Part#] [int] NOT NULLreturnGOSET QUOTED_IDENTIFIER OFFGOSET ANSI_NULLS ONGOhere is the original tableCREATE TABLE [ItemTest] ([BarCode Part#] [int] NOT NULL ,[File Number] [nvarchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULLCONSTRAINT [DF_ItemTest_File Number] DEFAULT (''),[Item Number] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULLCONSTRAINT [DF_ItemTest_Item Number] DEFAULT (''),[Description] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULLCONSTRAINT [DF_ItemTest_Description] DEFAULT (''),[Room Number] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULLCONSTRAINT [DF_ItemTest_Room Number] DEFAULT (''),[Quantity] [int] NULL CONSTRAINT [DF_ItemTest_Quantity] DEFAULT (0),[Label Printed Cnt] [int] NULL CONSTRAINT [DF_ItemTest_Label Printed Cnt]DEFAULT (0),[Rework] [bit] NULL CONSTRAINT [DF_ItemTest_Rework] DEFAULT (0),[Rework Cnt] [int] NULL CONSTRAINT [DF_ItemTest_Rework Cnt] DEFAULT (0),[Assembly Scan Cnt] [int] NULL CONSTRAINT [DF_ItemTest_Assembly Scan Cnt]DEFAULT (0),[BarCode Crate#] [int] NULL CONSTRAINT [DF_ItemTest_BarCode Crate#] DEFAULT(0),[Assembly Group#] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULLCONSTRAINT [DF_ItemTest_Assembly Group#] DEFAULT (''),[Assembly Name] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULLCONSTRAINT [DF_ItemTest_Assembly Name] DEFAULT (''),[Import Date] [datetime] NULL CONSTRAINT [DF_ItemTest_Import Date] DEFAULT(getdate()),CONSTRAINT [IX_ItemTest] UNIQUE NONCLUSTERED([BarCode Part#]) ON [PRIMARY]) ON [PRIMARY]GO

View 2 Replies View Related







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