Site sponsored by: Idera The gold standard of SQL Server performance monitoring & diagnostics.
SQL Server Performance

  • Home
  • Articles
  • Forums
  • Tips
  • Quiz
  • FAQ's
  • Blogs
  • Software
  • Books
  • About Us
RSS Feeds
Sign in | Join


Article Topics

All Articles
Performance Tuning
Audit
Business Intelligence
Clustering
Reporting Services
Developer
General DBA
ASP.NET / ADO.NET

Write for Us

Share your SQL Server knowledge with others and raise your profile in the community More...
Latest Articles

Recover Data Using Database Snapshots
Analyze and Fix Index Fragmentation in SQL Server 2008
Powerful Geographical Visualisations made easy with SQL 2008 Spatial (Part 2) ...
Backup User Databases Using a Maintenance Plan

More     
 
Latest FAQ's

How to alter a User Defined Data Type?
How to unzip a File in SSIS?
How to view previous query plans?
ALTER TABLE SWITCH statement failed because the object '%.*ls' is not ...

More     
   
Latest Software Reviews

Spotlight on ApexSQL Doc 2008
ApexSQL Enforce
Embarcadero Change Manager
SQL Server DBA Dashboard

More     

articles >> general dba >> Fast Database File Creation for Large Databases ...

Fast Database File Creation for Large Databases in SQL Server 2005

By : Mohamed Hassan
Jul 06, 2008

The time needed for creating large and very large database can often take many minutes.  SQL Server 2005 has a new feature called Instant File Initialization (IFI) that can speed up the data file initialization of a database.

Database File initialization
The pages in the Data and Log files are initially filled with zeros when one of the following database tasks is performed:

  • CREATE DATABASE
  • Creating the TEMPDB database at service startup
  • Autogrow of databases activity (including TEMPDB)
  • RESTORE DATABASE from backup media
  • ALTER DATABASE…MODIFY FILE

 

The filling zero process can affect the performance of SQL Server. SQL Server 2005 has a new feature called Instant File Initialization (IFI). This feature skips zeroing out of the data pages. Instant File Initialization reduces the time during the creation of large and very large databases.

When installing SQL Server 2005, the login account of the service, by default, runs under the Local System account. Microsoft recommends that DBA's use a named Windows user (in the case of workgroup environment) or using a domain user account whe the server is a member of domain.

By default these accounts do not have the right "Perform Volume Maintenance Tasks". In other words, the SQL Server service login account isn't granted the security policy "SE_MANAGE_VOLUME_NAME". As a result SQL Server can't perform instant initialization and perform the filling zero process during database file creation which can take a long time.

Enabling Instant Data File Initialization
Instant initialization is only used for data files (not log files). This feature is available only on Microsoft Windows XP, Windows Server 2003 or later versions. Members of the Windows Administrator group have this right and can grant it to other users by adding them to the Perform Volume Maintenance Tasks security policy.

Configuring a SQL 2005 service Account to Enable Instant File Initialization

 

  1. Log into the SQL Server 2005 machine using an account with administrative privileges.
  2. Determin the SQL Server 2005 service account name . You can get the account name from the services applet or from SQL Server Configuration Manager:
  • Click Start, Microsoft SQL Server 2005, Configuration Tools, SQL Server Configuration Manager
  • Click SQL Server 2005 Services. The services will be displayed in the right pane
  • Double-click the SQL Server service, the SQL Server (MSSQLSERVER) properties window is displayed (the service may be with other name, if you use a named service)

  • In the login tab, you will find the login account name
  • Click Start, select Settings and click Control Panel
  • In Control Panel, double-click Administrative Tools
  • In Administrative Tools, double-click "Local Security Settings"
  • In Local Security Settings window, expand Security Settings, and then expand Local Policies
  • Select the User Rights Assignment folder. The policies will be displayed in the right pane
  • In the right pane, select Perform Volume Maintenance Tasks


    Next Page>>    








Home | Peformance Articles | Audit Articles | Business Intelligence Articles | Clustering Articles | Developer Articles | Reporting Services Articles | DBA Articles | ASP.NET / ADO.NET Articles | DBA FAQ's | Developer Peformance FAQ's | DBA Peformance FAQ's | Developer FAQ's | Clustering FAQ's | Error Messages | Audit Tool Reviews | Backup Tool Reviews | Coding Tool Reviews | Compare Tool Reviews | Documentation Tool Reviews | Design Tool Reviews | Monitoring Tool Reviews | Log Tool Reviews | Reporting Tool Reviews | Clustering Tool Reviews | Security Tool Reviews | Change Management Tool Reviews | Remote Access Tool Reviews | Book Reviews | Security Tool Reviews | QDPMA Performance Tuning | ADO.NET / ASP.NET | Administration | Analysis/OLAP Services | Application Development | Configuration | Components | ETL | Hardware | High Availability | Hints | Index | Misc | Operating Systems | Performance Tuning | Replication | T-SQL | Views


              © 1999-2008 by T10 Media. All rights reserved