Set the database as read_only

From this article http://msdn.microsoft.com/en-us/library/jj650016.aspx

there is a review:

You pay for every database copy . To avoid additional charges for copies, you can set the database as read-only and export the BACPAC file directly from the database to create a transitionally consistent copy . However, marking the database as read-only locks the database access until the export is complete and the read-only settings are reverted . "

but how can we set the sql azure database to read-only ? Is it possible?

+4
source share
2 answers

You can only read the database with the following query. I'm not sure about loading read-only databases in SQL Azure

Read Only Database

 --USE [master] --GO ALTER DATABASE [TESTDB] SET READ_ONLY GO 

Make read / write database

 --USE [master] --GO ALTER DATABASE [TESTDB] SET READ_WRITE GO 

I got this from SQL_Authority , check it out for more details.

Edit:

USAGE [wizard] will not work in an Azure environment.

You can change the connection to use the [master] database.

+6
source

You can execute the command below by connecting to the database you want to modify / create the database. change database ser read_only | read_write

0
source

Source: https://habr.com/ru/post/1482740/


All Articles