Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Request to increase size of all db's on server

Author  Topic 

Malik_Alamin
Starting Member

3 Posts

Posted - 2010-04-12 : 14:10:06
I've received a request to increase the size of all db's on the server by 10%. Is this possible with a script?

Thanks

Malik

DBA in the making
Aged Yak Warrior

638 Posts

Posted - 2010-04-12 : 15:16:06
Here's a script to do it for a single database. You could use copy and paste to create one for each database, or you could use the system tables to generate a dynamic SQL script.

USE [master]
GO
ALTER DATABASE [AdventureWorks] MODIFY FILE
( NAME = N'AdventureWorks_Data', SIZE = 512000KB )
GO

------------------------------------------------------------------------------------
Any and all code contained within this post comes with a 100% money back guarantee.
Go to Top of Page
   

- Advertisement -