1
votes

Resizing of a single shard is possible through the Windows Azure database management portal, but there doesn't seem to be any documentation on how to do this programmatically. Is this command available through SQL?

1

1 Answers

1
votes

The only available command is ALTER FEDERATION command. With that command you can SPLIT federations - i.e. making two federations out of one. Or you can DROP federations. Currently there is no single command to perform federation resizing. You can use the ALTER Federation command to achieve your goal, but resizing a Federation would require more than one step. The current approach is to:

  • Copy data from the federation that you want resized to some DB (locally or federation root)
  • Drop the federation
  • Create the federation with new "size"
  • get the data back in

Well this is for, if you would like to change the federation boundary values (top and bottom) for federation key. If you just like to resize in terms of MAX SIZE, you could just ALTER DATABASE syntax. Each federation member is actually a separate SQL Database. You can look at your MASTER DB and look around the following VIEWS to find the exact name of the database behind a federation member:

Once you find, just execute ALTER DATABASE [your_found_federation_member_db_name] MODIFY (MAXSIZE = [1 | 5 | 10 | 20 | 30 … 150] GB).