O'Reilly logo

Microsoft SQL Server 2012 Internals by Bob Beauchemin Kalen Delaney Conor Cunningham, Jonathan Kehayias, Benjamin Nevarez, and Paul S. Randal

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Altering a database

You can use the ALTER DATABASE statement to change a database’s definition in one of the following ways:

  • By changing the name of the database.

  • By adding one or more new data files to the database. If you want, you can put these files in a user-defined filegroup. All files added in a single ALTER DATABASE statement must go in the same filegroup.

  • By adding one or more new log files to the database.

  • By removing a file or a filegroup from the database. You can do this only if the file or filegroup is completely empty. Removing a filegroup removes all the files in it.

  • By adding a new filegroup to a database. (Adding files to those filegroups must be done in a separate ALTER DATABASE statement.)

  • By modifying an existing file in one of ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required