Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Add files to filegroups and log for many dbs

By lge,

Purpose: This SP is used to add a logfile and a datafile to each file group in a database or all databases. This is handy when you have a lot of databases and you want to add a new big SAN-disk and stop db expansion on the old disks.
Consider: Avoid running any large updates when you use this SP. I freeze expansion of old databasefiles while adding another 10 MB extra for safety when I set max size (current size plus 10 MB), if someone is adding data anyway.
Performance: Intel 1000 MHz x 2, 2 GB RAM, StorageTek SAN- disks, 500 databases with a total of 220 GB. Added another SAN-disk with 290 GB. Freezing the old files for the 500 databases and adding a logfile, a file for each of the two filegroups took 25 minutes in daytime on a heavily used system.

Total article views: 102 | Views in the last 30 days: 2
 
Related Articles
FORUM

Database

Database

FORUM

Database Sync

Database

FORUM

Database suspect

Database

FORUM
FORUM

Database Synchronization

Database Synchronization

 
Contribute

Join the most active online SQL Server Community

SQL knowledge, delivered daily, free:

Email address:  

You make SSC a better place

As a member of SQLServerCentral, you get free access to loads of fresh content: thousands of articles and SQL scripts, a library of free eBooks, a weekly database news roundup, a great Q & A platform… And it’s our huge, buzzing community of SQL Server Professionals that makes it such a success.

Join us!

Steve Jones
Editor, SQLServerCentral.com

Already a member? Jump in:

Email address:   Password:   Remember me: Forgotten your password?
Steve Jones