Creating an Azure SQL Database via PowerShell
This post is about using the brilliance of PowerShell to script the creation of databases in Azure.
Background:
Apart from the obvious question...
2017-05-11 (first published: 2017-04-30)
1,365 reads
This post is about using the brilliance of PowerShell to script the creation of databases in Azure.
Background:
Apart from the obvious question...
2017-05-11 (first published: 2017-04-30)
1,365 reads
Another post for me that is simple and hopefully serves as an example for people trying to get blogging as...
2017-05-11
582 reads
I’m a big fan of dynamic SQL. In the past I’ve written a How to, a Best Practices and even...
2017-05-11
629 reads
Dear all,Being a DBA, developers approach me with questions like can you run this query for me in production?Select *
FROM
[dbo].[FactInternetSales]
WHERE UnitPrice = 32.6
Lets, say the table contains...
2017-05-11
45 reads
Dear all,Being a DBA, developers approach me with questions like can you run this query for me in production?Select *
FROM
[dbo].[FactInternetSales]
WHERE UnitPrice = 32.6
Lets, say the table contains...
2017-05-11
5 reads
Yesterday was the first day to submit sessions for the PASS Summit 2017 in Seattle on Oct 30th thru Nov 3rd. Oct 30th and 31st are for pre-conference sessions...
2017-05-11
6 reads
Yesterday was the first day to submit sessions for the PASS Summit 2017 in Seattle on Oct 30th thru Nov...
2017-05-11
547 reads
As you all have heard, Microsoft is supporting Linux as a supported operating system for the next version of SQL...
2017-05-11
756 reads
Have you heard of SQLskills? Have you heard of the waits library? If not then where have you been hiding?...
2017-05-11
363 reads
Last week I was having an issue with a SQL install within a container and to fix I needed to...
2017-05-10
2,114 reads
If you’ve been watching AI roll through the data community and thinking, “this seems...
By Arun Sirpal
Not every production incident is a database in RECOVERY_PENDING or a corrupted event (like...
It is Friday, the queries are running, and nobody is watching the bill. That...
Comments posted to this topic are about the item SQL Art, Part 4: Happy...
Hi All I am trying to find 'bad' characters that users might type in....
Comments posted to this topic are about the item Extreme DAX: Take your Power...
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