Skip to content

Instantly share code, notes, and snippets.

Masayuki Ozawa MasayukiOzawa

Block or report user

Report or block MasayukiOzawa

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View ADR Demo.sql
USE master
GO
ALTER DATABASE gocowboys SET ACCELERATED_DATABASE_RECOVERY = ON
BACKUP DATABASE gocowboys TO DISK=N'NUL'
BACKUP LOG gocowboys TO DISK=N'NUL'
GO
USE gocowboys
GO
View go study_sql.go
package main
import (
"context"
"database/sql"
"encoding/json"
"fmt"
"log"
"os"
"time"
View install 2019 languagepack.ps1
# https://support.microsoft.com/ja-jp/help/4466511/cannot-configure-language-pack-for-windows-server-2019
$lp_uri = "https://software-download.microsoft.com/download/pr/17763.1.180914-1434.rs5_release_SERVERLANGPACKDVD_OEM_MULTI.iso"
Invoke-WebRequest -Uri $lp_uri -OutFile (Join-Path $ENV:temp ($lp_uri -split "/")[-1])
Mount-DiskImage (Join-Path $ENV:temp ($lp_uri -split "/")[-1])
$drive = Get-PSDrive | ? Description -like "*SL1_X64FRE*"
Set-Location ($drive.Name + ":\")
lpksetup.exe /i ja-jp /r /f /s /p ".\x64\langpacks"
View Retrieve backup status of SQLDB.sql
-- バックアップによるスループットの発生の確認
SELECT GETDATE(), instance_name, cntr_value
FROM sys.dm_os_performance_counters
WHERE counter_name LIKE '%Backup%' AND instance_name = '_Total'
-- 完全バックアップの発生タイミングの確認 (完全バックアップが発生すると 値が減る)
SELECT modified_extent_page_count
FROM sys.dm_db_file_space_usage
@MasayukiOzawa
MasayukiOzawa / 00-query.conf
Last active Aug 1, 2018
Elastick Stack + SQL Server
View 00-query.conf
input {
jdbc {
jdbc_driver_library => "/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/mssql-jdbc-6.4.0.jre8.jar"
jdbc_driver_class => "com.microsoft.sqlserver.jdbc.SQLServerDriver"
jdbc_connection_string => "jdbc:sqlserver://192.168.0.7;databaseName=master"
jdbc_user => "<User Id>"
jdbc_password => "<Password>"
schedule => "15 00 * * *"
statement => "exec usp_Get_Cache"
# columns_charset => {"query_hash" => "UTF-8"}
View MCW_List.md
contents Azure services and related products
App modernization - Xamarin
- Web APIs
- PowerApps
- Flow
- Azure Storage
- Azure Search
- Azure Redis
- Azure SQL Database
- Azure Active Directory
- API Management
Azure Blockchain - Blockchain Workbench
- IoT Hub
- Service Bus
- SQL Database
- Key Vault
- Event Grid
- Application Insights
Azure security and management - Azure Automation
- Azure Monitor
- Azure Log Analytics
- Change Tracking
- Update Management
- Security Center
- Service Map
- Application Insights
- Virtual machines
Azure security, privacy, and compliance - Azure Virtual Machines and Networks with Network Security Groups
- Virtual Private Networks (Point to
View gist:ec8ea93f19c67421f4a513c636a4c4db
2004年 : 65,418 円 6件 最高額 : 20,759 円
2005年 : 158,127 円 14件 最高額 : 49,500 円
2006年 : 121,575 円 14件 最高額 : 29,917 円
2007年 : 222,324 円 30件 最高額 : 30,140 円
2008年 : 161,817 円 29件 最高額 : 18,069 円
2009年 : 131,029 円 34件 最高額 : 15,645 円
2010年 : 229,647 円 45件 最高額 : 28,484 円
2011年 : 327,966 円 39件 最高額 : 38,800 円
2012年 : 385,573 円 66件 最高額 : 72,036 円
2013年 : 354,654 円 134件 最高額 : 45,120 円
View OMS + colllectd によるバッチ実行数の取得
Perf
| where Computer == "ubuntu"
| where CounterName contains "Batch"
| sort by TimeGenerated asc nulls last
| extend PrevCounterValue = prev(CounterValue, 1, 0)
| extend PrevTimeGenerated = prev(TimeGenerated, 1, 0)
| extend TimeInterval = case(
PrevCounterValue == 0, toreal(0),
round(datetime_diff("Second", TimeGenerated, PrevTimeGenerated))
)
@MasayukiOzawa
MasayukiOzawa / Deploy-Nami.sh
Last active Oct 12, 2017
Nami+SQL Server on Linux による WordPress の構築
View Deploy-Nami.sh
#!/bin/bash
# Base Script : https://github.com/ProjectNami/sandbox-installer
# Install Package
apt-get update
apt-get install -y \
nginx \
git \
unixodbc-dev \
php7.0-fpm php-pear php-dev
View GPU 版 Tensorflow のテスト用クエリ.sql
exec sp_execute_external_script @language =N'Python',
@script=N'
from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets("MNIST_data", one_hot=True)
import tensorflow as tf
sess = tf.InteractiveSession()
x = tf.placeholder(tf.float32, shape=[None, 784])
You can’t perform that action at this time.