MSSQL: mudanças entre as edições
Ir para navegação
Ir para pesquisar
(Criou página com '=Basic Commands= <syntaxhighlight lang=sql> -- Create LOGIN CREATE LOGIN readonlylogin WITH password='1231!#ASDF!a'; -- Create USER CREATE USER readonlyuser FROM LOGIN readon...') |
Sem resumo de edição |
||
Linha 9: | Linha 9: | ||
-- ADD ROLE MEMBER | -- ADD ROLE MEMBER | ||
EXEC sp_addrolemember 'db_datareader', 'readonlyuser'; | EXEC sp_addrolemember 'db_datareader', 'readonlyuser'; | ||
-- CREATE USER WITHOUT LOGIN | |||
CREATE USER readonlyuser WITH PASSWORD = '1231!#ASDF!a'; | |||
</syntaxhighlight> | </syntaxhighlight> |
Edição das 19h23min de 13 de outubro de 2021
Basic Commands
-- Create LOGIN
CREATE LOGIN readonlylogin WITH password='1231!#ASDF!a';
-- Create USER
CREATE USER readonlyuser FROM LOGIN readonlylogin;
-- ADD ROLE MEMBER
EXEC sp_addrolemember 'db_datareader', 'readonlyuser';
-- CREATE USER WITHOUT LOGIN
CREATE USER readonlyuser WITH PASSWORD = '1231!#ASDF!a';