Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Commit 07dea61

Browse files
authored
Merge pull request #5834 from simonsabin/patch-8
Make it a easier to know what to run
2 parents 65aa239 + 8a396df commit 07dea61

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

docs/relational-databases/replication/administration/enable-coordinated-backups-for-transactional-replication.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ ms.author: "mathoma"
2626

2727
### To enable coordinated backups for a database published with transactional replication
2828

29-
1. At the Publisher, use the [DATABASEPROPERTYEX (Transact-SQL)](../../../t-sql/functions/databasepropertyex-transact-sql.md) function to return the **IsSyncWithBackup** property of the publication database. If the function returns **1**, coordinated backups are already enabled for the published database.
29+
1. At the Publisher, use the `SELECT DATABASEPROPERTYEX(DB_NAME(),'IsSyncWithBackup')` [DATABASEPROPERTYEX (Transact-SQL)](../../../t-sql/functions/databasepropertyex-transact-sql.md) function to return the **IsSyncWithBackup** property of the publication database. If the function returns **1**, coordinated backups are already enabled for the published database.
3030

3131
2. If the function in step 1 returns **0**, execute [sp_replicationdboption (Transact-SQL)](../../../relational-databases/system-stored-procedures/sp-replicationdboption-transact-sql.md) at the Publisher on the publication database. Specify a value of **sync with backup** for **\@optname**, and **true** for **\@value**.
3232

@@ -43,4 +43,20 @@ ms.author: "mathoma"
4343

4444
1. At either the Publisher on the publication database or at the Distributor on the distribution database, execute [sp_replicationdboption (Transact-SQL)](../../../relational-databases/system-stored-procedures/sp-replicationdboption-transact-sql.md). Specify a value of **sync with backup** for **\@optname** and **false** for **\@value**.
4545

46+
## Examples
4647

48+
### A. Retrieve the `IsSyncWithBackup` property for the current database
49+
50+
This example returns the `IsSyncWithBackup` property for the current database:
51+
52+
```sql
53+
SELECT DATABASEPROPERTYEX(DB_NAME(),'IsSyncWithBackup')`
54+
```
55+
56+
### B. Retrieve the `IsSyncWithBackup` property for a specific database
57+
58+
This example returns the `IsSyncWithBackup` property for the database `NameOfDatabaseToCheck`:
59+
60+
```sql
61+
SELECT DATABASEPROPERTYEX('NameOfDatabaseToCheck','IsSyncWithBackup')`
62+
```

0 commit comments

Comments
 (0)