大聲公
- Jul 12 Tue 2011 13:36
安裝vSphere Clinet出現:The Microsoft Visual J# 2.0 Second Edition installer returned error code 4113
- Jul 08 Fri 2011 13:51
換行(line break) in Stored Procedure
想要在SQL SERVER中的Stored Procedure中的輸出有換行的效果,
使用CHAR10 + CHAR13即可,
SET @MSG = @MSG + ' TEST LINE BREAK' + CHAR10 + CHAR13
- Jun 24 Fri 2011 19:07
The EXECUTE permission was denied on the object 'xp_prop_oledb_provider'
展開linked server時,出現下列錯誤訊息:
The EXECUTE permission was denied on the object 'xp_prop_oledb_provider', database 'mssqlsystemresource', schema 'sys'.
Solution:
USE [master]
- Jun 21 Tue 2011 16:54
找出欄位中的重複值
SELECT column_A, column_B FROM db_name GROUP BY column_A, column_B HAVING COUNT(*) > 1
- Jun 21 Tue 2011 10:08
Property Owner is not available for Database '[db_name]'
有一台沒上去看過的db server,因為空間不足,需要去壓縮log file,
但是查看db的Properites時,出現
Property Owner is not available for Database '[db_name]'. This property may not exist for this object, or may not be retrievable due to insufficient access rights.
原因應該是這個db之前設置的owner可能是某人的AD帳號,但是那個人離職了.
- Jun 14 Tue 2011 16:18
SQL SERVER Activity Monitor & Permission
在SQL SERVER 2008 R2要啟動Activity Monitor,
需在Server Name上Right click mouse -> Activity Monitor.
若是要給予某個帳號有執行Activity Monitor的權限,
SSMS UI:
- Jun 13 Mon 2011 18:15
Mirror:Error 1418
建立db mirror時,出現
Error 1418
The server network address "tcp://[server name]:5022" can not be reached or does not exist. Check the network address name and that the ports for the local and remote endpoints are operational.
已經確定principal & mirror兩方都是相同版本的SQL SERVER,
- Jun 13 Mon 2011 14:58
sp_configure CLR ENABLE
CLR(Common Language Runtime)在SQL SERVER上預設沒開啟,
啟用clr enabled選項:
sp_configure 'show advanced options', 1;
GO
RECONFIGURE; --立即變更,不需等到重啟服務
- Jun 09 Thu 2011 19:31
Log Shipping Error:Event ID 14421
Event Viewer一直持續出現:
The log shipping secondary database XXX.YYY has restore threshold of 45 minutes and is out of sync. No restore was performed for 106 minutes. Restored latency is 15 minutes. Check agent log and logshipping monitor information.
Solution:
將secondary database主機上的Windows System DateTime & TimeZone更改成跟primary database主機上的相同,
- Jun 07 Tue 2011 21:12
PHP mail(),信件主旨是亂碼
EX:
$Subject = '親愛的客戶,您好:';
$Subject = '=?UTF-8?B?'.base64_encode($Subject).'?='; //加上這一行