Skip to content

Instantly share code, notes, and snippets.

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
$cred = Get-Credential
$Node = @("10.200.0.6", "10.200.0.7", "10.200.0.9")
$script = {
if((Get-WindowsFeature -Name Failover-Clustering).InstallState -ne "Installed"){
Install-WindowsFeature -Name Failover-Clustering -IncludeManagementTools
}else{
Write-Output "Failover-Clustering Feature has Installed"
}
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
package main
import (
"context"
"database/sql"
"encoding/json"
"fmt"
"log"
"os"
"time"
# 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"
-- バックアップによるスループットの発生の確認
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 August 1, 2018 14:04
Elastick Stack + SQL Server
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"}
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 円
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 October 12, 2017 05:24
Nami+SQL Server on Linux による WordPress の構築
#!/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