Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Privileges granted to an account or role through the security mechanism of an operating system, database manager or other system.
6
votes
Permissions required to alter a database file
GRANT ALTER ON DATABASE:: joneslocker2 TO username
Below script will help you to find what permissions are assigned at the database level :
SELECT prin. …
4
votes
Copying Db permission between same instance
I use powershell based Sync-DbaSqlLoginPermission
This command syncs SQL login permissions from one server to another including login permissions, roles, database permissions and more. … Or You can use TSQL based Script DB Level Permissions v3 …
5
votes
Accepted
SQL server level permissions
I have used it many times and its a life saver especially when you want to transfer database roles and object permissions from one server to another :
Credit goes to the original writer : Bradley Morris … --Script to Reverse Engineer SQL Server Object User Permissions
--Written By Bradley Morris
--In Query Analyzer be sure to go to
--Query -> Current Connection Options -> Advanced (Tab)
--and set Maximum …
0
votes
How do I identify all super users in SQL Server?
For future readers, if you want to automate this for your entire sql server estate then, I would highly recommend using dbatools - powershell based tool to ease your life working with sql server.
For …
3
votes
Database user permissions: GRANT VIEW DEFINITION but DENY on some object types
You can create a role and then grant / revoke permissions to it. Any user that is a part of the role will inherit the permissions. …
0
votes
Permission required to view a database diagram
As per BOL, an account with database owner dbo privileges is required. More info here.
So, the user who created it, or a member of the db_owner role can open diagrams.
3
votes
Database Tuning Advisor user permissions
From BOL : Permissions Required to Run Database Engine Tuning Advisor
After you install SQL Server, a user who is a member of the sysadmin fixed server role must launch Database Engine Tuning Advisor …
22
votes
SQL Server - granting permissions to an entire schema vs. object?
Once you assign permissions to the role, you can just add users to the role. This way you dont have to manage permissions for individual users. The users inherit permissions granted to role. …
1
vote
Accepted
What is the minimum privilege required to create a full text index?
Just grant permissions to the role. …
3
votes
How to enable a SQL Server 2012 login to create, alter and drop the created databases?
First you have to
Create Login with create database permission. Note that the login cannot drop any databases.
USE [master]
GO
CREATE LOGIN [Kin] WITH PASSWORD=N'somePassw0rd', DEFAULT_DATABASE=[ …
3
votes
Accepted
SQL User Permissions for Continuous Integration via DbUp and Octopus
Assuming you are using SQL Server 2008 and up, A better way of doing is to create a role in the database and grant that role permissions. … You can add users to the role, so they will inherit the permissions of the role.
-- to grant CREATE, ALTER, DROP OBJECTS (tables, procs, functions, views) with ALTER permissions on the schema. …
1
vote
SQL Server CREATE and DROP TABLE Permissions in Stored Procedure Only
GRANT SELECT ON SCHEMA::SchemaA TO SomeRole;
go
If you have many users that are requiring rights to run the stored procedure, its better to create a role and then add users to the role and assign permissions … Check my answer for Setting user permissions for different SQL Server schemas …
3
votes
sa doesn't have permissions to other database through synonyms with the Service Broker
The easiest (quick and dirty solution) but risky in terms of security approach would be to mark the database as TRUSTWORTHY using ALTER DATABASE [your_db_name] SET TRUSTWORTHY ON.
Remember that marki …
2
votes
Accepted
Checking SQL AlwaysOn backup target with fn_hadr_backup_is_preferred_replica, different answ...
You have to GRANT the user view server state and view definition on availability group.
45
votes
Accepted
How to clone a user in SQL Server 2008 R2?
Below script will help you copy/clone permissions of one user to another:
--- To copy permissions of one user/role to another user/role. … to copy the permissions from
SET @NewUser = 'userNEW' --The user or role to which to copy the permissions to
SELECT 'USE' + SPACE(1) + QUOTENAME(DB_NAME()) AS '--Database Context'
SELECT '--Cloning …