surfriderfoundationeurope / plasticorigins-ops-db

Database management (access, code, etc)
MIT License
1 stars 1 forks source link

Create an user for PowerBI reports #1

Open cmaneu opened 4 years ago

cmaneu commented 4 years ago

Asked by Nicolas Charles (Microsoft). Create a readonly user for dev-trashroulette-database.windows.net, database dev-trashroulette.

cmaneu commented 4 years ago
CREATE LOGIN surfriderreport
    WITH PASSWORD = '34f80b80-5d59-4af4-840c-6282b5e9eb33' 
GO

USE dev-trashroulette
GO

CREATE USER surfriderreport
    FOR LOGIN surfriderreport
    WITH DEFAULT_SCHEMA = dbo
GO

-- Add user to the database owner role
EXEC sp_addrolemember N'db_datareader', N'surfriderreport'
GO
ChristopheHvd commented 4 years ago

Merci pour le script du coup ;) Tu sais si on a d'autres user à créer?