搜尋此網誌

顯示具有 Oracle 標籤的文章。 顯示所有文章
顯示具有 Oracle 標籤的文章。 顯示所有文章

2016-08-04

TransactionScope

0 意見
EF6新增Database.BeginTransaction()
Working with Transactions (EF6 Onwards)
Entity Framework (EF) TransactionScope vs Database.BeginTransaction
Transaction Support in Entity Framework 6
What's the point of an explicit database transaction in Entity Framework 6?




使用前必需詳閱說明:
使用交易範圍實作隱含交易
根據預設,交易會在隔離等級設為 Serializable 時執行。在讀取頻繁的系統上,常常會選取使用 Serializable 以外的隔離等級。

11.TRANSACTION ISOLATION LEVEL *****
All About TransactionScope *****
What is default IsolationLevel for TransactionScope?
.NET TransactionScope and its default Transaction Isolation level issue

Transactions and Connections in Entity Framework 4.0 *****

using new TransactionScope() Considered Harmful *****

Why is System.Transactions TransactionScope default Isolationlevel Serializable

Deadlocks w/Entity Framework - how to rerun the transaction?
Quote from Ladislav Mrnka:
Default isolation level for TransactionScope is serializable which is the most restrictive level for transaction (= causes deadlock more often). You should start by using Read committed isolation level (but you must ensure that same data are not read multiple times from the database during a transaction) to reduce database locking but it will most probably doesn't solve the problem (it can reduce the frequency)


目前用法:
using (var ts = new TransactionScope(TransactionScopeOption.Required, 
     new TransactionOptions { IsolationLevel = IsolationLevel.ReadCommitted }))
{
     //TODO
     ts.Complete();
}




TimeOut 預設1分鐘,最大10分鐘。
All About TransactionScope *****
using new TransactionScope() Considered Harmful ***
Changing TransactionScope - Timeout at runtime
Transaction scope timeout on 10 minutes
Transactionscope timeout max is only 10 mins




Introducing System.Transactions in the .NET Framework 2.0

確保交易的新利器(TransactionScope)初體驗
KB-.NET 2.0 分散式交易新利器---TransactionScope
TransactionScope與COMMIT TRAN

.NET分散式交易程式開發FAQ
多重TransactionScope與TransactionScopeOption


Nesting Transactions with a Single SQL Server Database

[IIS] 啟用Microsoft 分散式交易協調器(MSDTC)服務




ORA-02089: COMMIT is not allowed in a subordinate session

與目前連接關聯的交易已完成,但尚未處置。必須先處置交易,才能使用連接來執行 SQL 陳述式。
The transaction associated with the current connection has completed but has not been disposed. The transaction must be disposed before the connection can be used to execute SQL statements.
設定timeout

2014-09-16

OracleClient 試圖載入格式錯誤的程式

0 意見
應用程式中發生伺服器錯誤。
無法載入檔案或組件 'System.Data.OracleClient' 或其相依性的其中之一。
試圖載入格式錯誤的程式。
描述: 在執行目前 Web 要求的過程中發生未處理的例外情形。
請檢閱堆疊追蹤以取得錯誤的詳細資訊,以及在程式碼中產生的位置。

例外詳細資訊: System.BadImageFormatException: 無法載入檔案或組件 'System.Data.OracleClient' 或其相依性的其中之一。
試圖載入格式錯誤的程式。

原始程式錯誤:

在執行目前 Web 要求期間,產生未處理的例外狀況。如需有關例外狀況來源與位置的資訊,可以使用下列的例外狀況堆疊追蹤取得。

可能的原因,OS是64位元,dll不相容。

解決方式:
把ASP.NET網站設定為x86編譯
把IIS的應用程式集區設定為啟用32位元





試圖載入格式錯誤的程式。 (發生例外狀況於 HRESULT: 0x8007000B)
若是應用程式,目前有試出一個方法:
1.安裝x64的Oracle Client
2.平台目標改為x64 或是 Any CPU + 不勾選 建議使用32位元




Oracle .NET Development Requirements

vs2010發生 "試圖載入格式錯誤的程式" 的錯誤


2014-09-05

Dapper.Net

0 意見
Dapper - a simple object mapper for .Net
Dapper Tutorials & Examples

Dapper - Third Party Library
Dapper.SimpleCRUD

[dapper] + Enterprise Library
[enterprise-library] dapper

Use Dapper.NET ORM in ASP.NET MVC

短小精悍的.NET ORM神器 -- Dapper
Dapper小技巧:以資料表保存集合物件JSON
由 Dapper 傳回 dynamic 物件取得欄位清單

Dapper +Oracle 之 DateTime 注意事項

OracleParameter 型別不符導致 ORA-03111 通訊中斷錯誤

[料理佳餚] Dapper 自定義欄位對應的三種方式

好用的微型 ORM:Dapper
[.NET]輕量又兼具效能的ORM Framework - Dapper
輕型的ORM類Dapper
给力分享新的ORM => Dapper
Dapper的一些BUG的修复和扩展
关于Dapper的一些使用和扩展的例子
A Look at Dapper.NET
Dapper.NET Tutorial
Creating a Data Repository using Dapper: 10 Years of .Net Compressed into Weeks #12
RepositoryWrapper.Dapper



Making Dapper Faster with Transactions
Bulk inserts taking longer than expected using Dapper
how perform batch operation with dapper orm?
SqlBulkCopy for Generic List (useful for Entity Framework & NHibernate)
SqlBulkCopy 類別



Can't get multi-mapping to work in Dapper
Help with Multi-Mapper to create object hierarchy
Is there an equivalent to “NotMapped” for Dapper.Net and the Dapper.Net extensions?
Manually Map column names with class properties

Data Access Extension Method

Building A Dapper Glimpse Plugin
Glimpse 1.7+ with Dapper Profiling
Getting the SQL and Parameters out of Dapper for display in Glimpse

SQL Server Dapper *** Helper class to mitigate working with Dapper against SQL Server database
POCO Generator





Evaluating ORMs for Batch Data Performance
Followup on ORMs for Batch Performance
Fetch performance of various .NET ORM / Data-access frameworks




Dapper – Micro ORM for Oracle and Microsoft .NET read Oracle cursor
OracleDynamicParameters.cs




Kuick Application & ORM Framework

PetaPoco A tiny ORM-ish thing for your POCOs

2014-08-25

ORACLE client & ODP.Net

0 意見
設定環境變數
新增:
ORACLE_HOME = C:\Oracle\32\instantclient_12_1
TNS_ADMIN = %ORACLE_HOME%
LD_LIBRARY_PATH = %ORACLE_HOME%

語系設定(視情況)
NLS_LANG = TRADITIONAL CHINESE_TAIWAN.ZHT16BIG5
或
NLS_LANG = TRADITIONAL CHINESE_TAIWAN.AL32UTF8

在PATH增加(不是取代)
;%ORACLE_HOME%

設定SQL Developer時間格式:YYYY-MM-DD HH24:MI:SSXFF TZR

查詢DB設定
SELECT name,value$ FROM sys.props$;
select userenv('language') from dual;
[Oracle]處理中文亂碼 -- NLS_LANG設定

tnsnames.ora






Oracle Database Online Documentation 12c Release 1 (12.1)
SQL and PL/SQL
.NET and Windows Application Development
2 Day Developer's Guide

Oracle Database Online Documentation 11g Release 2 (11.2)
SQL and PL/SQL
.NET and Windows Application Development
2 Day Developer's Guide
2 Day + .NET Developer's Guide for Microsoft Windows

Database Data Access Components Documentation 12c Release 2 (12.1.0.1.2)

SQL Developer Documentation
SQL Developer Data Modeler Documentation






Let It Go吧! System.Data.OracleClient *****

Oracle with .NET

安裝ORACLE client
Oracle 10g Client 安裝設定
[轉]OracleClient on Windows 2008 x64

ORA-12154 : TNS Could not resolve the connect Identifier
在64位元環境上利用SSIS存取Oracle資料

Package Load Failure VS 2008 Architect & 11.1.0.6.20
Copy MSVCR71.dll
from %ORACLE_HOME%\oui\lib\win32
to %ORACLE_HOME%






Oracle Database Instant Client Downloads & Installation
Instant Client Downloads

Oracle Database Client Installation Guide 12c Release 1 (12.1) for Microsoft Windows

Oracle 10/11G Instant Client

Oracle Instant Client安裝
安裝Oracle11g Instant Client結果找不到tnsnames.ora

Oracle Instant Client安裝
InstantClient安裝使用

Windows7x64 Toad 簡易安裝啟動使用






ODP.NET - Oracle Data Provider for .NET

Oracle Data Provider for .NET
Oracle .NET Developer Center
Oracle .NET 开发人员中心

An Easy Drive to .NET


Oracle Developer Tools for Visual Studio FAQ
Tech Article: ODP.NET, Managed Driver
ODP.NET, Managed Driver Introduction
Oracle Schema Compare in Visual Studio
Using Multitenant Container Databases in Visual Studio

ODAC 12c Release 2 (12.1.0.1.2) Installation Instructions, Setup, and Notes






[odp.net]
community Oracle .NET Sample Code

nuget






Connecting to Oracle from C# / Winforms / Asp.net without tnsnames.ora
Using generic database providers with C#
Using the new ODP.Net to access Oracle from C# with simple deployment

What is the minimum client footprint required to connect C# to an Oracle database?
How can i deploy a .Net Application that uses ODAC Without installing the Whole Component to the user ??

ODP.NET upgrade 10G to 11G

Using the Easy Connect Naming Method

.NET and Windows Application Development






Instant ODP.NET Deployment
Deploying ODP.NET with Oracle Instant Client
Oracle Instant Client with ODP.NET
C# 连接Oracle(利用ODP.net,不安装oracle客户端)
如何在 64 位元的 Windows 7 中安裝 PLSQL DEVELOPER 8 和 Oracle 11g x64 Client
Instant Oracle Using C#

【茶包射手日記】OracleClient分散式交易問題兩則
Accessing Oracle database without installing Oracle Client
再论使用Oracle Instant Client连接Oracle
【茶包射手日記】OracleDataReader數字型別對應陷阱(ODP.NET)
讓ODP.NET查詢快10倍的小密技-FetchSize


.NET Oracle Developer的福音——ODP.NET Managed正式推出

[SSIS][Oracle]安裝 Oracle Driver 提供 SSIS 使用






Deploying and Configuring ODP.NET to work without installation with Entity Framework
Does ODP.NET require Oracle Client installation



Petapoco 连接oracle11g 自动生成poco时遇到的问题

2011-07-04

ORA-04062

0 意見
ORA-04062: timestamp (procedure "OWNER.PROCEDURE_NAME" 的) 已變更

若A DB中的PROCEDURE,有使用DB LINK呼叫另一個B DB的PROCEDURE,
當B DB的PROCEDURE有修改時,A DB的PROCEDURE必須要RECOMPILE。