用Google的 my map建置好地圖,接著再匯出成KML
https://www.google.com/maps/d/?hl=zh-TW
打開KML檔,把 <Document> 這層節點拿掉
Sapphire Crystal
如果想對SQL作篩選,可將
not like '%fetch%' 換成 like '%user%'就可以找出SQL語句中含有user關鍵字的SQL
原文:
http://blog.csdn.net/silvanus/article/details/8424227
SELECT top 10
(total_elapsed_time / execution_count)/1000 N'平均時間ms'
,total_elapsed_time/1000 N'總花費時間ms'
,total_worker_time/1000 N'所用的CPU總時間ms'
,total_physical_reads N'物理讀取總次數'
,total_logical_reads/execution_count N'每次邏輯讀次數'
,total_logical_reads N'邏輯讀取總次數'
,total_logical_writes N'邏輯寫入總次數'
,execution_count N'執行次數'
,creation_time N'語句編譯時間'
,last_execution_time N'上次執行時間'
,SUBSTRING(
st.text,
(qs.statement_start_offset/2) + 1,
(
(CASE statement_end_offset WHEN -1 THEN DATALENGTH(st.text) ELSE qs.statement_end_offset END - qs.statement_start_offset)/2
) + 1
) N'執行語句'
,qp.query_plan
FROM
sys.dm_exec_query_stats AS qs CROSS APPLY sys.dm_exec_sql_text(qs.sql_handle) st CROSS APPLY sys.dm_exec_query_plan(qs.plan_handle) qp
WHERE
SUBSTRING(
st.text,
(qs.statement_start_offset/2) + 1,
(
(CASE statement_end_offset WHEN -1 THEN DATALENGTH(st.text) ELSE qs.statement_end_offset END - qs.statement_start_offset)/2
) + 1
) not like '%fetch%'
ORDER BY
total_elapsed_time / execution_count DESC;
在開發.Net Core MVC時,因為專案有多個web和api服務依附在iis上做運行,會需要邊跑網頁邊開發,因此常發生project編譯出來的dll被iis咬住,這時候就得手動重啟iis,但等IIS重啟實在太慢了
Severity Code Description Project File Line Suppression State
Error MSB3027 Could not copy "******\bin\Debug\net6.0\******.dll" to "bin\Debug\net6.0\*****.dll". Exceeded retry count of 10. Failed. The file is locked by: "IIS Worker Process (6404)" Company C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets\
無法將 "****\bin\Debug\net6.0\****.dll" 複製到 "bin\Debug\net6.0\****.dll"。已超過重試次數 10。失敗。檔案鎖定者: "w3wp.exe (6404)" Company C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets 4967
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(4967,5): error MSB3021: 無法將檔案 "****\bin\Debug\net6.0\****.dll" 複製到 "bin\Debug\net6.0\****.dll"。由於另一個處理序正在使用檔案 'bin\Debug\net6.0\****.dll',所以無法存取該檔案。
這邊提供比較快速的方法
1. 建立一個iisrestart1.bat批次執行檔
指令內容如下
C:\Windows\System32\inetsrv\appcmd.exe recycle apppool /apppool.name:"WebAPIPool"
C:\Windows\System32\inetsrv\appcmd.exe recycle apppool /apppool.name:"XXXwebPool"
2. 針對bat 批次檔建立捷徑,接著在捷徑的"內容"中調整"目標"值
C:\Windows\System32\cmd.exe /C "C:\Users\XXXX\Documents\iisrestart1.bat"
3. 釘選到工作列,即可完成
之後只要執行批次檔就可以快速釋放IIS POOL,進而能順利做編譯,若在DEBUG模式下沒有反應時,則需整個重啟IIS或是砍掉w3wp執行緒
* 指令筆記:
//砍掉所有w3wp執行緒
taskkill /F /IM w3wp.exe /T
//回收指定的IIS Pool
C:\Windows\System32\inetsrv\appcmd.exe recycle apppool /apppool.name:"WebAPIPool"
C:\Windows\System32\inetsrv\appcmd.exe recycle apppool /apppool.name:"XXXwebPool"
檢查server上安裝的.net framework版本
cd C:\Windows\System32
dir %WINDIR%\Microsoft.Net\Framework\v* O-N /B
檢查server上安裝的.net core版本
dotnet --list-sdks
參考 https://docs.microsoft.com/zh-tw/dotnet/core/install/how-to-detect-installed-versions?pivots=os-windows
*在組件中加入DLL參考
*可將DLL檔案轉成bytes 直接加入參考
CREATE ASSEMBLY SQLCom
FROM 0x4D5A900003.................
WITH PERMISSION_SET = SAFE;
DLL to bytes string 參考
https://stackoverflow.com/questions/2885335/clr-sql-assembly-get-the-bytestream
*DLL程式碼
[Microsoft.SqlServer.Server.SqlFunction]
public static string GZip(string rawString)
{
..................
return (string)(Convert.ToBase64String(zippedData));
}
* 於資料新增 擴充的 預存程序
CREATE FUNCTION dbo.GZip(@src nvarchar(MAX))
RETURNS nvarchar(MAX)
EXTERNAL NAME SQLCom.UserDefinedFunctions.GZip
在做異質系統間接時,若是透過WCF連線,此時專案就必須加入服務參考,但開發本機端若因為防火牆因素無法直接連到對方的WCF服務來取的服務參考,但目標機器又無法安裝VS2019開發工具,這時可在目標機器上安裝SDK,並利用svcutil.exe來下指令產生clinet端程式碼
以下兩道指令
svcutil.exe /t:metadata http://******/******/MsgService.svc
svcutil *.wsdl *.xsd /language:cs /out:MsgService.cs /config:app.config
MangoHost Copyright © 2009 Cookiez is Designed by Ipietoon for Free Blogger Template
