Presents your SQL SERVER E-NEWSLETTER for November 14, 2002 <-------------------------------------------> Develop database creation scripts with these tips Rather than developing databases from scratch each time an implementation of a system is needed, you can create database scripts and have them checked into a version control system. You can then check out the most recent version and modify it according to the current needs. This method helps implement a consistent manner for developing databases and creates a reiterative process that helps other less experienced database administrators get up to speed quickly. Here are a few tips for developing database creation scripts: * Create directories for the data and log files of a database. Place these directories someplace other than under the SQL Server install directories and you will avoid any problems with edition and/or version upgrades and rebuilds. * Create a filegroup other than the PRIMARY filegroup to place all nonsystem information into. Only the system tables should reside on the PRIMARY filegroup to allow for better space allocation. * Make sure the PRIMARY filegroup is not the default filegroup for database objects to be placed on. All user defined database objects should reside within this filegroup. * The filegroup's initial size should be adequate to accommodate the growth of data and avoid the reallocation of space. * Make sure the filegroup's maxsize is not larger than the disk space on the server. If SQL Server requests more space than what is available, it will allocate all the space on the disk, which can cause errors. * It's worth taking the time to figure the maximum size a database can have allocated before disk space is consumed. Make sure you take into account the maximum size of all databases residing on the SQL Server installation. ----------------------------------------