Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
1 vote
1 answer
1k views

how to script out all the permissions in a folder using powershell?

Using the script below I find out where are the data and log folders: declare @rc int, @dir nvarchar(4000) declare @data nvarchar(4000) declare @log nvarchar(4000) ...
Marcello Miorelli's user avatar
2 votes
1 answer
578 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 ...
J.D.'s user avatar
  • 39.5k
7 votes
1 answer
2k 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 ...
J.D.'s user avatar
  • 39.5k
0 votes
1 answer
251 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 ...
ErpaDerp's user avatar
  • 105
0 votes
1 answer
6k views

Why securityAdmin does not have enough permission?

I am a server securityAdmin. The securityAdmin role should be treated as equivalent to the sysadmin role, according to Microsoft, but I failed to do below 2 things make myself as sysAdmin grant ...
Rm558's user avatar
  • 123
1 vote
1 answer
121 views

denydatawriter does not work in SQL Server

I have a couple of admin roles in a SQL Server 2012. To prevent myself from changing data in one database, I added my login as a member of denydatawriter role to that database. It seems does not ...
Rm558's user avatar
  • 123
4 votes
2 answers
19k views

What are SHOWPLAN permission security risks? (MS SQL Server)

I'm having some friction when it comes to showplan permission security. Say there are 5 databases on a server. And each one has a test/ production split (so 10 total). There is one sysadmin. There ...
user45867's user avatar
  • 1,709
1 vote
1 answer
4k views

What would cause "SELECT permission denied" for an object?

This is a work backwards kind of issue, since I can't tell you all of the requirements to cause this to happen. I'm getting the following error for a table (TABLE01) in one database (DB01), but not a ...
JustBeingHelpful's user avatar
14 votes
1 answer
22k views

Access view based on table in another database without account in that other database

I created view in database1 based on tables in database2. I gave SELECT permission to a user who has access only to database1. The user can't get this view to work because he doesn't have an account ...
tom's user avatar
  • 141
5 votes
4 answers
8k views

Why does user not have access to database?

I have a user ls_readonly which is supposed to have db_datareader privileges on several databases. I thought I had set it up right: But when I connect to the server as ls_readonly and try to open the ...
Shaul Behr's user avatar
  • 2,943
1 vote
1 answer
2k views

Granting permission to the service account

I am currently granting permissions to a service account on a database. I want to ensure if the granting db_datareader and db_datawriter database roles is the same as my grant command. Adding service ...
Tom's user avatar
  • 141
-3 votes
1 answer
86 views

How to make it Secure? [closed]

I am building a website ( a platform ) which will have people communicate between each other and there is bound to be money transactions. The amount of money in each customers account will be kept ...
ADR's user avatar
  • 1
4 votes
2 answers
34k views

What does GRANT CONTROL on a schema do in MSSQL?

I'm using SQL Server 2016 for these tests. The following did not allow me to create a table in schema S for user U USE [D]; GRANT CONTROL ON SCHEMA :: [S] TO [U]; But this did: USE [D] GRANT ALTER ...
JustBeingHelpful's user avatar
2 votes
1 answer
11k views

Grant View Server State - is it possible for a none SA user to have in Azure SQL?

I'm trying to set up some scheduled jobs which will collect some server stats, using system DMV's in SQL Server Azure. If a none SA users uses 'sys.dm_os_schedulers', they get an error (below), query ...
DBA-PJS's user avatar
  • 21
4 votes
2 answers
2k views

How to completely hide a function from all other users and roles?

Database : Postgres 9.6 Use case : I have a function that needs to be hidden, only a particular role/user can see it. I don't even want to expose even the name or body of function to other users/...
Abhijit Gujar's user avatar
3 votes
1 answer
2k views

Granting SELECT permission on a object

I am not sure if this is an odd question, so please let me know if what I describe below is possible. We have a server, which is configured by someone else and none of us are "added in it". As of ...
Learning_Learning's user avatar
3 votes
1 answer
162 views

Status of objects owned & permissions granted by a (now)-disabled Windows Account

When an employee (esp. sysadmin) leaves (ie, their AD account is disabled), what happens to objects they 'owned' (permissions they granted) in SQL Server? In other words, for SQL Server security, do ...
user115336's user avatar
0 votes
1 answer
1k views

SQL Server 2016 Security - Restrict users from viewing a single database

Our client requirement, is to restrict other users from viewing/accessing the database if they are not assigned to work on it. Some background on how the databases are setup: For each client, a new ...
Indee's user avatar
  • 1
2 votes
2 answers
8k views

Granting minimum select permission on system "sys" tables in every database

Our development team has created some SSRS reports that retrieve metadata only (no 'real' data) from every database. I am trying to lock down the service account running these reports to the minimum ...
SomeGuy's user avatar
  • 2,053
9 votes
3 answers
72k views

Create table permission for a user in specific schema

I want to give Create , alter and drop permission to user A on a schema1 of a database. I guess this question has been already asked, and what i have found is to Grant Alter to the schema and also ...
joeprince's user avatar
  • 190
13 votes
1 answer
12k views

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

Is there a way to prevent a login from listing the tables and columns in a schema? I have to give access to a remote login to query on a single view; however, I also must make sure that such login ...
Silvano González's user avatar
7 votes
1 answer
4k views

Is there any way to prevent a PostgreSQL user to change his/her own password?

I'm administering a PotsgreSQL server and recently I realized that my "nonsuperuser" users have the possibility to change the secure passwords that I assign them for insecure ones. I searched in the ...
ericgcc's user avatar
  • 73
4 votes
4 answers
12k views

See who has access to databases via AD group membership

SharePoint has a button to "Check Permissions". Here you can select a user from Active Directory, and it will magically traverse groups and show you all the access the user has on the site based on ...
SomeGuy's user avatar
  • 2,053
6 votes
1 answer
751 views

How to GRANT object permission to a user defined server role?

I want to create logins that are granted permission to access all user databases view all definitions select all records of all tables To me it seems to be too much overhead to assign the login to ...
Magier's user avatar
  • 4,807
0 votes
1 answer
25 views

Calling Sproc From Another Server - runs as SA

I have a sproc on ServerA that calls another sproc on ServerB The servers are connected through linked server. When the sproc gets called on ServerA it is called by the user login. However, then on ...
K09's user avatar
  • 1,414
1 vote
2 answers
876 views

Server role with permission only to create server login, not alter one

I am working with Microsoft SQL Server Management Studio and I want to create a server role that has permissions to create server login but only create, not alter! Does anyone know what is the ...
Robert's user avatar
  • 133
3 votes
1 answer
2k views

Cannot delete domain login from SQL SERVER 2012

We are in the process of trying to clean up some old accounts on one of our AlwaysOn clusters. This particular account refuses to play nice and allow itself to be deleted. USE [master] GO DROP ...
Geoff Dawdy's user avatar
  • 1,133
2 votes
1 answer
2k views

Permissions for SSIS/SQL Server agent jobs for multiple user groups

What permissions should I use for Active Directory groups to be able to deploy and then run/schedule their own jobs only? For example, I have 3 folders in the Integration Services catalog. Dept_A, ...
SomeGuy's user avatar
  • 2,053
2 votes
2 answers
2k views

Audit Plugin on Ubuntu: CONTROL [main] Failed global initialization: FileNotOpen: Failed to open "/path" : exit status 1

We use MongoDB 3.2.11 and try to enable Audit. New in version 2.6. MongoDB Enterprise includes an auditing capability for mongod and mongos instances. The auditing facility allows ...
Sybil's user avatar
  • 2,558
3 votes
1 answer
4k views

Deny dbo schema permission

I'm trying to deny all permissions on the dbo schema for a particular user, as I only want that user to access a specific schema. When I try the following (using sa): DENY CONTROL, ALTER ON SCHEMA :: ...
Amy Barrett's user avatar
6 votes
1 answer
1k views

Avoiding Sysadmin Rights

I'm going to start off apologizing since this is my first post and looking at other questions they don't quite match my own situation, also I'm a SysAdmin, not a DBA so my understanding of SQL is ...
Mark's user avatar
  • 61
5 votes
3 answers
2k views

Giving Special Permissions to a Stored Procedure in SQL Server

I have a restricted database (that contains confidential data) called database B with only a couple of users with access to it. However, I need some select data from a couple of tables within B to be ...
BeginnerDBA's user avatar
16 votes
2 answers
65k views

SQL Server : which role grants permission to execute all stored procedures?

Which database role membership grants permission to execute all existing stored procedures in SQL Server 2012? I tried adding a user to each of them and am still unable to execute a stored procedure. ...
Hikari's user avatar
  • 1,573
2 votes
3 answers
174 views

Restrictions on user-defined queries

I have a client that wants me to implement a webpage that allows users to enter custom queries in a text box so they can directly query the SQL Server database. I am concerned about users entering ...
hershmans's user avatar
3 votes
1 answer
922 views

What is the difference between membership and securables? Does one override the other?

When setting permissions for a database user, what is the difference between 'Membership' and 'Securables'? From what I've read in the MSDN documentation (Securables and Database-Level Roles), I ...
Amy Barrett's user avatar
4 votes
3 answers
6k views

Execute xp_cmdshell as a non-windows user

So I have a bunch of database users who should be able to execute a procedure with a call to xp_cmdshell. They are not windows domain accounts, they are just sql-server logins. I want to do it using a ...
PacoDePaco's user avatar
0 votes
2 answers
73 views

SharePoint Database Creation Failure

I wonder if this question will need to be moved to the SharePoint SE site, but I believe this could be a simple a SQL Server security fix. A little back story: Back in April we upgraded our ...
AKDiscer's user avatar
  • 1,385
3 votes
1 answer
2k views

Postgres permission for EXPLAIN

I would like to give user a permission to perform EXPLAIN but not to execute the SELECT itself. Is this doable in PostgreSQL?
bpiec's user avatar
  • 155
2 votes
3 answers
39k views

Grant permissions to a user to grant select to specific tables in several schemas in Oracle

I administer a small datawarehouse in Oracle. My user dwhmanager was given the SELECT ANY TABLE privilege: GRANT SELECT ANY TABLE TO dwhmanager WITH ADMIN OPTION; The idea was to have the ability to ...
Craig Stevensson's user avatar
3 votes
1 answer
143 views

How keep overview about database permissions?

As DB-Administrator I need to keep overview about my servers and databases in general - and from a security context about logins, users, db-roles and permissions in particular. It is possible to ...
Magier's user avatar
  • 4,807
0 votes
1 answer
106 views

secure specific tables in Data Warehouse

I'm newbie in this domain, I have a project that aim to create java application (Desktop Application) to manage roles based on users profile in a data warehouse. The thing that I'm not able to ...
Bilal's user avatar
  • 109
3 votes
1 answer
85 views

Granting only SELECT permissions on specific views to a specific user

I have landed in a scenario were I have to let a user inside a database which is not his. Hence I want to make sure that he is only able to SELECT from the views that I deem he can read from. I have ...
MrBonus's user avatar
  • 33
4 votes
1 answer
3k views

Group permissions in postgreSQL not inheriting to table level

I am moving to a group role from a lot of individual users and have one table that needs to have permissions SELECT, INSERT only. Lets say I have: user1 user2 newgroup Both of the users are in ...
Snyder's user avatar
  • 43
4 votes
1 answer
14k views

Create Linked Server using Active Directory account

I was able to grant access in MSSQL to an Active Directory group and add a service account to that group. It's working fine, I'm able to use trusted connection to login on that MSSQL using both my ...
Hikari's user avatar
  • 1,573
1 vote
1 answer
2k views

Deny users permission to create tables in master

I have noticed that I can create tables, schemas, stored procedures etc. the master database. I don't know what is granting this permission. It's annoying, because when we open a *.sql file in SSMS, ...
Hikari's user avatar
  • 1,573
4 votes
2 answers
11k views

Grant Admin to an Active Directory account in SQL Server

I have a SQL Server 2012 instance, and an Active Directory group, which I can add Active Directory users to. I have my personal AD account (MyAccount) and a service account (ServiceAccount) in that ...
Hikari's user avatar
  • 1,573
3 votes
1 answer
620 views

How to set minimal permissions to change SQL Azure Firewall rules

I have a desktop app that connects to SQL Azure database. Some users have dynamic IP addresses, and it is not possible to get them to use fixed addresses. I've written an ASP.NET page hosted on the ...
vkiwi's user avatar
  • 131
0 votes
1 answer
6k views

Why can I drop table when logged in as not owner?

I read that only owner can drop table and no other user may be granted to do so. I created a table with owner postgres and then drop it as another user. What privileges should I revoke to disallow it?...
Vlad's user avatar
  • 445
3 votes
1 answer
2k views

What are the minimal MySQL grants for the debian-sys-maint user?

What are the minimal privileges that debian-sys-maint@localhost needs for the mysql service to work correctly? This answer on ServerFault suggests granting RELOAD only, but this is incorrect, as it ...
augurar's user avatar
  • 141
4 votes
1 answer
2k views

InfluxDB - How can I limit the measures that a user can read by their tags?

I have some data that is collected by several sensors. Some users may own many of these sensors. I want to keep all the measures in a single database in InfluxDB. To differentiate the sensors I ...
David Mendez's user avatar