Reputation: 51
From this article http://msdn.microsoft.com/en-us/library/jj650016.aspx
there's a note tip:
You are charged for each
database copy
. To avoid additional charges for the copies, you can set the database asread-only
, and export aBACPAC file
directly from thedatabase
to create atransitionally consistent copy
. However marking thedatabase
asread-only
locks the database access until the export is complete
andthe read-only settings are reverted
."
but how we can set the sql azure database to read-only
?
Is it possible?
Upvotes: 5
Views: 7192
Reputation: 6180
You can make database read only by using the following query. I am not sure about the charging of Read-Only Data bases in SQL Azure
Make Database Read Only
--USE [master]
--GO
ALTER DATABASE [TESTDB] SET READ_ONLY WITH NO_WAIT
GO
Make Database Read/Write
--USE [master]
--GO
ALTER DATABASE [TESTDB] SET READ_WRITE
GO
I got this from the SQL_Authority, check the same for more details.
Edit:
USE [master] will not work in Azure Environment.
You can change connection to use [master] database.
Upvotes: 11
Reputation: 1022
You can execute below command by connecting to the database you want to modify / master database. alter database ser read_only | read_write
Upvotes: -1