搜尋此網誌

2014年12月27日 星期六

如何清除交易記錄

參考原文:http://vito-sql.blogspot.tw/2013/07/blog-post_9.html

SQL 資料庫系統的 Log記錄檔,會隨著系統的使用,不停的成長。

在 SQL 2005 前(含),使用 Backup log 來清除(Truncate)交易記錄。

--(1)truncate log in log file
BACKUP LOG [DBName] WITH TRUNCATE_ONLY
 
--(2)compress log file
DBCC SHRINKFILE([DBName_log],2


BACKUP LOG 指令原本是用來備份 log 用的,因為加上了 WITH TRUNCATE_ONLY 選項,
所以不會真正備份記錄檔,只會移除非使用的交易記錄。

DBCC SHRINKFILE 是把實體的Log檔案縮小,可是只要資料繼續異動,Log檔就又會繼續長大。
比較正確的作法,是執行 LOG 備份時,加上 WITH NO_LOG 選項以便同時清除Log內容。
這樣子,在清除Log後,雖然Log檔案大小不變,但內容是空的,可提供資料異動時的Log使用。
1
2
3
BACKUP LOG TestDB_Log WITH NO_LOG;

在 SQL 2008 環境下,上述用法已被停用,須改用「復原模式」為「簡單」來清空交易記錄。

--1) 將資料庫 Northwind 切換為「簡單復原模式」,便會自動截斷交易記錄。
ALTER DATABASE TestDB SET RECOVERY SIMPLE  
 
--2) 壓縮交易記錄檔
DBCC SHRINKFILE(TestDB_Log, 2)
 
--3) 若要使用備份交易記錄檔(*.ldf),再將資料庫 Northwind 切換回「完整復原模式」
ALTER DATABASE TestDB SET RECOVERY FULL  


2014年12月15日 星期一

2014年12月4日 星期四

Windows Server Time Sync

Create a .bat
Include:

w32tm /config /update /manualpeerlist:time.windows.com
w32tm /resync



可用來校正時間的伺服器很多, 可以試下面的看看.
time.windows.com
nist1-ny.glassey.com
utcnist.colorado.edu
time.nist.gov
time-a.nist.gov
time-b.nist.gov

2014年11月17日 星期一

5 Call Center Tech Trends That Have Become Mainstream in 2014

Source:http://customerthink.com/5-call-center-tech-trends-that-have-become-mainstream-in-2014/

5 Call Center Tech Trends That Have Become Mainstream in 2014

By  on Sep 15, 2014 Editor's Pick No Comments

Customer service has always been the competitive battleground for businesses.
That’s why all call centers are always on the lookout for new methods to create a more effective customer experience strategy.
With the emergence of new technologies and channels, this year brought an across-the-board opportunity for call center operators to boost their game.
As we come close to the last quarter of 2014, let us have a quick look at the five critical tech trends that came on the scene this year and are continuously driving changes in the call center landscape.

2014年11月16日 星期日

Google Chrome Temporary Internet Files & Folders

Windows Vista: C:\Users\[USERNAME]\AppData\Local\Google\Chrome\ 

Windows XP: C:\Documents and Settings\[USERNAME]\Local Settings\Application Data\Google\Chrome\ 

Windows 7/8C:\Users\[USERNAME]\AppData\Local\Google\Chrome\User Data\Default\Cache

Mac OS X: /Users/[USERNAME]/Library/Caches/Google/Chrome/

2014年10月10日 星期五

修正 xrdp 畫面空白問題

學習筆記: 以下以 Lubuntu IMAGE for BananaPI 為例:

bananapi/bananapi
&
root/bananapi

===========================================================
修改 BananaPi 開機解析度
===========================================================
用 Windows 修改 SD 記憶卡裡的 uEnv.txt
去除 EDID 字眼

Make sure you disable EDID in the uEnv.txt...

The screen output-mode field should look sth like :
disp.screen0_output_mode=1280x720p50

instead of
disp.screen0_output_mode=EDID:1280x720p50

完成。


===========================================================
ubuntu下要怎麼在 command mode中連線無線網路
===========================================================

sudo iwconfig  <--查看無線網卡的編號
sudo iwlist scan  <--看目前AP的資訊
sudo iwconfig eth1 "ssap"   <--設定網卡要連的AP名稱
sudo dhclient  <--取得IP

完成。


===========================================================
修正 xrdp 畫面空白問題
===========================================================

首先
cd /etc/xrdp/
cp startwm.sh startwm.sh.bak
vi /etc/xrdp/startwm.sh

第一行加入
echo "lxsession -s Lubuntu -e LXDE" > .xsession

重新啟動 xrdp
sudo service xrdp restart


完成。



===========================================================
Banana Pi - Lubuntu - 擴展 root 分割區
===========================================================

目前的硬碟分割狀態
$ df -h

使用 fdisk 指令來列出硬碟的分割狀態及分割硬碟
$ sudo fdisk -l

分割硬碟
$ sudo fdisk /dev/mmcblk0

d 2 n p 2 enter enter

輸入 p 觀看硬碟分割的狀態
輸入 wq 儲存磁碟分割並離開

重新開機
$ sudo reboot

使用 resize2fs 調整分割區大小
$ sudo resize2fs /dev/mmcblk0p2

重新輸入 df -h 來查驗
$ df -h

最後在 GUI 底下
執行 偏好設定 / Disks 程式

完成。

搜尋此網誌