SQL Clone
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in

Set your Warehouse Database to Read Only

In most environments new data is added to the data warehouse daily, weekly or even monthly.  Even further, these changes typically occur during the ETL process.  This means that most of the activity is read only.  As a result, you may be able to set your warehouse database to READ_ONLY.  When you set your database to read only SQL Server does not bother to acquire any locks, meaning that your SELECT statements should never be in conflict with any other activity.  Therefore, you should get better performance because your queries will produce less overhead.

You can set your database to READ_WRITE just before starting your ETL process. Once the process is complete you can set your database back to READ_ONLY.  These steps could be automated as part of your ETL process using a couple of T-SQL statements.  The process would be similar to the following:


ETL Process...


As always, if you have any questions concerning this please email me at pleblanc@pragmaticworks.com.

Talk to you soon,

Patrick LeBlanc, founder SQLLunch.com and TSQLScripts.com

Visit www.BIDN.com, Bringing Business Intelligence to your company 


Posted by Jason Brimhall on 16 February 2010

Nice Suggestion Patrick

Leave a Comment

Please register or log in to leave a comment.