Files
TriunniaLabs.Arch.Sample/support/SqlServer.SetupUser.sql
T

17 lines
463 B
Transact-SQL

-- 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