顯示具有 MS-SQL 標籤的文章。 顯示所有文章
顯示具有 MS-SQL 標籤的文章。 顯示所有文章

2019年5月28日 星期二

【MS-SQL】Can't open .trc file generated by SQLDiag

想直接雙擊打開 SQLDiag 錄的 trc 但會碰到

SQL Server Profiler
Failed to open a file. Access is denied.
的錯誤視窗

【MS-SQL】SQLDiag debug

要跑 SQLDiag 的時候發生錯誤,錄完之後沒產生 trc 檔,cmd 有以下錯誤。
\ Error querying installation path for SQLDIAG on . Function result: 2. Message: The system cannot find the file specified.

2018年11月26日 星期一

2018年11月24日 星期六

【MS-SQL】Connection pool

Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached.

2018年11月15日 星期四

【MS-SQL】BACKUP LOG cannot be performed because there is no current database backup

BACKUP LOG cannot be performed because there is no current database backup

不確定是 shrink 還是改 log size 或其他什麼的,突然沒辦法用之前做的 full back 還原。

【MS-SQL】The transaction log for database 'DatabaseName' is full due to 'LOG_BACKUP'

The transaction log for database 'DatabaseName' is full due to 'LOG_BACKUP'

2018年6月8日 星期五

【SQL】SQL Profiler can't edit filter

雖然覺得自己很白癡,但這已經第二次發生了,還是紀錄一下,讓大家笑笑

2017年9月5日 星期二

【SQL】Derived table, Subquery, CTE, Temporary table, Table variable

這篇主要是面試被考到 CTE,但我實際上不只沒寫過,連聽都沒聽過,查了一下發現暫存資料集的眉眉角角比想像的多很多,所以做一下整理,有誤還請指出。

2017年5月27日 星期六

2016年2月1日 星期一

【MS-SQL】An attempt to attach an auto-named database for file ... failed.

EF 嘗試存直接附屬於專案的 mdf 時發生的 inner exception

An attempt to attach an auto-named database for file
D:\\...\\xxx.mdf failed.
A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.

2016年1月30日 星期六

【MS-SQL】The database 'xxx.MDF' cannot be opened because it is version 782.

The database 'xxx.MDF' cannot be opened because it is version 782. This server supports version 706 and earlier. A downgrade path is not supported.

【MS-SQL】System.Data.SqlClient.SqlError: BACKUP LOG cannot be performed because there is no current database backup.

System.Data.SqlClient.SqlError: 無法執行 BACKUP LOG,因為沒有目前的資料庫備份。 (Microsoft.SqlServer.SmoExtended)

2015年9月22日 星期二

【MS-SQL】Batch process by Table-Valued Parameters

Entity Framework 大量 update 時使用 SaveChanges() 會是單筆一次 update 造成效能不彰,這裡參考 Yun-Long Lin 的 solution 是採用 資料表值參數 搭配 預存程式 的方式一次傳遞整個資料集,再於預存程序中進行 update,以降低 IO 需求。

2010年9月2日 星期四