c**t 发帖数: 2744 | 1 我有这么一段代码:
const string CONNECTION_STRING = "Data Source=Some_TNSName;User Id=XX;Passwo
rd=XXX;";
using( OracleConnection conn = new OracleConnection(CONNECTION_STRING) )
{
using(OracleCommand cmd = conn.CreateCommand() )
{
conn.Open();
cmd.CommandText = "SchemaName.PackageName.ProcedureName";
cmd.CommandType = OracleCommandType.StoredProcedure;
cmd.ExecuteNonQuery();
conn.Close();
}
}
这个sp在SQLPLUS下运行8分钟左右;但是在.net中就死在cmd.ExecuteNonQuery(),数小
时不r |
a9 发帖数: 21638 | 2 cmd.Expire....Time = 0
???
Passwo
【在 c**t 的大作中提到】 : 我有这么一段代码: : const string CONNECTION_STRING = "Data Source=Some_TNSName;User Id=XX;Passwo : rd=XXX;"; : using( OracleConnection conn = new OracleConnection(CONNECTION_STRING) ) : { : using(OracleCommand cmd = conn.CreateCommand() ) : { : conn.Open(); : cmd.CommandText = "SchemaName.PackageName.ProcedureName"; : cmd.CommandType = OracleCommandType.StoredProcedure;
|
c**t 发帖数: 2744 | 3 set cmd.CommandTimeout, set Connection Timeout in connection string, didn't
help.
cmd.Expire....Time = 0
???
Passwo
【在 a9 的大作中提到】 : cmd.Expire....Time = 0 : ??? : : Passwo
|
a9 发帖数: 21638 | 4 你这个存储过程是没有参数的吧?
如果有参数,看看参数类型是不是对了。比如varchar和nvarchar什么的。
这是我在sqlserver里的经验,有时候参数类型不对,就会搞的巨慢巨慢的。
t
【在 c**t 的大作中提到】 : set cmd.CommandTimeout, set Connection Timeout in connection string, didn't : help. : : cmd.Expire....Time = 0 : ??? : Passwo
|
B*****g 发帖数: 34098 | 5 set pooling to false?
t
【在 c**t 的大作中提到】 : set cmd.CommandTimeout, set Connection Timeout in connection string, didn't : help. : : cmd.Expire....Time = 0 : ??? : Passwo
|