1、 遇到不想回答的問題 :直視對方的眼睛 ,微笑、沈默 。
2、走路抬頭挺胸,心情不好時,不想跟人招呼,點頭微笑,逕直走過 。
3、請記得 :好朋友的定義是,你混的好,
他打心眼裡為你開心,你混的不好,他由衷的為你著急 。
4、做自己的決定 ,然後準備好承擔後果 。
從一開始就提醒自己 ,世上沒有後悔藥吃, 而我永遠有個 B計劃。
5、自己分內的事情 ,努力做到一百分 。
6、接受自己不過是個"小小的我" ,但眼裡要能夠悅納"大大的世界" 。
7、如果你真的喜歡一個人,就給他自由。
如果他能回到你身邊,他就是你的,如果他沒有回來,那他也永遠不屬於你。
8 、不要試圖給自己找任何藉口,錯誤面前沒人愛聽那些藉口。
9 、不要隨意發脾氣,誰都不欠你的 。
10 、不說謊話 ,因為總有被拆穿的一天。
11 、別低估任何人。
12 、你沒那麼多觀眾 ,別那麼累 。
13、 過去的事情可以不忘記 ,但一定要放下。
14 、別人說的記在腦袋裡,而自己的, 則放在心裡。
15 、社會是有等級的, 很多事不公平, 別抱怨 ,因為沒有用 。
16 、你永遠沒有你自己想像中那麼重要 。
17 、錢能解決的問題統統不叫問題。
18 、無論何時說"我愛你",請真心實意, 無論何時說"對不起", 請看著對方的眼睛。
19、 永遠不要以貌取人,慢慢地說,但要迅速地想。
20 、找點時間,單獨呆會兒 。
21、 不是自己的東西不要 ,就是再喜歡也不行 ,要懂得放棄 。
22、不要覺得是生活虧欠了你 ,其實是我做的努力不夠 。
23、努力向前,再努力向前,再努力一下下,願望就會實現 !
24、永遠沒有堅持到底的失敗,也不會有半途而廢的成功。
25、三人行必有我師,沒有人會比你弱,好學、上進的心態。
多問問自己:"我努力了沒有?"。
2010/10/13
2010/01/11
2009/09/17
2009/07/14
Dealing with a large transaction log file
Transaction log principles
Whenever a data update is made entries are added to the transaction log.
It is not possible to prevent this as it is part of the way sql server maintains integrity - particularly during recovery.
The transaction log is a circular file i.e. when the end is reached any free entries at the start will be used.
This means that all being well the file will stay at a constant size as the current entry cycles round.
The system maintains the MinLSN which is a pointer to the first active log record.
Any log records before this (in the circular file) are free.
The MinLSN will be prevented from moving forward by any open transactions - i.e. the oldest open transaction entry will be >= the MinLSN.
The MinLSN is updated at checkpoint so committing a transaction will not immediately free entries and anything that holds up the checkpoint can cause problems.
If the database is in simple recovery mode all entries prior to the MinLSN will be freed at checkpoint.
If the database is in full recovery mode (and a full backup has been taken) the entries prior to the MinLSN will only be freed by a transaction log backup (not full backup).
Common cause of large transaction log file (.ldf)
Unfortunately the sql server default (except local editions) leaves the databases in full recovery mode.
This menas that if no action is taken no tr log entries will be freed and the log file will eventally fill the disk and crash the system.
The SQL Server installation process is very simple and commonly carried out by inexperienced personel. This will appear to work happily but cause problems later.
I would recommend always setting the model database to simple recovery mode to set the default for new databases.
Stopping the transaction log file (.ldf) from growing
If the log file has grown do to being in full recovery mode then set it to simple before going any further. This should immediately stop the log from growing.
Enterprise manager
Right click on the database, properties, Options, set model to simple, OK.
t-sql
sp_dboption [dbname], 'trunc. log on chkpt.', 'true'
Shrinking the transaction log file (.ldf)
Before this make sure there are free entries by setting the recovery model to simple or backing up the log.
Enterprise manager
Right click on the database, All tasks, Shrink database, Files, Select log file, OK.
t-sql
dbcc shrinkfile ([db_log_name])
Here [db_log_name] is the logical name of the log file as found from sp_helpdb or the table sysfiles
Shrinking the log file via detach/attach
Always take a full backup before a detach.
Detach the database, delete/rename the log file, attach the database - this will create a minimum size log file.
Note that the log file must be deleted/renamed otherwise it will be re-used even though it is not mentioned in the attach.
Enterprise manager
Right click on the database, All tasks, Detach database, OK.
Delete/rename the disk log file.
Right click on databases, All tasks, Attach database, Select the .mdf file, OK, Yes (to the create new log message).
t-sql
sp_detach_db [dbname]
Delete/rename the disk log file.
sp_attach_single_file_db [dbname], [filename]
where [filename] is the name of the physical data file (.mdf).
[轉貼於這裡]
Whenever a data update is made entries are added to the transaction log.
It is not possible to prevent this as it is part of the way sql server maintains integrity - particularly during recovery.
The transaction log is a circular file i.e. when the end is reached any free entries at the start will be used.
This means that all being well the file will stay at a constant size as the current entry cycles round.
The system maintains the MinLSN which is a pointer to the first active log record.
Any log records before this (in the circular file) are free.
The MinLSN will be prevented from moving forward by any open transactions - i.e. the oldest open transaction entry will be >= the MinLSN.
The MinLSN is updated at checkpoint so committing a transaction will not immediately free entries and anything that holds up the checkpoint can cause problems.
If the database is in simple recovery mode all entries prior to the MinLSN will be freed at checkpoint.
If the database is in full recovery mode (and a full backup has been taken) the entries prior to the MinLSN will only be freed by a transaction log backup (not full backup).
Common cause of large transaction log file (.ldf)
Unfortunately the sql server default (except local editions) leaves the databases in full recovery mode.
This menas that if no action is taken no tr log entries will be freed and the log file will eventally fill the disk and crash the system.
The SQL Server installation process is very simple and commonly carried out by inexperienced personel. This will appear to work happily but cause problems later.
I would recommend always setting the model database to simple recovery mode to set the default for new databases.
Stopping the transaction log file (.ldf) from growing
If the log file has grown do to being in full recovery mode then set it to simple before going any further. This should immediately stop the log from growing.
Enterprise manager
Right click on the database, properties, Options, set model to simple, OK.
t-sql
sp_dboption [dbname], 'trunc. log on chkpt.', 'true'
Shrinking the transaction log file (.ldf)
Before this make sure there are free entries by setting the recovery model to simple or backing up the log.
Enterprise manager
Right click on the database, All tasks, Shrink database, Files, Select log file, OK.
t-sql
dbcc shrinkfile ([db_log_name])
Here [db_log_name] is the logical name of the log file as found from sp_helpdb or the table sysfiles
Shrinking the log file via detach/attach
Always take a full backup before a detach.
Detach the database, delete/rename the log file, attach the database - this will create a minimum size log file.
Note that the log file must be deleted/renamed otherwise it will be re-used even though it is not mentioned in the attach.
Enterprise manager
Right click on the database, All tasks, Detach database, OK.
Delete/rename the disk log file.
Right click on databases, All tasks, Attach database, Select the .mdf file, OK, Yes (to the create new log message).
t-sql
sp_detach_db [dbname]
Delete/rename the disk log file.
sp_attach_single_file_db [dbname], [filename]
where [filename] is the name of the physical data file (.mdf).
[轉貼於這裡]
2009/06/12
2009/04/27
訂閱:
文章 (Atom)
NGINX SSL/設定檔案
#user nobody; worker_processes 1; #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #...
-
Source: Automatically Retry Failed Jobs in Quartz Retrying continuously until success: If you want to keep trying over and over again un...
-
*主餐類 漢堡王炸雞腿-227大卡 華嫩雞條(6PCS)-259大卡 火烤漢堡-311大卡 火烤吉士漢堡-353大卡 小華堡-397大卡 華雪魚-471大卡 雙層吉士漢堡-534大卡 雙層燒烤培根堡-580大卡 華辣雞腿堡-597大卡 華香雞排堡-685大卡...
-
Download source files from here Upload files to the CentOS server Prepare the necessary files #yum -y install gcc gcc-c++ autoconf lib...