2
剛剛偶然發現了Oracle 10g中提供的新ClientId(aka client_identifier)變量,並且很想將其納入到應用程序中以協助審計跟蹤。如何在企業庫中使用Oracle的ClientId屬性?
應用程序是使用被連接到使用與EntLibContrib的ODP.NET驅動程序生成的企業庫DAAB基於層(netTiers),所以CRUD功能創建Oracle數據庫對象,然後從中檢索
通用的DbCommand對象它看起來像OracleConnection類具有ClientId屬性,那麼到達該模式中的Connection對象的最乾淨的方式是什麼?我應該從每一個創建並設置它的DbCommand中獲取連接嗎?還是那種矯枉過正?
因爲EntLib在幕後做了很多連接管理,所以我不確定是否可以將ClientId設置在CRUD功能之外的某個位置,並期望它能夠保留下來?
我不明白爲什麼你不能只抓的連接並更新從DbCommand對象的ClientId屬性。雖然有沒有可以直接訪問DbConnection對象的地方?除非EntLib用ClientId(我懷疑)做了什麼事情,否則它將持續用於連接會話的剩餘部分。 – mservidio 2011-04-29 19:06:42