database-permissions

SQL Server: Find out which users have write access to which tables?

In SQL Server 7.0, I need to find out which users have write access to which tables in a particular database. I know that I can do this in Enterprise Manager by going through each table in the database and looking at the access granted to those tables - but there are a few hundred tables in the database. As I'm only concerned with a ha...

PostgreSQL copy permissions from another table

Is it possible to copy the user permissions from one table in a PostgreSQL database to another table? Is it just a matter of updating the pg_class.relacl column value for the target table to the value for the source table, as in: UPDATE pg_class SET relacl=(SELECT relacl FROM pg_class WHERE relname='source_table') WHERE relname='target_...

SQL Server - Limit the databases view based on login

Hi there, I have a situation where I want to limit the database view per user login. For example: I have 3 databases in my SQL Server instance called MyDB, UserDB, RestrictedDB. I then create a 2 logins; User1 and User2. I then did a DENY VIEW ANY DATABASE TO [User1] and then DENY VIEW ANY DATABASE TO [User2]. I then made User1 the ow...

Database access permissions issue (sql server 2008)

I have created a C# app that reads a config file, gets connection strings, and for each connection string it reads list of stored proc for some further processing. Now, I'm facing some permissions issues. When developing the app I was using connection strings with dbo level users. Real life connection strings are for sql users with only...

Restrict stored procedure to only perform SELECT operations

Is is possible to restrict a stored proc to only SELECT from a database. I want a stored proc which only selects data to execute correctly and a stored proc with UPDATE, CREATE, DELETE operations to return an error indicating insufficient permissions. I am using Sybase 12.5 ...

SQl server 2008 permission and encryption

i have made columns in some of the tables encrypted in sql server 2008. Now as i am a db owner i have the access to encode and decode the data using the symmetric key and certificate. But some other users have only currently datareader and datawriter rights ,and when they execute any SP referring the logic which uses the key and certific...

Would this hack for per-object permissions in django work?

According to the documentation, a class can have the meta option permissions, described as such: Options.permissions Extra permissions to enter into the permissions table when creating this object. Add, delete and change permissions are automatically created for each object that has admin set. This example specifies an extra permiss...

sqlite3 on iPhone emulator versus device permissions?

Ok, now I finished developing on the emulator and when I installed on my test device, I got the error attempt to write a readonly database What are the settings to control the DB access? Is this going to be difficult to manage when deployed? More information ... I think I know what is going on ... When I look for my DB it is not...

CakePHP: What to use for MySQL users & permissions?

I'm getting ready to deploy a CakePHP site for the first time. I'm using the site with a MySQL database, and I'm still a little unclear about the proper use of users & permissions for MySQL -- I'm talking about the "login" and "password" fields that appear in app/config/database.php. During development, I've been using 'root' and 'root' ...

Prevent SQL Server Table operations (INSERT and DELETE) on some tables

While working with some random sql queries on our databases, we may not want to insert or delete items to some of the database tables by just typing their names by mistake. So how to make them locked to the "editing", to be able to work safe. Thanks. ...

Database permissions and ORMs

I've been using .NET's Entity Framework a lot lately and have absolutely no wish to go back to using Stored Procedures. Been shocked though that the company I'm building this project for had a policy where applications were only given accounts that only had permissions to access stored procedures! Apparently, they believe that there's ...

Securing ASP.Net user database

Hi, I'm working on the web app which will be hosted on the client's server. There are various restrictions/security measures in place and I'm concerned that these can be "hacked" because the client will have a direct access to the ASP.Net user database through the SSMS. I can think of few ways to stop the user from doing this, but I...

Sql server execute permission; failure to apply permissions

I've just migrated from SQL2000 to SQL2008 and I have started getting an execute permission issue on a stored proc which uses sp_OACreate. The rest of the system works fine with the db login which has been setup and added to the database. I've tried: USE master GO GRANT EXEC ON sp_OACreate TO [dbuser] GO But this fails with the foll...

I can't create a view in oracle database using sqlplus (insufficient privileges)

I'm running this SQL: CREATE VIEW showMembersInfo(MemberID,Fname,Lname,Address,DOB,Telephone,NIC,Email,WorkplaceID,WorkName,WorkAddress,WorkTelephone,StartingDate,ExpiryDate,Amount,WitnessID,WitName,WitAddress,WitNIC,WitEmail,WitTelephone) AS SELECT mem.MemberID,mem.FirstName,mem.LastName,mem.Address,mem.DOB,mem.Telephone,mem.NIC,mem.E...

Grant a user permission to only view a mysql view

Hi, I'm using MySQL 5.1.44, let's say I have a table with records inserted by different users of my application, how can I give some specific user access to only see his records on the table? I've think about creating a view with his records but don't know how to create a mysql user that only can view that view.. So, is it possible to ...

SQL Server: protect database from being changed directly

Our program ships with an SQL Server 2005 database and SQL Server 2005 Express. Usually it installs its own instance of SQL Server 2005 in the client's computer. Now I have to add some tables whose content should only be updated from within the program. I need to prevent these tables from being changed directly, by using Management Stud...

Creating a SQL Server user with permission to read one view and nothing else - but he can see system views and procedures?

My company hired a contractor to do a small project for us, for which he needs to select data from one single view in our main database (SQL Server 2005). I wanted to create a locked-down SQL Server login for him, with permissions just to SELECT from "his" view...and nothing else. So I created a new user on the server, and then I gav...

SQL Server 2008 permission for View Dependencies

I would like to enable a SQL server user with read-only access to a DB the ability to view object dependencies. As a sysadmin I can select a table in SSMS and view any dependent objects (views, SPROCs, etc). My read-only users can see very few or none of these dependencies. I have already granted view definition but that didn't do it. D...

GRANT DELETE ON database.table TO username@'%';

Hi, I have given a user full control over one table in a database. Hoever it appears they cant delete records. I've tried as a privilaged user: GRANT DELETE ON databasename.tablename TO username@'%'; flush privileges; But delete stil doesn't work ERROR 1142 (42000): DELETE command denied to user 'username'@'localhost' for table 'ta...

Mysql cross table update permission problem

I'm doing a MySQL query similar to following: UPDATE my_articles a LEFT JOIN categorylinks cl ON a.pageid = cl.cl_from SET a.importance = 'High' WHERE cl.cl_to = 'High' The problem is, I don't have a UPDATE right for the categorylinks table (I do have that right for my_articles), so the query fails with the message UPD...