mirror of
https://github.com/Microsoft/sql-server-samples.git
synced 2025-12-08 14:58:54 +00:00
Merge pull request #87 from DRediske/master
Modified backpac to explicitly include permissions in setup script
This commit is contained in:
@@ -32,6 +32,7 @@ This project has adopted the [Microsoft Open Source Code of Conduct](http://micr
|
||||
1. Clone/Download the repository
|
||||
2. While connected to your database (master) via SSMS, execute [Create-Application-Login.sql](tsql/Create-Application-Login.sql) link.
|
||||
+ You should change the default password in the script before running it.
|
||||
+ This script also modifies the permissions of the `ContosoClinicApplication` user
|
||||
3. Import the *Clinic* database
|
||||
+ Open SSMS and connect to your SQL Server 2016 instance (or Azure SQL Database instance)
|
||||
+ In SSMS, right-click on *Databases* in Object Explorer and select *Import Data-tier Application...*.
|
||||
|
||||
Binary file not shown.
@@ -1,3 +1,9 @@
|
||||
-- Create a non-sysadmin account for the application to use
|
||||
CREATE LOGIN ContosoClinicApplication WITH PASSWORD = '{Some Strong Password}'
|
||||
CREATE LOGIN [ContosoClinicApplication] WITH PASSWORD = <enter a strong password here>
|
||||
CREATE USER [ContosoClinicApplication] FOR LOGIN [ContosoClinicApplication]
|
||||
EXEC sp_addrolemember N'db_datareader', N'ContosoClinicApplication'
|
||||
EXEC sp_addrolemember N'db_datawriter', N'ContosoClinicApplication'
|
||||
GRANT VIEW ANY COLUMN MASTER KEY DEFINITION TO [ContosoClinicApplication]
|
||||
GRANT VIEW ANY COLUMN ENCRYPTION KEY TO [ContosoClinicApplication]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user