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

learn more… | top users | synonyms (2)

3
votes
2answers
2k views

Move (Restore) SQL Server 2005 database which does not exist before

I did not ready about this but found out after trying to restore a database from remote server and it wont restore if the database did not exist before. What I would do is create a .bak file ...
3
votes
2answers
2k views

Set permissions on a view

I'm creating a view on a SQL Server 2005 database via SQL Server Management Studio 2008, the view reads from two tables. The view is accessed from a web application and I want users to be able to ...
3
votes
1answer
132 views

How to grant connect and read/write permission to ALL databases?

I want a SQL Server login that can READ, WRITE and View definition on all databases. After doing: USE master; GRANT VIEW ANY Definition TO [a]; It looks like I have to GRANT CONNECT and read/write ...
3
votes
1answer
1k views

Verify if user has read access to a table

I'm developing an ETL, whose extract step must read data from a table. There are times that my user's access to that table is revoked. So, to avoid the ETL failing, before reading the table I must ...
3
votes
2answers
487 views

Restricting Database Access/Functions to User Groups?

We've been having issues with Databases being DROPed or RESTOREd WITH REPLACE with the incorrect backup etc... I'm developing a plan right now on how to restrict access and I have some questions. ...
3
votes
2answers
3k views

How to grant permission to new user created in mysql?

I want to create new user and want to give them specific permission like inset, update and delete. But how to create new user and give them permission i don't know. Any help please.
3
votes
2answers
2k views

Can I delegate SQL Agent rights without granting sysadmin rights?

I'd like to give a user the ability to administer SQL Agent jobs. According to the doc page, I can do this by granting the "appropriate" roles on msdb. I've granted all three SQLAgent% roles, but ...
3
votes
3answers
2k views

SQL Server Permission Denied Error When I'm DBOwner?

So I created an account, gave him dbcreator and securityadmin privileges and then through that account tried to run CREATE TABLE on a database that I had created and now owned, but was getting a ...
3
votes
1answer
245 views

Do not have permission to use 'dbo' when creating a view

I want to create a user with minimal required access to two databases within a server. The user will be used by someone from a third party integrating a Business Intelligence tool into our database. ...
3
votes
1answer
149 views

Prevent explicit insert into serial columns

I want to prevent explicit inserts into serial columns. I have come up to the following trigger: drop table test_table; create table test_table( id bigserial primary key, foobar text ); create or ...
3
votes
2answers
114 views

How can I switch to sa account from guest session in SQL server 2012?

I have a situation where I can log into my server as guest, and see that there is no password on the sa account. However when I try to login as sa with null password over the network it is rejected. ...
3
votes
1answer
264 views

Changing db ownership using a user which can only see the sa

At first, I would like to thank the community for creating such a resourceful forum. I've been using StackOverflow for years, and recently, using dba on SE too and you're great. Most of my questions ...
3
votes
1answer
6k views

Does this mean the 'public' has full select, insert, update, and delete access?

I'm trying to create a new DB user in SQL Server 2008 R2 that can only select from one SQL View. But no matter what I try when I login as this new user I can select from any table. I ran this query: ...
3
votes
1answer
9k views

How to connect multiple users/schemas in Oracle 11g?

I'm almost new user to databases, so I think I'm doing something wrong. I have the database created. I created 3 users, 1 it's an Admin, 2 are just users. I created 2 roles, 1 for the Admin and 2 ...
3
votes
2answers
1k views

User can alter procedures without permission

I have a sql server user that our application is connecting as. The user has been granted db_datareader and db_datawriter as well as Grant Execute on each stored procedure that it needs to use. ...
3
votes
2answers
2k views

Do all users need access to the postgres database in pg_hba.conf?

I was just testing the user creation process in pgAdmin. I have a database db1 for which I want to create a user to be able to connect to it. I want this to be the only database the user can connect ...
3
votes
2answers
218 views

SQL 2005 Permission Precedence

Very simple question - I have two database roles (Basic, Admin). Say I explicitly deny the Basic role from deleting from table A and grant that to the Admin role. If I am a user who is in both ...
3
votes
1answer
3k views

Oracle permission issue

Please see the following statements. My question is, the table t1 was created in the users tablespace, so it will take up some space. But why it can be created before I impose the quota on the users ...
3
votes
1answer
27 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 ...
3
votes
1answer
52 views

Find current owner of custom data type?

In Postgresql, when I try to run ALTER TYPE x ADD VALUE y; on a custom datatype I get an error stating PG::Error: ERROR: must be owner of type x. I know this can be solved by running ALTER TYPE x ...
3
votes
1answer
132 views

Reg: Default Privileges on PostgreSQL Schemas

I have a situation where many users can create database objects across all the available schema. There is a generic user pg_dump_user used for by all the developers to dump the whole database to ...
3
votes
2answers
4k views

Grant permissions on views, deny select on tables

I have a MySQL user and I want it to view ONLY the views I want and not any other table in the database. I've granted this user permissions only on certain views as following: GRANT SHOW VIEW ON ...
3
votes
1answer
2k views

Permission for sequence in another schema

Postgres 9.3 Debian 7.0 I created a specific schema for a specific user and created a view in this schema for this user, so it's the only table he knows that exists. The problem is that this same ...
3
votes
1answer
521 views

With SQL transactional replication, does changing user permissions to a table trigger a new snapshot?

I was hoping to get some help with a SQL Server 2012 transactional replication scenario - or maybe just my understanding of where permissions are stored in SQL server. If I change a users permissions ...
3
votes
1answer
464 views

“Set Password” with a limited user

I'm using MySQL 5.6. I want to have a limited service-user which is able to create/modify the users of my databases. Now my problem is that I can quite figure out what privileges my service-user ...
3
votes
3answers
138 views

SQL Logins in db_owner role on database cannot create stored procedures

I started locking down permissions in our test environment by removing sysadmin permission from generic accounts. The first account, used by several developers, is a local SQL login. I gave the ...
3
votes
1answer
71 views

Effective SQL Server permissions when user is in several AD groups

Using Window Authentication via Active Directory Groups, if an Active Directory user exists in two different Active Directory Groups with different permissions to a database, which Active Directory ...
3
votes
1answer
401 views

Unable to change database owner to a user that is already mapped as user

I ran into this problem. Trying to change a database owner to acct1; however, I get the following error message when doing so: The proposed new database owner is already a user in the database ...
3
votes
1answer
64 views

`chown -R` equivalent for PostgreSQL

We occasionally have the problem that, when upgrading some software and database, inexperienced (or overworked, not excluding myself) sysadmins (we don’t have separate DBAs except for Oracle) run the ...
3
votes
2answers
16k views

Can't start MySQL server because of wrong file permissions?

I'm trying to start the server and then fix the root user by $ mysql -u root mysql $mysql> UPDATE user SET Password=PASSWORD('my_password') where USER='root'; $mysql> FLUSH PRIVILEGES; But ...
3
votes
1answer
263 views

Is it possible to remove useless GRANTS in MySQL

I'm using pt-show-grants to create all my GRANTS on a new server but there's lots of old GRANTS that refer to tables that doesn't exist anymore so I get errors when I try to apply the SQL file on the ...
3
votes
1answer
60 views

How should permissions for anonymous users be modelled?

I'm designing a web application. There will be users who log into the site, but also anonymous, non-authenticated users, i.e. any member of the public who accesses the site. Users will be assigned to ...
3
votes
1answer
1k views

How do you gain access to embedded MySQL database via localhost command line?

We run an application (Windows 2003 server) and would like to have database connectivity -- contacted the company and they do not have any documentation on how to do so. A quick glance at the ...
3
votes
1answer
2k views

How do I install pgcrypto on Windows?

I would like to install pgcrypto in Windows. I have a file C:\Program\PostgreSQL\9.0\share\contrib\pgcrypto.sql but when I try to run it in psql I get an error: C:: Permission denied How do I solve ...
3
votes
1answer
33 views

What permissions are required to return rows from information_schema.schemata?

In postgres (I'm on 9.3.4) what permissions are required to return rows for select * from information_schema.schemata The 9.3 documentation says "are owned by a currently enabled role". Does that ...
3
votes
1answer
47 views

MySQL replication and master users on slave server

Do the users initiating inserts on the master server also have to be on the slave with at least as many permissions for the replicated queries to be correctly executed? My understanding is that you ...
3
votes
1answer
33 views

Select Permissions Multiple Schema

I have an interesting one that I have not had the pleasure of solving before. I have been asked by a client to implement some views for reporting purposes, the views will be accessed via PowerBI, ...
3
votes
1answer
52 views

Why does SQL Server need permissions to access data and log files?

When you want to attach a database, you can open them up if you put those mdf files in a folder such as: C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\ But SQL Server will ...
3
votes
3answers
68 views

Finding out what permissions are required by the SQL Server Agent Jobs

I've been looking at this for a while and I can't work out an easy way to do this. As it stands every job in the database runs under SA level rights (horrifying thought) I'm sure some of the jobs ...
3
votes
1answer
601 views

Domain Admin on AWS lacking user rights to edit the top 200 using the Management Studio interface

I setup an application + SQL Server on AWS. Everything works fine my SQL User can read/write to any table. Now I connected to the SQL Server using my domain admin account using windows authentication ...
3
votes
1answer
41 views

How to allow users to run a function, but not access objects the function is accessing

I have a PL/PgSQL stored procedure that performs various operations on tables (SELECT, UPDATE, INSERT, TRUNCATE). I want users to be able to run the stored procedure, but not themselves perform those ...
3
votes
1answer
210 views

How to create a login and user that can only access one schema in one database

I have executed the following: USE [MyDatabase]; GO CREATE LOGIN [MyDomain\MyAccount] FROM WINDOWS WITH DEFAULT_DATABASE=[MyDatabase]; CREATE USER [MyDomain\MyAccount] FOR LOGIN [MyDomain\MyAccount]; ...
3
votes
1answer
1k views

Confused by GRANT ALL PRIVILEGES ON *.* (…) WITH GRANT OPTION

Normally I manage users on my databases via phpMyAdmin, but since I do everything else in standalone programs such as SQLyog or HeidiSQL, I wanted the ability to manage users remotely from these ...
3
votes
2answers
20k views

CREATE DATABASE permission denied in database 'master'. unable to get the permission

I am making a database in sql server and it shows an error that "CREATE DATABASE permission denied in database 'master'" I am using the administrator log in itself. What i need to do? Please suggest a ...
3
votes
1answer
5k views

Create new Read Only user on DB2 on the whole database

I am an oracle/sql server DBA having limited knowledge in IBM DB2. We have DB2 9.7 fp4 running on AIX 6. I would like to create a new user and grant him READ only privilege on a particular database. ...
3
votes
1answer
1k views

In Postgresql, after pg_dump the access privileges on the database itself are not restored

Suppose user foo owns a database gee, and user foo has granted user bar with all access privileges on database gee gee=> \l List of databases Name | Owner | ...
3
votes
2answers
5k views

SysAdmin server role and Active Directory Groups

I've been struggling to find best practices information or any advice regarding Active Directory Groups that provide group members with the SysAdmin server role. I'm at a new job where I'm the only ...
3
votes
2answers
7k views

How to enable a SQL Server 2012 login to create, alter and drop the created databases?

I'm trying to assign a proper GRANT permission to CI login, that will be able to: Create test DB Alter it Drop this test DB (and only it) But it appears that SQL Server 2012 GRANT CREATE ANY ...
3
votes
1answer
7k views

Login failed for user Error: 18456 State: 10

In one of my vb.net applications I am getting the error Login failed for user 'user'. But the user has full permission (sysadmin). Also this error happens intermittently. Error log has the following: ...
3
votes
1answer
1k views

Even when user has 'bulkadmin' role, query says user does not have role - SQL Server 2012

I am facing a weird issue with SQL Server 2012. I have a user (say RS\sqluser) which has bulkadmin role. Now when i run this query Select IS_SRVROLEMEMBER('bulkadmin', 'RS\sqluser') output is 0. ...