Skip to content

Commit a63bd05

Browse files
committed
2 parents e1a28ab + d2382a0 commit a63bd05

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

README.md

+13-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# SQL Server Database Restore
2-
Standardized database restore, doing some of pre-restore checks and post-restore configurations with restored databse. Doing also refresh of Availability Group databases, means restores into databases that are part of Availability Group and joining them back. More detailed info within [documentation file](docs/SQL%20Server%20Database%20Restore%20-%20documentation.pdf).
2+
Standardized database restore, doing some of pre-restore checks and post-restore configurations with restored databse. Doing also refresh of Availability Group databases, means restores into databases that are part of Availability Group and joining them back. Since v1.3 there is also possiblity to preserve permissions settings, which means that custom database roles and users are kept from original database including: user mapping, owned schemas, database roles, explicit permissions on securables and extended properties. More detailed info within [documentation file](docs/SQL%20Server%20Database%20Restore%20-%20documentation.pdf).
33

44
Table of contents:
55
* [Technical preview](#technical-preview)
@@ -51,6 +51,16 @@ EXEC [master].[dbo].[RestoreDatabase]
5151
```
5252
*@CheckModel parameter available since v1.2
5353

54+
### Restore of database preserving permissions settings*
55+
```
56+
EXEC [master].[dbo].[RestoreDatabase]
57+
@BackupFile = N'\\Path\To\BackupFile\Backup.bak',
58+
@Database = N'TestDB',
59+
@LogToTable = 'Y',
60+
@PreservePermissions = 'Y'
61+
```
62+
*@PreservePermissions parameter available since v1.3
63+
5464
### Restore of database that is joined in Availability Group
5565
```
5666
EXEC [master].[dbo].[RestoreDatabase]
@@ -86,8 +96,9 @@ I’m assuming only following possible issues:
8696
And some other possible problems can be related to OH stuff in the solution so, please be so kind and try to check this FAQ https://ola.hallengren.com/frequently-asked-questions.html first before asking me directly.
8797

8898
## Versions
89-
* v1.1 - first sharable tested solution major bugs fixed
99+
* v1.3 - added possiblity to preserve original database permissions settings inlcuding custom roles and users with all securables (RestoreDatabase stored procedure)
90100
* v1.2 - added possiblity to set autogrowth for restored database based on model database settings (RestoreDatabase stored procedure)
101+
* v1.1 - first sharable tested solution major bugs fixed
91102

92103
## Reporting issues
93104

0 commit comments

Comments
 (0)