Skip to main content
11 votes
Accepted

How to prevent a login from 'listing' a table or view definition in PostgreSQL?

The documentation to the rescue: UPDATE [...] For schemas, allows access to objects contained in the specified schema (assuming that the objects' own privilege requirements are also met). Essentially ...
András Váczi's user avatar
2 votes
Accepted

Disallow superusers and single-user mode in POSTGRESQL

You will find that you need superuser access for certain tasks, e.g. CREATE EXTENSION. Vieving database metadata is not a security problem. Just because you know that there is a column with credit ...
Laurenz Albe's user avatar
  • 56.4k
2 votes
Accepted

Operation level authorization in PostgreSQL

You can do this with views. The columns of the view must be given names, they can't be specified in the functional form. create view employee_agg as select count(*), avg(salary) from employee; grant ...
jjanes's user avatar
  • 41.3k
2 votes
Accepted

Postgres 13 - Grant to Active Directory Groups?

No. All roles have to be created with CREATE ROLE in the database. The existence of the role in the database is necessary, because it is associated with permissions in the database (authorization). ...
Laurenz Albe's user avatar
  • 56.4k
1 vote

Create Sequence Permission for Postgres

From this answer, an example of how to do this with an event trigger is CREATE OR REPLACE FUNCTION check_ddl_event_user() RETURNS event_trigger LANGUAGE plpgsql AS $$ BEGIN IF (SELECT current_user)...
Daniel's user avatar
  • 11
1 vote

Permission for business logic layer & application

Database engines have no standardized access layer with enough resolution to allow direct use of the database from client apps. The databases locking mechanism and indexing also have to be taken into ...
Lucas's user avatar
  • 155
1 vote

Stored procedure runs fine when executed manually but fails in scheduled job

Please add more details. I assume T-SQL job step type here. If you use something else (cmdexec, SSIS, Powershell), then let us know. Agent service account is always sysadmin with the connection it ...
Tibor Karaszi's user avatar
1 vote

Stored procedure runs fine when executed manually but fails in scheduled job

The probable reason I can think is when u execute manually it might be because you are executing with login with privileges or access to execute that proc. However sql agent job might be using the ...
KASQLDBA's user avatar
  • 7,177
1 vote

How to access Multiple DB2 Relational Databases In A Single Query

One way you can achieve this is via federation. In short words, if you want to access db_b from db_a, you catalog db_b in instance of db_a. You then create nicknames in db_a for the tables in db_b ...
Lennart - Slava Ukraini's user avatar
1 vote
Accepted

How to use mysql_plugin utility?

The .ini needs to contain the plugin followed by the components. The document Authentication Plugin - Unix Socket hints that the component name is unix_socket. So the correct contents of the file ...
danblack's user avatar
  • 8,009
1 vote

Authorization dbo maps to a user with an old machine name

It seems the database was created/restored/attached by a Windows account user that no longer exists. Change the database owner to a valid existing login using ALTER AUTHORIZATION ALTER AUTHORIZATION ...
Dan Guzman's user avatar
  • 28.5k
1 vote

Designing a database structure for a permissions system

"... the yellow tables are arrays so that every user can have multiple ..." -- Good. Restricted access should be in the application layer. No user should be able to write arbitrary SQL. Dates ...
Rick James's user avatar
  • 79.4k

Only top scored, non community-wiki answers of a minimum length are eligible