SQL 2012 :: Grant DROP Table Permission Within Database

Mar 26, 2015

How to grant DROP table permission within a database to an SQL login. I could see in Databae properties-> permission tab, there is an option to grant CREATE TABLE, EXECUTE permission etc, but not DROP table permission. How to grant it?

View 3 Replies


ADVERTISEMENT

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

How To Grant Create Procedure Permission To Database User?

Apr 7, 2008

Can somebody tell me without pointing to any other link how to grant Create Procedure permission to DB user.

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

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

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

Drop All Indexes In A Table, How To Drop All For User Tables In Database

Oct 9, 2006

Hi,I found this SQL in the news group to drop indexs in a table. I need ascript that will drop all indexes in all user tables of a givendatabase:DECLARE @indexName NVARCHAR(128)DECLARE @dropIndexSql NVARCHAR(4000)DECLARE tableIndexes CURSOR FORSELECT name FROM sysindexesWHERE id = OBJECT_ID(N'F_BI_Registration_Tracking_Summary')AND indid 0AND indid < 255AND INDEXPROPERTY(id, name, 'IsStatistics') = 0OPEN tableIndexesFETCH NEXT FROM tableIndexes INTO @indexNameWHILE @@fetch_status = 0BEGINSET @dropIndexSql = N' DROP INDEXF_BI_Registration_Tracking_Summary.' + @indexNameEXEC sp_executesql @dropIndexSqlFETCH NEXT FROM tableIndexes INTO @indexNameENDCLOSE tableIndexesDEALLOCATE tableIndexesTIARob

View 2 Replies View Related

Grant Permission

Apr 14, 2008

how to grant alter table and set identity insert column permission in sql server 2005,

help is apprecitate

View 4 Replies View Related

Grant Permission

May 14, 2008

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.

View 11 Replies View Related

What Permission Do I Need To Grant ?

May 31, 2007

hello,



what permission do I need to grant to a user to let him to read a table in a linked server object?



Thanks

View 13 Replies View Related

Grantor Does Not Have GRANT Permission.

Apr 12, 2008

I run the following query...using sql analyzer dbo.aCVChangeSQLPassword 'user1','user1',''I am logged in as user1 in the sql analyzer...It chnages my password, in sql server, however gives me this message...Grantor does not have GRANT permission.Password changed.(1 row(s) affected)Server: Msg 4613, Level 16, State 1, Procedure aCVChangeSQLPassword, Line 27Grantor does not have GRANT permission.
Line no 27 has the folliwng code that I execute...
 
exec sp_password @old,@new,null
 

View 1 Replies View Related

Grantor Does Not Grant Permission

Jun 18, 2008

Hi I have installed Sql server 2005.  I tried to give "Create database" permission to master database I am getting an errorGrantor does not grant permission (Microsoft SQL Server, Error 4613) May  I know what is the reason for this.How to resolve it. RegardsKaran 

View 1 Replies View Related

MSDE - Grant Permission?

Mar 13, 2006

Hi all,

If I would like to create a user with a db_owner permission & some permissions such as sp_addlogin, sp_adduser etc.

How can I do? Would you mind to give me some examples?

Many thanks.

View 3 Replies View Related

How To Grant Permission To User?

Apr 25, 2008

Hi,
I newly created one database (using creat database testdb ). After that i created login name and password for that database ( using create login login1 with password = 'pass1'; use testdb; command) and i created user for that login name ( using create user user1 for login login1 command).
Then i connected testdb database using login1. But when i trying to create table in that database, it thrown error. Anyone please tell me that how to assign all privileges to the user user1?

Sathish kumar D

View 3 Replies View Related

UDA Grant Permission Problem

Apr 30, 2008

When I try and grant execute permission to an assembly like this:
GRANT EXECUTE ON ASSEMBLY::[UDAs] TO [lgnMyLogin]

I get this error:
Incorrect syntax near 'EXECUTE...'.

Any ideas?

View 2 Replies View Related

Grant Win Acct Permission

Mar 24, 2006

I'd like to grant a WIndows account permission to connect to a db andexec stored procedures. But am having trouble.I want this type of effect but can't get the syntax correct:USE MyDBGOCREATE USER 127.0.0.1ASPNET --ASPNET Account for current machineGOGRANT EXECUTE ON AllStoredPRocs TO 127.0.0.1ASPNETHow is this done in a t-sql script?Thanks for any help.

View 1 Replies View Related

Error: Grantor Does Not Have Grant Permission

Jan 4, 2006

Hi all,Before using SQL Server 2000 Developer Edition I did not get this error message. I had been using the trial edition of SQL Server 2000.I only get it with stored procedures.I solved my problem by giving the ASPNET login "db_owner" privs, which I didn't need to with the trial edition and is not best practice from a security angle.I login under the Windows based admin account. (not using mixed mode).Hope someone can shed some light.Thanks.

View 1 Replies View Related

Grant Select Permission On All Tables

Jul 3, 2004

Hi Gurus, Can any one tell me how to grant select permisision all tables in a DB

like Grant all on [all tables] to myuser.


Thanks in advance.
Srinivas varanasi

View 2 Replies View Related

Grant Execute Permission In 2000

Dec 11, 2006

does anyone know how to do this, its :

GRANT EXECUTE ...

for 2005 but for 2000?

View 6 Replies View Related

How To Grant Permission To Create A New Object

Jan 23, 2008

I am new to sql server. right now i getting used to management studio.I am trying to creata a new object / a new database but i am getting an error which says permission not granted

can any help me to move ahead

thanks

View 1 Replies View Related

SQL 2012 :: Grant Read-only Access To Windows Logins On Remote Standby Database

Mar 23, 2015

We log ship our production database tansaction logs to a secondary database on a separate remote domain.

Incidentally, this was not set up via the "Ship Transaction Logs" wizard, but instead we had to use the various system stored procedures after restoring a copy of the database on the remote domain in standby mode.

We now have an issue where users are unable to access the remote secondary database without having sysadmin privileges. Clearly we want to avoid this!

We want to be able to use Windows Authentication mode on the server of the secondary database. But since the two domains differ, is it possible to even achieve this?

How can we set up read-only access for users on the secondary database without giving them sysadmin privileges?

View 3 Replies View Related

How To Grant Sysadmin Permission To SQL Server User ?

Jul 26, 2001

Hi,

I'm trying to run the Bulk Insert statement but in order for me the run it, i need to have the sysadmin permission. Can someone show me how to grant sysadmin permission to my SQL Server user? This is really urgent. Thank you in advance.

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

How To Grant User Permission To Create Other Users?

Jun 26, 2007

There's something I can't quite figure out about user creating



The application that I'm currently working on is interacting with DB, therefore every time you use application you need to login as user which is fine. The problem is that certain users should be able to create new users and the new user may even have the same level of permissions as the one that's creating it ( like admin creating another admin acount or some like that).



Question is how can I allow users to create these user with giving them as few permissions as possible.



If there's is somewhere a code sample on the net I would appreciate the link.







View 1 Replies View Related

DB Engine :: GRANT Read-only Permission After A Restore

Jun 19, 2015

I'm trying to grant a read-only permission in sql 2014 after a restore and I wanted to find out what it is in SQL 20114?

View 4 Replies View Related

How To Grant Permission To A Specific User To Run SQL Scheduled Jobs?

Feb 7, 2003

Hello Everyone,

I have an web application where the users has to run SQL scheduled jobs from the webpage. How to assign permission to a specific user to run specific jobs without making them a member of a Sysadmin role?

Any ideas you all smart people?
Thanks in advance!

Jannat.

View 3 Replies View Related

SQL 2012 :: Drop Table With FKs

Jun 26, 2015

When I drop a table should I also drop it's FK ? or they keys are removed with the table?

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

Howto Setup My User In Order To Grant Him The Drop Privilege

Sep 28, 2005

Hi. Thru a sproc, I drop & re-create some temp tables.When I call that sproc from the client, though, I cannot drop thetables.I need to allow the user, say "Alex", to drop/create tables (actually,that would be DDL). Which role should "Alex" assume ? How do I do that?I run the following sproc named, say, "CREATE_TABLE" (SNIP):__________________________________________________ __________________Set @StrSQL = 'if exists (select * from dbo.sysobjects where id =object_id(N''[dbo].[' + @TableName + ']'') and OBJECTPROPERTY(id,N''IsUserTable'') = 1) drop table [dbo].[' + @TableName + ']'Exec (@StrSQL)Set @StrSQL = 'CREATE TABLE [dbo].[' + @TableName + '] ([GROUP] [varchar] (6) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,...........[Stuff] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL) ON [PRIMARY]'Exec (@StrSQL)Set @StrSQL = 'GRANT SELECT , UPDATE , INSERT , DELETE ON [dbo].['+ @TableName + '] TO [Alex]'Exec (@StrSQL)__________________________________________________ __________________As you can see, it is dynamic, because I need to repeat it for many@TableName values - that means, further more, that I will be executingthis in the context of the current user, Alex, and therefore I have togive Alex rights to both executing the sproc and to the tables referredto by the sproc, as specified by @TableName.I created a _TEST sproc which contains only the following:_______________________________________________CREATE PROCEDURE _TEST ASDROP TABLE [dbo].[SomeTable]RETURN_______________________________________________When I execute it from the client, thru ADODB, on user Alex, I get"User does not have permission to execute this operation on tableSomeTable"The table has been created thru "CREATE_TABLE", abovePlease help, I have to finish this tomorrow, and I'm under tons ofpressure.Thanks a lot,Alex.

View 1 Replies View Related

SQL Server 2008 :: Grant User Full Permission Within Schema Scope

Jul 13, 2015

The requirements are:
1. the user has read-only permissions to dbo tales.
2. the user can do everything within the rpt schema, which contains all objects analyzing dbo tables.
3. the user does not have any permission outside rpt schema, except permissions in #1.

The current solutions are:
1. grant the user select only on dbo tables.
2. make the user the owner of rpt schema.
3. Grant the user database permission on create table/create procedure/create view/create function.

My question is - in step 3, should I just grant "Alter" database permission to the user? Granting Alter seems to be cleaner and simpler. According to MSDN,

"Alter" confers the ability to change the properties, except ownership, of a particular securable. When granted on a scope, ALTER also bestows the ability to alter, create, or drop any securable that is contained within that scope.

View 2 Replies View Related

What Permission I Need To Grant To A User If He Need To Read Or Write A Link Server Tables

May 31, 2007

hello,



What role or system privilege do I need to grant to a user if he need to read the data from a table which is in a link server object? where I can find the document about these commands.



Thanks

View 1 Replies View Related

SQL 2012 :: Error - Cannot Drop Table Because It Is Being Used For Replication

Sep 2, 2014

The error message is "cannot drop the table because it is being used for replication"

my sql version is in sql server 2012 and Im ussing merge replication.

I want to drop only one table.

View 7 Replies View Related

SQL 2012 :: Unable To Drop Database User

May 7, 2014

We are unable to drop a database user with the following error "Msg 15284, Level 16, State 1, Line 1

The database principal has granted or denied permissions to objects in the database and cannot be dropped."

On checking the database permissions we have the following permissions assigned to the user

classclass_descmajor_idminor_idgrantee_principal_idgrantor_principal_idtypepermission_namestatestate_desc
17SERVICE655360517SN SENDGGRANT
17SERVICE655370517SN SENDGGRANT
17SERVICE655380517SN SENDGGRANT
17SERVICE655390517SN SENDGGRANT
17SERVICE655400517SN SENDGGRANT

[Code] ....

How we can revoke the SEND permissions?

View 3 Replies View Related







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