add sql server setup user support script
This commit is contained in:
1 parent
78e4b74337
commit
b094852e1f
1 file changed
+17
@@ -0,0 +1,17 @@
|
|||||||
|
-- Create a user in the specified database, associate it with the login,
|
||||||
|
-- and grant permission to it to create tables, read and write records.
|
||||||
|
|
||||||
|
-- Change the database and the user as required.
|
||||||
|
|
||||||
|
USE ArchControlPanel;
|
||||||
|
GO
|
||||||
|
CREATE USER archdemo FOR LOGIN archdemo;
|
||||||
|
GO
|
||||||
|
ALTER USER archdemo WITGH DEFAULT_SCHEMA = dbo;
|
||||||
|
GO
|
||||||
|
ALTER ROLE [db_owner] ADD MEMBER archdemo;
|
||||||
|
GO
|
||||||
|
ALTER ROLE [db_datareader] ADD MEMBER archdemo;
|
||||||
|
GO
|
||||||
|
ALTER ROLE [db_datawriter] ADD MEMBER archdemo;
|
||||||
|
GO
|
||||||
Reference in new issue
Block a user