Deploy Security Changes with Copy-SqlLogin
Moving security changes between server instances can be a cumbersome process, but it doesn't need to be with the PowerShell cmdlet, Copy-SqlLogin.
2016-11-01
2,300 reads
Moving security changes between server instances can be a cumbersome process, but it doesn't need to be with the PowerShell cmdlet, Copy-SqlLogin.
2016-11-01
2,300 reads
A major difficulty for a System Administrator who wishes to provide access for auditors, Helpdesk staff, developers and other IT people is that adminstrator roles give users more access than they need. It is too easy to make mistakes, or to make more changes than those that were signed-off. With JEA, it is possible to create role-based access control (RBAC) endpoints that define precisely what actions you’ll let your users carry out without needing a elevated, privileged administrator credentials, and which log and report all operations.
2016-10-19
3,276 reads
Desired State Configuration (DSC) allows you to automate the way that you manage configuration data for software services as well as the environment in which these services run. DSC uses a set of built-in and custom 'resources' as the building blocks for a configuration. If you have specific requirements you may need to create the relevant resource to make the configuration happen. Nicolas Prigent provides a practical guide to DSC resources.
2016-09-27
3,764 reads
Use Powershell to troubleshoot SQL connectivity issues. A way to monitor up-time and connectivity of a SQL server database with some simple Powershell commands.
2016-09-22
3,048 reads
To demonstrate that dynamic modules in PowerShell can be used to easily create objects with methods and properties, Phil Factor implements an expression analyser written in PowerShell, using a variation of Dijstra's Shunting Algorithm.
2016-09-16
5,804 reads
Learn how to use the login commands included with SSMS2016 from PowerShell.
2016-09-01
3,431 reads
Tim Smith shows how you can use PowerShell to automate a simple comparison of objects such as stored procedures, views, and fucntions.
2016-08-17
3,933 reads
The Pull mode of Desired State Configuration (DSC) is more complicated to implement because you need to meticulously manage the MOF files and their naming conventions so as to ensure that you deploy your DSC configurations correctly. In this first article of a two-part series, Nicolas Prigent describes how you can best automate this, and then in a second part on monitoring DSC he describes techniques to help you to use the pull mode as a regular part of your admin work.
2016-07-22
3,368 reads
Capture Linux Drive Space data with Powershell using Posh-SSH module
2016-07-19 (first published: 2016-07-06)
1,271 reads
A number of new SQL Server PowerShell cmdlets have been released and the Microsoft is asking for feedback on what else you'd like to see.
2016-07-01
1,219 reads
It is Friday, the queries are running, and nobody is watching the bill. That...
By Steve Jones
Annabel retired from Redgate Software this week. Across most of my career at Redgate,...
By Tim Radney
As a SQL Server DBA with years of experience tuning production environments, I’ve seen...
Comments posted to this topic are about the item What is the Cloud?
Comments posted to this topic are about the item Changing the Schema
Comments posted to this topic are about the item Index Fragmentation Explained: Page Splits,...
I set up a few users on my SQL Server 2022 instance.
CREATE LOGIN User1 WITH PASSWORD = 'Demo12#1' CREATE USER User1 FOR LOGIN User1 GO CREATE LOGIN User2 WITH PASSWORD = 'Demo12#2' CREATE USER User2 FOR LOGIN User2 GO CREATE LOGIN User3 WITH PASSWORD = 'Demo12#3' CREATE USER User3 FOR LOGIN User3 GOI then created a schema that one of them owned. Under this schema, I added a table with some data.
CREATE SCHEMA MySchema AUTHORIZATION User1
GO
CREATE TABLE Myschema.MyTable(myid INT)
GO
INSERT MySchema.MyTable
(
myid
)
VALUES
(1), (2), (3)
GO
SELECT * FROM MySchema.MyTable
GO
I granted rights and verified that User2 could access this table.
GRANT SELECT ON Myschema.MyTable TO User2 GO SETUSER 'USER2' GO SELECT * FROM MySchema.MyTable GOThis worked. Now, I move this schema to a new user.
ALTER AUTHORIZATION ON SCHEMA::Myschema TO User3; GOWhat happens with this code?
SETUSER 'USER2' GO SELECT * FROM MySchema.MyTable GOSee possible answers