简体   繁体   中英

modify file max size in Azure SQL Database

I am using this query:

ALTER DATABASE [{'DB_NAME'}] MODIFY FILE ( NAME = [{'DB_NAME'}_log], MAXSIZE=UNLIMITED)

in SQL Server and all works fine, now I want to use Azure SQL Database and I am getting this error:

Msg 5008, Level 16, State 2, Line 2
This ALTER DATABASE statement is not supported. Correct the syntax and execute the statement again. 

how can I modify MAXSIZE in Azure SQL Database

SQL Azure databases are a whole different ballgame. They are managed (and optimized) by the cloud provider (Microsoft Azure), so you're "not in charge of the MAXSIZE". Of course, since you're the one paying, there is some level of control you have, but not on this level.

You can only change the max size of a SQL Azure database by moving to another pricing tier . You can find more information on pricing tiers and their (included) storage over here (for your scenario, select Single Database):SQL Database pricing

Edit:

Some more information (taken from the Azure SQL Database Support Blogpost Azure SQL DB MAXSIZE – what can I do with that? ):

Azure SQL DB max size is limited by the pricing tier for each DB.

For instance Basic is limited by 2GB, Standard by 250GB, and Premium by 500GB per database.

You can also set your own limit while it's lower or equal to the level max size and if this is in the list of available sizes .

And

  • Database size can be set to lower limit than the tier max size
  • If custom size has been set, it will not be changed when you upscale / downscale the database and you must change that manually.

For Azure SQL Database, use the script below instead.

ALTER DATABASE [DATABASENAME] MODIFY (MAXSIZE = 30 GB);
GO

Also refer to Rick's reply for MAXSIZE limitations.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM