TIL: Get-DbaErrorLog
Ed: SQLDork is a Junior DBA on the team here, learning the DBATools in addition to normal DBA stuff™ Today’s dbatools command is Get-DbaErrorLog, which is very similar to...
2020-05-29
32 reads
Ed: SQLDork is a Junior DBA on the team here, learning the DBATools in addition to normal DBA stuff™ Today’s dbatools command is Get-DbaErrorLog, which is very similar to...
2020-05-29
32 reads
Today’s dbatools command: Measure-DbaBackupThroughput This one’s a smaller command, but that doesn’t mean it’s without use. If you need information on backup speeds (throughput) or early warning of possible...
2020-05-26
29 reads
Microsoft Data Platform and PowerShell MVP, Chrissy Lemaire (b|t) sat down with us in the virtual studio Saturday, and we had a blast getting to know her! Quotables: “This...
2020-05-28 (first published: 2020-05-18)
326 reads
Another blog post, another dbatools command. Today’s command: Get-DbaAgentJobHistory Basic command, gets all the job history info and pipes it to gridview, because there’s a LOT of info here....
2020-05-14
58 reads
(This post comes from one of our Junior DBAs – @SQLDork) I’ve been learning dbatools over the past week or so, you can read the previous blog posts here...
2020-05-06
27 reads
(This post comes from one of our Junior DBAs – @SQLDork) If you haven’t read it already, i recently wrote a blogpost where i go over Backup-DbaDatabase, you can...
2020-04-29
28 reads
(This post comes from one of our Junior DBAs – @SQLDork) I’m learning how to use dbatools. Today’s command: Backup-DbaDatabase I’m using the 64-bit PowerShell ISE (running as administrator),...
2021-04-26 (first published: 2020-04-27)
540 reads
20+ year Oracle DBA Mary Elizabeth stopped by the Data Bits virtual studio today! Quotables: “Corona Curls”, “rolling around in the food” and “Capitalist Pirate” You can reach Mary...
2020-04-24
21 reads
My Pluralsight course for new SQL Server DBAs Problem: My client asked me for a way to automate test restores and CheckDB either ad hoc or on a schedule,...
2020-04-29 (first published: 2020-04-23)
517 reads
SQL DBA Peter Shore (t) and I had a great time recording this. Quotables: “Vehemently OK”, “Intentional Accidental DBA”, “Professional Nerd”, “Senior DBA as defined by AARP” I cut...
2020-04-13
26 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