SE の雑記

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

Archive for 10月, 2014

クエリからのバイナリデータのインポート/エクスポート

leave a comment

クエリから SQL Server のバイナリ (varbinary(max)) に対してデータをインポート / エクスポートする際のメモを。

Using OPENROWSET to read large files into SQL Server
Exporting binary file data (images) from SQL via a stored procedure
Exporting Binary Files To The File System

を参考にするとよいかと。

SSIS で実行する場合は以下が参考になるかと。
Import multiple images to SQL Server using SSIS
Export images from a SQL Server Table to a Folder with SSIS
Store Images,Documents,PDF (BLOB) Files Into SQL Server Using SSIS
Retrive Image,Document,PDF (BLOB) Files Stored In SQL Server Tables Using SSIS

Read the rest of this entry »

Written by Masayuki.Ozawa

10月 28th, 2014 at 10:45 pm

Posted in SQL Server

Tagged with

特定のセッションで実行されているクエリが複数スレッドで実行されているかを確認

leave a comment

以下のようなクエリを実行してみます。

DECLARE @tmp char(500)
SELECT @tmp = Col1 FROM [dbo].TempDBTest ORDER BY Col1 DESC OPTION (MAXDOP 0)
GO

 

この時の実行プランは以下のようになります。

image

実行プランからは複数のスレッドによる並列クエリとして実行されていることが確認できます。

実行中のセッションについて、この確認を実行プラン以外から確認する方法を。

Read the rest of this entry »

Written by Masayuki.Ozawa

10月 22nd, 2014 at 11:09 pm

Posted in SQL Server

Tagged with

トランザクションレプリケーションの基本的な仕組み

one comment

トランザクションレプリケーションの基本的な仕組みを調べたことがなかったのでメモとして。
今回はプッシュサブスクリプションを利用しています。
レプリケーションについては、兄貴SQL Server replication overviewSQL Server のレプリケーション から情報を追ってみると良いかと。
Read the rest of this entry »

Written by Masayuki.Ozawa

10月 13th, 2014 at 2:16 pm

Posted in SQL Server

Tagged with

Predictable Performance から見るパフォーマンスレベルに応じたリソースの調整

leave a comment

 ぺんぺん師匠Azure SQL Database Benchmark (ベンチマーク)の詳細説明動画が公開!という記事で紹介されている動画のシリーズで面白いものがあったので、それに倣ってパフォーマンスレベルのリソース調整について少し。

Azure SQL Database for Business-Critical Cloud ApplicationsAzure SQL Database for Business-Critical Cloud Applications: (03) Predictable Performance を参考にさせていただいています。

Read the rest of this entry »

Written by Masayuki.Ozawa

10月 9th, 2014 at 2:39 pm

Posted in SQL Database

Tagged with

sys.resource_stats を使用した Web/Business エディションの移行先検討

one comment

先日、ぺんぺん師匠Azure sql database 入門 2014年10月版
[slideshare id=39862630&doc=azuresqldatabase-141004001720-conversion-gate01]
sys.resource_stats を Web/Business で使用すると、S2 を基準とした使用率を表示してくれるという情報をお話しされていてお~と思ったので試してみました。
# 現状、Web / Business の場合は S2 を基本としているという記載は sys.resource_stats の英語版の情報のみ記載されているようですね。
Azure SQL Database introduces new near real-time performance metrics
Azure SQL Database に新たなほぼリアルタイムのパフォーマンス指標を追加
に書かれていたようなのですが下の方は全く読んでいませんでした。
やはり、SQL Database についてはぺんぺん師匠No.1 にぶん投げるのがよさそうです。
Read the rest of this entry »

Written by Masayuki.Ozawa

10月 8th, 2014 at 7:16 am

Posted in SQL Database

Tagged with