Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Privileges granted to an account or role through the security mechanism of an operating system, database manager or other system.

2
votes
1answer
50 views

How to script out the grant view on login permission?

I create the following login without any permissions. USE [master] GO IF NOT EXISTS (SELECT * FROM sys.server_principals WHERE name = N'Radhe') CREATE LOGIN [Radhe] WITH PASSWORD=N'...
1
vote
1answer
30 views

Only allow access to a table via a function, not directly via queries

I have a table t and some functions which access t. For example: create function list_t() returns setof t as $$ select * from t; $$ language sql stable; Is it possible to define role permissions ...
0
votes
1answer
32 views

Error granting SELECT on view that uses ALL_OBJECTS

I'm in the middle of testing Oracle 12c for our application. I have something similar to this view in a particular schema, which we'll call MY_OWNER_SCHEMA for this question: CREATE OR REPLACE VIEW ...
1
vote
0answers
20 views

Create a postgres user role that can't access a specific table

I have a postgres 9.6 database with many tables. I need to create a role that doesn't have access to one of these tables. I think I need to do a Grant Permissions, but I haven't been able to find ...
1
vote
2answers
76 views

Bit column vs relationships?

Two examples: Table users, each user may have or not have some of ~10 possible permissions (like "can login, can post, can edit, can delete" etc). Table articles, each article may have or not have ...
0
votes
0answers
23 views

Small Business Database & Security (Permissions) [closed]

I have the opportunity of a small scale contract to design a database system for a small business, and I am unsure how to proceed. I have created Databases in Access & MySQL but only after IT ...
0
votes
1answer
7 views

How to grant Connect & Create Privilege on current Database in PostgreSQL?

After looking at the docs, I know that you can grant Connect & Create Privileges by using the following commands: GRANT CREATE ON DATABASE <db_name> TO user; GRANT CONNECT ON DATABASE <...
9
votes
1answer
444 views

Grant deny permission stacking

For the role db_denycustomer, I want only the column code of the customer table to be SELECTable, and none of the others. So I did this: DENY SELECT ON dbo.customer TO db_denycustomer GRANT SELECT ON ...
2
votes
1answer
38 views

Does a user who has permissions to select from a view also need select granted to the children entities of that view?

If view 1 uses tables A and B, and a user has SELECT granted on view 1 is that sufficient for the user to select from view 1 or does he also need SELECT granted on tables A and B. Specific details on ...
1
vote
1answer
95 views

The EXECUTE permission was denied on the object 'SPROC', database 'DATABASE', schema 'dbo'

I have a few users that are unexpectedly receiving this error message today when they attempt to refresh a stored procedure via Excel: The EXECUTE permission was denied on the object 'SPROC', ...
1
vote
1answer
40 views

Apache Cassandra INSERT-only permissions

Looking at the Cassandra documentation, it appears that the smallest write-only permission on a table you can grant is MODIFY, which includes UPDATE, DELETE and TRUNCATE. Is there a proper way to ...
0
votes
0answers
26 views

Apply default privileges to tables when their owner changes

I am using an event trigger to change view and table owners upon creation. Unfortunately that means that default privileges are not applied. Is there a good way of applying default privileges in this ...
-1
votes
1answer
55 views

granting permissions in MS SQL Server

I am logged in with a windows authentication account which is sa. Trying to grant CONTROL SERVER permission to myself, and shows this error Cannot grant, deny, or revoke permissions to sa, dbo, ...
1
vote
1answer
25 views

MySQL privileges for roles aren't applying to users?

I've done what I consider to be sufficient research with no answers to justify posting this question here. I am attempting to grant users permission to execute certain stored procedures. And because ...
1
vote
1answer
40 views

Mysql preventing truncate and drop table statements for a specific table

I have a MySQL table that serves as an immutable event store. I added triggers to prevent rows from being updated or deleted; CREATE TABLE t2 ( str VARCHAR(32), ts TIMESTAMP(6) DEFAULT ...
2
votes
1answer
69 views

Stored Procedure Execute as Owner Close Database Connections Not Working

I created a stored procedure to allow users to Close All Db connections in the QA environment. I am SA and created the procedure. When I modify the SP , run it Without 'Execute as Owner', I get ...
0
votes
2answers
45 views

read/write/execute to pl/sql grants [closed]

For a current task and future references, I am wondering how pl/sql grants (select, insert, update, delete, references, alter, index, all) are categorized from a read/write/execute or read/read-write/...
1
vote
1answer
10 views

DB user restricted permissions vs Docker?

As far as I know, it's usually considered a good practice when developing websites to store in website config DB credentials of the user without ALTER/DROP permissions (so user may only select, insert,...
0
votes
1answer
22 views

Organizing and assigning privileges to multiple objects in MySQL

I'm new to MySQL, moving from MS SQL Server, and I'm wondering if there's a way to logically group tables, views, sp's, etc in the same manner as you would with schemas in SQL Server....seeing as how ...
1
vote
1answer
62 views

What permissions does HAS_DBACCESS check?

I assume that SELECT HAS_DBACCESS('database name') is equivalent to SELECT HAS_PERMS_BY_NAME('database name', 'DATABASE', 'permission name') for some permission (or set of permissions, the results ...
0
votes
1answer
10 views

Postgres - Revoke database acess from user, but allow replication acess

The DB have a replication server, i need to revoke the permission on the user "user_bi" but allow the acess of this same user on the replication server! REVOKE ALL ON ALL TABLES IN SCHEMA public FROM ...
0
votes
0answers
14 views

How to create a user in postgres that has a access to particular schema

I want to create a user in the postgres database which has read access to a particular schema in the database. how can I create that? eg:- if in case a database has 3 schemas public, test and test2. ...
2
votes
1answer
77 views

SQL Server Error while creating User

I tried creating a user with all privileges but I am getting this error: Microsoft SQL Server Management Studio Create failed for User 'Hru'. (Microsoft.SqlServer.Smo) Additional ...
1
vote
1answer
26 views

Permissions for runtime user on all objects in schema (including future objects)

In PostgreSQL 10 - when using an "owner user" (login role owning a schema and all tables, not used by the application at runtime) and a "runtime" user I can GRANT Select/Update/Delete permissions on ...
0
votes
1answer
38 views

How to give read only access to a user to view the tables of different owner in oracle

I have 2 users are present in oracle ex User1 and User2, Under user1 some tables are present ex t1,t2,t3 etc.. . what are the minimum permissions to view the tables of user1 by using user2 ( Just want ...
0
votes
0answers
19 views

How to connect to mdb fie

I have a exe file that read and write from local Db file. I check this file with Detect It Easy and it tell me that is mdb file. I can open this file with Microsoft Access, and watch all the tables ...
3
votes
1answer
57 views

Querying an Oracle view don't return records using some clients but it does using others

I was given this view that when I query it using OracleSQLDeveloper it returns nothing, but if I use Toad it does return records! I cannot inspect the definition of the view, and no errors are ...
1
vote
1answer
16 views

Permission errors on insert after schema drop/create (Pg 9.0.23)

We have a web application that allows users to modify data through an API. In order to allow people to run tests, we provide a sandbox area called 'daily'. This sandbox gets refreshed every day from ...
1
vote
1answer
27 views

PostgreSQL - automating database grants [closed]

We're managing about 200 instances of postgres on Amazon RDS. The problem that we're constantly experiencing is that our "DBA" accounts can't access stuff. Basic stuff. Tables, views, etc. Is there ...
2
votes
2answers
36 views

How to revoke “Alter role” on users

I have a user "sa" which is sysadmin in a MSSQL instance. All users who log into the database have the permission to change the password and delete the "sa" user. Is there a way to revoke this ...
3
votes
1answer
341 views

List of database users: can you run C# Code in SQL Server Management Studio?

I'm trying to obtain a list of users associated with the AD Groups represented by the logons in my database. I understand from my research that the best way to do it is using this code: { Server ...
1
vote
0answers
16 views

Pros and cons of setting super admin in users table

I'm structuring a RBAC in a Web system. My database tables looks like: actions id name resources id name permissions id action_id resource_id roles id name permission_role permission_id ...
2
votes
0answers
37 views

Just one Active Directory group will not sync to SQL Server

Modifying the Active Directory group membership for a particular user propagates to our SQL Server instances as expected — except when one specific group is added. What is causing this issue, ...
2
votes
0answers
625 views

ORA-01031: insufficient privileges solution oracle

Create or replace procedure myprocedure is stmt varchar2(1000); stmt2 varchar2(1000); begin stmt := 'create global temporary table temp(id number(10))'; execute immediate stmt; ...
7
votes
1answer
524 views

How to GRANT permission to execute stored procedure?

I have an AD group that is setup as a Windows Authenticated SQL Login on my SQL Server. On DatabaseA it has the db_datareader and public roles. So the users of this AD group only have read access to ...
0
votes
1answer
87 views

MySQL user password vs authentication_string

I run following commands: CREATE USER 'dbuser'@'%' IDENTIFIED BY PASSWORD('mypass'); CREATE USER 'dbuserx'@'%' IDENTIFIED BY PASSWORD('mypass'); SET PASSWORD FOR 'dbuser'@'%' = PASSWORD('mypass'); ...
2
votes
1answer
29 views

How are “DEFAULT PRIVILEGES” implemented in Postgresql?

If I create a new database cluster (via initdb), then create a new database. How are the "default privileges" and "global default privileges" implemented? For example, when I run \ddp in psql, it ...
1
vote
0answers
19 views

Is it possible to `REVOKE` all privileges from all members from previous `GRANT`s?

Let's say I grant a privilege to "user_a", "user_b", "user_c". Is it possible to REVOKE from all users in previous grants, but without specifying them explicitly? Something like this: REVOKE ALL ...
1
vote
1answer
42 views

Why does my INSERT fail on SELECT permissions when I have change tracking enabled?

I have a user in a SQL Server 2014 database that only has permissions to insert into a table (no select permissions). When change tracking is enabled on the table, the inserts will fail with The ...
2
votes
2answers
58 views

Mysql 8.0 and read-only not working as expected

I have a new Master/Slave config running. Everything is happily replication. I have added a secondary user whose role will be to manage the databases and tables. Currently the following privileges ...
0
votes
1answer
26 views

Inherited Permissions: SQL Server 2005 vs 2016

Question: I have a SQL Server 2005 server and a SQL Server 2016 server. On each server is a database (A) with a stored procedure that selects data from a view in Database (A) The view in database (A) ...
0
votes
1answer
30 views

What are the minimal permissions required for the “Users and Privileges” tab in MySQL Workbench to function in MySQL 5.6

My ultimate goal is to allow administration for the purposes of password resets with minimal possible permissions given. It seems to me that with the UserAdmin role, or even UserAdmin with ...
3
votes
1answer
262 views

Unsuccessfully granting privileges

I'm currently attempting to define a new user using the following: mysql> GRANT ALL PRIVILEGES ON simple_cms_development.* TO 'br'@'localhost' IDENTIFIED BY 'password'; However, it is ...
1
vote
1answer
42 views

Read Only Access Except Stored Procedures in Specific Schema

I'm building an application that is attached to a legacy application database. The application has it's own database that is on the same server as the legacy database. My application is ASP.NET and ...
0
votes
0answers
20 views

Postgresql: Restored dump into another database with another user, results in permission denied

I'm using postgresql on two machines, and I regularly create a dump on the production server and restore it on my development computer. Usernames are identical. The dump / restore porcess works in ...
0
votes
1answer
35 views

Oracle SQL: How to give user the permissions to SELECT from a table?

I'm not very familiar with Oracle SQL at all, but using our admin account I ran the following query on our Oracle database server: GRANT SELECT ON Table1 TO OtherUser. I then committed this change (...
2
votes
1answer
57 views

What is the equivalent of SQL Server's db_datareader/db_datawriter in PostgreSQL?

I'm porting an application from SQL Server to PostgreSQL. Most of this is simple as the application only really does simple selects, inserts and updates. However I need to create a user to access the ...
0
votes
0answers
14 views

Postgres (permissions): Can connect to DB, can't see tables [duplicate]

I have one database called db. I've created a copy of this database called db_guest so my colleague can work with copy of the data but doesn't touch production. I've created a new ROLE to not have to ...
0
votes
2answers
45 views

db_datareader role along with selected table update

I have given one data base user read permission only, using db_datareader role. Now, I need to give the same user permission to update only one table (PROD.CustomerRelations). Is there any way to ...
0
votes
1answer
202 views

How to assign privileges on a postgresql schema to a user?

pg_hba.conf contains: ... host 10.10.10.10 service_db admin md5 ... Logged in as root, executed the following commands: ###CREATE DB ADMIN sudo -u postgres psql -p 5432 -d postgres -c "CREATE USER '...