由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Database版 - 问个odp.net的问题
相关主题
How to know which database I am connected?Help with Oracle8i Lite
请教一下一个关于SQL SERVER非常基本的问题Interview question about Microsoft Access and SQL. please help
问个sqlserver 2008 concurrent connection的问题retrieving Chinese from database
connection pool 面试题SQL Server 2005: How to hash a column?
connect to an oracle server on anoter machineNeed help on finding dependency objects
Sql developer connection issue如何决定index
问个connection string的问题SQL Server 2005 Exec( )
求救:Connection Pooling 没有close resultset 怎么解决 (转载)如何在数据库中进行复杂查询, 但不把中间结果放到程序内存
相关话题的讨论汇总
话题: string话题: connection话题: passwo话题: using
进入Database版参与讨论
1 (共1页)
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

1 (共1页)
进入Database版参与讨论
相关主题
如何在数据库中进行复杂查询, 但不把中间结果放到程序内存connect to an oracle server on anoter machine
Like 和 equal 啥区别?Sql developer connection issue
测一下你的t-sql 功力问个connection string的问题
SQL 2008 64bit performance issue求救:Connection Pooling 没有close resultset 怎么解决 (转载)
How to know which database I am connected?Help with Oracle8i Lite
请教一下一个关于SQL SERVER非常基本的问题Interview question about Microsoft Access and SQL. please help
问个sqlserver 2008 concurrent connection的问题retrieving Chinese from database
connection pool 面试题SQL Server 2005: How to hash a column?
相关话题的讨论汇总
话题: string话题: connection话题: passwo话题: using