Note:How to Emergency Mode Repair If you execute Emergency Mode Repair to your system's SQL Server user databases,you can use follow Transact-SQL. ("TestDB" is a sample database)
ALTER DATABASE TestDB SET EMERGENCY GO ALTER DATABASE TestDB SET SINGLE_USER GO DBCC CHECKDB ('TestDB',REPAIR_ALLOW_DATA_LOSS) GO ALTER DATABASE TestDB SET ONLINE GO ALTER DATABASE TestDB SET MULTI_USER GO
If you check database state,you see sys.databases.
I'm trying MongoDB,a kind of NoSQL databases now,because we will manage big data some day.NoSQL databases have highly parallelizable instead of a fixed schema and consistency as Releational databases.But NoSQL databases don't have ACID and we must juggle Relational databases and NoSQL databases by purpose.
[My Favorite Books] Follow two books is nice because we can study both business and English.
1.English Presentations The Steve Jobs Way 50 easy phrases to help you be instantly great! by Yoko Ueno This book explains English of Mr.Steve Jobs's presentations easily and we can learn effective phrases.
2.The Voices World Business Innovators by CNN English Express This book is collected CNN's Interviews with persons actively at work in the business world,Mr.Craig Barret, Mr.Bill Gates, Mr.Erick Schmidt etc with listening CD.
Follow two books is my favorite business books.
3.Business Model Generation by Alexander Osterwalder & Yves Pigneur This book is my most favorite book this year and it explains how to improve a business model with many pictures. It explains 6 ways Canvas,Pattern,Design,Strategy,Process,Outlook and Design serves as a good reference for me. It's good to introduce iPad,Wii,Google,Open Source Software,Nespresso etc.
4.How to master your life by Peter Sage This book is introduced five keys to executive of Peter Sage,British young executive. It is easy to understand and I recommend it for self-development.
就職する時にバイブルにしていた「闘うプログラマー ビル・ゲイツの野望を担った男達」(原題:Show Stopper!)の電子書籍を見つけました。 hontoや日経BPストアで手に入ります。 今も紙の書籍を持っていますが、今回この電子書籍も購入してみました。 この本は現在、PCのOSの主流となっているWindows NTの開発ストーリーを開発責任者のデビッド・カトラー(David Neil Cutler)を中心に描いたものです。カトラー以外にも多数の個性豊かなプログラマーやビル・ゲイツ(William Henry Gate III))、スティーブ バルマー(Steven Anthony Ballmer)、ネイサン・ミアボルド(Nathan Paul Myhvold)といった当時のマイクロソフトのスター達も登場します。 Windows NTは1994年に最初の3.1がリリースされた後、成長を続け、2012年となった今年にはWindows 8としてニューバージョンがリリースされます。 そして最近になってカトラーはマイクロソフトで次世代Xbox開発チームにいるという話が飛び込んできました。
さて、今回はこのRC0を使用して、SQL Server 2012から追加されるカラムストアインデックス(列ストアインデックス)を試してみることにしました。 カラムストアインデックスはインデックスに含まれる列のデータを列単位でページに格納する様にすることで、効率的なデータの格納を実現しパフォーマンスを向上させる技術の様です。
-------------------------------------------------------------------------- CREATE NONCLUSTERED INDEX IX_RetailTransaction_1 ON RetailTransaction(GoodsCode) --------------------------------------------------------------------------
-------------------------------------------------------------------------- CREATE NONCLUSTERED INDEX IX_RetailTransaction_1 ON RetailTransaction(GoodsCode) INCLUDE(ItemCount,Amount) --------------------------------------------------------------------------
-------------------------------------------------------------------------- CREATE NONCLUSTERED COLUMNSTORE INDEX IX_RetailTransaction_1 ON RetailTransaction(GoodsCode) --------------------------------------------------------------------------
-------------------------------------------------------------------------- CREATE NONCLUSTERED COLUMNSTORE INDEX IX_RetailTransaction_1 ON RetailTransaction(GoodsCode,ItemCount,Amount) --------------------------------------------------------------------------
クエリー実行時に使用可能なメモリ量はサーバー構成オプションの"min memory per query (KB)"、"min server memory (MB)"で決まる最大使用量とリソース ガバナーの"request_max_memory_grant_percent"(既定:25%)の掛け合わせで決まる様ですが、それがカラムストアインデックスを作成するだけの容量が確保されていないとエラーとなる様です。 以下の方法で対処しました。
①サーバー構成オプションの"min memory per query (KB)"、"min server memory (MB)"の設定値を最大値まで拡大します。 -------------------------------------------------------------------------- sp_configure 'show advanced options', 1 GO RECONFIGURE GO sp_configure "min memory per query (KB)",2147483647 GO RECONFIGURE sp_configure "min server memory (MB)",2147483647 GO RECONFIGURE --------------------------------------------------------------------------
②次にリソース ガバナーのdefaultの"request_max_memory_grant_percent"を25%から必要量を確保できる割合に引き上げます。(今回のケースでは30%) -------------------------------------------------------------------------- USE [master] GO ALTER WORKLOAD GROUP [default] WITH(group_max_requests=0, importance=Medium, request_max_cpu_time_sec=0, request_max_memory_grant_percent=30, request_memory_grant_timeout_sec=0, max_dop=0) USING [default] GO --------------------------------------------------------------------------