SE の雑記

SQL Server の情報をメインに Microsoft 製品の勉強内容を日々投稿

Windows Server 2012 R2 の Dynamic Witness を 2012 と比較しながら確認してみる

leave a comment

Windows Server 2012 R2 では WSFC (Windows Server Failover Clustering) の機能が強化されています。
What’s New in Failover Clustering in Windows Server 2012 R2

この追加された機能の中に Dynamic witness というものがあります。

MCTの憂鬱 さんの 動的なクォーラム監視に関してWindows Server 2012 R2 Preview & System Center 2012 R2 Preview 評価ガイドWSFC’s Dynamic Witness in Windows Server 2012 R2 で解説がされていますが、自分のメモとして少しまとめてみたいと思います。

Read the rest of this entry »

Written by Masayuki.Ozawa

7月 28th, 2013 at 12:58 pm

Windows 8.1 / Windows Server 2012 R2 Preview の評価ドキュメント

leave a comment

Windows 8.1 / Windows Server 2012 R2 Preview をまだあまり触れていないのですが、これから触ろうとした際の評価用ドキュメントをメモとして。

Read the rest of this entry »

Written by Masayuki.Ozawa

7月 27th, 2013 at 3:01 pm

いちからはじめる Memory Optimized Table その 7

leave a comment

Memory Optimized Table にはいくつかの制限があります。
今回はその制限について少しまとめてみたいと思います。

BOL には SQL Server Support for In-Memory OLTP にまとめられています。

Read the rest of this entry »

Written by Masayuki.Ozawa

7月 22nd, 2013 at 6:47 am

Posted in SQL Server

Tagged with ,

いちからはじめる Memory Optimized Table その 6

leave a comment

ここまで Memory Optimized Table について数回書いてきました。
ここで一度 Memory Optimized Table のデータストレージの基本構成をまとめてみたいと思います。

Memory Optimized Table の構成を理解するためには以下のポイントを押させておく必要がありそうです。

  • メモリ上のデータ構成
  • チェックポイントファイルのデータ構成

Read the rest of this entry »

Written by Masayuki.Ozawa

7月 21st, 2013 at 1:09 pm

Posted in SQL Server

Tagged with ,

SQL Server のセキュリティを調査するためのサンプルクエリ

leave a comment

クラウドで提供されている SQL Server の権限周りを調べたくていくつかのサンプルクエリを作ってみました。

Read the rest of this entry »

Written by Masayuki.Ozawa

7月 20th, 2013 at 1:09 pm

Posted in SQL Server

Tagged with

デッドロックのサンプルクエリ

2 comments

デッドロックのテストをする際のサンプルクエリなどを。

BOL では、デッドロック を確認するとよいかと思います。
第 3 章 トランザクション分離レベルの選択とデッドロックの問題~ SQL Server 2000 における Web アプリケーション開発 ~  も参考になります。

今回は以下のデッドロックを発生させるためのサンプルクエリとなっています。

  • サイクルデッドロック
  • 変換デッドロック
  • インデックス間デッドロック

Read the rest of this entry »

Written by Masayuki.Ozawa

7月 15th, 2013 at 3:35 pm

Posted in SQL Server

Tagged with

ロックリソースを取得する仮想列

leave a comment

The Curious Case of the Dubious Deadlock and the Not So Logical Lock  や Undocumented Virtual Column: %%lockres% を見て初めて知りました。

Read the rest of this entry »

Written by Masayuki.Ozawa

7月 14th, 2013 at 7:54 pm

Posted in SQL Server

Tagged with

いちからはじめる Memory Optimized Table その 5

leave a comment

Memory Optimized Table のメモリ上ですが通常のデータベースページとは異なる領域として取得がされるようです。

以下は 900MB 程度のデータを Memory Optimized Table に格納した際のメモリの利用状態を SQL Server:Memory Manager から取得したものになります。
image

Read the rest of this entry »

Written by Masayuki.Ozawa

7月 11th, 2013 at 11:52 pm

Posted in SQL Server

Tagged with ,

いちからはじめる Memory Optimized Table その 4

leave a comment

Memory Optimized Table のデータの実体はメモリ上に配置されることになります。
データの永続性の指定として DULABILITY = SCHEMA_ONLY / SCHEMA_AND_DATA を設定し、永続化をするかを指定することになります。

Read the rest of this entry »

Written by Masayuki.Ozawa

7月 11th, 2013 at 8:58 am

Posted in SQL Server

Tagged with ,

いちからはじめる Memory Optimized Table その 3

leave a comment

Memory Optimized Table を作成する際には以下のようなクエリでテーブルを作成します。
# CREATE TABLE のサンプルは Creating a Memory Optimized Table に記載されています。

CREATE TABLE MemTable
(
Col1 int NOT NULL,
Col2 nchar(450) COLLATE Japanese_XJIS_100_BIN2 NOT NULL INDEX NCIX_MemTable_col2 HASH (Col2) WITH (BUCKET_COUNT = 1024),
Col3 int,
CONSTRAINT PK_MemTable PRIMARY KEY NONCLUSTERED HASH (Col1) WITH (BUCKET_COUNT = 100)
) WITH (MEMORY_OPTIMIZED = ON, DURABILITY = SCHEMA_AND_DATA)
GO

Memory Optimized Table を使用するためには WITH 句 で指定をする必要があります。
Read the rest of this entry »

Written by Masayuki.Ozawa

7月 10th, 2013 at 11:40 pm

Posted in SQL Server

Tagged with ,