Skip to content

Commit b2fcbaa

Browse files
authored
Merge pull request #6350 from alberto-morillo/patch-2
Update databasepropertyex-transact-sql.md
2 parents b1d7076 + a87e9e8 commit b2fcbaa

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

docs/t-sql/functions/databasepropertyex-transact-sql.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,14 @@ Collation Edition ServiceObjective MaxSizeInBytes
144144
---------------------------- ------------- ---------------- --------------
145145
SQL_Latin1_General_CP1_CI_AS DataWarehouse DW1000 5368709120
146146
```
147+
148+
### C. Use DATABASEPROPERTYEX to verify connection to replica
149+
When using Azure SQL Database read the scale-out feature, you can verify whether you are connected to a read-only replica or not by running the following query in the context of your database. It will return READ_ONLY when you're connected to a read-only replica. This way, you can also identify when a query is running on a read-only replica.
147150

151+
```sql
152+
SELECT DATABASEPROPERTYEX(DB_NAME(), 'Updateability');
153+
```
154+
148155
## See also
149156
[ALTER DATABASE (Transact-SQL)](../../t-sql/statements/alter-database-transact-sql.md)
150157
[Database States](../../relational-databases/databases/database-states.md)

0 commit comments

Comments
 (0)