2007年7月11日 星期三
Security Exception
今天跑之前寫好的程式,跑到一半,出現下面的錯誤訊息
Security Exception Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's
原因出在asp.net 要寫event log 時,無法寫入。因權限的問題。
最後,執行 regedit, 修改HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog 的權限,讓aspnet 可以完全控制該 registry 以及其下所有的 registry。
這個 registry path 不好記,寫在blog 備忘一下。
大功告成。不過這樣一來,aspnet 帳號就可能破壞我網頁伺服器的 event log 了,,有沒有比較好的方式呢?
2007年7月10日 星期二
無法解析equal to 動作的定序衝突
今天同事問了一個問題。
Declare @tblCUSTADR table
(
[CUST_ID] [char] (6) NOT NULL ,
[Seq] [char] (1) COLLATE Chinese_Taiwan_Stroke_CI_AS NOT NULL,
[Sale_ADR] [nvarchar](60) COLLATE Chinese_Taiwan_Stroke_CI_AS NOT NULL
)
insert into @tblCUSTADR(CUST_ID, Seq, Sale_ADR)
VALUES('A19834', '4', N'台北縣新莊市新泰路號-新杏店')
select t.* from customerAddress address
inner join @tblCUSTADR t on address.SubSeq = t.Seq
inner join Customer on t.CUST_ID = Customer.Cust_ID
結果出現了下面的錯誤訊息。
Msg 446, Level 16, State 9, Line 16
無法解析equal to 動作的定序衝突。
真是受不了,第一次碰到定序的問題。
解法如下:
select * from customerAddress address
inner join @tblCUSTADR t on address.SubSeq COLLATE Chinese_Taiwan_Stroke_CI_AS = t.Seq COLLATE Chinese_Taiwan_Stroke_CI_AS
inner join Customer on t.CUST_ID = Customer.Cust_ID
COLLATE Chinese_Taiwan_Stroke_CI_AS
Declare @tblCUSTADR table
(
[CUST_ID] [char] (6) NOT NULL ,
[Seq] [char] (1) COLLATE Chinese_Taiwan_Stroke_CI_AS NOT NULL,
[Sale_ADR] [nvarchar](60) COLLATE Chinese_Taiwan_Stroke_CI_AS NOT NULL
)
insert into @tblCUSTADR(CUST_ID, Seq, Sale_ADR)
VALUES('A19834', '4', N'台北縣新莊市新泰路號-新杏店')
select t.* from customerAddress address
inner join @tblCUSTADR t on address.SubSeq = t.Seq
inner join Customer on t.CUST_ID = Customer.Cust_ID
結果出現了下面的錯誤訊息。
Msg 446, Level 16, State 9, Line 16
無法解析equal to 動作的定序衝突。
真是受不了,第一次碰到定序的問題。
解法如下:
select * from customerAddress address
inner join @tblCUSTADR t on address.SubSeq COLLATE Chinese_Taiwan_Stroke_CI_AS = t.Seq COLLATE Chinese_Taiwan_Stroke_CI_AS
inner join Customer on t.CUST_ID = Customer.Cust_ID
COLLATE Chinese_Taiwan_Stroke_CI_AS
2007年7月2日 星期一
Publish a web application in vs2005 sp1
when i publish a web application, some file will change.
What kind of rule it obey?
I found that : when publishing an web application, all files newer than target file will be copied and overwrite the target files, even the web.config file.
So, if web want publish a web application to prodution envirment, ALWAYS remeber to backup all the old files, especially the config files.
2007年6月28日 星期四
Lyrics of “Way Back Into Love” — From “Music and Lyrics”
五月時去了一趟日本,去程時在飛機上看了K歌情人。
日文字幕,看不太懂。可是覺的很好看,回程時又看了一遍。
還是很好看。
於是,又租來看一次。
這大概是我在最短時間內看最多次的電影了。
其中的 way back into love 這首歌非常動聽。
於是將找到的歌詞轉貼在此。參考處
I’ve been living with a shadow overhead
I’ve been sleeping with a cloud above my bed
I’ve been lonely for so long
Trapped in the past, I just can’t seem to move on
I’ve been hiding all my hopes and dreams away
Just in case I ever need them again someday
I’ve been setting aside time
To clear a little space in the corners of my mind
All I want to do is find a way back into love
I can’t make it through without a way back into love
Oh oh oh
I’ve been watching but the stars refuse to shine
I’ve been searching but I just don’t see the signs
I know that it’s out there
There’s got to be something for my soul somewhere
I’ve been looking for someone to shed some light
Not just somebody just to get me through the night
I could use some direction
And I’m open to your suggestions
All I want to do is find a way back into love
I can’t make it through without a way back into love
And if I open my heart again
I guess I’m hoping you’ll be there for me in the end
There are moments when I don’t know if it’s real
Or if anybody feels the way I feel
I need inspiration
Not just another negotiation
All I want to do is find a way back into love
I can’t make it through without a way back into love
And if I open my heart to you
I’m hoping you’ll show me what to do
And if you help me to start again
You know that I’ll be there for you in the end
2007年6月20日 星期三
ACID rules for transactions
- Transaction must be Atomic (it is one unit of work and does not dependent on previous and following transactions)
- Consistent (data is either committed or roll back, no “in-between” case where something has been updated and something hasn’t)
- Isolated (no transaction sees the intermediate results of the current transaction)
- Durable (the values persist if the data had been committed even if the system crashes right after).
2007年6月15日 星期五
SQL Server 2005 vs Oracle
這個網站http://www.tpc.org/ 是資料庫系統的競技場。
當然,微軟的 SQL Server 2005 並不是champion
由效能來看,前十名,只有一個是微軟的。第一名是 Oracle 10g R2。但是,看它的規格,天哪! 64 顆 CPU。總造價11,987,716 US $,相當於3,9559,4628 NT,近四億新台幣。這是跑車界中鑽石,是全世界最高等級富豪才需要的「身份表徵」。我們平民等級所需要的,是貨真價實的代步用轎車。
如果由價格/效能比來看,前十名有九名是微軟的產品。看看其硬體規格,會發現這才是符合平常百姓家的等級。
有趣的是第一名的Oracle,其價格/效能比,硬是比2,3,4 名更便宜上近兩成。我覺得是Oracle 特意打造出來的成果,在行銷上有好的交待。
訂閱:
文章 (Atom)