SE の雑記

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

Author Archive

Simple Monitor というツールを細々と作っています

leave a comment

ちょっと、SQL Server や、SQL Database のリソース可視化を行いたかったので、Simple Monitor というツールを細々と作っています。
https://github.com/MasayukiOzawa/SQLServer-Util/tree/master/Simple%20Monitor
Read the rest of this entry »

Written by Masayuki.Ozawa

4月 18th, 2017 at 9:39 am

Windows 10 Creators Update にアップデートした際に FileStream が動作しなくなる現象についての情報

leave a comment

SNS でいくつか情報が上がっていますが、Windows 10 Creators Update にアップデートした環境で、SQL Server の FileStream が動作しないという現象が発生しています。
US の TechNet フォーラムにも同様の現象の情報が上がっています。
Database in recovery pending status
詳細については、FILESTREAM issues with SQL Server on Windows 10 creators update で情報が発信されており、現状の回避策としては、SQL Server のサービスアカウントが管理者権限を持つように設定変更する必要があるようです。

Workaround

Following are some of the workaround identified which will enable you to overcome the above errors on Windows 10 creators update.

  • Change the SQL Server service startup account to built-in account LocalSystem
  • Change the SQL Server service startup account to a domain user account with local admin privileges on the system
  • If you use virtual account [NT SERVICE\MSSQL$InstanceName] as service startup account, please make this account a member of the local administrators group
  • Uninstall Creators Update and fall back to the previous Windows build

The Windows team is working on the fix to prevent this breaking change on FILE_OPEN_IF api. If you have SQL Server installed on Windows 10 with databases using filestream feature, we recommend you defer applying the Windows 10 Creators update until the fix is made available.

We will update the blog post once the fix is made available by Windows team

とのことで、修正をする予定のようですが、4/15 時点では修正プログラムはまだ公開されていませんので、Creators Update の適用は注意する必要があるかと。
Read the rest of this entry »

Written by Masayuki.Ozawa

4月 15th, 2017 at 10:48 am

SQL Server v.Next の 「140」「VSS」 の照合順序を試してみる

leave a comment

SQL Server v.Next では「140」と「_VSS」という照合順序が追加されています。
# Variation selector Sensitive の略でしょうかね。
照合順序と Unicode のサポート を見ていたところ、VSS について記載が追加されていました。

バリエーションの選択を区別する (_VSS)
SQL Server vNext から導入された日本語の照合順序 Japanese_Bushu_Kakusu_140 と Japanese_XJIS_140 で多様な表意文字のバリエーションの選択を区別します。 バリエーションのシーケンスは、基本文字と追加のバリエーションの選択で構成されます。 この _VSS オプションが選択されていない場合、照合順序はバリエーションの選択が区別されず、バリエーションの選択は比較で考慮されません。 つまり、SQL Server では、並べ替えが同じになるように、バリエーションの選択が異なる同じ基本文字に基づいて構築された文字を考慮しています。 「Unicode Ideographic Variation Database」 (Unicode 表意文字のバリエーション データベース) も参照してください。
異体字セレクターを区別する (_VSS) 照合順序は、全文検索インデックスではサポートされていません。 全文検索インデックスでは、アクセントを区別する (_AS)、かなを区別する (_KS)、文字幅を区別する (_WS) オプションのみがサポートされます。 SQL Server XML と CLR のエンジンでは、(_VSS) 異体字セレクターはサポートされていません。

 
異体字セレクターの 基本文字 + 追加のバリエーションの文字が考慮されるとのことですので少し試してみました。
異体字セレクターについては、以下を見るとよさそうです。
 https://msdn.microsoft.com/ja-jp/library/ms143726.aspx
 http://unicode.org/ivd/
 http://www.mirai-ii.co.jp/moji/ivs.html
Read the rest of this entry »

Written by Masayuki.Ozawa

4月 3rd, 2017 at 10:36 pm

Posted in SQL Server

Tagged with ,

Data Factory のコピーアクティブティと SQL Database の BLOB ストレージのファイルロードの組み合わせ

leave a comment

以前、SQL Server v.Next と SQL Database の BLOB ストレージからのローディングの新機能 という投稿を書きましたが、Azure Data Factory と組み合わせてみたいと思います。 Read the rest of this entry »

Written by Masayuki.Ozawa

4月 2nd, 2017 at 10:42 pm

OMS のパフォーマンスカウンターに SQL Server 関連のカウンターを追加するスクリプト

leave a comment

OMS の Log Analytics (ログ解析) では、Windows パフォーマンスカウンターの情報を取得することができます。
Log Analytics での Windows および Linux のパフォーマンス データ ソース Read the rest of this entry »

Written by Masayuki.Ozawa

4月 2nd, 2017 at 12:22 pm

PASS SUMMIT 2016 のセッションから見る SQL Server v.Next のグラフテーブル

leave a comment

SSMS 17.0 RC3 で SQL Server v.Next に接続をすると「グラフテーブル」というテーブルが表示されるようになります。
# SQL Database v12 に接続した場合も「Graph Table」が表示されます。
SQL Server のグラフテーブルは「ノードテーブル」「エッジテーブル」で構成されることが確認でき、構文自体も確認することができます。
image
 

CREATE TABLE dbo.sample_nodetable
(
    c1 int NOT NULL,
    c2 char(10) NULL,
    c3 datetime NULL,
    -- Unique index on $nodeid is required
    INDEX ix_graphid UNIQUE ($nodeid)
)
AS NODE
GO
CREATE TABLE dbo.sample_edgetable
(
    -- Columns are optional for Edge Tables
    --
    c1 int NOT NULL,
    c2 char(10) NULL,
    c3 datetime NULL,
    -- Unique index on $edgeid is required
    INDEX ix_graphid UNIQUE ($edgeid),
    -- indexes on $fromid and $toid support faster lookups
    INDEX ix_fromid ($fromid),
    INDEX ix_toid ($toid)
)
AS EDGE
GO

 
現状、この構文を実行するだけでは、構文エラーとなりグラフテーブルを作成することができないのですが、PASS  SUMMIT 2016 の「What’s New in Azure SQL Database」というセッションで、グラフテーブルについても解説がされていましたので、情報をまとめてみたいと思います。
Read the rest of this entry »

Written by Masayuki.Ozawa

3月 29th, 2017 at 7:25 am

Posted in SQL Server

Tagged with ,

ブロッキングの情報を「blocked process threshold (s)」以外の方法でロギングしてみる

leave a comment

ブロッキングの情報を取得するための方法として「blocked process threshold (s)」を使用する方法がありますが、それ以外の方法の紹介を。 Read the rest of this entry »

Written by Masayuki.Ozawa

3月 26th, 2017 at 9:52 pm

Posted in SQL Server

Tagged with

Batch Mode Adaptive Memory Grant Feedback を試してみる

leave a comment

SQL Server v.Next のプレビューが開始された際に「Adaptive Query Processing」というものを目にしたのですが、「あれ、今どういうステータスなんだっけ」というのが気になったので少し調べてみました。 Read the rest of this entry »

Written by Masayuki.Ozawa

3月 24th, 2017 at 8:21 am

Posted in SQL Server

Tagged with ,

QCon の SQL Server on Linux のセッションが公開されていました

leave a comment

QCon で開催された SQL Server on Linux: Will it Perform or Not? のセッションが公開されているようです。

SQL Server on Linux の内部構造の最新情報となりそうですね。
SQL Server on Linux: How? Introduction の内容が深堀され、最終的な SQLPAL に統合された構成についても触れられています。

Written by Masayuki.Ozawa

3月 24th, 2017 at 12:15 am

Posted in SQL Server

Tagged with ,

非クラスター化列ストアインデックスが設定されているテーブルに対して、ETL でデータ挿入をする際に意識しておきたいと思ったポイント

leave a comment

細かな動作まで見れていないですが、非クラスター化列ストアインデックス付きのテーブルに対して、SSIS で一括ロードを実施していた際に、意識しておいた方がよいかなと思ったポイントをいくつか。
今回は、クラスター化インデックス + 非クラスター化インデックスのテーブルに対して、「フラット ファイル ソース」で読み込んで、「ADO.NET 変換先」でインポートする単純な ETL を使っています。
image
なお、列ストアインデックスについて困ったら Niko Neugebauer  を見るのが鉄板かと。
Read the rest of this entry »

Written by Masayuki.Ozawa

3月 20th, 2017 at 10:51 pm

Posted in SQL Server

Tagged with