Comments (2)
Looks like this is an issue with Connect-SqlServer generally requiring SA, we can definitely connect to the server with the -RegularUser switch, which wont attempt to enforce this.
There is still some mulling going on around general permissions and how much we want to manage them, I think the current behavior of the command is acknowleding that managing permissions is a PITA.
Going forward, I think we have a few options:
- Continue as usual until someone complains and add additional code
- Make it easier to swap in a regular user and make them deal with the permissions of the user must be sufficient (obviously dealing with errors)
- Code in the understanding of the required permissions to manage this feature, which will be a moving target as newer functions of SQL Server come out, but we could potentially abstract this into its own set of functions.
- ???
I was wondering if you had any opinion on the topic @paschott?
from dbatools.
My opinion is handle the option by just validating if the user has direct sysadmin
privileges via role membership or explicitly granted CONTROL SERVER
. If they do not then just post a warning like:
[Security] The user account in use is not granted elevated privileges to [server name], some actions may fail or error.
I mean look how applications handle it, on average, none of them are going to check if you have permissions and then fail (before taking that action). They are just going to fail after trying it, and in their documentation state what permissions are required for each user that handles whatever process. Microsoft does the same thing for the most part (e.g. SharePoint services, SQL Server install account).
from dbatools.
Related Issues (20)
- Get-DbaWaitStatistic is three years behind the Paul Randall script it copies
- [Copy-DbaCredential] Failed to decrypt credentials HOT 6
- Support Backup/Restore to Amazon S3
- [Set-DbaAgentSchedule] Errors when $null passed for EndDate
- Get-DbaDependency's documentation should say how it finds dependencies HOT 6
- Add option to use a time-period when using Test-DbaBuild HOT 1
- Get-DbaReplArticleColumn: doesn't seem to return any data
- Export-DbaServerRole - Fails on case-sensitive systems HOT 1
- Allow setting the hashing algorithm and expiry date for self-signed certificates in New-DbaComputerCertificate
- New-DbaCredential doesn't respect -ProviderName HOT 3
- Add OutputScriptOnly to Set-DbaSpn HOT 3
- Sync-DbaAvailabilityGroup not to try to copy over MSX agent jobs
- Copy-DbaAgentJob is not migration jobs with operators even though they exist HOT 3
- Versions of included sqlserver DLLs both newer and older than sqlserver module.
- Get-DbaDatabase significantly slower on SQL2022 vs. SQL2016 when executing user is sysadmin HOT 26
- Error copying sql permissions with Copy-DbaLogin when the database user and server user does not match. HOT 4
- Disconnect-DbaInstance does not actually disconnect HOT 2
- Install-DbaInstance Feature MachineLearning(SQL_INST_MR) is not supported on SQL2022 HOT 1
- Copy-DbaDbTableData - Error when attempting to copy tables with a column of datatype Geography
- Backup-DbaDbCertificate and Restore-DbaDbCertificate issue with certificate naming HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dbatools.