Skip to content

Commit 6ccbad0

Browse files
authored
Merge pull request MicrosoftDocs#8999 from MicrosoftDocs/FromPublicRepo
Confirm merge from FromPublicRepo to master to sync with https://github.com/MicrosoftDocs/sql-docs (branch live)
2 parents d12e919 + 7e953d4 commit 6ccbad0

2 files changed

Lines changed: 30 additions & 30 deletions

File tree

docs/database-engine/availability-groups/windows/manually-prepare-a-secondary-database-for-an-availability-group-sql-server.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ This topic describes how to prepare a database for an Always On availability gro
188188
GO
189189
```
190190
191-
5. After you restore the full backup, you must create a log backup on the primary database. For example, the following [!INCLUDE[tsql](../../../includes/tsql-md.md)] statement backs up the log to the a backup file named *E:\MyDB1_log.bak*:
191+
5. After you restore the full backup, you must create a log backup on the primary database. For example, the following [!INCLUDE[tsql](../../../includes/tsql-md.md)] statement backs up the log to the a backup file named *E:\MyDB1_log.trn*:
192192
193193
```
194194
BACKUP LOG MyDB1
@@ -198,7 +198,7 @@ This topic describes how to prepare a database for an Always On availability gro
198198
199199
6. Before you can join the database to the secondary replica, you must apply the required log backup (and any subsequent log backups).
200200
201-
For example, the following [!INCLUDE[tsql](../../../includes/tsql-md.md)] statement restores the first log from *C:\MyDB1.bak*:
201+
For example, the following [!INCLUDE[tsql](../../../includes/tsql-md.md)] statement restores the first log from *C:\MyDB1.trn*:
202202
203203
```
204204
RESTORE LOG MyDB1
@@ -209,15 +209,15 @@ This topic describes how to prepare a database for an Always On availability gro
209209
210210
7. If any additional log backups occur before the database joins the secondary replica, you must also restore all of those log backups, in sequence, to the server instance that hosts the secondary replica using RESTORE WITH NORECOVERY.
211211
212-
For example, the following [!INCLUDE[tsql](../../../includes/tsql-md.md)] statement restores two additional logs from *E:\MyDB1_log.bak*:
212+
For example, the following [!INCLUDE[tsql](../../../includes/tsql-md.md)] statement restores two additional logs from *E:\MyDB1_log.trn*:
213213
214214
```
215215
RESTORE LOG MyDB1
216-
FROM DISK = 'E:\MyDB1_log.bak'
216+
FROM DISK = 'E:\MyDB1_log.trn'
217217
WITH FILE=2, NORECOVERY
218218
GO
219219
RESTORE LOG MyDB1
220-
FROM DISK = 'E:\MyDB1_log.bak'
220+
FROM DISK = 'E:\MyDB1_log.trn'
221221
WITH FILE=3, NORECOVERY
222222
GO
223223
```

docs/relational-databases/security/authentication-access/determining-effective-database-engine-permissions.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ monikerRange: ">=aps-pdw-2016||=azuresqldb-current||=azure-sqldw-latest||>=sql-s
2121

2222
This article describes how to determine who has permissions to various objects in the SQL Server Database Engine. SQL Server implements two permission systems for the Database Engine. An older system of fixed roles has preconfigured permissions. Beginning with SQL Server 2005 a more flexible and precise system is available. (The information in this article applies to SQL Server, beginning with 2005. Some types of permissions are not available in some versions of SQL Server.)
2323

24-
> [!IMPORTANT]
24+
> [!IMPORTANT]
2525
> * The effective permissions are the aggregate of both permission systems.
2626
> * A denial of permissions overrides a grant of permissions.
2727
> * If a user is a member of the sysadmin fixed server role, permissions are not checked further, so denials will not be enforced.
@@ -45,20 +45,20 @@ This article describes how to determine who has permissions to various objects i
4545
## Older Fixed Role Permission System
4646

4747
Fixed Server Roles and Fixed Database Roles have preconfigured permissions that cannot be changed. To determine who is a member of a fixed server role, execute the following query:
48-
> [!NOTE]
48+
> [!NOTE]
4949
> Does not apply to SQL Database or SQL Data Warehouse where server level permission is not available. The `is_fixed_role` column of `sys.server_principals` was added in SQL Server 2012. It is not needed for older versions of SQL Server.
50-
> ```sql
51-
> SELECT SP1.name AS ServerRoleName,
52-
> isnull (SP2.name, 'No members') AS LoginName
53-
> FROM sys.server_role_members AS SRM
54-
> RIGHT OUTER JOIN sys.server_principals AS SP1
55-
> ON SRM.role_principal_id = SP1.principal_id
56-
> LEFT OUTER JOIN sys.server_principals AS SP2
57-
> ON SRM.member_principal_id = SP2.principal_id
58-
> WHERE SP1.is_fixed_role = 1 -- Remove for SQL Server 2008
59-
> ORDER BY SP1.name;
60-
```
61-
> [!NOTE]
50+
> ```sql
51+
> SELECT SP1.name AS ServerRoleName,
52+
> isnull (SP2.name, 'No members') AS LoginName
53+
> FROM sys.server_role_members AS SRM
54+
> RIGHT OUTER JOIN sys.server_principals AS SP1
55+
> ON SRM.role_principal_id = SP1.principal_id
56+
> LEFT OUTER JOIN sys.server_principals AS SP2
57+
> ON SRM.member_principal_id = SP2.principal_id
58+
> WHERE SP1.is_fixed_role = 1 -- Remove for SQL Server 2008
59+
> ORDER BY SP1.name;
60+
> ```
61+
> [!NOTE]
6262
> * All logins are members of the public role and cannot be removed.
6363
> * This query checks tables in the master database but it can be executed in any database for the on premises product.
6464
@@ -100,18 +100,18 @@ Remember that a Windows user might be a member of more than one Windows group (e
100100
### Server Permissions
101101

102102
The following query returns a list of the permissions that have been granted or denied at the server level. This query should be executed in the master database.
103-
> [!NOTE]
103+
> [!NOTE]
104104
> Server-level permissions cannot be granted or queried on SQL Database or SQL Data Warehouse.
105-
> ```sql
106-
> SELECT pr.type_desc, pr.name,
107-
> isnull (pe.state_desc, 'No permission statements') AS state_desc,
108-
> isnull (pe.permission_name, 'No permission statements') AS permission_name
109-
> FROM sys.server_principals AS pr
110-
> LEFT OUTER JOIN sys.server_permissions AS pe
111-
> ON pr.principal_id = pe.grantee_principal_id
112-
> WHERE is_fixed_role = 0 -- Remove for SQL Server 2008
113-
> ORDER BY pr.name, type_desc;
114-
```
105+
> ```sql
106+
> SELECT pr.type_desc, pr.name,
107+
> isnull (pe.state_desc, 'No permission statements') AS state_desc,
108+
> isnull (pe.permission_name, 'No permission statements') AS permission_name
109+
> FROM sys.server_principals AS pr
110+
> LEFT OUTER JOIN sys.server_permissions AS pe
111+
> ON pr.principal_id = pe.grantee_principal_id
112+
> WHERE is_fixed_role = 0 -- Remove for SQL Server 2008
113+
> ORDER BY pr.name, type_desc;
114+
> ```
115115
116116
### Database Permissions
117117

0 commit comments

Comments
 (0)