Questions tagged [owner]
14 questions
16
votes
5 answers
Is there a means to set the owner of all objects in a PostgreSQL database at the same time?
The Stack Overflow Q & A Modify OWNER on all tables simultaneously in PostgreSQL describes some nifty ways to change table and other objects to a specific user, and it works swimmingly, however all the suggestions seem to ignore the functions I…
Jeremy Holovacs
- 1,271
- 4
- 20
- 27
14
votes
4 answers
Why am I getting permission denied on an ownership change?
My current user is pronto
mediapop_staging=> select current_user;
current_user
--------------
pronto
(1 row)
This user a standard super user created on AWS RDS.
mediapop_staging=> \du pronto
List of roles
Role name | …
Kit Sunde
- 363
- 1
- 3
- 17
9
votes
1 answer
What is the purpose of "Schema Owner"?
If I create a new schema and set the schema owner to another schema, for example dbo, what is the meaning of that in regards to my new schema?
Does my new schema inherit the same permissions from it's owner dbo?
J.D.
- 40,776
- 12
- 62
- 141
5
votes
2 answers
Can I change the owner of the cdc schema?
I've enabled Change Data Capture (CDC) on a database using exec sys.sp_cdc_enable_db
This creates a new cdc schema which is owned by the cdc user
select
s.*
, dp.name
from sys.schemas as s
join sys.database_principals as dp
on…
Zikato
- 5,619
- 1
- 17
- 34
5
votes
1 answer
Select Permissions Across Multiple Schemas Within the Same Database
I have been asked by a client to implement some views for reporting purposes, the views will be accessed via PowerBI, Excel and SSRS. The designated user will only have access to the view and no underlying tables must be available to the user.
The…
Tim
- 53
- 4
4
votes
1 answer
How to maintain database ownership restoring across domains?
I am working with a vendor who is developing a SQL Server database outside of our domain. Occasionally, they need to deploy a new copy of that database into our domain by backing up their database, and restoring over the top of the of the database…
SomeGuy
- 2,053
- 8
- 35
- 48
3
votes
1 answer
How to change table and sequence owner to another user with PostgreSQL?
Created these tables and sequences under postgres user:
table creation schema
SET search_path TO main;
CREATE TABLE table1 ...
CREATE TABLE table2 ...
CREATE TABLE table3 ...
sequence creation schema
CREATE SEQUENCE main.seq1...
CREATE SEQUENCE…
Miantian
- 177
- 1
- 3
- 9
2
votes
1 answer
How do I change the default database owner for new databases in SQL Server?
I had cause to change my computer name (it’s running in a virtual machine). I have an existing SQLExpress instance which was installed prior to the rename.
There are some features which fail because new databases are still created with the old…
Manngo
- 3,065
- 10
- 38
- 61
2
votes
0 answers
Change database owner of Azure SQL Database
I want to change the database owner of an Azure SQL Database. I can do this via the server administration user. However I want to do it using a different user. Why? Because I have a process which copies a database from one server to another using a…
sidesw1pe
- 21
- 1
- 3
2
votes
1 answer
What is the best practice for the msdb database owner?
In the course of reading up on SQL Server security best practices, I learned that databases should generally be owned by a dedicated, low-privileged login (sometimes a separate one for each DB or each application), per these articles.
I've also…
RollingDBA
- 231
- 1
- 3
- 10
2
votes
1 answer
Why the owner of a database can't alter the tables of this database that are owned by other owners?
For now I don't understand why this access rights segregation exist.
Is it implemented for some security reasons? Or can it be needed by some use cases I can't imagine right now?
Knowing almost nothing about the reasons behind concrete PostgreSQL…
Alexander Ites
- 121
- 1
1
vote
1 answer
Why does a user use owner privileges when executing a trigger?
I came across a strange situation that gave me a big headache and after solving it I would also like to understand WHY.
Basically, a user had all the privileges he needed to execute a "trigger" (it was actually a foreign key constraint with an…
Sotis
- 328
- 2
- 9
0
votes
2 answers
What are the Minimum Permissions to Create an MSSQL Database and Take Ownership of it?
I would like a less privileged user (KINGDOM\joker) to be able to create, manage, and drop databases on an MSSQL 2017 server [14.0.2027.2 (X64)]. KINGDOM\joker should only be able to affect the databases that they create, and should not be able to…
0
votes
1 answer
Find all sequences and other schema objects owned not by certain user
How can I find all sequences (and more widely - all objects in given schema), which are owned not by certain user, on PostgreSQL (10-15)?
I found such query:
SELECT relname, relacl
FROM pg_class pgc
WHERE relkind = 'S'
AND relacl is not null
AND…
lospejos
- 109
- 5