SQL Server提供了Schema Changes History report可以用來追蹤DDL相關資訊。 但是Schema Changes History report的資料是從哪裡來的呢? 首先我啟動SQL Profiler trace然後開啟Schema Changes History report(Management studio->Report->Standard report->Schema Changes History
一般在處理迴圈問題的時候,大家都會選擇Cursor,因為使用起來非常方便,代碼也很好實現,但是使用Cursor肯能會產生效能問題。那麼有什麼好的替代方法嗎?從網上看到的一篇文章很有借鑒意義(ReplacingCursors and While Loops),改寫Cursor效能提高了幾倍. 所以我們在設計代碼的時候可以多考慮考慮是否不用Cursor也可以實現。
為了安裝SCCM 2012,今天將測試資料庫升級到SQL Server 2008 SP3 + CU4, 但是改為連接埠後發現Servcie無法啟動。 從SQL Server errorlog中看到下面的錯誤資訊: Error: 17172, Severity: 16, State: 1.SNIInitialize() failed with error 0x2.SQL Server Audit failed to record the SERVER SHUTDOWN
測試:1.首先建立一張表TESTcreate table test (name int)2.插入兩條資料:insert into test values (1);insert into test values (1);3.對錶啟動移動行ALTERTABLE table ENABLE ROW MOVEMENT;4.刪除表:drop table test5.在資源回收筒查詢表:SHOWRECYCLEBIN;或者SELECTobject_name AS recycle_name,
曾經遇到過一個由於第三方的OLE DB建立的Linked Server 導致SQL Server Crash的案例,最後的解決辦法是修改OLE DB Provider選項“Allow inprocess”。所以解決Linked Server的某些問題還是要知道這些選項的含義。這裡我將這些選項以及解釋列出來,希望能夠對大家有所協助: Provider optionDescriptionDynamicParametersIf nonzero, indicates that the provider
配置好 2012 AlwaysOn High availability Group就想體驗一下在次要資料庫做備份的新功能。在次要伺服器備份,這樣可以減輕主伺服器的負載(非常好的一項改進,以前Databasemirroring次要資料庫是不可以訪問的)。 但是備份的時候卻報錯: Backup databasetesttodisk='c:\test.bak' Msg 3059, Level 16, State 1, Line 2This BACKUP or RESTORE command is
早上同事在安裝程式的時候一直報錯讓我幫忙查一下原因,最後發現是一個網站無法開啟。錯誤判錯如下: 錯誤1:The Web server is configured to not list the contents of thisdirectory. 解決辦法:開啟IIS控制台兵器啟用Directory browsing 錯誤2:Request format is unrecognized. 解決辦法: 找到Web.config檔案,增加下面的資訊: <configuration>
今天使用SSIS製作一個提取Excel的小程式,在Preview Excel資料的時候出現下面的錯誤: There was an error displayingthe preview.ADDITIONAL INFORMATION:Index and length must refer toa location within the string.Parameter name: length (mscorlib) 這個錯誤的原因是Excel Sheet的命名有問題,解決辦法是修改Excel
刪除使用者報錯: Msg 15138, Level16, State 1, Line 1The database principal owns a schemain the database, and cannot be dropped. 解決辦法(SSMS): 1.找到使用者擁有的Schema 2.在Schema中找到db_owner將Schema